|
-
Mar 9th, 2006, 05:02 AM
#1
Thread Starter
New Member
VB6 Fuction call to DLL - invalid property or method
HI, I am having a problem passing a parameter from an EXE to a dll. If I pass a basic type then it works OK, such as string, Long,etc. However. I have created a new type. If I pass the parameters withing the same project it works OK but when I try to do it to a DLL then I get the error
Code call looks like this
Private oServer As pServer.c_Main
Private Sub cmdStartServer_Click()
Set oServer = New pServer.c_Main
oServer.StartServer
End Sub
Private Sub Command1_Click()
Dim newAlarm As c_Alarm_T
Set newAlarm = New c_Alarm_T
newAlarm.notificationId = "12345"
oServer.push_Alarm (newAlarm)
End Sub
I get the run-time error 438. Object doesn't support this property or method. Any help greatly appreciated.
-
Mar 20th, 2006, 06:33 AM
#2
Frenzied Member
Re: VB6 Fuction call to DLL - invalid property or method
Sounds like an IID issue. Recompile the DLL with Binary Compatibility set to ON.
What it sounds like is inside the development environment VB will (behind the scenes) create temporary UUID,IID, and GUIDS to get you going. Once you try to use the compiled version you are using the registry (in some cases) to look up how to bind, and marshal too and from the object.
If the interface definition/specification, and it's subsequent 'tags' mismatch in any way, then errors will be raised.
In this case it sounds like you've added a method, or changed a method signature with recompiling with binary compatibility set.
"As far as the laws of mathematics refer to reality, they are not certain; and as far as they are certain, they do not refer to reality." - Albert Einstein
It's turtles! And it's all the way down
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|