ReactOS 0.4.16-dev-197-g92996da
systeminfo.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "ole2.h"
#include "wuapi.h"
#include "wuapi_private.h"
#include "wine/debug.h"
Include dependency graph for systeminfo.c:

Go to the source code of this file.

Classes

struct  _systeminfo
 

Macros

#define COBJMACROS
 

Typedefs

typedef struct _systeminfo systeminfo
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wuapi)
 
static systeminfoimpl_from_ISystemInformation (ISystemInformation *iface)
 
static ULONG WINAPI systeminfo_AddRef (ISystemInformation *iface)
 
static ULONG WINAPI systeminfo_Release (ISystemInformation *iface)
 
static HRESULT WINAPI systeminfo_QueryInterface (ISystemInformation *iface, REFIID riid, void **ppvObject)
 
static HRESULT WINAPI systeminfo_GetTypeInfoCount (ISystemInformation *iface, UINT *pctinfo)
 
static HRESULT WINAPI systeminfo_GetTypeInfo (ISystemInformation *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI systeminfo_GetIDsOfNames (ISystemInformation *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI systeminfo_Invoke (ISystemInformation *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI systeminfo_get_OemHardwareSupportLink (ISystemInformation *iface, BSTR *retval)
 
static HRESULT WINAPI systeminfo_get_RebootRequired (ISystemInformation *iface, VARIANT_BOOL *retval)
 
HRESULT SystemInformation_create (LPVOID *ppObj)
 

Variables

static const struct ISystemInformationVtbl systeminfo_vtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 22 of file systeminfo.c.

Typedef Documentation

◆ systeminfo

Function Documentation

◆ impl_from_ISystemInformation()

static systeminfo * impl_from_ISystemInformation ( ISystemInformation *  iface)
inlinestatic

Definition at line 43 of file systeminfo.c.

44{
45 return CONTAINING_RECORD(iface, systeminfo, ISystemInformation_iface);
46}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by systeminfo_AddRef(), systeminfo_QueryInterface(), and systeminfo_Release().

◆ systeminfo_AddRef()

static ULONG WINAPI systeminfo_AddRef ( ISystemInformation *  iface)
static

Definition at line 48 of file systeminfo.c.

49{
51 return InterlockedIncrement(&This->refs);
52}
#define InterlockedIncrement
Definition: armddk.h:53
static systeminfo * impl_from_ISystemInformation(ISystemInformation *iface)
Definition: systeminfo.c:43

◆ systeminfo_get_OemHardwareSupportLink()

static HRESULT WINAPI systeminfo_get_OemHardwareSupportLink ( ISystemInformation *  iface,
BSTR retval 
)
static

Definition at line 119 of file systeminfo.c.

121{
122 FIXME("\n");
123 return E_NOTIMPL;
124}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ systeminfo_get_RebootRequired()

static HRESULT WINAPI systeminfo_get_RebootRequired ( ISystemInformation *  iface,
VARIANT_BOOL retval 
)
static

Definition at line 126 of file systeminfo.c.

128{
129 *retval = VARIANT_FALSE;
130 return S_OK;
131}
#define S_OK
Definition: intsafe.h:52

◆ systeminfo_GetIDsOfNames()

static HRESULT WINAPI systeminfo_GetIDsOfNames ( ISystemInformation *  iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 102 of file systeminfo.c.

105{
106 FIXME("\n");
107 return E_NOTIMPL;
108}

◆ systeminfo_GetTypeInfo()

static HRESULT WINAPI systeminfo_GetTypeInfo ( ISystemInformation *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 95 of file systeminfo.c.

97{
98 FIXME("\n");
99 return E_NOTIMPL;
100}

◆ systeminfo_GetTypeInfoCount()

static HRESULT WINAPI systeminfo_GetTypeInfoCount ( ISystemInformation *  iface,
UINT pctinfo 
)
static

Definition at line 88 of file systeminfo.c.

90{
91 FIXME("\n");
92 return E_NOTIMPL;
93}

◆ systeminfo_Invoke()

static HRESULT WINAPI systeminfo_Invoke ( ISystemInformation *  iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 110 of file systeminfo.c.

114{
115 FIXME("\n");
116 return E_NOTIMPL;
117}

◆ systeminfo_QueryInterface()

static HRESULT WINAPI systeminfo_QueryInterface ( ISystemInformation *  iface,
REFIID  riid,
void **  ppvObject 
)
static

Definition at line 66 of file systeminfo.c.

68{
70
71 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
72
73 if (IsEqualGUID(riid, &IID_ISystemInformation) ||
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}
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
#define debugstr_guid
Definition: kernel32.h:35
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define TRACE(s)
Definition: solgame.cpp:4
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ systeminfo_Release()

static ULONG WINAPI systeminfo_Release ( ISystemInformation *  iface)
static

Definition at line 54 of file systeminfo.c.

55{
57 LONG refs = InterlockedDecrement(&This->refs);
58 if (!refs)
59 {
60 TRACE("destroying %p\n", This);
62 }
63 return refs;
64}
#define InterlockedDecrement
Definition: armddk.h:52
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
long LONG
Definition: pedump.c:60

◆ SystemInformation_create()

HRESULT SystemInformation_create ( LPVOID ppObj)

Definition at line 146 of file systeminfo.c.

147{
149
150 TRACE("(%p)\n", 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}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define HeapAlloc
Definition: compat.h:733
static const struct ISystemInformationVtbl systeminfo_vtbl
Definition: systeminfo.c:133

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wuapi  )

Variable Documentation

◆ systeminfo_vtbl

const struct ISystemInformationVtbl systeminfo_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI systeminfo_GetIDsOfNames(ISystemInformation *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: systeminfo.c:102
static HRESULT WINAPI systeminfo_Invoke(ISystemInformation *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: systeminfo.c:110
static ULONG WINAPI systeminfo_Release(ISystemInformation *iface)
Definition: systeminfo.c:54
static HRESULT WINAPI systeminfo_GetTypeInfoCount(ISystemInformation *iface, UINT *pctinfo)
Definition: systeminfo.c:88
static HRESULT WINAPI systeminfo_get_OemHardwareSupportLink(ISystemInformation *iface, BSTR *retval)
Definition: systeminfo.c:119
static HRESULT WINAPI systeminfo_get_RebootRequired(ISystemInformation *iface, VARIANT_BOOL *retval)
Definition: systeminfo.c:126
static HRESULT WINAPI systeminfo_GetTypeInfo(ISystemInformation *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: systeminfo.c:95
static HRESULT WINAPI systeminfo_QueryInterface(ISystemInformation *iface, REFIID riid, void **ppvObject)
Definition: systeminfo.c:66
static ULONG WINAPI systeminfo_AddRef(ISystemInformation *iface)
Definition: systeminfo.c:48

Definition at line 133 of file systeminfo.c.

Referenced by SystemInformation_create().