'typedef struct {
' DWORD dwFlags; 'byval
' LPBITMAPINFOHEADER lpbiOutput; 'needs a pointer to a bitmapinfoheader
' LPVOID lpOutput; 'this i can handle with Global/Heap
memory function
' LPBITMAPINFOHEADER lpbiInput; 'needs a pointer to a bitmapinfoheader
' LPVOID lpInput; 'this i can handle with Global/Heap
memory function
' LPDWORD lpckid; 'not used now, but needs a ptr to a 2
byte array
' LPDWORD lpdwFlags; 'needs a pointer to vb long
' LONG lFrameNum; 'byval
' DWORD dwFrameSize;'byval
' DWORD dwQuality; 'byval
' LPBITMAPINFOHEADER lpbiPrev; 'needs a pointer to a bitmapinfoheader
' LPVOID lpPrev; 'this i can handle with Global/Heap
memory function
'} ICCOMPRESS;

make this work in VB.NET
Option Explicit
Private Type BITMAPINFOHEADER
biSize As Long
biWidth As Long
biHeight As Long
biPlanes As Integer
biBitCount As Integer
biCompression As Long
biSizeImage As Long
biXPelsPerMeter As Long
biYPelsPerMeter As Long
biClrUsed As Long
biClrImportant As Long
End Type

Private Type ICCompress
dwFlags As Long
lpbiOutput As Long
lpOutput As Long
lpbiInput As Long
lpInput As Long
lpckid As Long
lpdwFlags As Long
lFrameNum As Long
dwFrameSize As Long
dwQuality As Long
lpbiPrev As Long
lpPrev As Long
End Type

Private m_ICCompress as ICCompress
Private m_bmHdrTarget as BitmapInfoHeader
Private m_bmHdrCompressed as BitmapInfoHeader
Private m_ICCompressReturnFlag As Long

Sub Main

m_ICCompress.lpbiInput = VarPtr(m_bmHdrTarget)
m_ICCompress.lpbiOutput = VarPtr(m_bmHdrCompressed)
m_ICCompress.lpInput = m_lpBits
m_ICCompress.lpOutput = HeapAlloc(GetProcessHeap(), 0,
m_bmHdrCompressed.biSizeImage)
m_ICCompress.lpbiPrev = VarPtr(m_bmHdrTarget)
m_ICCompress.lpPrev = HeapAlloc(GetProcessHeap(), 0,
m_bmHdrPrevious.biSizeImage)
m_ICCompress.lpdwFlags = VarPtr(m_ICCompressReturnFlag)

Msgbox "I am really ****ed up because i cannot fill the ICCompress
Structure anymore", vbOKOnly + vbExclamation,"VB is dead"

End Sub