Removed dynamic loading of Ole32 on Windows (see patch #3456407)

This commit is contained in:
Jason Perkins 2012-01-04 15:01:22 -05:00
parent c18f49192f
commit a4b2152e85
2 changed files with 4 additions and 9 deletions

View File

@ -52,6 +52,9 @@
configuration "vs2005"
defines {"_CRT_SECURE_NO_DEPRECATE" }
configuration "windows"
links { "ole32" }
configuration "linux"
defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" }
links { "m", "dl" }

View File

@ -5,7 +5,7 @@
*/
#include "premake.h"
#include <Objbase.h>
int os_uuid(lua_State* L)
{
@ -13,15 +13,7 @@ int os_uuid(lua_State* L)
char uuid[38];
#if PLATFORM_WINDOWS
static int (__stdcall *CoCreateGuid)(char*) = NULL;
if (CoCreateGuid == NULL)
{
HMODULE hOleDll = LoadLibrary("OLE32.DLL");
CoCreateGuid = (int(__stdcall*)(char*))GetProcAddress(hOleDll, "CoCreateGuid");
}
CoCreateGuid((char*)bytes);
#else
int result;