Initial Commit
This commit is contained in:
19
common/IOBUFF.CPP
Normal file
19
common/IOBUFF.CPP
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <common/iobuff.hpp>
|
||||
|
||||
void IOBuffer::destroyBuffer(void)
|
||||
{
|
||||
if(!mhGlobalBuffer)return;
|
||||
::GlobalUnlock(mhGlobalBuffer);
|
||||
::GlobalFree(mhGlobalBuffer);
|
||||
mhGlobalBuffer=0;
|
||||
}
|
||||
|
||||
WORD IOBuffer::createBuffer(DWORD lengthBuffer)
|
||||
{
|
||||
destroyBuffer();
|
||||
mhGlobalBuffer=::GlobalAlloc(GMEM_FIXED,lengthBuffer);
|
||||
if(!mhGlobalBuffer)return FALSE;
|
||||
mlpBuffer=(BYTE FAR *)::GlobalLock(mhGlobalBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user