ReactOS  0.4.15-dev-1384-g878186b
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 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

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 }
static systeminfo * impl_from_ISystemInformation(ISystemInformation *iface)
Definition: systeminfo.c:43
#define InterlockedIncrement
Definition: armddk.h:53

◆ 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: debug.h:111
#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:51

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ 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 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
static systeminfo * impl_from_ISystemInformation(ISystemInformation *iface)
Definition: systeminfo.c:43
#define FIXME(fmt,...)
Definition: debug.h:111
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
const GUID IID_IUnknown
const GUID IID_IDispatch
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define S_OK
Definition: intsafe.h:51
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112

◆ 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 }
static systeminfo * impl_from_ISystemInformation(ISystemInformation *iface)
Definition: systeminfo.c:43
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
#define InterlockedDecrement
Definition: armddk.h:52
#define HeapFree(x, y, z)
Definition: compat.h:594

◆ SystemInformation_create()

HRESULT SystemInformation_create ( LPVOID ppObj)

Definition at line 146 of file systeminfo.c.

147 {
148  systeminfo *info;
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 }
static const struct ISystemInformationVtbl systeminfo_vtbl
Definition: systeminfo.c:133
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:595
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
struct _test_info info[]
Definition: SetCursorPos.c:19
#define S_OK
Definition: intsafe.h:51

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wuapi  )

Variable Documentation

◆ systeminfo_vtbl

const struct ISystemInformationVtbl systeminfo_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI systeminfo_AddRef(ISystemInformation *iface)
Definition: systeminfo.c:48
static HRESULT WINAPI systeminfo_get_RebootRequired(ISystemInformation *iface, VARIANT_BOOL *retval)
Definition: systeminfo.c:126
static HRESULT WINAPI systeminfo_GetTypeInfoCount(ISystemInformation *iface, UINT *pctinfo)
Definition: systeminfo.c:88
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 HRESULT WINAPI systeminfo_get_OemHardwareSupportLink(ISystemInformation *iface, BSTR *retval)
Definition: systeminfo.c:119
static HRESULT WINAPI systeminfo_QueryInterface(ISystemInformation *iface, REFIID riid, void **ppvObject)
Definition: systeminfo.c:66
static ULONG WINAPI systeminfo_Release(ISystemInformation *iface)
Definition: systeminfo.c:54
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_GetTypeInfo(ISystemInformation *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: systeminfo.c:95

Definition at line 133 of file systeminfo.c.

Referenced by SystemInformation_create().