wbemprox: Return 64-bit property values as strings.
[wine/multimedia.git] / dlls / scrrun / scrrun.c
blobd1e2de2f2a92e353fbbaf64f72de2834e7bfa67d
1 /*
2 * Copyright 2011 Hans Leidekker for CodeWeavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18 #define COBJMACROS
20 #include "config.h"
21 #include <stdarg.h>
23 #include "windef.h"
24 #include "winbase.h"
25 #include "ole2.h"
26 #include "rpcproxy.h"
28 #include <initguid.h>
29 #include "scrrun.h"
31 #include "wine/debug.h"
33 WINE_DEFAULT_DEBUG_CHANNEL(scrrun);
35 static HINSTANCE scrrun_instance;
37 typedef HRESULT (*fnCreateInstance)(LPVOID *ppObj);
39 extern HRESULT WINAPI FileSystem_CreateInstance(IClassFactory*,IUnknown*,REFIID,void**) DECLSPEC_HIDDEN;
41 static HRESULT WINAPI scrruncf_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppv )
43 *ppv = NULL;
45 if(IsEqualGUID(&IID_IUnknown, riid)) {
46 TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv);
47 *ppv = iface;
48 }else if(IsEqualGUID(&IID_IClassFactory, riid)) {
49 TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv);
50 *ppv = iface;
53 if(*ppv) {
54 IUnknown_AddRef((IUnknown*)*ppv);
55 return S_OK;
58 FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv);
59 return E_NOINTERFACE;
62 static ULONG WINAPI scrruncf_AddRef(IClassFactory *iface )
64 TRACE("(%p)\n", iface);
65 return 2;
68 static ULONG WINAPI scrruncf_Release(IClassFactory *iface )
70 TRACE("(%p)\n", iface);
71 return 1;
74 static HRESULT WINAPI scrruncf_LockServer(IClassFactory *iface, BOOL fLock)
76 TRACE("(%p)->(%x)\n", iface, fLock);
77 return S_OK;
80 static const struct IClassFactoryVtbl scrruncf_vtbl =
82 scrruncf_QueryInterface,
83 scrruncf_AddRef,
84 scrruncf_Release,
85 FileSystem_CreateInstance,
86 scrruncf_LockServer
89 static IClassFactory FileSystemFactory = { &scrruncf_vtbl };
91 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
93 TRACE("%p, %u, %p\n", hinst, reason, reserved);
95 switch (reason)
97 case DLL_WINE_PREATTACH:
98 return FALSE; /* prefer native version */
99 case DLL_PROCESS_ATTACH:
100 DisableThreadLibraryCalls( hinst );
101 scrrun_instance = hinst;
102 break;
103 case DLL_PROCESS_DETACH:
104 break;
106 return TRUE;
109 /***********************************************************************
110 * DllRegisterServer (scrrun.@)
112 HRESULT WINAPI DllRegisterServer(void)
114 TRACE("()\n");
115 return __wine_register_resources(scrrun_instance);
118 /***********************************************************************
119 * DllUnregisterServer (scrrun.@)
121 HRESULT WINAPI DllUnregisterServer(void)
123 TRACE("()\n");
124 return __wine_unregister_resources(scrrun_instance);
127 /***********************************************************************
128 * DllGetClassObject (scrrun.@)
131 HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
133 if(IsEqualGUID(&CLSID_FileSystemObject, rclsid)) {
134 TRACE("(CLSID_WshShell %s %p)\n", debugstr_guid(riid), ppv);
135 return IClassFactory_QueryInterface(&FileSystemFactory, riid, ppv);
138 FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
139 return CLASS_E_CLASSNOTAVAILABLE;
142 /***********************************************************************
143 * DllCanUnloadNow (scrrun.@)
145 HRESULT WINAPI DllCanUnloadNow(void)
147 return S_FALSE;