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

Last change on this file since 7955 was 7955, checked in by phaller, 24 years ago

Fixed dbgwrap for new defined prototypes

File size: 1.9 KB
Line 
1/* $Id: clsid.cpp,v 1.15 2002-02-18 23:24:09 phaller 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// ----------------------------------------------------------------------
31#ifdef __WIN32OS2__
32HRESULT WINAPI IIDFromString(LPOLESTR lpsz, LPIID lpiid)
33#else
34HRESULT WIN32API IIDFromString(LPSTR lpsz, LPIID lpiid)
35#endif
36{
37// dprintf(("OLE32: IIDFromString"));
38 return CLSIDFromString((LPCOLESTR)lpsz, (LPCLSID)lpiid);
39}
40
41
42
43
44// ----------------------------------------------------------------------
45// StringFromIID
46// Memory allocated here on behalf of application should be freed using CoTaskMemFree()
47// ----------------------------------------------------------------------
48#ifdef __WIN32OS2__
49HRESULT WINAPI StringFromIID(REFIID riid, LPOLESTR * ppsz)
50#else
51HRESULT WIN32API StringFromIID(REFIID riid, LPOLESTR *ppsz)
52#endif
53{
54 char tmp[50];
55 LPWSTR sziid;
56 size_t strLen;
57
58// dprintf(("OLE32: StringFromIID"));
59
60 // Setup new string...
61 WINE_StringFromCLSID(riid, tmp);
62
63 strLen = strlen(tmp);
64
65 // Grab buffer for string...
66 sziid = (LPWSTR)CoTaskMemAlloc((strLen + 1) * sizeof(WCHAR));
67
68 AsciiToUnicode(tmp, sziid);
69
70 *ppsz = (LPOLESTR)sziid;
71
72 return S_OK;
73}
74
75// ----------------------------------------------------------------------
76// CONCRETE_IsEqualGUID
77// ----------------------------------------------------------------------
78int WIN32API CONCRETE_IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
79{
80 return IsEqualGUID(rguid1, rguid2);
81}
82
Note: See TracBrowser for help on using the repository browser.