Hi, lastly I found a working solution and its far from zipping data, thanks for that really good idea, but it was not April 1st, (and gives insight into your mindset). The embedded framework didn't support passing 64 bit values between managed and unmanaged code. A little workaround is needed. Fist create a new IntPnt object and pass this object to unmanged code by reference as parameter of some function. In unmanaged code use this pointer as any other pointer in C/C++, and assign the data you need. Return from this unmanaged function and use the 'Marshal' class to readout the value. Use a 'try finally' block to clean up memory in any case. Managed code:
Private Shared Function ReadFilePointer() As Long
Dim ptr As IntPtr = Marshal.AllocHGlobal(Len(New Long()))
Try
GetBookmark(ptr)
Return Marshal.ReadInt64(ptr)
Finally
Marshal.FreeHGlobal(ptr)
End Try
End Function
Unmanaged code:
extern "C" { __declspec(dllexport) void GetBookmark (intptr_t*); }
void GetBookmark(intptr_t* bmark)
{
*bmark = ftell(outFile);
}
Hope this can help someone someday. With best regards Gerhard