I cannnot make sure my patch 99266 cid:part1.07050802.08000504@gmail.com was rejected.
From: Akira Nakagawa matyapiro31@gmail.com Subject: add ualapi directory(try 15) Message-Id: 52496BA8.1020908@gmail.com Date: Mon, 30 Sep 2013 21:16:40 +0900
I think it has no problem without what Bruno said. So this is the last one.
From e7b788f927621f5d8544bbf73f1e155e05098387 Mon Sep 17 00:00:00 2001 Message-Id: e7b788f927621f5d8544bbf73f1e155e05098387.1380543383.git.matyapiro31@gmail.com From: Akira Nakagawa matyapiro31@gmail.com Date: Mon, 30 Sep 2013 21:13:52 +0900 Subject: [PATCH] add ual directory (try 15)
--- dlls/ualapi/Makefile.in | 6 ++++ dlls/ualapi/main.c | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/ualapi/ualapi.spec | 4 +++ include/ual.h | 47 +++++++++++++++++++++++++++ 4 files changed, 143 insertions(+)
diff --git a/dlls/ualapi/Makefile.in b/dlls/ualapi/Makefile.in new file mode 100644 index 0000000..59e56fe --- /dev/null +++ b/dlls/ualapi/Makefile.in @@ -0,0 +1,6 @@ +MODULE = ualapi.dll +IMPORTLIB = ualapi + +C_SRCS = main.c + +@MAKE_DLL_RULES@ diff --git a/dlls/ualapi/main.c b/dlls/ualapi/main.c new file mode 100644 index 0000000..7b3ff7b --- /dev/null +++ b/dlls/ualapi/main.c @@ -0,0 +1,86 @@ +/* + * main.c + * This file is part of wine + * + * Copyright (C) 2013 - Akira Nakagawa + * + * wine 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. + * + * wine 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 wine. If not, see http://www.gnu.org/licenses/. + */ +#include <stdio.h> +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "wine/debug.h" +#include "ual.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ualapi); + +/***************************************************** + * DllMain + */ +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved); + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hinstDLL); + break; + } + return TRUE; +} + +/* + * Return S_OK if succeed,or return error code + * It records Data of the user. + */ +HRESULT +WINAPI +UalStart( + PUAL_DATA_BLOB Data){ + FIXME("This function is not supported.\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return S_OK; +} + +HRESULT +WINAPI +UalStop( + PUAL_DATA_BLOB Data){ + FIXME("This function is not supported.\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return S_OK; +} + +HRESULT +WINAPI +UalInstrument( + PUAL_DATA_BLOB Data){ + FIXME("This function is not supported.\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return S_OK; +} + +HRESULT +WINAPI +UalRegisterProduct( + const WCHAR* wszProductName, + const WCHAR* wszRoleName, + const WCHAR* wszGuid){ + FIXME("This function is not supported.\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return S_OK; +} diff --git a/dlls/ualapi/ualapi.spec b/dlls/ualapi/ualapi.spec new file mode 100644 index 0000000..b7682fb --- /dev/null +++ b/dlls/ualapi/ualapi.spec @@ -0,0 +1,4 @@ +@ stdcall UalStart(ptr) +@ stdcall UalStop(ptr) +@ stdcall UalInstrument(ptr) +@ stdcall UalRegisterProduct(wstr wstr wstr) diff --git a/include/ual.h b/include/ual.h new file mode 100644 index 0000000..14f1c74 --- /dev/null +++ b/include/ual.h @@ -0,0 +1,47 @@ +/* + * ual.h: User Access Logging + * This file is part of wine + * + * Copyright (C) 2013 - Akira Nakagawa + * + * wine 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. + * + * wine 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 wine. If not, see http://www.gnu.org/licenses/. + */ + + +#ifndef _UAL_H_INCLUDED +#define _UAL_H_INCLUDED + +#include <winsock2.h> + +typedef struct tagUAL_DATA_BLOB +{ + DWORD Size; + GUID RoleGuid; + GUID TenantId; + SOCKADDR_STORAGE Address; + WCHAR UserName[MAX_PATH]; +} UAL_DATA_BLOB, *PUAL_DATA_BLOB; + +HRESULT WINAPI UalStart(PUAL_DATA_BLOB Data); + +HRESULT WINAPI UalStop(PUAL_DATA_BLOB Data); + +HRESULT WINAPI UalInstrument(PUAL_DATA_BLOB Data); + +HRESULT WINAPI UalRegisterProduct( + const WCHAR* wszProductName, + const WCHAR* wszRoleName, + const WCHAR* wszGuid); +#endif +