taskschd: Build with msvcrt.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2019-06-24 10:10:24 +02:00
parent 4dd9f585ac
commit 86faa3d276
6 changed files with 17 additions and 20 deletions

View File

@ -1,6 +1,8 @@
MODULE = taskschd.dll
IMPORTS = oleaut32 ole32 advapi32 xmllite rpcrt4
EXTRADLLFLAGS = -mno-cygwin
C_SRCS = \
folder.c \
folder_collection.c \

View File

@ -28,7 +28,6 @@
#include "schrpc.h"
#include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@ -122,7 +121,7 @@ static HRESULT WINAPI TaskFolder_get_Name(ITaskFolder *iface, BSTR *name)
if (!name) return E_POINTER;
p_name = strrchrW(folder->path, '\\');
p_name = wcsrchr(folder->path, '\\');
if (!p_name)
p_name = folder->path;
else
@ -208,9 +207,9 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
WCHAR *folder_path;
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 */
folder_path = heap_alloc((len + 2) * sizeof(WCHAR));
@ -219,21 +218,21 @@ WCHAR *get_full_path(const WCHAR *parent, const WCHAR *path)
folder_path[0] = 0;
if (parent)
strcpyW(folder_path, parent);
lstrcpyW(folder_path, parent);
if (path && *path)
{
len = strlenW(folder_path);
len = lstrlenW(folder_path);
if (!len || folder_path[len - 1] != '\\')
strcatW(folder_path, bslash);
lstrcatW(folder_path, bslash);
while (*path == '\\') path++;
strcatW(folder_path, path);
lstrcatW(folder_path, path);
}
len = strlenW(folder_path);
len = lstrlenW(folder_path);
if (!len)
strcatW(folder_path, bslash);
lstrcatW(folder_path, bslash);
return folder_path;
}
@ -416,7 +415,7 @@ HRESULT TaskFolder_create(const WCHAR *parent, const WCHAR *path, ITaskFolder **
if (path)
{
int len = strlenW(path);
int len = lstrlenW(path);
if (len && path[len - 1] == '\\') return HRESULT_FROM_WIN32(ERROR_INVALID_NAME);
}

View File

@ -27,7 +27,6 @@
#include "schrpc.h"
#include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd);

View File

@ -28,7 +28,6 @@
#include "schrpc.h"
#include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@ -124,7 +123,7 @@ static HRESULT WINAPI regtask_get_Name(IRegisteredTask *iface, BSTR *name)
if (!name) return E_POINTER;
p_name = strrchrW(regtask->path, '\\');
p_name = wcsrchr(regtask->path, '\\');
if (!p_name)
p_name = regtask->path;
else

View File

@ -30,7 +30,6 @@
#include "schrpc.h"
#include "taskschd_private.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(taskschd);
@ -2919,7 +2918,7 @@ static HRESULT read_int_value(IXmlReader *reader, int *int_val)
hr = read_text_value(reader, &value);
if (hr != S_OK) return hr;
*int_val = strtolW(value, NULL, 10);
*int_val = wcstol(value, NULL, 10);
return S_OK;
}
@ -3871,7 +3870,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
if (server_name[0] == '\\' && server_name[1] == '\\')
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)));
return HRESULT_FROM_WIN32(ERROR_BAD_NETPATH);
@ -3893,7 +3892,7 @@ static HRESULT WINAPI TaskService_Connect(ITaskService *iface, VARIANT server, V
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;
return S_OK;

View File

@ -19,7 +19,6 @@
#ifndef __WINE_TASKSCHD_PRIVATE_H__
#define __WINE_TASKSCHD_PRIVATE_H__
#include "wine/unicode.h"
#include "wine/heap.h"
HRESULT TaskService_create(void **obj) DECLSPEC_HIDDEN;
@ -37,7 +36,7 @@ static inline WCHAR *heap_strdupW(const WCHAR *src)
WCHAR *dst;
unsigned len;
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);
return dst;
}