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:
parent
93fa2e0ab8
commit
7e39b0056d
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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')) ||
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue