|
Lines 1-38
Link Here
|
| 1 |
#include <string> |
|
|
| 2 |
#include <locale> |
| 3 |
#include <set> |
| 4 |
#include <vector> |
| 5 |
#include <algorithm> |
| 6 |
#include <iostream> |
| 7 |
#include <fstream> |
| 8 |
#include <mutex> |
| 9 |
|
| 10 |
#include "WinCompat.h" |
| 11 |
#include "WinPort.h" |
| 12 |
#include "WinPortHandle.h" |
| 13 |
#include "PathHelpers.h" |
| 14 |
|
| 15 |
WINPORT_DECL(GlobalAlloc, HGLOBAL, ( UINT uFlags, SIZE_T dwBytes)) |
| 16 |
{ |
| 17 |
PVOID rv = malloc(dwBytes); |
| 18 |
if (rv && (uFlags&GMEM_ZEROINIT)==GMEM_ZEROINIT) |
| 19 |
memset(rv, 0, dwBytes); |
| 20 |
return rv; |
| 21 |
} |
| 22 |
|
| 23 |
WINPORT_DECL(GlobalFree, HGLOBAL, ( HGLOBAL hMem)) |
| 24 |
{ |
| 25 |
free(hMem); |
| 26 |
return NULL; |
| 27 |
} |
| 28 |
|
| 29 |
WINPORT_DECL(GlobalLock, PVOID, ( HGLOBAL hMem)) |
| 30 |
{ |
| 31 |
return hMem; |
| 32 |
} |
| 33 |
|
| 34 |
WINPORT_DECL(GlobalUnlock, BOOL, ( HGLOBAL hMem)) |
| 35 |
{ |
| 36 |
return TRUE; |
| 37 |
} |
| 38 |
|