Alexandre Julliard : kernel32: Move the 16-bit PE module functions to kernel16.c.

Alexandre Julliard julliard at winehq.org
Thu Oct 8 08:57:11 CDT 2009


Module: wine
Branch: master
Commit: 4496f281d865e700e78e02c7e297484b738539a9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4496f281d865e700e78e02c7e297484b738539a9

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Oct  7 17:27:28 2009 +0200

kernel32: Move the 16-bit PE module functions to kernel16.c.

---

 dlls/kernel32/kernel16.c       |   33 +++++++++++++++++++++++++++++++++
 dlls/kernel32/krnl386.exe.spec |    6 +++---
 dlls/kernel32/module.c         |   23 -----------------------
 3 files changed, 36 insertions(+), 26 deletions(-)

diff --git a/dlls/kernel32/kernel16.c b/dlls/kernel32/kernel16.c
index 6d72c01..61767ac 100644
--- a/dlls/kernel32/kernel16.c
+++ b/dlls/kernel32/kernel16.c
@@ -276,6 +276,15 @@ VOID WINAPI VWin32_EventSet(HANDLE event)
 }
 
 /***********************************************************************
+ *           GetProcAddress32   		(KERNEL.453)
+ */
+FARPROC WINAPI GetProcAddress32_16( HMODULE hModule, LPCSTR function )
+{
+    /* FIXME: we used to disable snoop when returning proc for Win16 subsystem */
+    return GetProcAddress( hModule, function );
+}
+
+/***********************************************************************
  *           CreateW32Event    (KERNEL.457)
  */
 HANDLE WINAPI CreateW32Event( BOOL manual_reset, BOOL initial_state )
@@ -377,6 +386,30 @@ DWORD WINAPI MapProcessHandle( HANDLE hProcess )
 }
 
 /***********************************************************************
+ *           FreeLibrary32 (KERNEL.486)
+ */
+BOOL WINAPI FreeLibrary32_16( HINSTANCE module )
+{
+    return FreeLibrary( module );
+}
+
+/***********************************************************************
+ *              GetModuleFileName32     (KERNEL.487)
+ */
+DWORD WINAPI GetModuleFileName32_16( HMODULE module, LPSTR buffer, DWORD size )
+{
+    return GetModuleFileNameA( module, buffer, size );
+}
+
+/***********************************************************************
+ *              GetModuleHandle32        (KERNEL.488)
+ */
+HMODULE WINAPI GetModuleHandle32_16(LPCSTR module)
+{
+    return GetModuleHandleA( module );
+}
+
+/***********************************************************************
  *		RegisterServiceProcess (KERNEL.491)
  */
 DWORD WINAPI RegisterServiceProcess16( DWORD dwProcessId, DWORD dwType )
diff --git a/dlls/kernel32/krnl386.exe.spec b/dlls/kernel32/krnl386.exe.spec
index 10c1b76..b43c874 100644
--- a/dlls/kernel32/krnl386.exe.spec
+++ b/dlls/kernel32/krnl386.exe.spec
@@ -388,9 +388,9 @@
 483 pascal MapProcessHandle(long) MapProcessHandle
 484 pascal SetProcessDword(long s_word long) SetProcessDword
 485 pascal GetProcessDword(long s_word) GetProcessDword
-486 pascal FreeLibrary32(long) FreeLibrary
-487 pascal GetModuleFileName32(long str word) GetModuleFileNameA
-488 pascal GetModuleHandle32(str) GetModuleHandleA
+486 pascal FreeLibrary32(long) FreeLibrary32_16
+487 pascal GetModuleFileName32(long str word) GetModuleFileName32_16
+488 pascal GetModuleHandle32(str) GetModuleHandle32_16
 489 stub KERNEL_489  # VWin32_BoostWithDecay
 490 pascal -ret16 KERNEL_490(word) KERNEL_490
 491 pascal RegisterServiceProcess(long long) RegisterServiceProcess16
diff --git a/dlls/kernel32/module.c b/dlls/kernel32/module.c
index ddb8fe2..dee3725 100644
--- a/dlls/kernel32/module.c
+++ b/dlls/kernel32/module.c
@@ -562,7 +562,6 @@ BOOL WINAPI GetModuleHandleExW( DWORD flags, LPCWSTR name, HMODULE *module )
 
 /***********************************************************************
  *              GetModuleHandleA         (KERNEL32.@)
- *              GetModuleHandle32        (KERNEL.488)
  *
  * Get the handle of a dll loaded into the process address space.
  *
@@ -597,7 +596,6 @@ HMODULE WINAPI GetModuleHandleW(LPCWSTR module)
 
 /***********************************************************************
  *              GetModuleFileNameA      (KERNEL32.@)
- *              GetModuleFileName32     (KERNEL.487)
  *
  * Get the file name of a loaded module from its handle.
  *
@@ -996,7 +994,6 @@ HMODULE WINAPI LoadLibraryW(LPCWSTR libnameW)
 
 /***********************************************************************
  *           FreeLibrary   (KERNEL32.@)
- *           FreeLibrary32 (KERNEL.486)
  *
  * Free a dll loaded into the process address space.
  *
@@ -1070,26 +1067,6 @@ FARPROC WINAPI GetProcAddress( HMODULE hModule, LPCSTR function )
 }
 
 /***********************************************************************
- *           GetProcAddress32   		(KERNEL.453)
- *
- * Find the address of an exported symbol in a loaded dll.
- *
- * PARAMS
- *  hModule  [I] Handle to the dll returned by LoadLibraryA().
- *  function [I] Name of the symbol, or an integer ordinal number < 16384
- *
- * RETURNS
- *  Success: A pointer to the symbol in the process address space.
- *  Failure: NULL. Use GetLastError() to determine the cause.
- */
-FARPROC WINAPI GetProcAddress32_16( HMODULE hModule, LPCSTR function )
-{
-    /* FIXME: we used to disable snoop when returning proc for Win16 subsystem */
-    return GetProcAddress( hModule, function );
-}
-
-
-/***********************************************************************
  *           DelayLoadFailureHook  (KERNEL32.@)
  */
 FARPROC WINAPI DelayLoadFailureHook( LPCSTR name, LPCSTR function )




More information about the wine-cvs mailing list