* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include <stdarg.h>
+
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <windef.h>
+#include <winbase.h>
+#include <ole2.h>
+
#include "wscript.h"
+#include <wine/debug.h>
+#include <wine/heap.h>
+
+WINE_DEFAULT_DEBUG_CHANNEL(wscript);
+
#define BUILDVERSION 16535
static const WCHAR wshNameW[] = {'W','i','n','d','o','w','s',' ','S','c','r','i','p','t',' ','H','o','s','t',0};
return;
}
- len = strlenW(string);
+ len = lstrlenW(string);
ret = WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), string, len, &count, NULL);
if(ret) {
static const WCHAR crnlW[] = {'\r','\n'};
- WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), crnlW, sizeof(crnlW)/sizeof(*crnlW), &count, NULL);
+ WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE), crnlW, ARRAY_SIZE(crnlW), &count, NULL);
return;
}
WINE_TRACE("(%p)\n", out_Path);
- if(GetModuleFileNameW(NULL, fullPath, sizeof(fullPath)/sizeof(WCHAR)) == 0)
+ if(GetModuleFileNameW(NULL, fullPath, ARRAY_SIZE(fullPath)) == 0)
return E_FAIL;
if(!(*out_Path = SysAllocString(fullPath)))
return E_OUTOFMEMORY;
WINE_TRACE("(%p)\n", out_Path);
- if(GetModuleFileNameW(NULL, path, sizeof(path)/sizeof(WCHAR)) == 0)
+ if(GetModuleFileNameW(NULL, path, ARRAY_SIZE(path)) == 0)
return E_FAIL;
- pos = strrchrW(path, '\\');
+ pos = wcsrchr(path, '\\');
howMany = pos - path;
if(!(*out_Path = SysAllocStringLen(path, howMany)))
return E_OUTOFMEMORY;
WINE_TRACE("(%p)\n", out_ScriptName);
- scriptName = strrchrW(scriptFullName, '\\');
+ scriptName = wcsrchr(scriptFullName, '\\');
++scriptName;
if(!(*out_ScriptName = SysAllocString(scriptName)))
return E_OUTOFMEMORY;
{
WCHAR *output = NULL, *ptr;
unsigned argc, i, len;
+#ifdef __REACTOS__
LONG ubound, lbound;
+#else
+ int ubound, lbound;
+#endif
VARIANT *argv;
BSTR *strs;
HRESULT hres;