sit and go strategy
Sorry, but I can't figure out how to use Create/OpenGlobalFileMapping in BCB.
I can't make MapViewOfFile take DWORD as File Handle, so I try this:
Then use ths->Write/Read, but it doesn't seem to work.
Using FileRead/Write doesn't seem to work either.
Can someone give an example?
Thanks in advance.
I can't make MapViewOfFile take DWORD as File Handle, so I try this:
Code: Select all
DWORD hFile = OpenGlobalFileMapping("TEST.GFM", 1);
if( hFile < 1 ) {
ShowMessage("open gfm error:"+SysErrorMessage(GetLastError()));
return;
}
THandleStream *ths = new THandleStream(hFile);
Using FileRead/Write doesn't seem to work either.
Can someone give an example?
Thanks in advance.