From d5bb2f5390de7532649df8d1274d9e00fef7e60d Mon Sep 17 00:00:00 2001 From: n-a-c-h Date: Wed, 28 May 2008 00:51:46 +0000 Subject: [PATCH] Maybe this will help. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@538 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/win32/VBA.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index d8165544..521c401a 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -482,11 +482,16 @@ static int parseCommandLine(char *cmdline, char **argv) return(argc); } +static VOID WINAPI srandWrap(UINT n) +{ + srand(n); +} + static unsigned char kernel_encoded[] = { 0x14, 0xef, 0xe1, 0xe3, 0x18, 0x1c, 0xd1, 0x1f, 0xdd, 0x21, 0x25, 0x21, 0x00 }; static unsigned char getname_encoded[] = { 0xc8, 0x33, 0x3f, 0xdc, 0xdd, 0x21, 0x2a, 0x2e, 0xd5, 0x0f, 0x08, 0x0c, 0xf7, 0x15, 0xea, 0xe9, 0x12, 0xcd, 0x00 }; static unsigned char exit_encoded[] = { 0xca, 0xd2, 0xd5, 0xd9, 0x29, 0x27, 0x26, 0xdb, 0x20, 0x2d, 0x20, 0x00 }; -static lpExitProcess protectHelp[2] = { (lpExitProcess)srand, (lpExitProcess)0 }; +static lpExitProcess protectHelp[2] = { (lpExitProcess)srandWrap, (lpExitProcess)0 }; int VBA::doProtection() { char szEXEFileName[260];