combase: Move CoCreateGuid().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-08-06 09:13:04 +03:00 committed by Alexandre Julliard
parent 93fa2e0ab8
commit 7e39b0056d
5 changed files with 17 additions and 29 deletions

View File

@ -1,6 +1,6 @@
MODULE = combase.dll MODULE = combase.dll
IMPORTLIB = combase IMPORTLIB = combase
IMPORTS = advapi32 ole32 user32 gdi32 uuid IMPORTS = advapi32 ole32 user32 gdi32 uuid rpcrt4
DELAYIMPORTS = oleaut32 DELAYIMPORTS = oleaut32
EXTRADLLFLAGS = -mno-cygwin EXTRADLLFLAGS = -mno-cygwin

View File

@ -440,3 +440,17 @@ HRESULT WINAPI CoFileTimeNow(FILETIME *filetime)
GetSystemTimeAsFileTime(filetime); GetSystemTimeAsFileTime(filetime);
return S_OK; 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);
}

View File

@ -78,7 +78,7 @@
@ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy @ stdcall CoCopyProxy(ptr ptr) ole32.CoCopyProxy
@ stub CoCreateErrorInfo @ stub CoCreateErrorInfo
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) ole32.CoCreateFreeThreadedMarshaler
@ stdcall CoCreateGuid(ptr) ole32.CoCreateGuid @ stdcall CoCreateGuid(ptr)
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance @ stdcall CoCreateInstance(ptr ptr long ptr ptr) ole32.CoCreateInstance
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx @ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) ole32.CoCreateInstanceEx
@ stub CoCreateInstanceFromApp @ stub CoCreateInstanceFromApp

View File

@ -2186,32 +2186,6 @@ HRESULT WINAPI CoDisconnectObject( LPUNKNOWN lpUnk, DWORD reserved )
return S_OK; 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) static inline BOOL is_valid_hex(WCHAR c)
{ {
if (!(((c >= '0') && (c <= '9')) || if (!(((c >= '0') && (c <= '9')) ||

View File

@ -11,7 +11,7 @@
@ stdcall CoBuildVersion() @ stdcall CoBuildVersion()
@ stdcall CoCopyProxy(ptr ptr) @ stdcall CoCopyProxy(ptr ptr)
@ stdcall CoCreateFreeThreadedMarshaler(ptr ptr) @ stdcall CoCreateFreeThreadedMarshaler(ptr ptr)
@ stdcall CoCreateGuid(ptr) @ stdcall CoCreateGuid(ptr) combase.CoCreateGuid
@ stdcall CoCreateInstance(ptr ptr long ptr ptr) @ stdcall CoCreateInstance(ptr ptr long ptr ptr)
@ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr) @ stdcall CoCreateInstanceEx(ptr ptr long ptr long ptr)
@ stdcall CoDecrementMTAUsage(ptr) @ stdcall CoDecrementMTAUsage(ptr)