rtutils: Add stub TraceRegisterExW and TraceRegisterExA.
The -W function is imported by Windows Journal Viewer.
This commit is contained in:
parent
a4689aaeee
commit
5a91cffc20
|
@ -7,7 +7,8 @@ IMPORTLIB = rtutils
|
||||||
IMPORTS = kernel32
|
IMPORTS = kernel32
|
||||||
|
|
||||||
C_SRCS = \
|
C_SRCS = \
|
||||||
main.c
|
main.c \
|
||||||
|
tracing.c
|
||||||
|
|
||||||
@MAKE_DLL_RULES@
|
@MAKE_DLL_RULES@
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@
|
||||||
@ stub TracePrintfW
|
@ stub TracePrintfW
|
||||||
@ stub TracePutsExA
|
@ stub TracePutsExA
|
||||||
@ stub TracePutsExW
|
@ stub TracePutsExW
|
||||||
@ stub TraceRegisterExA
|
@ stdcall TraceRegisterExA(str long)
|
||||||
@ stub TraceRegisterExW
|
@ stdcall TraceRegisterExW(wstr long)
|
||||||
@ stub TraceVprintfExA
|
@ stub TraceVprintfExA
|
||||||
@ stub TraceVprintfExW
|
@ stub TraceVprintfExW
|
||||||
@ stub UpdateWaitTimer
|
@ stub UpdateWaitTimer
|
||||||
|
|
|
@ -0,0 +1,64 @@
|
||||||
|
/*
|
||||||
|
* Tracing API functions
|
||||||
|
*
|
||||||
|
* Copyright 2009 Alexander Scott-Johns
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#include "windef.h"
|
||||||
|
#include "winbase.h"
|
||||||
|
#include "winnt.h"
|
||||||
|
#include "winuser.h"
|
||||||
|
#include "winnls.h"
|
||||||
|
|
||||||
|
#include "wine/debug.h"
|
||||||
|
|
||||||
|
#include "rtutils.h"
|
||||||
|
|
||||||
|
WINE_DEFAULT_DEBUG_CHANNEL(rtutils);
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TraceRegisterExW (RTUTILS.@)
|
||||||
|
*/
|
||||||
|
DWORD WINAPI TraceRegisterExW(LPCWSTR name, DWORD flags)
|
||||||
|
{
|
||||||
|
FIXME("(%s, %x): stub\n", debugstr_w(name), flags);
|
||||||
|
return INVALID_TRACEID;
|
||||||
|
}
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* TraceRegisterExA (RTUTILS.@)
|
||||||
|
*
|
||||||
|
* See TraceRegisterExW.
|
||||||
|
*/
|
||||||
|
DWORD WINAPI TraceRegisterExA(LPCSTR name, DWORD flags)
|
||||||
|
{
|
||||||
|
DWORD id;
|
||||||
|
int lenW = MultiByteToWideChar(CP_ACP, 0, name, -1, NULL, 0);
|
||||||
|
WCHAR* nameW = HeapAlloc(GetProcessHeap(), 0, lenW * sizeof(WCHAR));
|
||||||
|
if (!nameW)
|
||||||
|
{
|
||||||
|
SetLastError(ERROR_OUTOFMEMORY);
|
||||||
|
return INVALID_TRACEID;
|
||||||
|
}
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, lenW);
|
||||||
|
id = TraceRegisterExW(nameW, flags);
|
||||||
|
HeapFree(GetProcessHeap(), 0, nameW);
|
||||||
|
return id;
|
||||||
|
}
|
|
@ -390,6 +390,7 @@ SRCDIR_INCLUDES = \
|
||||||
rpcndr.h \
|
rpcndr.h \
|
||||||
rpcnterr.h \
|
rpcnterr.h \
|
||||||
rpcproxy.h \
|
rpcproxy.h \
|
||||||
|
rtutils.h \
|
||||||
scarderr.h \
|
scarderr.h \
|
||||||
schannel.h \
|
schannel.h \
|
||||||
schemadef.h \
|
schemadef.h \
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
/*
|
||||||
|
* Rtutils.h - Routing utilities / RRAS tracing
|
||||||
|
*
|
||||||
|
* Copyright (C) 2009 Alexander Scott-Johns
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _RTUTILS_H_
|
||||||
|
#define _RTUTILS_H_
|
||||||
|
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DWORD WINAPI TraceRegisterExW(LPCWSTR name, DWORD flags);
|
||||||
|
DWORD WINAPI TraceRegisterExA(LPCSTR name, DWORD flags);
|
||||||
|
#define TraceRegisterEx WINELIB_NAME_AW(TraceRegisterEx)
|
||||||
|
|
||||||
|
#define TraceRegisterW(name) TraceRegisterExW((name), 0)
|
||||||
|
#define TraceRegisterA(name) TraceRegisterExA((name), 0)
|
||||||
|
#define TraceRegister WINELIB_NAME_AW(TraceRegister)
|
||||||
|
|
||||||
|
/* Flags for TraceRegisterEx(W|A) */
|
||||||
|
#define TRACE_USE_FILE 1
|
||||||
|
#define TRACE_USE_CONSOLE 2
|
||||||
|
|
||||||
|
/* Return value of TraceRegisterEx(W|A) */
|
||||||
|
#define INVALID_TRACEID 0xFFFFFFFF
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _RTUTILS_H_ */
|
Loading…
Reference in New Issue