2 * Copyright 2002 Dmitry Timoshkov for Codeweavers
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
30 NTSTATUS WINAPI LdrDisableThreadCalloutsForDll(HANDLE hModule)
32 if (DisableThreadLibraryCalls(hModule))
33 return STATUS_SUCCESS;
35 return STATUS_DLL_NOT_FOUND;
38 /* FIXME : MODULE_FindModule should depend on LdrGetDllHandle, not vice-versa */
40 NTSTATUS WINAPI LdrGetDllHandle(ULONG x, LONG y, PUNICODE_STRING name, PVOID *base)
45 FIXME("%08lx %08lx %s %p : partial stub\n",x,y,debugstr_wn(name->Buffer,name->Length),base);
49 RtlUnicodeStringToAnsiString(&str, name, TRUE);
50 wm = MODULE_FindModule(str.Buffer);
52 return STATUS_DLL_NOT_FOUND;
53 *base = (PVOID) wm->module;
55 return STATUS_SUCCESS;
58 /* FIXME : MODULE_GetProcAddress should depend on LdrGetProcedureAddress, not vice-versa */
60 NTSTATUS WINAPI LdrGetProcedureAddress(PVOID base, PANSI_STRING name, ULONG ord, PVOID *address)
62 WARN("%p %s %ld %p\n",base, debugstr_an(name->Buffer,name->Length), ord, address);
65 *address = MODULE_GetProcAddress( (HMODULE) base, name->Buffer, -1, FALSE);
67 *address = MODULE_GetProcAddress( (HMODULE) base, (LPSTR) ord, -1, FALSE);
69 return (*address) ? STATUS_SUCCESS : STATUS_DLL_NOT_FOUND;