Link to home
Start Free TrialLog in
Avatar of Tim Turner
Tim TurnerFlag for United States of America

asked on

Runtime error 32797 related to using an object from a compiled DLL

Hello,
I have a DLL created from some compiled classes.
I instantiate the Object but when I try to assign a value to one of the properties... I get a runtime error 32797
"Application-defined or object-defined error"


Dim soapInvestorReq As New InvestorInfoRequest

soapInvestorReq.AuthInfo.FIID = 22  <-- barfs on any assignment on any property of the object...

Am I instantiating/creating the object wrong?  Or is this a problem with the DLL?

Please advise.  500 points for help.  Thank you.
Avatar of nffvrxqgrcfqvvc
nffvrxqgrcfqvvc

This sounds like a DLL thats not registered correctly or you have the wrong GUID. Causing compatability issues. I would suggest  un-registering the DLL's and changing the compatability to "no compatibility" and re-compile the DLL's
ASKER CERTIFIED SOLUTION
Avatar of Muhammad Khan
Muhammad Khan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Also, I would suggest you to test the dlll with a sample program before compiling it into .dll, as such errors can then be trapped using the Visual basic debugger.
Break up the declaration into 2 statements: the Dim and the Set.
Now if there is a problem creating the object, it will barf at the Set .. New line.

Dim soapInvestorReq As InvestorInfoRequest
Set soapInvestorReq = New InvestorInfoRequest

soapInvestorReq.AuthInfo.FIID = 22
Avatar of Tim Turner

ASKER

The problem was indeed that I needed to break it up into 2 steps...

Dim soapInvestorReq As InvestorInfoRequest

Set soapInvestorReq = New InvestorInfoRequest