> I am having problems with MS getting rid of MS J++... I have a large
> application that uses MS J++ code as a back-end data retrieval mechanism
[quoted text clipped - 6 lines]
> could create.
> Thanks,
I did this and I had to add _dispatch to my classes that I was calling in
VB6.0 (I'm not sure why I need to add _dispatch, but that is the way it was
listed in the Object Browser.)
I'm now running into the problem:
"Function or interface marked as restricted, or the function uses an
Automation type not supported in Visual Basic"
on the following line of code, which worked fine with my VB compiled code.
rainfall = dataProcessor.getRainfallDouble(ru)
Previous in the code this was called:
ru = dataProcessor.hexAddrToRegionUnit(adoElementsRS!WxStation)
The declaration for getRainfallDouble looks like:
public double getRainfallDouble(int[] rgnunit)
The declaration for the hexAddrToRegionUnits looks like:
public int[] hexAddrToRegionUnit(String HexAddr)
I tried passing ru as a variant and an integer array and neither way will
the code compile. It worked fine in VJ++, what's the difference between the
using the Com Interop and VJ++?
Thanks,
Eric
> > I am having problems with MS getting rid of MS J++... I have a large
> > application that uses MS J++ code as a back-end data retrieval mechanism
[quoted text clipped - 16 lines]
>
> David
David Browne - 26 Mar 2004 17:30 GMT
> I did this and I had to add _dispatch to my classes that I was calling in
> VB6.0 (I'm not sure why I need to add _dispatch, but that is the way it was
[quoted text clipped - 20 lines]
> Thanks,
> Eric
VJ++ was as COM language J# has a completely different type system. COM
interop is a large and tricky subject, plus you are working across 2
different languages. So here's a suggestion to bypass a lot of the
marshalling and signature headache you're facing.
Write a wrapper DLL in VB6 which supplies your interface. Just stub out the
implementations. Then run that VB6 project throught the DOT.NET upgrade
wizard. The wizard should handle all of your marshaling troubles. Then in
your VB.NET library you can access your J# library.
David