C贸mo pasar una imagen de una dll en c++ a un vb
Hola a todos
Es la 5陋 vez que pongo una pregunta aqu铆...y todav铆a conf铆o en que alguien me conteste.
Tengo una DLL hecha en c++ y hay una funci贸n a la que se le pasa n par谩metro WinBitmap por referncia.
bool Cex2Dlg::UpdateCamera3(WinBitmap* &imagen)
Tengo un .def para exportar la DLL:
LIBRARY "ex2Dlg"
EXPORTS
UpdateCamera3
Luego tengo un proyecto para cargar las DLL y poder usarlas en VB:
<DllImport("ex2.dll", EntryPoint:="UpdateCamera3", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function UpdateCamera3(ByRef imagen As Winbitmap) As Boolean
End Function
Ahora, mi problema viene al llamar esta funci贸n desde un proyecto WindowsForm en VB.
Porque al llamar a la funci贸n en VB le paso una imagen de tipo Bitmap, por lo que al ejecutarse la DLL, debe esperar una imagen de tipo WinBitmap y no Bitmap (que es la que te ofrece VB).
Mi problema es ese, c贸mo co*o paso la imagen de la DLL al proyecto VB.
Es la 5陋 vez que pongo una pregunta aqu铆...y todav铆a conf铆o en que alguien me conteste.
Tengo una DLL hecha en c++ y hay una funci贸n a la que se le pasa n par谩metro WinBitmap por referncia.
bool Cex2Dlg::UpdateCamera3(WinBitmap* &imagen)
Tengo un .def para exportar la DLL:
LIBRARY "ex2Dlg"
EXPORTS
UpdateCamera3
Luego tengo un proyecto para cargar las DLL y poder usarlas en VB:
<DllImport("ex2.dll", EntryPoint:="UpdateCamera3", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function UpdateCamera3(ByRef imagen As Winbitmap) As Boolean
End Function
Ahora, mi problema viene al llamar esta funci贸n desde un proyecto WindowsForm en VB.
Porque al llamar a la funci贸n en VB le paso una imagen de tipo Bitmap, por lo que al ejecutarse la DLL, debe esperar una imagen de tipo WinBitmap y no Bitmap (que es la que te ofrece VB).
Mi problema es ese, c贸mo co*o paso la imagen de la DLL al proyecto VB.
Sorry but I was wrong with the details of my error.
The problem, specifically, is that when I make a VB project to import my function DLL, I don麓t know how can I recieve a WinBitmap in the function, because is a C++ Variable and in VB I don麓t have this variable.
So in c++ I have a WinBitmap variable and in VB I have a Bitmap variable, so I don麓t know how can I pass this parameter through the function!!
I have also a VB project to load the functions of the DLL in order to use them in VB:
<DllImport("ex2.dll", EntryPoint:="UpdateCamera3", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function UpdateCamera3(ByRef imagen As Bitmap) As Boolean
End Function
Here, I would have to "catch" the \'imagen\' as a WinBitmap but in VB only exists the variable "Bitmap".
Any Idea?????
The problem, specifically, is that when I make a VB project to import my function DLL, I don麓t know how can I recieve a WinBitmap in the function, because is a C++ Variable and in VB I don麓t have this variable.
So in c++ I have a WinBitmap variable and in VB I have a Bitmap variable, so I don麓t know how can I pass this parameter through the function!!
I have also a VB project to load the functions of the DLL in order to use them in VB:
<DllImport("ex2.dll", EntryPoint:="UpdateCamera3", SetLastError:=True, _
CharSet:=CharSet.Unicode, ExactSpelling:=True, _
CallingConvention:=CallingConvention.StdCall)> _
Public Shared Function UpdateCamera3(ByRef imagen As Bitmap) As Boolean
End Function
Here, I would have to "catch" the \'imagen\' as a WinBitmap but in VB only exists the variable "Bitmap".
Any Idea?????
