ReactOS 0.4.15-dev-7953-g1f49173
arguments.c File Reference
#include <stdarg.h>
#include <windef.h>
#include <winbase.h>
#include <ole2.h>
#include "wscript.h"
#include <wine/debug.h>
Include dependency graph for arguments.c:

Go to the source code of this file.

Macros

#define COBJMACROS
 
#define CONST_VTABLE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (wscript)
 
static HRESULT WINAPI Arguments2_QueryInterface (IArguments2 *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Arguments2_AddRef (IArguments2 *iface)
 
static ULONG WINAPI Arguments2_Release (IArguments2 *iface)
 
static HRESULT WINAPI Arguments2_GetTypeInfoCount (IArguments2 *iface, UINT *pctinfo)
 
static HRESULT WINAPI Arguments2_GetTypeInfo (IArguments2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI Arguments2_GetIDsOfNames (IArguments2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI Arguments2_Invoke (IArguments2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI Arguments2_Item (IArguments2 *iface, LONG index, BSTR *out_Value)
 
static HRESULT WINAPI Arguments2_Count (IArguments2 *iface, LONG *out_Count)
 
static HRESULT WINAPI Arguments2_get_length (IArguments2 *iface, LONG *out_Count)
 

Variables

WCHAR ** argums
 
int numOfArgs
 
static const IArguments2Vtbl Arguments2Vtbl
 
IArguments2 arguments_obj = { &Arguments2Vtbl }
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 21 of file arguments.c.

◆ CONST_VTABLE

#define CONST_VTABLE

Definition at line 22 of file arguments.c.

Function Documentation

◆ Arguments2_AddRef()

static ULONG WINAPI Arguments2_AddRef ( IArguments2 *  iface)
static

Definition at line 52 of file arguments.c.

53{
54 return 2;
55}

◆ Arguments2_Count()

static HRESULT WINAPI Arguments2_Count ( IArguments2 *  iface,
LONG out_Count 
)
static

Definition at line 111 of file arguments.c.

112{
113 WINE_TRACE("(%p)\n", out_Count);
114
115 *out_Count = numOfArgs;
116 return S_OK;
117}
int numOfArgs
Definition: arguments.c:35
#define S_OK
Definition: intsafe.h:52
#define WINE_TRACE
Definition: debug.h:354

◆ Arguments2_get_length()

static HRESULT WINAPI Arguments2_get_length ( IArguments2 *  iface,
LONG out_Count 
)
static

Definition at line 119 of file arguments.c.

120{
121 WINE_TRACE("(%p)\n", out_Count);
122
123 *out_Count = numOfArgs;
124 return S_OK;
125}

◆ Arguments2_GetIDsOfNames()

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

Definition at line 80 of file arguments.c.

82{
83 WINE_TRACE("(%s %p %d %x %p)\n", wine_dbgstr_guid(riid), rgszNames,
84 cNames, lcid, rgDispId);
85
86 return ITypeInfo_GetIDsOfNames(arguments_ti, rgszNames, cNames, rgDispId);
87}
ITypeInfo * arguments_ti
Definition: main.c:59
REFIID riid
Definition: atlbase.h:39
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:197

◆ Arguments2_GetTypeInfo()

static HRESULT WINAPI Arguments2_GetTypeInfo ( IArguments2 *  iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 70 of file arguments.c.

72{
73 WINE_TRACE("(%x %x %p\n", iTInfo, lcid, ppTInfo);
74
75 ITypeInfo_AddRef(arguments_ti);
76 *ppTInfo = arguments_ti;
77 return S_OK;
78}

◆ Arguments2_GetTypeInfoCount()

static HRESULT WINAPI Arguments2_GetTypeInfoCount ( IArguments2 *  iface,
UINT pctinfo 
)
static

Definition at line 62 of file arguments.c.

63{
64 WINE_TRACE("(%p)\n", pctinfo);
65
66 *pctinfo = 1;
67 return S_OK;
68}

◆ Arguments2_Invoke()

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

Definition at line 89 of file arguments.c.

92{
93 WINE_TRACE("(%d %p %p)\n", dispIdMember, pDispParams, pVarResult);
94
95 return ITypeInfo_Invoke(arguments_ti, iface, dispIdMember, wFlags, pDispParams,
96 pVarResult, pExcepInfo, puArgErr);
97}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ Arguments2_Item()

static HRESULT WINAPI Arguments2_Item ( IArguments2 *  iface,
LONG  index,
BSTR out_Value 
)
static

Definition at line 99 of file arguments.c.

100{
101 WINE_TRACE("(%d %p)\n", index, out_Value);
102
104 return E_INVALIDARG;
105 if(!(*out_Value = SysAllocString(argums[index])))
106 return E_OUTOFMEMORY;
107
108 return S_OK;
109}
WCHAR ** argums
Definition: arguments.c:34
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
GLuint index
Definition: glext.h:6031
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238

◆ Arguments2_QueryInterface()

static HRESULT WINAPI Arguments2_QueryInterface ( IArguments2 *  iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 37 of file arguments.c.

38{
39 WINE_TRACE("(%s %p)\n", wine_dbgstr_guid(riid), ppv);
40
43 || IsEqualGUID(&IID_IArguments2, riid)) {
44 *ppv = iface;
45 return S_OK;
46 }
47
48 *ppv = NULL;
49 return E_NOINTERFACE;
50}
const GUID IID_IUnknown
#define NULL
Definition: types.h:112
REFIID LPVOID * ppv
Definition: atlbase.h:39
const GUID IID_IDispatch
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Arguments2_Release()

static ULONG WINAPI Arguments2_Release ( IArguments2 *  iface)
static

Definition at line 57 of file arguments.c.

58{
59 return 1;
60}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( wscript  )

Variable Documentation

◆ Arguments2Vtbl

const IArguments2Vtbl Arguments2Vtbl
static
Initial value:
= {
}
static HRESULT WINAPI Arguments2_QueryInterface(IArguments2 *iface, REFIID riid, void **ppv)
Definition: arguments.c:37
static HRESULT WINAPI Arguments2_GetTypeInfo(IArguments2 *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: arguments.c:70
static HRESULT WINAPI Arguments2_GetIDsOfNames(IArguments2 *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: arguments.c:80
static HRESULT WINAPI Arguments2_Invoke(IArguments2 *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: arguments.c:89
static HRESULT WINAPI Arguments2_GetTypeInfoCount(IArguments2 *iface, UINT *pctinfo)
Definition: arguments.c:62
static HRESULT WINAPI Arguments2_Item(IArguments2 *iface, LONG index, BSTR *out_Value)
Definition: arguments.c:99
static HRESULT WINAPI Arguments2_Count(IArguments2 *iface, LONG *out_Count)
Definition: arguments.c:111
static ULONG WINAPI Arguments2_AddRef(IArguments2 *iface)
Definition: arguments.c:52
static HRESULT WINAPI Arguments2_get_length(IArguments2 *iface, LONG *out_Count)
Definition: arguments.c:119
static ULONG WINAPI Arguments2_Release(IArguments2 *iface)
Definition: arguments.c:57

Definition at line 127 of file arguments.c.

◆ arguments_obj

IArguments2 arguments_obj = { &Arguments2Vtbl }

Definition at line 140 of file arguments.c.

Referenced by Host_get_Arguments().

◆ argums

WCHAR** argums

Definition at line 34 of file arguments.c.

Referenced by Arguments2_Item(), and wWinMain().

◆ numOfArgs

int numOfArgs

Definition at line 35 of file arguments.c.

Referenced by Arguments2_Count(), Arguments2_get_length(), Arguments2_Item(), and wWinMain().