Calling VB6 exe from VB.net2003

Merchand

Well-known member
Joined
Dec 28, 2005
Messages
73
Location
USA Eastcoast
Programming Experience
10+
I have a task to call a few methods/properties in a visual basic 6 .exe from within a VB.net2003 application. I'm invoking the vb6 .exe and setting a property then calling a method based on another property in the .exe. This works good from a vb6 application. However, using com-inter-op and vb.net the property always returns false and never true. And the method call is identified in intellisense but during run-time the method is a object and does not work.

Is com-inter-op that bad or what??? :rolleyes:

Any help is greatly appreciated!
 
OK, one more thing... I can call a method that loads my main vb6 form and starts the vb6 application. The boolean property (read-only) that I have to read is always false and it is suppose to indicate that my vb6 application is active. But never is anything other than false. (vb6 client works).

Also my main problem is that I'm setting this other "String" property to a string value and it is a write-only property from the vb6 .exe. The weird thing is that the property show's up in intellisense, but the return type of the property is not string like it should be, but Intptr in my vb.net code. When I hit this vb.net code in debug the vb6 class object is shown as object so it can't assign the string value I want (Intptr). So basically one out of three things are working in my vb.net code using com-interop, while all three work from a vb6 test application .

Any ideas?
 
Back
Top