ReactOS 0.4.17-dev-357-ga8f14ff
host.c
Go to the documentation of this file.
1/*
2 * Copyright 2010 Jacek Caban for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19#include <stdarg.h>
20
21#define COBJMACROS
22#define CONST_VTABLE
23
24#include <windef.h>
25#include <winbase.h>
26#include <ole2.h>
27
28#include "wscript.h"
29
30#include <wine/debug.h>
31
33
34#define BUILDVERSION 16535
35static const WCHAR wshVersionW[] = L"5.8";
36
38#ifndef CSCRIPT_BUILD
39 VARIANT_TRUE;
40#else
41 VARIANT_FALSE;
42#endif
43
45
47{
48 VARIANT v;
50
51 if(V_VT(src) == VT_NULL) {
52 *dst = SysAllocString(L"null");
53 return *dst ? S_OK : E_OUTOFMEMORY;
54 }
55
56 V_VT(&v) = VT_EMPTY;
58 if(FAILED(hres)) {
59 WARN("Could not convert argument %s to string\n", debugstr_variant(src));
60 return hres;
61 }
62
63 *dst = V_BSTR(&v);
64 return S_OK;
65}
66
67static void print_string(const WCHAR *string)
68{
69 DWORD count, ret, len, lena;
70 char *buf;
71
72 if(wshInteractive) {
73 MessageBoxW(NULL, string, L"Windows Script Host", MB_OK);
74 return;
75 }
76
77 len = lstrlenW(string);
79 if(ret) {
81 return;
82 }
83
84 lena = WideCharToMultiByte(GetOEMCP(), 0, string, len, NULL, 0, NULL, NULL);
85 buf = malloc(len);
86 if(!buf)
87 return;
88
89 WideCharToMultiByte(GetOEMCP(), 0, string, len, buf, lena, NULL, NULL);
91 free(buf);
93}
94
96{
97 WINE_TRACE("(%s %p)\n", wine_dbgstr_guid(riid), ppv);
98
101 || IsEqualGUID(&IID_IHost, riid)) {
102 *ppv = iface;
103 return S_OK;
104 }
105
106 *ppv = NULL;
107 return E_NOINTERFACE;
108}
109
111{
112 return 2;
113}
114
116{
117 return 1;
118}
119
121{
122 WINE_TRACE("(%p)\n", pctinfo);
123 *pctinfo = 1;
124 return S_OK;
125}
126
128 ITypeInfo **ppTInfo)
129{
130 WINE_TRACE("(%x %lx %p\n", iTInfo, lcid, ppTInfo);
131
132 ITypeInfo_AddRef(host_ti);
133 *ppTInfo = host_ti;
134 return S_OK;
135}
136
137static HRESULT WINAPI Host_GetIDsOfNames(IHost *iface, REFIID riid, LPOLESTR *rgszNames,
138 UINT cNames, LCID lcid, DISPID *rgDispId)
139{
140 WINE_TRACE("(%s %p %d %lx %p)\n", wine_dbgstr_guid(riid), rgszNames,
141 cNames, lcid, rgDispId);
142
143 return ITypeInfo_GetIDsOfNames(host_ti, rgszNames, cNames, rgDispId);
144}
145
146static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid,
147 LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult,
148 EXCEPINFO *pExcepInfo, UINT *puArgErr)
149{
150 WINE_TRACE("(%ld %p %p)\n", dispIdMember, pDispParams, pVarResult);
151
152 return ITypeInfo_Invoke(host_ti, iface, dispIdMember, wFlags, pDispParams,
153 pVarResult, pExcepInfo, puArgErr);
154}
155
156static HRESULT WINAPI Host_get_Name(IHost *iface, BSTR *out_Name)
157{
158 WINE_TRACE("(%p)\n", out_Name);
159
160 if(!(*out_Name = SysAllocString(L"Windows Script Host")))
161 return E_OUTOFMEMORY;
162 return S_OK;
163}
164
165static HRESULT WINAPI Host_get_Application(IHost *iface, IDispatch **out_Dispatch)
166{
167 WINE_TRACE("(%p)\n", out_Dispatch);
168
169 *out_Dispatch = (IDispatch*)&host_obj;
170 return S_OK;
171}
172
173static HRESULT WINAPI Host_get_FullName(IHost *iface, BSTR *out_Path)
174{
175 WCHAR fullPath[MAX_PATH];
176
177 WINE_TRACE("(%p)\n", out_Path);
178
179 if(GetModuleFileNameW(NULL, fullPath, ARRAY_SIZE(fullPath)) == 0)
180 return E_FAIL;
181 if(!(*out_Path = SysAllocString(fullPath)))
182 return E_OUTOFMEMORY;
183 return S_OK;
184}
185
186static HRESULT WINAPI Host_get_Path(IHost *iface, BSTR *out_Path)
187{
189 int howMany;
190 WCHAR *pos;
191
192 WINE_TRACE("(%p)\n", out_Path);
193
195 return E_FAIL;
196 pos = wcsrchr(path, '\\');
197 howMany = pos - path;
198 if(!(*out_Path = SysAllocStringLen(path, howMany)))
199 return E_OUTOFMEMORY;
200 return S_OK;
201}
202
203static HRESULT WINAPI Host_get_Interactive(IHost *iface, VARIANT_BOOL *out_Interactive)
204{
205 WINE_TRACE("(%p)\n", out_Interactive);
206
207 *out_Interactive = wshInteractive;
208 return S_OK;
209}
210
212{
213 WINE_TRACE("(%x)\n", v);
214
216 return S_OK;
217}
218
219static HRESULT WINAPI Host_Quit(IHost *iface, int ExitCode)
220{
221 FIXME("(%d) semi-stub: no script engine clean up\n", ExitCode);
222
223 ExitProcess(ExitCode);
224 return S_OK;
225}
226
227static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName)
228{
229 WCHAR *scriptName;
230
231 WINE_TRACE("(%p)\n", out_ScriptName);
232
233 scriptName = wcsrchr(scriptFullName, '\\');
234 ++scriptName;
235 if(!(*out_ScriptName = SysAllocString(scriptName)))
236 return E_OUTOFMEMORY;
237 return S_OK;
238}
239
240static HRESULT WINAPI Host_get_ScriptFullName(IHost *iface, BSTR *out_ScriptFullName)
241{
242 WINE_TRACE("(%p)\n", out_ScriptFullName);
243
244 if(!(*out_ScriptFullName = SysAllocString(scriptFullName)))
245 return E_OUTOFMEMORY;
246 return S_OK;
247}
248
249static HRESULT WINAPI Host_get_Arguments(IHost *iface, IArguments2 **out_Arguments)
250{
251 WINE_TRACE("(%p)\n", out_Arguments);
252
253 *out_Arguments = &arguments_obj;
254 return S_OK;
255}
256
257static HRESULT WINAPI Host_get_Version(IHost *iface, BSTR *out_Version)
258{
259 WINE_TRACE("(%p)\n", out_Version);
260
261 if(!(*out_Version = SysAllocString(wshVersionW)))
262 return E_OUTOFMEMORY;
263 return S_OK;
264}
265
266static HRESULT WINAPI Host_get_BuildVersion(IHost *iface, int *out_Build)
267{
268 WINE_TRACE("(%p)\n", out_Build);
269
270 *out_Build = BUILDVERSION;
271 return S_OK;
272}
273
274static HRESULT WINAPI Host_get_Timeout(IHost *iface, LONG *out_Timeout)
275{
276 TRACE("(%p)\n", out_Timeout);
277
278 *out_Timeout = wshTimeout;
279 return S_OK;
280}
281
283{
284 TRACE("(%ld)\n", v);
285
286 if(v < 0)
287 return E_INVALIDARG;
288 wshTimeout = v;
290 return S_OK;
291}
292
294 IDispatch **out_Dispatch)
295{
296 IUnknown *unk;
297 GUID guid;
299
300 TRACE("(%s %s %p)\n", wine_dbgstr_w(ProgID), wine_dbgstr_w(Prefix), out_Dispatch);
301
302 if(Prefix && *Prefix) {
303 FIXME("Prefix %s not supported\n", debugstr_w(Prefix));
304 return E_NOTIMPL;
305 }
306
307 hres = CLSIDFromProgID(ProgID, &guid);
308 if(FAILED(hres))
309 return hres;
310
311 hres = CoCreateInstance(&guid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_LOCAL_SERVER|CLSCTX_REMOTE_SERVER,
312 &IID_IUnknown, (void**)&unk);
313 if(FAILED(hres))
314 return hres;
315
316 hres = IUnknown_QueryInterface(unk, &IID_IDispatch, (void**)out_Dispatch);
317 IUnknown_Release(unk);
318 return hres;
319}
320
322{
323 WCHAR *output = NULL, *ptr;
324 unsigned argc, i, len;
325 LONG ubound, lbound;
326 VARIANT *argv;
327 BSTR *strs;
329
330 TRACE("(%p)\n", args);
331
332 if(SafeArrayGetDim(args) != 1) {
333 FIXME("Unsupported args dim %d\n", SafeArrayGetDim(args));
334 return E_NOTIMPL;
335 }
336
337 SafeArrayGetLBound(args, 1, &lbound);
338 SafeArrayGetUBound(args, 1, &ubound);
339
340 hres = SafeArrayAccessData(args, (void**)&argv);
341 if(FAILED(hres))
342 return hres;
343
344 argc = ubound-lbound+1;
345 if (!(strs = calloc(argc, sizeof(*strs))))
346 {
348 return E_OUTOFMEMORY;
349 }
350
351 /* Len of spaces between arguments. */
352 len = argc-1;
353
354 for(i=0; i < argc; i++) {
355 hres = to_string(argv+i, strs+i);
356 if(FAILED(hres))
357 break;
358
359 len += SysStringLen(strs[i]);
360 }
361
363 if(SUCCEEDED(hres)) {
364 ptr = output = malloc((len+1)*sizeof(WCHAR));
365 if(output) {
366 for(i=0; i < argc; i++) {
367 if(i)
368 *ptr++ = ' ';
369 len = SysStringLen(strs[i]);
370 memcpy(ptr, strs[i], len*sizeof(WCHAR));
371 ptr += len;
372 }
373 *ptr = 0;
374 }else {
376 }
377 }
378
379 for(i=0; i < argc; i++)
380 SysFreeString(strs[i]);
381 free(strs);
382 if(FAILED(hres))
383 return hres;
384
385 print_string(output);
386
387 free(output);
388 return S_OK;
389}
390
392 BSTR Prefix, IDispatch **out_Dispatch)
393{
394 WINE_FIXME("(%s %s %s %p)\n", wine_dbgstr_w(Pathname), wine_dbgstr_w(ProgID),
395 wine_dbgstr_w(Prefix), out_Dispatch);
396 return E_NOTIMPL;
397}
398
400{
401 WINE_FIXME("(%p)\n", Object);
402 return E_NOTIMPL;
403}
404
406{
407#ifdef __REACTOS__
409#endif
410 TRACE("(%ld)\n", Time);
411 if (Time < 0)
412 return E_INVALIDARG;
413 Sleep(Time);
414 return S_OK;
415}
416
418{
419 WINE_FIXME("(%p %s)\n", Object, wine_dbgstr_w(Prefix));
420 return E_NOTIMPL;
421}
422
423static HRESULT WINAPI Host_get_StdIn(IHost *iface, ITextStream **ppts)
424{
425 WINE_FIXME("(%p)\n", ppts);
426 return E_NOTIMPL;
427}
428
429static HRESULT WINAPI Host_get_StdOut(IHost *iface, ITextStream **ppts)
430{
431 WINE_FIXME("(%p)\n", ppts);
432 return E_NOTIMPL;
433}
434
435static HRESULT WINAPI Host_get_StdErr(IHost *iface, ITextStream **ppts)
436{
437 WINE_FIXME("(%p)\n", ppts);
438 return E_NOTIMPL;
439}
440
441static const IHostVtbl HostVtbl = {
455 Host_Quit,
464 Host_Echo,
472};
473
IArguments2 arguments_obj
Definition: arguments.c:140
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
WCHAR scriptFullName[MAX_PATH]
Definition: main.c:54
void schedule_timeout(LONG seconds)
Definition: main.c:416
ITypeInfo * host_ti
Definition: main.c:56
#define ARRAY_SIZE(A)
Definition: main.h:20
HANDLE WINAPI GetStdHandle(IN DWORD nStdHandle)
Definition: console.c:203
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, CLSID *clsid)
Definition: combase.c:1437
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define wcsrchr
Definition: compat.h:16
OLECHAR * BSTR
Definition: compat.h:2293
#define MAX_PATH
Definition: compat.h:34
#define WideCharToMultiByte
Definition: compat.h:111
short VARIANT_BOOL
Definition: compat.h:2290
@ VT_BSTR
Definition: compat.h:2303
@ VT_NULL
Definition: compat.h:2296
@ VT_EMPTY
Definition: compat.h:2295
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleW(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
Definition: readwrite.c:1447
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
Definition: rw.c:25
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
Definition: loader.c:600
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1330
UINT WINAPI GetOEMCP(void)
Definition: locale.c:2062
LCID lcid
Definition: locale.c:5660
GUID guid
Definition: version.c:147
MonoAssembly int argc
Definition: metahost.c:107
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
Definition: safearray.c:1033
HRESULT WINAPI SafeArrayAccessData(SAFEARRAY *psa, void **ppvData)
Definition: safearray.c:1137
HRESULT WINAPI SafeArrayUnaccessData(SAFEARRAY *psa)
Definition: safearray.c:1168
UINT WINAPI SafeArrayGetDim(SAFEARRAY *psa)
Definition: safearray.c:1094
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
Definition: safearray.c:1066
static const char * debugstr_variant(const VARIANT *var)
Definition: dom.c:505
return ret
Definition: mutex.c:146
#define L(x)
Definition: resources.c:13
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum src
Definition: glext.h:6340
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
GLenum GLenum dst
Definition: glext.h:6340
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static HRESULT WINAPI Host_QueryInterface(IHost *iface, REFIID riid, void **ppv)
Definition: host.c:95
static HRESULT WINAPI Host_get_Application(IHost *iface, IDispatch **out_Dispatch)
Definition: host.c:165
static ULONG WINAPI Host_Release(IHost *iface)
Definition: host.c:115
static HRESULT WINAPI Host_Invoke(IHost *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: host.c:146
static HRESULT WINAPI Host_GetTypeInfoCount(IHost *iface, UINT *pctinfo)
Definition: host.c:120
static HRESULT WINAPI Host_Echo(IHost *iface, SAFEARRAY *args)
Definition: host.c:321
static HRESULT WINAPI Host_get_ScriptFullName(IHost *iface, BSTR *out_ScriptFullName)
Definition: host.c:240
static HRESULT WINAPI Host_CreateObject(IHost *iface, BSTR ProgID, BSTR Prefix, IDispatch **out_Dispatch)
Definition: host.c:293
static void print_string(const WCHAR *string)
Definition: host.c:67
static HRESULT WINAPI Host_GetObject(IHost *iface, BSTR Pathname, BSTR ProgID, BSTR Prefix, IDispatch **out_Dispatch)
Definition: host.c:391
static HRESULT WINAPI Host_get_FullName(IHost *iface, BSTR *out_Path)
Definition: host.c:173
static HRESULT WINAPI Host_get_Name(IHost *iface, BSTR *out_Name)
Definition: host.c:156
static HRESULT WINAPI Host_GetIDsOfNames(IHost *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: host.c:137
static HRESULT WINAPI Host_get_Version(IHost *iface, BSTR *out_Version)
Definition: host.c:257
static HRESULT WINAPI Host_get_Interactive(IHost *iface, VARIANT_BOOL *out_Interactive)
Definition: host.c:203
static HRESULT WINAPI Host_get_ScriptName(IHost *iface, BSTR *out_ScriptName)
Definition: host.c:227
static HRESULT WINAPI Host_get_BuildVersion(IHost *iface, int *out_Build)
Definition: host.c:266
static HRESULT WINAPI Host_ConnectObject(IHost *iface, IDispatch *Object, BSTR Prefix)
Definition: host.c:417
static HRESULT to_string(VARIANT *src, BSTR *dst)
Definition: host.c:46
IHost host_obj
Definition: host.c:474
static HRESULT WINAPI Host_put_Interactive(IHost *iface, VARIANT_BOOL v)
Definition: host.c:211
static HRESULT WINAPI Host_get_Timeout(IHost *iface, LONG *out_Timeout)
Definition: host.c:274
LONG wshTimeout
Definition: host.c:44
static const WCHAR wshVersionW[]
Definition: host.c:35
static HRESULT WINAPI Host_get_Path(IHost *iface, BSTR *out_Path)
Definition: host.c:186
static HRESULT WINAPI Host_get_StdErr(IHost *iface, ITextStream **ppts)
Definition: host.c:435
static HRESULT WINAPI Host_get_StdOut(IHost *iface, ITextStream **ppts)
Definition: host.c:429
static HRESULT WINAPI Host_Sleep(IHost *iface, LONG Time)
Definition: host.c:405
static HRESULT WINAPI Host_GetTypeInfo(IHost *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: host.c:127
static HRESULT WINAPI Host_Quit(IHost *iface, int ExitCode)
Definition: host.c:219
static ULONG WINAPI Host_AddRef(IHost *iface)
Definition: host.c:110
static const IHostVtbl HostVtbl
Definition: host.c:441
static HRESULT WINAPI Host_get_Arguments(IHost *iface, IArguments2 **out_Arguments)
Definition: host.c:249
static HRESULT WINAPI Host_put_Timeout(IHost *iface, LONG v)
Definition: host.c:282
#define BUILDVERSION
Definition: host.c:34
VARIANT_BOOL wshInteractive
Definition: host.c:37
static HRESULT WINAPI Host_DisconnectObject(IHost *iface, IDispatch *Object)
Definition: host.c:399
static HRESULT WINAPI Host_get_StdIn(IHost *iface, ITextStream **ppts)
Definition: host.c:423
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_w
Definition: kernel32.h:32
#define wine_dbgstr_w
Definition: kernel32.h:34
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
HRESULT hres
Definition: protocol.c:465
static PLARGE_INTEGER Time
Definition: time.c:37
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define argv
Definition: mplay32.c:18
Definition: ihost.idl:30
unsigned int UINT
Definition: ndis.h:50
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
UINT WINAPI SysStringLen(BSTR str)
Definition: oleaut.c:196
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
const GUID IID_IDispatch
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define calloc
Definition: rosglue.h:14
DWORD LCID
Definition: nls.h:13
#define WINE_TRACE
Definition: debug.h:328
#define WINE_FIXME
Definition: debug.h:340
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:171
#define TRACE(s)
Definition: solgame.cpp:4
Definition: match.c:390
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:726
uint32_t ULONG
Definition: typedefs.h:59
HRESULT WINAPI DECLSPEC_HOTPATCH VariantChangeType(VARIANTARG *pvargDest, VARIANTARG *pvargSrc, USHORT wFlags, VARTYPE vt)
Definition: variant.c:962
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
#define STD_OUTPUT_HANDLE
Definition: winbase.h:293
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_OK
Definition: winuser.h:801
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1647