Commit 86faa3d2 authored by Alexandre Julliard's avatar Alexandre Julliard

taskschd: Build with msvcrt.

parent 4dd9f585
MODULE = taskschd.dll MODULE = taskschd.dll
IMPORTS = oleaut32 ole32 advapi32 xmllite rpcrt4 IMPORTS = oleaut32 ole32 advapi32 xmllite rpcrt4
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \ C_SRCS = \
folder.c \ folder.c \
folder_collection.c \ folder_collection.c \
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "schrpc.h" #include "schrpc.h"
#include "taskschd_private.h" #include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd); WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
...@@ -122,7 +121,7 @@ static HRESULT WINAPI TaskFolder_get_Name(ITaskFolder *iface, BSTR *name) ...@@ -122,7 +121,7 @@ static HRESULT WINAPI TaskFolder_get_Name(ITaskFolder *iface, BSTR *name)
if (!name) return E_POINTER; if (!name) return E_POINTER;
p_name = strrchrW(folder->path, '\\'); p_name = wcsrchr(folder->path, '\\');
if (!p_name) if (!p_name)
p_name = folder->path; p_name = folder->path;
else else
...@@ -208,9 +207,9 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path) ...@@ -208,9 +207,9 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
WCHAR *folder_path; WCHAR *folder_path;
int len = 0; int len = 0;
if (path) len = strlenW(path); if (path) len = lstrlenW(path);
if (parent) len += strlenW(parent); if (parent) len += lstrlenW(parent);
/* +1 if parent is not '\' terminated */ /* +1 if parent is not '\' terminated */
folder_path = heap_alloc((len + 2) * sizeof(WCHAR)); folder_path = heap_alloc((len + 2) * sizeof(WCHAR));
...@@ -219,21 +218,21 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path) ...@@ -219,21 +218,21 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
folder_path[0] = 0; folder_path[0] = 0;
if (parent) if (parent)
strcpyW(folder_path, parent); lstrcpyW(folder_path, parent);
if (path && *path) if (path && *path)
{ {
len = strlenW(folder_path); len = lstrlenW(folder_path);
if (!len || folder_path[len - 1] != '\\') if (!len || folder_path[len - 1] != '\\')
strcatW(folder_path, bslash); lstrcatW(folder_path, bslash);
while (*path == '\\') path++; while (*path == '\\') path++;
strcatW(folder_path, path); lstrcatW(folder_path, path);
} }
len = strlenW(folder_path); len = lstrlenW(folder_path);
if (!len) if (!len)
strcatW(folder_path, bslash); lstrcatW(folder_path, bslash);
return folder_path; return folder_path;
} }
...@@ -416,7 +415,7 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder ** ...@@ -416,7 +415,7 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **
if (path) if (path)
{ {
int len = strlenW(path); int len = lstrlenW(path);
if (len && path[len - 1] == '\\') return HRESULT_FROM_WIN32(ERROR_INVALID_NAME); if (len && path[len - 1] == '\\') return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
} }
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "schrpc.h" #include "schrpc.h"
#include "taskschd_private.h" #include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd); WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include "schrpc.h" #include "schrpc.h"
#include "taskschd_private.h" #include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd); WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
...@@ -124,7 +123,7 @@ static HRESULT WINAPI regtask_get_Name(IRegisteredTask *iface, BSTR *name) ...@@ -124,7 +123,7 @@ static HRESULT WINAPI regtask_get_Name(IRegisteredTask *iface, BSTR *name)
if (!name) return E_POINTER; if (!name) return E_POINTER;
p_name = strrchrW(regtask->path, '\\'); p_name = wcsrchr(regtask->path, '\\');
if (!p_name) if (!p_name)
p_name = regtask->path; p_name = regtask->path;
else else
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include "schrpc.h" #include "schrpc.h"
#include "taskschd_private.h" #include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h" #include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd); WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
...@@ -2919,7 +2918,7 @@ static HRESULT read_int_value(IXmlReader *reader, int *int_val) ...@@ -2919,7 +2918,7 @@ static HRESULT read_int_value(IXmlReader *reader, int *int_val)
hr = read_text_value(reader, &value); hr = read_text_value(reader, &value);
if (hr != S_OK) return hr; if (hr != S_OK) return hr;
*int_val = strtolW(value, NULL, 10); *int_val = wcstol(value, NULL, 10);
return S_OK; return S_OK;
} }
...@@ -3871,7 +3870,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V ...@@ -3871,7 +3870,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
if (server_name[0] == '\\' && server_name[1] == '\\') if (server_name[0] == '\\' && server_name[1] == '\\')
server_name += 2; server_name += 2;
if (strcmpiW(server_name, comp_name)) if (wcsicmp(server_name, comp_name))
{ {
FIXME("connection to remote server %s is not supported\n", debugstr_w(V_BSTR(&server))); FIXME("connection to remote server %s is not supported\n", debugstr_w(V_BSTR(&server)));
return HRESULT_FROM_WIN32(ERROR_BAD_NETPATH); return HRESULT_FROM_WIN32(ERROR_BAD_NETPATH);
...@@ -3893,7 +3892,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V ...@@ -3893,7 +3892,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
TRACE("server version %#x\n", task_svc->version); TRACE("server version %#x\n", task_svc->version);
strcpyW(task_svc->comp_name, comp_name); lstrcpyW(task_svc->comp_name, comp_name);
task_svc->connected = TRUE; task_svc->connected = TRUE;
return S_OK; return S_OK;
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#ifndef __WINE_TASKSCHD_PRIVATE_H__ #ifndef __WINE_TASKSCHD_PRIVATE_H__
#define __WINE_TASKSCHD_PRIVATE_H__ #define __WINE_TASKSCHD_PRIVATE_H__
#include "wine/unicode.h"
#include "wine/heap.h" #include "wine/heap.h"
HRESULT TaskService_create(void **obj) DECLSPEC_HIDDEN; HRESULT TaskService_create(void **obj) DECLSPEC_HIDDEN;
...@@ -37,7 +36,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src) ...@@ -37,7 +36,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
WCHAR *dst; WCHAR *dst;
unsigned len; unsigned len;
if (!src) return NULL; if (!src) return NULL;
len = (strlenW(src) + 1) * sizeof(WCHAR); len = (lstrlenW(src) + 1) * sizeof(WCHAR);
if ((dst = heap_alloc(len))) memcpy(dst, src, len); if ((dst = heap_alloc(len))) memcpy(dst, src, len);
return dst; return dst;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment