using c++ 6.0 DLL in VB.Net program, passing user defined Type

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello,
I have an old C++ DLL that I am wishing to use in a VB.NET program.
Previously I had a VB6 program that would pass a Type to a DLL
function. For example, I would pass a variable of this Type in:

Public Type ListInfo ' structure to hold information about the list
file
FileIndex As Integer
filename(MAXNAME) As Byte
FileNum As Integer
FileIcon As Integer
End Type

I am writing a new VB.NET program that will use the same DLL that was
used by the VB6 program, but I have had to update the data type to be a
structure:

Public Structure ListInfo ' structure to hold information about
the list file
Dim FileIndex As Short
Dim filename() As Byte
Dim FileNum As Short
Dim FileIcon As Short
End Structure
'integers made Shorts b/c of Int size change

My DLL does not like the new data type. Does anyone know of a solution?

.



Relevant Pages

  • Re: using c++ 6.0 DLL in VB.Net program, passing user defined Type
    ... Previously I had a VB6 program that would pass a Type to a DLL ... Public Structure ListInfo ' structure to hold information about ... Dim FileIndex As Short ...
    (microsoft.public.dotnet.languages.vb)
  • override file extention in users machine while calling DLL in VB6 program
    ... I have a vb6 program that uses dll that zip and extract ZIP file in the user's machine. ... Sometimes the user gets run time error 429 - activex can't create object, ...
    (microsoft.public.vb.general.discussion)
  • How to call functions in a DLL?
    ... How can I "call" functions in a 3rd-party DLL from my VB6 program? ... __stdcall calling convention. ... need and I know HOW to use them (from working with them in PHP). ...
    (microsoft.public.vb.general.discussion)
  • dll deployment issue
    ... This dll will be called ... Now I need to send the clients the latest version of the VB6 program. ... This means that I now need to deploy this dll on client's machines and ...
    (microsoft.public.dotnet.framework)
  • Re: My.Settings Questions
    ... Dim oValue As Object = Nothing ... Dim bDllConfigLoaded As Boolean = False ... End Namespace ... Not sure how this correlates to using My.Settings between a EXE and DLL? ...
    (microsoft.public.dotnet.languages.vb)