[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Dll's registered using regsvr32

Posted on 2004-11-17
9
Medium Priority
?
596 Views
Last Modified: 2011-10-03
Hi,

I have three dll's (written using visual basic) and one exe that make up an application. If the dll's are registered using COM+ they work fine. However, when they are registered using regsvr32 they cannot be accessed (error message 'Object variable or With block variable not set').
The regsvr32 command succeeds and I have searched the registry for the dll's to make sure they are registered, and they are.
Are there any settings on the dll's that I could have missed? I need to be able to register the components using regsvr32 so using COM+ isn't an option.

Thanks,

Louise
0
Comment
Question by:louiserutherford
  • 5
  • 4
9 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12603373
Why don't you use Package & Deployment Wizard to pack your exe?


May be you missing some other dll. Do you use ADO?
0
 

Author Comment

by:louiserutherford
ID: 12603471
I'm not missing any dll's because it works with the dll's registered under COM+.
If I debug the exe I see it go into error when it tries to access one of the methods in the dll.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12603519
Have you set your activex dll and exe in binary compatibility?


From the project property->component tab-> click binary comparibilty

for each project and recompile
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:louiserutherford
ID: 12603574
Yes, all of the dll's are set to binary comatability.

0
 
LVL 26

Accepted Solution

by:
EDDYKT earned 500 total points
ID: 12603681
are you trying to access mtx object inside your dll?
show us some code?
0
 

Author Comment

by:louiserutherford
ID: 12603722
The dll's were set to 'uses transaction' and 'requires transaction'. They will eventually run under COM+ but need to run under regsvr32 until some firewall changes are made. The idea was to re-register the components under COM+ when the changes have been made. All was working fine until I remade the dll's today.

I have tried setting the dll's to 'Not and mtx object' and remade them. It made no difference.

An example of where it goes into error is:

dim obj x as y
set x = createobject("y")
x.method

If goes into error on the call to the method, but compiles without error and the methods all appear automatically after the '.' when editing the code.
0
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12603839
>>All was working fine until I remade the dll's today.


Looks like you lost compatibility. Have you compiled all exe and dll and make sure all are in binary comatability.
0
 

Author Comment

by:louiserutherford
ID: 12604005
I've recompiled all of the dll's and ensured binary compatability is set. I have also recomited the dll's on another machine just in case there was a problem on my machine. It made no difference.

I agree, it looks as it either binary compatability has been lost or the dll's have not been correctly registered.
0
 

Author Comment

by:louiserutherford
ID: 12605271
I have found the problem, I had code in the objectControlActivate() and objectControlDeactivate() methods, which doesn't get executed when the components are not registered under COM+.

Thanks for all your help.

Louise
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question