06-05-2006 03:36 PM
06-05-2006 06:17 PM
06-06-2006 08:29 AM
06-06-2006 09:06 AM
Hi ysh,
Do you receive this error when you call just this individual method or any method associated with your dll? I have attached a example program that calls a VB DLL from TestStand. You just need to register the DLL with Windows. If this example works for you, then we can determine that there is an issue with your DLL and not TestStand.
Let me know what happens!
Hope this helps!
Best Regards,
06-06-2006 09:38 AM
Jonathan,
I only get this error when I call this particular kind of method. Other methods work fine. I don't get an error when my method returns a reference to an object. I only get the error when my method returns a reference to an interface. Here is a prototype of the method that is causing troubles:
Public Property Get Item() As ImyInterface
The dll was written in VB 6.0.
I've tried running your example and I get the error: "Create New Object" in automation call failed. Class not registered. It occurs at the first step.
06-06-2006 09:45 AM
Hi ysh,
You have to register the dll first before running the sequence. Refer to this link for that. Is it possible for you to post a small snippet of code that replicates the issue so I can try and reproduce your behavior here? Thanks
Best Regards,
06-06-2006 10:34 AM
06-06-2006 02:59 PM
Hi ysh,
I had R&D look at your code with me and it appears to be something in your code that is incorrect. We tested out your DLL in both TestStand and LabVIEW and got the same "Object variable or With block variable not set" message. We even tested that code in Visual Basic itself using the syntax
Private Sub Form_Load()
Dim x As New clsCallClass
Dim y As ImyInterface
y = x.Item
End Sub
Therefore you will need to refer to some Visual Basic documentation to see why the error occurs. This msdn document talks about this concept.
Hope this helps!
Best Regards,
06-06-2006 03:06 PM
06-06-2006 03:10 PM
Hi ysh,
I am sorry but we still get that same error when we create a new project that is for an exe, add the code you mentioned to our form code, add the reference to the dll created by your project, and then run it. We get the same error in several different environments.
Best Regards,