diff --git a/dlls/avifil32/api.c b/dlls/avifil32/api.c index 8a96dab5895..668aedb3a6c 100644 --- a/dlls/avifil32/api.c +++ b/dlls/avifil32/api.c @@ -32,6 +32,7 @@ #include "ole2.h" #include "shellapi.h" +#include "shlobj.h" #include "vfw.h" #include "msacm.h" @@ -42,11 +43,6 @@ 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 diff --git a/dlls/shell32/shell32.spec b/dlls/shell32/shell32.spec index fd535f4bc5d..cfb47e5c265 100644 --- a/dlls/shell32/shell32.spec +++ b/dlls/shell32/shell32.spec @@ -95,7 +95,7 @@ 99 stdcall SetAppStartingCursor (long 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) 104 stdcall FileMenu_DeleteAllItems(long) 105 stdcall FileMenu_DrawItem(long ptr) diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index a743871c9be..6ec6f8db17f 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -122,8 +122,8 @@ DWORD WINAPI __SHGUIDToStringW (REFGUID guid, LPWSTR str) /************************************************************************/ LRESULT WINAPI SHCoCreateInstance( - LPCSTR aclsid, - REFCLSID clsid, + LPCWSTR aclsid, + const CLSID *clsid, LPUNKNOWN pUnkOuter, REFIID refiid, LPVOID *ppv) @@ -150,7 +150,7 @@ LRESULT WINAPI SHCoCreateInstance( if (!clsid) { if (!aclsid) return REGDB_E_CLASSNOTREG; - SHCLSIDFromStringA(aclsid, &iid); + SHCLSIDFromStringW(aclsid, &iid); myclsid = &iid; } @@ -279,7 +279,7 @@ DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id) return CO_E_CLASSSTRING; 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); return CLSIDFromString(clsid, id); diff --git a/dlls/shell32/undocshell.h b/dlls/shell32/undocshell.h index 69b69424f78..b38ad83fda0 100644 --- a/dlls/shell32/undocshell.h +++ b/dlls/shell32/undocshell.h @@ -836,14 +836,7 @@ HRESULT WINAPI SHCreateDefClassObject( REFIID riidObject); DWORD WINAPI SHCLSIDFromStringA (LPCSTR clsid, CLSID *id); -DWORD WINAPI SHCLSIDFromStringW (LPWSTR clsid, CLSID *id); - -HRESULT WINAPI SHCoCreateInstance( - LPCSTR lpszClsid, - REFCLSID rClsid, - LPUNKNOWN pUnkOuter, - REFIID riid, - LPVOID *ppv); +DWORD WINAPI SHCLSIDFromStringW (LPCWSTR clsid, CLSID *id); void WINAPI SHFreeUnusedLibraries(); diff --git a/include/shlobj.h b/include/shlobj.h index a880619b35e..9c90852f0f8 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -33,6 +33,7 @@ extern "C" { #include #include +HRESULT WINAPI SHCoCreateInstance(LPCWSTR,const CLSID*,LPUNKNOWN,REFIID,LPVOID*); BOOL WINAPI SHGetPathFromIDListA (LPCITEMIDLIST pidl,LPSTR pszPath); BOOL WINAPI SHGetPathFromIDListW (LPCITEMIDLIST pidl,LPWSTR pszPath);