G
Guest
Hi all,
I need some help translating a C++ function that returns a pointer to a
Structure.
Here is the original C++ declare:
LPBITMAPINFO IMAPI ImgGetInfo(HANDLE hImage, LPINT lpbFlags)
Here's what I have so far in the VB.NET version:
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure BITMAPINFOHEADER '40 bytes
Public biSize As Integer
Public biWidth As Integer
Public biHeight As Integer
Public biPlanes As Short
Public biBitCount As Integer
Public biCompression As Integer
Public biSizeImage As Integer
Public biXPelsPerMeter As Integer
Public biYPelsPerMeter As Integer
Public biClrUsed As Short
Public biClrImportant As Integer
End Structure
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure BITMAPINFO
Public bmiHeader As BITMAPINFOHEADER
Public bmiColors As RGBQUAD
End Structure
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure RGBQUAD
Public rgbBlue As Byte
Public rgbGreen As Byte
Public rgbRed As Byte
Public rgbReserved As Byte
End Structure
Declare Ansi Function ImgGetInfo Lib "someDLLname.dll" (ByVal img As
Integer, ByRef lFlags As Integer) As BITMAPINFO
Can someone tell me if the VB.net translation is correct, and if not, how to
do the VB.Net declare correctly?
Thanks!
I need some help translating a C++ function that returns a pointer to a
Structure.
Here is the original C++ declare:
LPBITMAPINFO IMAPI ImgGetInfo(HANDLE hImage, LPINT lpbFlags)
Here's what I have so far in the VB.NET version:
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure BITMAPINFOHEADER '40 bytes
Public biSize As Integer
Public biWidth As Integer
Public biHeight As Integer
Public biPlanes As Short
Public biBitCount As Integer
Public biCompression As Integer
Public biSizeImage As Integer
Public biXPelsPerMeter As Integer
Public biYPelsPerMeter As Integer
Public biClrUsed As Short
Public biClrImportant As Integer
End Structure
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure BITMAPINFO
Public bmiHeader As BITMAPINFOHEADER
Public bmiColors As RGBQUAD
End Structure
<Serializable(), StructLayout(LayoutKind.Sequential)> _
Public Structure RGBQUAD
Public rgbBlue As Byte
Public rgbGreen As Byte
Public rgbRed As Byte
Public rgbReserved As Byte
End Structure
Declare Ansi Function ImgGetInfo Lib "someDLLname.dll" (ByVal img As
Integer, ByRef lFlags As Integer) As BITMAPINFO
Can someone tell me if the VB.net translation is correct, and if not, how to
do the VB.Net declare correctly?
Thanks!