From 1bd3eb1aecfb21a4155b9b59aec2c2790d3f334c Mon Sep 17 00:00:00 2001 From: Volodymyr M. Shcherbyna Date: Wed, 17 Nov 2010 21:52:49 +0100 Subject: Implementing stub version of dbgeng.dll (Debugger Engine API) Reply-To: wine-devel --- dlls/dbgeng/Makefile.in | 7 +++ dlls/dbgeng/dbgeng.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/dbgeng/dbgeng.spec | 2 + 3 files changed, 120 insertions(+), 0 deletions(-) create mode 100644 dlls/dbgeng/Makefile.in create mode 100644 dlls/dbgeng/dbgeng.c create mode 100644 dlls/dbgeng/dbgeng.spec diff --git a/dlls/dbgeng/Makefile.in b/dlls/dbgeng/Makefile.in new file mode 100644 index 0000000..07c58ab --- /dev/null +++ b/dlls/dbgeng/Makefile.in @@ -0,0 +1,7 @@ +MODULE = dbgeng.dll +IMPORTLIB = dbgebg +IMPORTS = kernel + +C_SRCS = dbgeng.c + +@MAKE_DLL_RULES@ diff --git a/dlls/dbgeng/dbgeng.c b/dlls/dbgeng/dbgeng.c new file mode 100644 index 0000000..8461d33 --- /dev/null +++ b/dlls/dbgeng/dbgeng.c @@ -0,0 +1,111 @@ +/* + * Support for Microsoft Debugging Extension API + * + * Copyright 2010 WINE Project (http://www.winehq.org/) + * + * 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 + +#include "windef.h" +#include "winbase.h" +#include "winternl.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(dbgeng); + +/************************************************************ +* DebugExtensionInitialize (DBGENG.@) +* +* Initialize dbgeng Engine. +* +* PARAMS +* Version [I] Receives the version of the extension. The high 16 bits contain the major version number, and the low 16 bits contain the minor version number. +* Flags [I] Set this to zero. (Reserved for future use.) +* +* RETURNS +* Success: S_OK +* Failure: Any other value indicates that the extension DLL was unable to initialize and the engine will unload it +* +* BUGS +* Unimplemented +*/ +HRESULT WINAPI DebugExtensionInitialize(ULONG * Version, ULONG * Flags) +{ + FIXME("(%p,%p): stub\n", Version, Flags); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + + return E_NOTIMPL; +} + +/************************************************************ +* DebugCreate (DBGENG.@) +* +* Creates a new client object and returns an interface pointer to it +* +* PARAMS +* InterfaceId [I] Specifies the interface identifier (IID) of the desired debugger engine client interface. +* Interface [I] Receives an interface pointer for the new client. +* +* RETURNS +* Success: S_OK +* Failure: Any other value +* +* BUGS +* Unimplemented +*/ +HRESULT WINAPI DebugCreate(REFIID InterfaceId, PVOID *Interface) +{ + FIXME("(%p,%p): stub\n", InterfaceId, Interface); + + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + + return E_NOTIMPL; +} + +/************************************************************ +* DllMain (DBGENG.@) +* +* Library Entry Point +* +* PARAMS +* hInstance [I] A handle to the DLL module +* fdwReason [I] The reason code that indicates why the DLL entry-point function is being called +* lpvReserved [I] Extended information +* +* RETURNS +* Success: TRUE (when fdwReason is DLL_PROCESS_ATTACH) +* Failure: FALSE (when fdwReason is DLL_PROCESS_ATTACH) +* +* BUGS +* Unimplemented +*/ +BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD fdwReason, LPVOID lpvReserved) +{ + BOOL bRetVal = FALSE; + + TRACE("(%p,%x,%p)\n", hInstance, fdwReason, lpvReserved); + + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + bRetVal = DisableThreadLibraryCalls(hInstance); + break; + } + + return bRetVal; +} diff --git a/dlls/dbgeng/dbgeng.spec b/dlls/dbgeng/dbgeng.spec new file mode 100644 index 0000000..d8ba681 --- /dev/null +++ b/dlls/dbgeng/dbgeng.spec @@ -0,0 +1,2 @@ +@ stdcall DebugExtensionInitialize(ptr ptr) +@ stdcall DebugCreate(ptr ptr) -- 1.7.2.3