source: trunk/src/ole32/clsid.cpp@ 6496

Last change on this file since 6496 was 5602, checked in by sandervl, 24 years ago

resync with Wine 20010418

File size: 1.7 KB
Line 
1/* $Id: clsid.cpp,v 1.14 2001-04-26 19:32:42 sandervl Exp $ */
2/*
3 *
4 * Project Odin Software License can be found in LICENSE.TXT
5 *
6 */
7/*
8 * ClassID Manipulation.
9 *
10 * 1/7/99
11 *
12 * Copyright 2000 David J. Raison
13 *
14 * Some portions from Wine Implementation
15 *
16 * Copyright 1995 Martin von Loewis
17 * 1998 Justin Bradford
18 * 1999 Francis Beaudet
19 * 1999 Sylvain St-Germain
20 */
21
22#include "ole32.h"
23#include "rpcdce.h"
24
25#include "oString.h"
26
27
28// ----------------------------------------------------------------------
29// IIDFromString
30// ----------------------------------------------------------------------
31HRESULT WIN32API IIDFromString(LPSTR lpsz, LPIID lpiid)
32{
33// dprintf(("OLE32: IIDFromString"));
34 return CLSIDFromString((LPCOLESTR)lpsz, (LPCLSID)lpiid);
35}
36
37
38
39
40// ----------------------------------------------------------------------
41// StringFromIID
42// Memory allocated here on behalf of application should be freed using CoTaskMemFree()
43// ----------------------------------------------------------------------
44HRESULT WIN32API StringFromIID(REFIID riid, LPOLESTR *ppsz)
45{
46 char tmp[50];
47 LPWSTR sziid;
48 size_t strLen;
49
50// dprintf(("OLE32: StringFromIID"));
51
52 // Setup new string...
53 WINE_StringFromCLSID(riid, tmp);
54
55 strLen = strlen(tmp);
56
57 // Grab buffer for string...
58 sziid = (LPWSTR)CoTaskMemAlloc((strLen + 1) * sizeof(WCHAR));
59
60 AsciiToUnicode(tmp, sziid);
61
62 *ppsz = (LPOLESTR)sziid;
63
64 return S_OK;
65}
66
67// ----------------------------------------------------------------------
68// CONCRETE_IsEqualGUID
69// ----------------------------------------------------------------------
70int WIN32API CONCRETE_IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
71{
72 return IsEqualGUID(rguid1, rguid2);
73}
74
Note: See TracBrowser for help on using the repository browser.