Dan Vice
2/21/2007 10:37:00 PM
I'm having some issues I hope someone can assist me with.
I have a VB6 application which needs to interact with a VB.NET
assembly (dll). The VB6 application is being developed on a separate
PC from my .NET development PC. I have setup the .NET assembly for
COM interop and have given it a strong name (this is all done with VS
2005). I have also copied the DLL to the C:\windows\assembly folder on
the VB6 PC which adds it to the GAC. When I create an instance of the
dll in VB6:
Global x as Test_Client.Client (this is actually in a Module)
Set x = New Test_Client.Client
and then access a function in the DLL:
If x.TestFunction() = True then....
It all seems to work pretty well. However, I'm seeing some wierd
things when I update the .NET dll, rebuild it, and re-deploy it to the
VB6 machine. Sometimes, my parameters don't show up in the VB6
intellisense. Sometimes, my boolean functions won't give me the
intellisense (True, False) when I enter them into VB6. If I just type
in the boolean value and then run the program, I get an error. I even
tried to add a parameter to a function that already exists. In this
case, the intellisense showed the new parameter, but when I tried to
call it, I got an error about having the wrong number of parameters.
This sounds to me like I'm missing something when I re-deploy the DLL
to the VB6 machine. I tried re-registering the dll:
regasm c:\windows\system32\Test_Client.dll /unregister
regasm c:\windows\system32\Test_Client.dll
But it didn't seem to make any difference. I also tried to re-copy
the dll to the c:\windows\assembly folder, with no luck.
Also (and this also may be a symptom of the same problem), is there a
requirement that parameters must be ByRef??? I had some trouble with
that too...where a ByVal parameter (which was an array of strings)
didn't work, but a ByRef parameter did.
Please help me! I'm pulling my hair out!!! What am I missing?