[1/2] scrrun: Moved creating filesystem object to its own function

Alexandre Julliard julliard at winehq.org
Wed Sep 19 06:29:49 CDT 2012


Alistair Leslie-Hughes <leslie_alistair at 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 at winehq.org



More information about the wine-devel mailing list