ReactOS  0.4.15-dev-439-g292f67a
main.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 #ifdef __REACTOS__
23 #define CONST_VTABLE
24 #endif
25 
26 #include <windef.h>
27 #include <winbase.h>
28 #include <winreg.h>
29 #include <ole2.h>
30 #include <shellapi.h>
31 #include <activscp.h>
32 #include <initguid.h>
33 
34 #include "wscript.h"
35 
36 #include <wine/debug.h>
37 
38 #ifdef _WIN64
39 
40 #define IActiveScriptParse_Release IActiveScriptParse64_Release
41 #define IActiveScriptParse_InitNew IActiveScriptParse64_InitNew
42 #define IActiveScriptParse_ParseScriptText IActiveScriptParse64_ParseScriptText
43 
44 #else
45 
46 #define IActiveScriptParse_Release IActiveScriptParse32_Release
47 #define IActiveScriptParse_InitNew IActiveScriptParse32_InitNew
48 #define IActiveScriptParse_ParseScriptText IActiveScriptParse32_ParseScriptText
49 
50 #endif
51 
53 
54 static const WCHAR wscriptW[] = {'W','S','c','r','i','p','t',0};
55 static const WCHAR wshW[] = {'W','S','H',0};
57 
60 
61 static HRESULT query_interface(REFIID,void**);
62 
64  REFIID riid, void **ppv)
65 {
66  return query_interface(riid, ppv);
67 }
68 
70 {
71  return 2;
72 }
73 
75 {
76  return 1;
77 }
78 
80 {
81  WINE_TRACE("()\n");
82 
83  *plcid = GetUserDefaultLCID();
84  return S_OK;
85 }
86 
88  LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppunkItem, ITypeInfo **ppti)
89 {
90  WINE_TRACE("(%s %x %p %p)\n", wine_dbgstr_w(pstrName), dwReturnMask, ppunkItem, ppti);
91 
92  if(lstrcmpW(pstrName, wshW) && lstrcmpW(pstrName, wscriptW))
93  return E_FAIL;
94 
95  if(dwReturnMask & SCRIPTINFO_ITYPEINFO) {
96  ITypeInfo_AddRef(host_ti);
97  *ppti = host_ti;
98  }
99 
100  if(dwReturnMask & SCRIPTINFO_IUNKNOWN) {
101  IHost_AddRef(&host_obj);
102  *ppunkItem = (IUnknown*)&host_obj;
103  }
104 
105  return S_OK;
106 }
107 
109  BSTR *pbstrVersion)
110 {
111  WINE_FIXME("()\n");
112  return E_NOTIMPL;
113 }
114 
116  const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
117 {
118  WINE_FIXME("()\n");
119  return E_NOTIMPL;
120 }
121 
123  SCRIPTSTATE ssScriptState)
124 {
125  WINE_TRACE("(%x)\n", ssScriptState);
126  return S_OK;
127 }
128 
130  IActiveScriptError *pscripterror)
131 {
132  WINE_FIXME("()\n");
133  return E_NOTIMPL;
134 }
135 
137 {
138  WINE_TRACE("()\n");
139  return S_OK;
140 }
141 
143 {
144  WINE_TRACE("()\n");
145  return S_OK;
146 }
147 
148 static IActiveScriptSiteVtbl ActiveScriptSiteVtbl = {
160 };
161 
163 
165 {
166  return query_interface(riid, ppv);
167 }
168 
170 {
171  return 2;
172 }
173 
175 {
176  return 1;
177 }
178 
180 {
181  TRACE("(%p)\n", phwnd);
182 
183  *phwnd = NULL;
184  return S_OK;
185 }
186 
188 {
189  TRACE("(%x)\n", fEnable);
190  return S_OK;
191 }
192 
193 static const IActiveScriptSiteWindowVtbl ActiveScriptSiteWindowVtbl = {
199 };
200 
202 
204 {
205  if(IsEqualGUID(riid, &IID_IUnknown)) {
206  TRACE("(IID_IUnknown %p)\n", ppv);
207  *ppv = &script_site;
208  }else if(IsEqualGUID(riid, &IID_IActiveScriptSite)) {
209  TRACE("(IID_IActiveScriptSite %p)\n", ppv);
210  *ppv = &script_site;
211  }else if(IsEqualGUID(riid, &IID_IActiveScriptSiteWindow)) {
212  TRACE("(IID_IActiveScriptSiteWindow %p)\n", ppv);
214  }else {
215  *ppv = NULL;
216  TRACE("(%s %p)\n", wine_dbgstr_guid(riid), ppv);
217  return E_NOINTERFACE;
218  }
219 
220  IUnknown_AddRef((IUnknown*)*ppv);
221  return S_OK;
222 }
223 
224 static BOOL load_typelib(void)
225 {
226  ITypeLib *typelib;
227  HRESULT hres;
228 
229  static const WCHAR wscript_exeW[] = {'w','s','c','r','i','p','t','.','e','x','e',0};
230 
231  hres = LoadTypeLib(wscript_exeW, &typelib);
232  if(FAILED(hres))
233  return FALSE;
234 
235  hres = ITypeLib_GetTypeInfoOfGuid(typelib, &IID_IHost, &host_ti);
236  if(SUCCEEDED(hres))
237  hres = ITypeLib_GetTypeInfoOfGuid(typelib, &IID_IArguments2, &arguments_ti);
238 
239  ITypeLib_Release(typelib);
240  return SUCCEEDED(hres);
241 }
242 
244 {
245  WCHAR fileid[64], progid[64];
246  DWORD res;
247  LONG size;
248  HKEY hkey;
249  HRESULT hres;
250 
251  static const WCHAR script_engineW[] =
252  {'\\','S','c','r','i','p','t','E','n','g','i','n','e',0};
253 
255  if(res != ERROR_SUCCESS)
256  return FALSE;
257 
258  size = ARRAY_SIZE(fileid);
259  res = RegQueryValueW(hkey, NULL, fileid, &size);
260  RegCloseKey(hkey);
261  if(res != ERROR_SUCCESS)
262  return FALSE;
263 
264  WINE_TRACE("fileid is %s\n", wine_dbgstr_w(fileid));
265 
266  lstrcatW(fileid, script_engineW);
267  res = RegOpenKeyW(HKEY_CLASSES_ROOT, fileid, &hkey);
268  if(res != ERROR_SUCCESS)
269  return FALSE;
270 
272  res = RegQueryValueW(hkey, NULL, progid, &size);
273  RegCloseKey(hkey);
274  if(res != ERROR_SUCCESS)
275  return FALSE;
276 
277  WINE_TRACE("ProgID is %s\n", wine_dbgstr_w(progid));
278 
280  return SUCCEEDED(hres);
281 }
282 
284  IActiveScriptParse **parser)
285 {
287  IUnknown *unk;
288  HRESULT hres;
289 
290  hres = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
291  &IID_IUnknown, (void**)&unk);
292  if(FAILED(hres))
293  return FALSE;
294 
295  hres = IUnknown_QueryInterface(unk, &IID_IActiveScript, (void**)&script);
296  IUnknown_Release(unk);
297  if(FAILED(hres))
298  return FALSE;
299 
300  hres = IActiveScript_QueryInterface(script, &IID_IActiveScriptParse, (void**)parser);
301  if(FAILED(hres)) {
302  IActiveScript_Release(script);
303  return FALSE;
304  }
305 
306  *script_ret = script;
307  return TRUE;
308 }
309 
310 static BOOL init_engine(IActiveScript *script, IActiveScriptParse *parser)
311 {
312  HRESULT hres;
313 
314  if(!load_typelib())
315  return FALSE;
316 
317  hres = IActiveScript_SetScriptSite(script, &script_site);
318  if(FAILED(hres))
319  return FALSE;
320 
322  if(FAILED(hres))
323  return FALSE;
324 
325  hres = IActiveScript_AddNamedItem(script, wscriptW, SCRIPTITEM_ISVISIBLE);
326  if(FAILED(hres))
327  return FALSE;
328 
329  hres = IActiveScript_AddNamedItem(script, wshW, SCRIPTITEM_ISVISIBLE);
330  if(FAILED(hres))
331  return FALSE;
332 
333  hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_INITIALIZED);
334  return SUCCEEDED(hres);
335 }
336 
338 {
339  const char *file_map;
340  HANDLE file, map;
341  DWORD size, len;
342  BSTR ret;
343 
346  return NULL;
347 
350  CloseHandle(file);
352  return NULL;
353 
354  file_map = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0);
355  CloseHandle(map);
356  if(!file_map)
357  return NULL;
358 
359  len = MultiByteToWideChar(CP_ACP, 0, file_map, size, NULL, 0);
361  MultiByteToWideChar(CP_ACP, 0, file_map, size, ret, len);
362 
363  UnmapViewOfFile(file_map);
364  return ret;
365 }
366 
367 static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScriptParse *parser)
368 {
369  BSTR text;
370  HRESULT hres;
371 
373  if(!text) {
374  WINE_FIXME("Could not get script text\n");
375  return;
376  }
377 
379  SCRIPTTEXT_HOSTMANAGESSOURCE|SCRIPTITEM_ISVISIBLE, NULL, NULL);
381  if(FAILED(hres)) {
382  WINE_FIXME("ParseScriptText failed: %08x\n", hres);
383  return;
384  }
385 
386  hres = IActiveScript_SetScriptState(script, SCRIPTSTATE_STARTED);
387  if(FAILED(hres))
388  WINE_FIXME("SetScriptState failed: %08x\n", hres);
389 }
390 
391 static BOOL set_host_properties(const WCHAR *prop)
392 {
393  static const WCHAR nologoW[] = {'n','o','l','o','g','o',0};
394  static const WCHAR iactive[] = {'i',0};
395  static const WCHAR batch[] = {'b',0};
396 
397  if(*prop == '/') {
398  ++prop;
399  if(*prop == '/')
400  ++prop;
401  }
402  else
403  ++prop;
404 
405  if(wcsicmp(prop, iactive) == 0)
406  wshInteractive = VARIANT_TRUE;
407  else if(wcsicmp(prop, batch) == 0)
408  wshInteractive = VARIANT_FALSE;
409  else if(wcsicmp(prop, nologoW) == 0)
410  WINE_FIXME("ignored %s switch\n", debugstr_w(nologoW));
411  else
412  {
413  WINE_FIXME("unsupported switch %s\n", debugstr_w(prop));
414  return FALSE;
415  }
416  return TRUE;
417 }
418 
419 int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
420 {
421  WCHAR *ext, *filepart, *filename = NULL;
422  IActiveScriptParse *parser;
424  WCHAR **argv;
425  CLSID clsid;
426  int argc, i;
427  DWORD res;
428 
429  WINE_TRACE("(%p %p %s %x)\n", hInst, hPrevInst, wine_dbgstr_w(cmdline), cmdshow);
430 
432  if(!argv)
433  return 1;
434 
435  for(i=1; i<argc; i++) {
436  if(*argv[i] == '/' || *argv[i] == '-') {
437  if(!set_host_properties(argv[i]))
438  return 1;
439  }else {
440  filename = argv[i];
441  argums = argv+i+1;
442  numOfArgs = argc-i-1;
443  break;
444  }
445  }
446 
447  if(!filename) {
448  WINE_FIXME("No file name specified\n");
449  return 1;
450  }
452  if(!res || res > ARRAY_SIZE(scriptFullName))
453  return 1;
454 
455  ext = wcsrchr(filepart, '.');
456  if(!ext || !get_engine_clsid(ext, &clsid)) {
457  WINE_FIXME("Could not find engine for %s\n", wine_dbgstr_w(ext));
458  return 1;
459  }
460 
462 
463  if(!create_engine(&clsid, &script, &parser)) {
464  WINE_FIXME("Could not create script engine\n");
465  CoUninitialize();
466  return 1;
467  }
468 
469  if(init_engine(script, parser)) {
471  IActiveScript_Close(script);
472  ITypeInfo_Release(host_ti);
473  }else {
474  WINE_FIXME("Script initialization failed\n");
475  }
476 
477  IActiveScript_Release(script);
479 
480  CoUninitialize();
481 
482  return 0;
483 }
static HRESULT WINAPI ActiveScriptSiteWindow_GetWindow(IActiveScriptSiteWindow *iface, HWND *phwnd)
Definition: main.c:179
static BOOL create_engine(CLSID *clsid, IActiveScript **script_ret, IActiveScriptParse **parser)
Definition: main.c:283
static IActiveScriptSiteVtbl ActiveScriptSiteVtbl
Definition: main.c:148
static int argc
Definition: ServiceArgs.c:12
static HRESULT WINAPI ActiveScriptSite_OnScriptTerminate(IActiveScriptSite *iface, const VARIANT *pvarResult, const EXCEPINFO *pexcepinfo)
Definition: main.c:115
static IActiveScriptSite script_site
Definition: main.c:162
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
static HRESULT query_interface(REFIID, void **)
Definition: main.c:203
static BOOL load_typelib(void)
Definition: main.c:224
#define CloseHandle
Definition: compat.h:407
#define E_NOINTERFACE
Definition: winerror.h:2364
#define ERROR_SUCCESS
Definition: deptool.c:10
#define MapViewOfFile
Definition: compat.h:411
IHost host_obj
Definition: host.c:471
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
WINE_DEFAULT_DEBUG_CHANNEL(wmic)
REFIID riid
Definition: precomp.h:44
char * wine_dbgstr_w(const wchar_t *wstr)
Definition: atltest.h:87
const WCHAR * text
Definition: package.c:1827
#define CP_ACP
Definition: compat.h:99
static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPCOLESTR pstrName, DWORD dwReturnMask, IUnknown **ppunkItem, ITypeInfo **ppti)
Definition: main.c:87
int WINAPI lstrcmpW(LPCWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:170
static BOOL get_engine_clsid(const WCHAR *ext, CLSID *clsid)
Definition: main.c:243
REFIID LPVOID * ppv
Definition: atlbase.h:39
static ITypeLib * typelib
Definition: apps.c:108
const char * wine_dbgstr_guid(const GUID *guid)
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
#define WINE_TRACE
Definition: debug.h:353
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1105
HRESULT WINAPI LoadTypeLib(const OLECHAR *szFile, ITypeLib **pptLib)
Definition: typelib.c:458
WCHAR ** argums
Definition: arguments.c:34
DWORD LCID
Definition: nls.h:13
static const IActiveScriptSiteWindowVtbl ActiveScriptSiteWindowVtbl
Definition: main.c:193
LCID WINAPI GetUserDefaultLCID(void)
Definition: lang.c:768
OLECHAR * BSTR
Definition: compat.h:1943
TCHAR * cmdline
Definition: stretchblt.cpp:32
ITypeInfo * arguments_ti
Definition: main.c:59
#define argv
Definition: mplay32.c:18
const char * filename
Definition: ioapi.h:135
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI DECLSPEC_HOTPATCH CLSIDFromProgID(LPCOLESTR progid, LPCLSID clsid)
Definition: compobj.c:2602
static HRESULT WINAPI ActiveScriptSite_OnEnterScript(IActiveScriptSite *iface)
Definition: main.c:136
HINSTANCE hInst
Definition: main.c:29
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
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
WCHAR scriptFullName[MAX_PATH]
Definition: main.c:56
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
LPWSTR WINAPI GetCommandLineW(VOID)
Definition: proc.c:2015
static HRESULT WINAPI ActiveScriptSite_OnLeaveScript(IActiveScriptSite *iface)
Definition: main.c:142
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
Definition: reg.c:3296
#define debugstr_w
Definition: kernel32.h:32
static BOOL set_host_properties(const WCHAR *prop)
Definition: main.c:391
LPWSTR *WINAPI CommandLineToArgvW(LPCWSTR lpCmdline, int *numargs)
Definition: shell32_main.c:79
smooth NULL
Definition: ftsmooth.c:416
char ext[3]
Definition: mkdosfs.c:358
script
Definition: msipriv.h:374
static HRESULT WINAPI ActiveScriptSite_GetDocVersionString(IActiveScriptSite *iface, BSTR *pbstrVersion)
Definition: main.c:108
enum tagSCRIPTSTATE SCRIPTSTATE
_Check_return_ _CRTIMP _CONST_RETURN wchar_t *__cdecl wcsrchr(_In_z_ const wchar_t *_Str, _In_ wchar_t _Ch)
#define FILE_MAP_READ
Definition: compat.h:436
static BSTR get_script_str(const WCHAR *filename)
Definition: main.c:337
static HRESULT WINAPI ActiveScriptSite_OnScriptError(IActiveScriptSite *iface, IActiveScriptError *pscripterror)
Definition: main.c:129
#define OPEN_EXISTING
Definition: compat.h:435
static const WCHAR wscriptW[]
Definition: main.c:54
static HRESULT WINAPI ActiveScriptSite_GetLCID(IActiveScriptSite *iface, LCID *plcid)
Definition: main.c:79
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
HRESULT hres
Definition: protocol.c:465
static BOOL init_engine(IActiveScript *script, IActiveScriptParse *parser)
Definition: main.c:310
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:78
#define CreateFileMappingW(a, b, c, d, e, f)
Definition: compat.h:410
const GUID IID_IUnknown
int numOfArgs
Definition: arguments.c:35
LSTATUS WINAPI RegQueryValueW(HKEY hkey, LPCWSTR name, LPWSTR data, LPLONG count)
Definition: reg.c:4254
#define MAX_PATH
Definition: compat.h:26
#define WINAPI
Definition: msvc.h:6
const char file[]
Definition: icontest.c:11
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
Definition: fileinfo.c:481
Definition: _map.h:44
ITypeInfo * host_ti
Definition: main.c:58
static HRESULT WINAPI ActiveScriptSiteWindow_EnableModeless(IActiveScriptSiteWindow *iface, BOOL fEnable)
Definition: main.c:187
int ret
#define IActiveScriptParse_Release
Definition: main.c:46
REFCLSID clsid
Definition: msctf.c:82
static const WCHAR wshW[]
Definition: main.c:55
GLenum GLsizei len
Definition: glext.h:6722
#define GENERIC_READ
Definition: compat.h:124
#define IActiveScriptParse_InitNew
Definition: main.c:47
static void run_script(const WCHAR *filename, IActiveScript *script, IActiveScriptParse *parser)
Definition: main.c:367
static ULONG WINAPI ActiveScriptSite_Release(IActiveScriptSite *iface)
Definition: main.c:74
static HRESULT WINAPI ActiveScriptSiteWindow_QueryInterface(IActiveScriptSiteWindow *iface, REFIID riid, void **ppv)
Definition: main.c:164
#define wcsicmp
Definition: string.h:1152
static HRESULT WINAPI ActiveScriptSite_QueryInterface(IActiveScriptSite *iface, REFIID riid, void **ppv)
Definition: main.c:63
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
Definition: compobj.c:3325
struct stdole::EXCEPINFO EXCEPINFO
#define S_OK
Definition: intsafe.h:59
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: compobj.c:2067
#define ARRAY_SIZE(a)
Definition: main.h:24
#define E_NOTIMPL
Definition: ddrawi.h:99
static IActiveScriptSiteWindow script_site_window
Definition: main.c:201
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
Definition: oleaut.c:271
BOOL WINAPI IsEqualGUID(REFGUID rguid1, REFGUID rguid2)
Definition: compobj.c:4112
#define PAGE_READONLY
Definition: compat.h:127
static ULONG WINAPI ActiveScriptSiteWindow_AddRef(IActiveScriptSiteWindow *iface)
Definition: main.c:169
#define MultiByteToWideChar
Definition: compat.h:100
#define CreateFileW
Definition: compat.h:409
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:1964
Definition: import.c:85
#define IActiveScriptParse_ParseScriptText
Definition: main.c:48
GLuint res
Definition: glext.h:9613
unsigned int ULONG
Definition: retypes.h:1
#define progid(str)
Definition: exdisp.idl:31
int WINAPI wWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPWSTR cmdline, int cmdshow)
Definition: main.c:419
#define HKEY_CLASSES_ROOT
Definition: winreg.h:10
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
WCHAR * LPWSTR
Definition: xmlstorage.h:184
VARIANT_BOOL wshInteractive
Definition: host.c:40
#define UnmapViewOfFile
Definition: compat.h:412
static ULONG WINAPI ActiveScriptSiteWindow_Release(IActiveScriptSiteWindow *iface)
Definition: main.c:174
static ULONG WINAPI ActiveScriptSite_AddRef(IActiveScriptSite *iface)
Definition: main.c:69
#define SUCCEEDED(hr)
Definition: intsafe.h:57
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 GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum map
Definition: glfuncs.h:262
Definition: fci.c:126
#define WINE_FIXME
Definition: debug.h:365
static HRESULT WINAPI ActiveScriptSite_OnStateChange(IActiveScriptSite *iface, SCRIPTSTATE ssScriptState)
Definition: main.c:122