SHCoCreateInstance is now documented (spotted by Francois Gouget).

Its first argument should be a Unicode string.
This commit is contained in:
Alexandre Julliard 2004-01-06 20:42:47 +00:00
parent 30a520e235
commit 72ecbb0675
5 changed files with 8 additions and 18 deletions

View File

@ -32,6 +32,7 @@
#include "ole2.h" #include "ole2.h"
#include "shellapi.h" #include "shellapi.h"
#include "shlobj.h"
#include "vfw.h" #include "vfw.h"
#include "msacm.h" #include "msacm.h"
@ -42,11 +43,6 @@
WINE_DEFAULT_DEBUG_CHANNEL(avifile); WINE_DEFAULT_DEBUG_CHANNEL(avifile);
/***********************************************************************
* copied from dlls/shell32/undocshell.h
*/
HRESULT WINAPI SHCoCreateInstance(LPCSTR lpszClsid,REFCLSID rClsid,
LPUNKNOWN pUnkOuter,REFIID riid,LPVOID *ppv);
/*********************************************************************** /***********************************************************************
* for AVIBuildFilterW -- uses fixed size table * for AVIBuildFilterW -- uses fixed size table

View File

@ -95,7 +95,7 @@
99 stdcall SetAppStartingCursor (long long) 99 stdcall SetAppStartingCursor (long long)
100 stdcall SHRestricted(long) 100 stdcall SHRestricted(long)
102 stdcall SHCoCreateInstance(ptr ptr long ptr ptr) 102 stdcall SHCoCreateInstance(wstr ptr long ptr ptr)
103 stdcall SignalFileOpen(long) 103 stdcall SignalFileOpen(long)
104 stdcall FileMenu_DeleteAllItems(long) 104 stdcall FileMenu_DeleteAllItems(long)
105 stdcall FileMenu_DrawItem(long ptr) 105 stdcall FileMenu_DrawItem(long ptr)

View File

@ -122,8 +122,8 @@ DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str)
/************************************************************************/ /************************************************************************/
LRESULT WINAPI SHCoCreateInstance( LRESULT WINAPI SHCoCreateInstance(
LPCSTR aclsid, LPCWSTR aclsid,
REFCLSID clsid, const CLSID *clsid,
LPUNKNOWN pUnkOuter, LPUNKNOWN pUnkOuter,
REFIID refiid, REFIID refiid,
LPVOID *ppv) LPVOID *ppv)
@ -150,7 +150,7 @@ LRESULT WINAPI SHCoCreateInstance(
if (!clsid) if (!clsid)
{ {
if (!aclsid) return REGDB_E_CLASSNOTREG; if (!aclsid) return REGDB_E_CLASSNOTREG;
SHCLSIDFromStringA(aclsid, &iid); SHCLSIDFromStringW(aclsid, &iid);
myclsid = &iid; myclsid = &iid;
} }
@ -279,7 +279,7 @@ DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id)
return CO_E_CLASSSTRING; return CO_E_CLASSSTRING;
return CLSIDFromString( buffer, id ); return CLSIDFromString( buffer, id );
} }
DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id) DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id)
{ {
TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id); TRACE("(%p(%s) %p)\n", clsid, debugstr_w(clsid), id);
return CLSIDFromString(clsid, id); return CLSIDFromString(clsid, id);

View File

@ -836,14 +836,7 @@ HRESULT WINAPI SHCreateDefClassObject(
REFIID riidObject); REFIID riidObject);
DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id); DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id);
DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id); DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id);
HRESULT WINAPI SHCoCreateInstance(
LPCSTR lpszClsid,
REFCLSID rClsid,
LPUNKNOWN pUnkOuter,
REFIID riid,
LPVOID *ppv);
void WINAPI SHFreeUnusedLibraries(); void WINAPI SHFreeUnusedLibraries();

View File

@ -33,6 +33,7 @@ extern "C" {
#include <shtypes.h> #include <shtypes.h>
#include <shobjidl.h> #include <shobjidl.h>
HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,LPUNKNOWN,REFIID,LPVOID*);
BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath); BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath);
BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath); BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);