Permalink
Browse files

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

  • Loading branch information...
1 parent 0df205d commit 23cc585957bf6361f180e4e0a65b803fd670a887 @starkos starkos committed Jan 4, 2012
Showing with 4 additions and 9 deletions.
  1. +3 −0 premake4.lua
  2. +1 −9 src/host/os_uuid.c
View
@@ -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
@@ -5,23 +5,15 @@
*/
#include "premake.h"
-
+#include <Objbase.h>
int os_uuid(lua_State* L)
{
unsigned char bytes[16];
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;

0 comments on commit 23cc585

Please sign in to comment.