Commit 7e39b005 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

combase: Move CoCreateGuid().

parent 93fa2e0a
MODULE = combase.dll
IMPORTLIB = combase
IMPORTS = advapi32 ole32 user32 gdi32 uuid
IMPORTS = advapi32 ole32 user32 gdi32 uuid rpcrt4
DELAYIMPORTS = oleaut32
EXTRADLLFLAGS = -mno-cygwin
......
......@@ -440,3 +440,17 @@ HRESULT WINAPI CoFileTimeNow(FILETIME *filetime)
GetSystemTimeAsFileTime(filetime);
return S_OK;
}
/******************************************************************************
* CoCreateGuid (combase.@)
*/
HRESULT WINAPI CoCreateGuid(GUID *guid)
{
RPC_STATUS status;
if (!guid) return E_INVALIDARG;
status = UuidCreate(guid);
if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK;
return HRESULT_FROM_WIN32(status);
}
......@@ -78,7 +78,7 @@
@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy
@ stub CoCreateErrorInfo
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid
@ stdcall CoCreateGuid(ptr)
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
@ stub CoCreateInstanceFromApp
......
......@@ -2186,32 +2186,6 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
return S_OK;
}
/******************************************************************************
* CoCreateGuid [OLE32.@]
*
* Simply forwards to UuidCreate in RPCRT4.
*
* PARAMS
* pguid [O] Points to the GUID to initialize.
*
* RETURNS
* Success: S_OK.
* Failure: HRESULT code.
*
* SEE ALSO
* UuidCreate
*/
HRESULT WINAPI CoCreateGuid(GUID *pguid)
{
DWORD status;
if(!pguid) return E_INVALIDARG;
status = UuidCreate(pguid);
if (status == RPC_S_OK || status == RPC_S_UUID_LOCAL_ONLY) return S_OK;
return HRESULT_FROM_WIN32( status );
}
static inline BOOL is_valid_hex(WCHAR c)
{
if (!(((c >= '0') && (c <= '9')) ||
......
......@@ -11,7 +11,7 @@
@ stdcall CoBuildVersion()
@ stdcall CoCopyProxy(ptr ptr)
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr)
@ stdcall CoCreateGuid(ptr)
@ stdcall CoCreateGuid(ptr) combase.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr)
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr)
@ stdcall CoDecrementMTAUsage(ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment