I am working on a project where I have to import a DLL file into a VB project that was created a few years back. The DLL was created in C++, and looks like:
void CoordinateConversionService::convert( SourceOrTarget::Enum sourceDirection, SourceOrTarget::Enum targetDirection, CoordinateTuple* sourceCoordinates, Accuracy* sourceAccuracy, CoordinateTuple& targetCoordinates, Accuracy& targetAccuracy )
I am an intern at my job, and I haven't had to use this yet, so my understanding is extremely limited, along with my usage of VB (I'm a C++/C# guy). Here are a few questions:
1) Looking at Dllimport, it seems like the last part outside of the parameters is a return type. Example code from another site:
<DllImport("advapi32.dll")> _
Public Function GetUserName( _
ByVal lpBuffer As StringBuilder, _
ByRef nSize As Integer) As Boolean
Is "As Boolean" the return type? If so, I tried using "Sub" and it says "Keyword does not name a type." Hence why I looked into declare, because it seems I CAN return void/sub as a return type.
2) Trying to use the types "CoordinateTuple" and "Accuracy" give me problems, saying that they aren't defined. How do I get around this since I don't think I can really define them, and what about the fact that they're pointers? Also - I cannot modify the C++ code in any way, so what I have is what I have.