dll marshalling com object

SrVBGuy

New member
Joined
Jul 10, 2008
Messages
2
Programming Experience
10+
I have a 3rd party dll written for .net 2.0. I have written a COM wrapper around this dll so that I can get to it's properties from a VB6 application. The dll is responsible for geocoding an address. When an address is geocoded it has a collection of stringbuilder objects that contain information about the address. Two pieces of that information is the latitude and longitude of the address.

Now when I call the wrapper from a .net application everything works fine. When I call the wrapper from a VB6 application everything works fine 99% of the time. Unfortunately there is a small set of addresses that when geocoded return nothing for the latitude longitude. The programmer of the 3rd party dll says it's probably problems with marshalling. However, if I geocode the address right next to one of the problem addresses the latitude and longitude are fine. I can even enter an invalid address and let the dll get a closest match and it will send back the correct lat and lon for the problem address.

Below is the code from the wrapper dll. If anyone can help I would greatly appreciate it.
 

Attachments

  • source.txt
    13.8 KB · Views: 28
Last edited by a moderator:
Back
Top