Current News Archived News Search News Discussion Forum Old Forum Install Programs More Downloads... Troubleshooting Source Code Format Specs. Misc. Information Non-SF Stuff Links Small banner for links to this site: |
diff --git a/grpapi/grpapi.cpp b/grpapi/grpapi.cpp
--- a/grpapi/grpapi.cpp
+++ b/grpapi/grpapi.cpp
SFileCloseFile(hFile);\r
return (HANDLE)-1;\r
}\r
- GrpFile = (char *)VirtualAlloc(0,fsz,MEM_COMMIT,PAGE_READWRITE);\r
+ GrpFile = (char *)malloc(fsz);\r
if (GrpFile) {\r
SFileSetFilePointer(hFile,0,0,FILE_BEGIN);\r
SFileReadFile(hFile,GrpFile,fsz,0,0);\r
CloseHandle(hFile);\r
return (HANDLE)-1;\r
}\r
- GrpFile = (char *)VirtualAlloc(0,fsz,MEM_COMMIT,PAGE_READWRITE);\r
+ GrpFile = (char *)malloc(fsz);\r
if (GrpFile) {\r
SetFilePointer(hFile,0,0,FILE_BEGIN);\r
ReadFile(hFile,GrpFile,fsz,&tsz,0);\r
BOOL GRPAPI WINAPI DestroyGrp(HANDLE hGrp)\r
{\r
if (!hGrp || hGrp==INVALID_HANDLE_VALUE) return FALSE;\r
- VirtualFree(hGrp,0,MEM_RELEASE);\r
+ free(hGrp);\r
return TRUE;\r
}\r
\r
\r
void GRPAPI WINAPI SetFunctionGetPixel(GETPIXELPROC lpGetPixelProc)\r
{\r
- MyGetPixel = lpGetPixelProc;\r
+ if (!lpGetPixelProc)\r
+ MyGetPixel = GetPixel;\r
+ else\r
+ MyGetPixel = lpGetPixelProc;\r
}\r
\r
void GRPAPI WINAPI SetFunctionSetPixel(SETPIXELPROC lpSetPixelProc)\r
{\r
- MySetPixel = lpSetPixelProc;\r
+ if (!lpSetPixelProc)\r
+ MySetPixel = (SETPIXELPROC)SetPixelV;\r
+ else\r
+ MySetPixel = lpSetPixelProc;\r
}\r
\r
void __inline SetPix(HDC hDC, int X, int Y, COLORREF clrColor, DWORD *dwPalette, DWORD dwFlags, DWORD dwAlpha)\r
|