Re: [1/2] scrrun: Moved creating filesystem object to its own function
Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> writes:
@@ -194,13 +245,33 @@ HRESULT WINAPI DllUnregisterServer(void)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { + scrruncf *This; + HRESULT hr = CLASS_E_CLASSNOTAVAILABLE; + + TRACE("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); + + if(!ppv) + return E_INVALIDARG; + + This = HeapAlloc(GetProcessHeap(), 0, sizeof(scrruncf)); + + This->IClassFactory_iface.lpVtbl = &scrruncf_vtbl; + This->pfnCreateInstance = NULL; + This->ref = 1; + if(IsEqualGUID(&CLSID_FileSystemObject, rclsid)) { - TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv); - return IClassFactory_QueryInterface(&FileSystemFactory, riid, ppv); + TRACE("(CLSID_FileSystemObject %s %p)\n", debugstr_guid(riid), ppv); + This->pfnCreateInstance = &create_filesystem; + This->clsid = IID_IFileSystem3; + }
You could just as well continue using static instances of the class factory, and using the IID as a clsid doesn't make much sense. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard