~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Wine Cross Reference
wine/dlls/wuapi/systeminfo.c

Version: ~ [ wine-1.5.30 ] ~ [ wine-1.5.29 ] ~ [ wine-1.5.28 ] ~ [ wine-1.5.27 ] ~ [ wine-1.5.26 ] ~ [ wine-1.5.25 ] ~ [ wine-1.5.24 ] ~ [ wine-1.5.23 ] ~ [ wine-1.5.22 ] ~ [ wine-1.5.21 ] ~ [ wine-1.5.20 ] ~ [ wine-1.5.19 ] ~ [ wine-1.5.18 ] ~ [ wine-1.5.17 ] ~ [ wine-1.5.16 ] ~ [ wine-1.5.15 ] ~ [ wine-1.5.14 ] ~ [ wine-1.5.13 ] ~ [ wine-1.5.12 ] ~ [ wine-1.5.11 ] ~ [ wine-1.5.10 ] ~ [ wine-1.5.9 ] ~ [ wine-1.5.8 ] ~ [ wine-1.5.7 ] ~ [ wine-1.4.1 ] ~ [ wine-1.5.6 ] ~ [ wine-1.5.5 ] ~ [ wine-1.5.4 ] ~ [ wine-1.5.3 ] ~ [ wine-1.5.2 ] ~ [ wine-1.5.1 ] ~ [ wine-1.5.0 ] ~ [ wine-1.4 ] ~ [ wine-1.4-rc6 ] ~ [ wine-1.4-rc5 ] ~ [ wine-1.4-rc4 ] ~ [ wine-1.4-rc3 ] ~ [ wine-1.4-rc2 ] ~ [ wine-1.4-rc1 ] ~ [ wine-1.3.37 ] ~ [ wine-1.3.36 ] ~ [ wine-1.3.35 ] ~ [ wine-1.3.34 ] ~ [ wine-1.3.33 ] ~ [ wine-1.3.32 ] ~ [ wine-1.3.31 ] ~ [ wine-1.3.30 ] ~ [ wine-1.3.29 ] ~ [ wine-1.3.28 ] ~ [ wine-1.3.27 ] ~ [ wine-1.3.26 ] ~ [ wine-1.3.25 ] ~ [ wine-1.3.24 ] ~ [ wine-1.3.23 ] ~ [ wine-1.3.22 ] ~ [ wine-1.3.21 ] ~ [ wine-1.3.20 ] ~ [ wine-1.3.19 ] ~ [ wine-1.3.18 ] ~ [ wine-1.2.3 ] ~ [ wine-1.3.17 ] ~ [ wine-1.3.16 ] ~ [ wine-1.3.15 ] ~ [ wine-1.3.14 ] ~ [ wine-1.3.13 ] ~ [ wine-1.3.12 ] ~ [ wine-1.3.11 ] ~ [ wine-1.3.10 ] ~ [ wine-1.3.9 ] ~ [ wine-1.2.2 ] ~ [ wine-1.3.8 ] ~ [ wine-1.3.7 ] ~ [ wine-1.3.6 ] ~ [ wine-1.3.5 ] ~ [ wine-1.2.1 ] ~ [ wine-1.3.4 ] ~ [ wine-1.3.3 ] ~ [ wine-1.3.2 ] ~ [ wine-1.3.1 ] ~ [ wine-1.3.0 ] ~ [ wine-1.2 ] ~ [ wine-1.2-rc7 ] ~ [ wine-1.2-rc6 ] ~ [ wine-1.2-rc5 ] ~ [ wine-1.2-rc4 ] ~ [ wine-1.2-rc3 ] ~ [ wine-1.2-rc2 ] ~ [ wine-1.2-rc1 ] ~ [ wine-1.1.44 ] ~ [ wine-1.1.43 ] ~ [ wine-1.1.42 ] ~ [ wine-1.1.41 ] ~ [ wine-1.1.40 ] ~ [ wine-1.1.39 ] ~ [ wine-1.1.38 ] ~ [ wine-1.1.37 ] ~ [ wine-1.1.36 ] ~ [ wine-1.1.35 ] ~ [ wine-1.1.34 ] ~ [ wine-1.1.33 ] ~ [ wine-1.1.32 ] ~ [ wine-1.1.31 ] ~ [ wine-1.1.30 ] ~ [ wine-1.1.29 ] ~ [ wine-1.1.28 ] ~ [ wine-1.1.27 ] ~ [ wine-1.1.26 ] ~ [ wine-1.1.25 ] ~ [ wine-1.1.24 ] ~ [ wine-1.1.23 ] ~ [ wine-1.1.22 ] ~ [ wine-1.1.21 ] ~ [ wine-1.1.20 ] ~ [ wine-1.1.19 ] ~ [ wine-1.1.18 ] ~ [ wine-1.1.17 ] ~ [ wine-1.1.16 ] ~ [ wine-1.1.15 ] ~ [ wine-1.1.14 ] ~ [ wine-1.1.13 ] ~ [ wine-1.1.12 ] ~ [ wine-1.1.11 ] ~ [ wine-1.1.10 ] ~ [ wine-1.1.9 ] ~ [ wine-1.1.8 ] ~ [ wine-1.1.7 ] ~ [ wine-1.0.1 ] ~ [ wine-1.1.6 ] ~ [ wine-1.1.5 ] ~ [ wine-1.1.4 ] ~ [ wine-1.1.3 ] ~ [ wine-1.1.2 ] ~ [ wine-1.1.1 ] ~ [ wine-1.1.0 ] ~ [ wine-1.0 ] ~

  1 /*
  2  * IAutomaticUpdates implementation
  3  *
  4  * Copyright 2008 Hans Leidekker
  5  * Copyright 2011 Bernhard Loos
  6  *
  7  * This library is free software; you can redistribute it and/or
  8  * modify it under the terms of the GNU Lesser General Public
  9  * License as published by the Free Software Foundation; either
 10  * version 2.1 of the License, or (at your option) any later version.
 11  *
 12  * This library is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 15  * Lesser General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU Lesser General Public
 18  * License along with this library; if not, write to the Free Software
 19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 20  */
 21 
 22 #define COBJMACROS
 23 
 24 #include "config.h"
 25 #include <stdarg.h>
 26 
 27 #include "windef.h"
 28 #include "winbase.h"
 29 #include "winuser.h"
 30 #include "ole2.h"
 31 #include "wuapi.h"
 32 
 33 #include "wine/debug.h"
 34 
 35 WINE_DEFAULT_DEBUG_CHANNEL(wuapi);
 36 
 37 typedef struct _systeminfo
 38 {
 39     ISystemInformation ISystemInformation_iface;
 40     LONG refs;
 41 } systeminfo;
 42 
 43 static inline systeminfo *impl_from_ISystemInformation(ISystemInformation *iface)
 44 {
 45     return CONTAINING_RECORD(iface, systeminfo, ISystemInformation_iface);
 46 }
 47 
 48 static ULONG WINAPI systeminfo_AddRef(ISystemInformation *iface)
 49 {
 50     systeminfo *This = impl_from_ISystemInformation(iface);
 51     return InterlockedIncrement(&This->refs);
 52 }
 53 
 54 static ULONG WINAPI systeminfo_Release(ISystemInformation *iface)
 55 {
 56     systeminfo *This = impl_from_ISystemInformation(iface);
 57     LONG refs = InterlockedDecrement(&This->refs);
 58     if (!refs)
 59     {
 60         TRACE("destroying %p\n", This);
 61         HeapFree(GetProcessHeap(), 0, This);
 62     }
 63     return refs;
 64 }
 65 
 66 static HRESULT WINAPI systeminfo_QueryInterface(ISystemInformation *iface,
 67                     REFIID riid, void **ppvObject)
 68 {
 69     systeminfo *This = impl_from_ISystemInformation(iface);
 70 
 71     TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
 72 
 73     if (IsEqualGUID(riid, &IID_ISystemInformation) ||
 74         IsEqualGUID(riid, &IID_IDispatch) ||
 75         IsEqualGUID(riid, &IID_IUnknown))
 76     {
 77         *ppvObject = iface;
 78     }
 79     else
 80     {
 81         FIXME("interface %s not implemented\n", debugstr_guid(riid));
 82         return E_NOINTERFACE;
 83     }
 84     ISystemInformation_AddRef(iface);
 85     return S_OK;
 86 }
 87 
 88 static HRESULT WINAPI systeminfo_GetTypeInfoCount(ISystemInformation *iface,
 89                     UINT *pctinfo )
 90 {
 91     FIXME("\n");
 92     return E_NOTIMPL;
 93 }
 94 
 95 static HRESULT WINAPI systeminfo_GetTypeInfo(ISystemInformation *iface,
 96                     UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 97 {
 98     FIXME("\n");
 99     return E_NOTIMPL;
100 }
101 
102 static HRESULT WINAPI systeminfo_GetIDsOfNames(ISystemInformation *iface,
103                     REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid,
104                     DISPID *rgDispId)
105 {
106     FIXME("\n");
107     return E_NOTIMPL;
108 }
109 
110 static HRESULT WINAPI systeminfo_Invoke(ISystemInformation *iface,
111                     DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags,
112                     DISPPARAMS *pDispParams, VARIANT *pVarResult,
113                     EXCEPINFO *pExcepInfo, UINT *puArgErr )
114 {
115     FIXME("\n");
116     return E_NOTIMPL;
117 }
118 
119 static HRESULT WINAPI systeminfo_get_OemHardwareSupportLink(ISystemInformation *iface,
120                                 BSTR *retval)
121 {
122     FIXME("\n");
123     return E_NOTIMPL;
124 }
125 
126 static HRESULT WINAPI systeminfo_get_RebootRequired(ISystemInformation *iface,
127                                 VARIANT_BOOL *retval)
128 {
129     *retval = VARIANT_FALSE;
130     return S_OK;
131 }
132 
133 static const struct ISystemInformationVtbl systeminfo_vtbl =
134 {
135     systeminfo_QueryInterface,
136     systeminfo_AddRef,
137     systeminfo_Release,
138     systeminfo_GetTypeInfoCount,
139     systeminfo_GetTypeInfo,
140     systeminfo_GetIDsOfNames,
141     systeminfo_Invoke,
142     systeminfo_get_OemHardwareSupportLink,
143     systeminfo_get_RebootRequired
144 };
145 
146 HRESULT SystemInformation_create(IUnknown *pUnkOuter, LPVOID *ppObj)
147 {
148     systeminfo *info;
149 
150     TRACE("(%p,%p)\n", pUnkOuter, ppObj);
151 
152     info = HeapAlloc(GetProcessHeap(), 0, sizeof(*info));
153     if (!info)
154         return E_OUTOFMEMORY;
155 
156     info->ISystemInformation_iface.lpVtbl = &systeminfo_vtbl;
157     info->refs = 1;
158 
159     *ppObj = &info->ISystemInformation_iface;
160 
161     TRACE("returning iface %p\n", *ppObj);
162     return S_OK;
163 }
164 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.