16 shell seperation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Is it possible to move all of the resources in the shell32 directory to a
sub directory inside shell32 like resources (just like gdi)?  Its quite
confusing the way it is now.

Changelog:
 * dlls/shell32/shell32_main.h
 * dlls/shell32/shell.c
 * dlls/shell32/shellreg.c
 * dlls/shell32/Makefile.in
 * dlls/shell32/shlexec.c
   Seperate out 16-bit funvtions into seperate file.

nog.

Index: dlls/shell32/shell.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell.c,v
retrieving revision 1.46
diff -u -r1.46 shell.c
--- dlls/shell32/shell.c	10 Oct 2002 21:22:11 -0000	1.46
+++ dlls/shell32/shell.c	12 Oct 2002 17:07:39 -0000
@@ -2,6 +2,7 @@
  * 				Shell Library Functions
  *
  * Copyright 1998 Marcus Meissner
+ * Copyright 2000 Juergen Schmied
  * Copyright 2002 Eric Pouech
  *
  * This library is free software; you can redistribute it and/or
@@ -526,4 +527,115 @@
         break;
     }
     return ret;
+}
+
+
+/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
+ * some programs. Do not remove those cases. -MM
+ */
+static inline void fix_win16_hkey( HKEY *hkey )
+{
+    if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT;
+}
+
+/******************************************************************************
+ *           RegOpenKey   [SHELL.1]
+ */
+DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, PHKEY retkey )
+{
+    fix_win16_hkey( &hkey );
+    return RegOpenKeyA( hkey, name, retkey );
+}
+
+/******************************************************************************
+ *           RegCreateKey   [SHELL.2]
+ */
+DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, PHKEY retkey )
+{
+    fix_win16_hkey( &hkey );
+    return RegCreateKeyA( hkey, name, retkey );
+}
+
+/******************************************************************************
+ *           RegCloseKey   [SHELL.3]
+ */
+DWORD WINAPI RegCloseKey16( HKEY hkey )
+{
+    fix_win16_hkey( &hkey );
+    return RegCloseKey( hkey );
+}
+
+/******************************************************************************
+ *           RegDeleteKey   [SHELL.4]
+ */
+DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name )
+{
+    fix_win16_hkey( &hkey );
+    return RegDeleteKeyA( hkey, name );
+}
+
+/******************************************************************************
+ *           RegSetValue   [SHELL.5]
+ */
+DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
+{
+    fix_win16_hkey( &hkey );
+    return RegSetValueA( hkey, name, type, data, count );
+}
+
+/******************************************************************************
+ *           RegQueryValue   [SHELL.6]
+ *
+ * NOTES
+ *    Is this HACK still applicable?
+ *
+ * HACK
+ *    The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
+ *    mask out the high 16 bit.  This (not so much incidently) hopefully fixes
+ *    Aldus FH4)
+ */
+DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count
+)
+{
+    fix_win16_hkey( &hkey );
+    if (count) *count &= 0xffff;
+    return RegQueryValueA( hkey, name, data, count );
+}
+
+/******************************************************************************
+ *           RegEnumKey   [SHELL.7]
+ */
+DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
+{
+    fix_win16_hkey( &hkey );
+    return RegEnumKeyA( hkey, index, name, name_len );
+}
+
+
+/*************************************************************************
+ *                              ShellExecute            [SHELL.20]
+ */
+HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
+                                   LPCSTR lpFile, LPCSTR lpParameters,
+                                   LPCSTR lpDirectory, INT16 iShowCmd )
+{
+    SHELLEXECUTEINFOA sei;
+    HANDLE hProcess = 0;
+
+    sei.cbSize = sizeof(sei);
+    sei.fMask = 0;
+    sei.hwnd = HWND_32(hWnd);
+    sei.lpVerb = lpOperation;
+    sei.lpFile = lpFile;
+    sei.lpParameters = lpParameters;
+    sei.lpDirectory = lpDirectory;
+    sei.nShow = iShowCmd;
+    sei.lpIDList = 0;
+    sei.lpClass = 0;
+    sei.hkeyClass = 0;
+    sei.dwHotKey = 0;
+    sei.hProcess = hProcess;
+
+    ShellExecuteExA32 (&sei, FALSE);
+    return (HINSTANCE16)sei.hInstApp;
 }
Index: dlls/shell32/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/shell32/Makefile.in,v
retrieving revision 1.53
diff -u -r1.53 Makefile.in
--- dlls/shell32/Makefile.in	27 Aug 2002 01:34:34 -0000	1.53
+++ dlls/shell32/Makefile.in	12 Oct 2002 17:07:42 -0000
@@ -27,7 +27,6 @@
 	iconcache.c \
 	memorystream.c \
 	pidl.c \
-	shell.c \
 	shell32_main.c \
 	shelllink.c \
 	shellole.c \
@@ -50,6 +49,7 @@
 
 RC_SRCS= shres.rc
 RC_SRCS16 = version16.rc
+C_SRCS16 = shell.c
 
 SUBDIRS = tests
 
Index: dlls/shell32/shell32_main.h
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shell32_main.h,v
retrieving revision 1.53
diff -u -r1.53 shell32_main.h
--- dlls/shell32/shell32_main.h	10 Oct 2002 21:22:11 -0000	1.53
+++ dlls/shell32/shell32_main.h	12 Oct 2002 17:07:48 -0000
@@ -202,4 +202,7 @@
 #define HINSTANCE_32(h16)	((HINSTANCE)(ULONG_PTR)(h16))
 #define HWND_32(h16)		((HWND)(ULONG_PTR)(h16))
 
+/* needed by 16-bit shell code in shell.c */
+BOOL WINAPI ShellExecuteExA32 (LPSHELLEXECUTEINFOA sei, BOOL is32);
+
 #endif
Index: dlls/shell32/shellreg.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shellreg.c,v
retrieving revision 1.14
diff -u -r1.14 shellreg.c
--- dlls/shell32/shellreg.c	3 Oct 2002 19:46:27 -0000	1.14
+++ dlls/shell32/shellreg.c	12 Oct 2002 17:07:52 -0000
@@ -147,86 +147,3 @@
 	TRACE("0x%04x\n",hkey);
 	return RegCloseKey( hkey );
 }
-
-
-/* 16-bit functions */
-
-/* 0 and 1 are valid rootkeys in win16 shell.dll and are used by
- * some programs. Do not remove those cases. -MM
- */
-static inline void fix_win16_hkey( HKEY *hkey )
-{
-    if (*hkey == 0 || *hkey == (HKEY)1) *hkey = HKEY_CLASSES_ROOT;
-}
-
-/******************************************************************************
- *           RegOpenKey   [SHELL.1]
- */
-DWORD WINAPI RegOpenKey16( HKEY hkey, LPCSTR name, PHKEY retkey )
-{
-    fix_win16_hkey( &hkey );
-    return RegOpenKeyA( hkey, name, retkey );
-}
-
-/******************************************************************************
- *           RegCreateKey   [SHELL.2]
- */
-DWORD WINAPI RegCreateKey16( HKEY hkey, LPCSTR name, PHKEY retkey )
-{
-    fix_win16_hkey( &hkey );
-    return RegCreateKeyA( hkey, name, retkey );
-}
-
-/******************************************************************************
- *           RegCloseKey   [SHELL.3]
- */
-DWORD WINAPI RegCloseKey16( HKEY hkey )
-{
-    fix_win16_hkey( &hkey );
-    return RegCloseKey( hkey );
-}
-
-/******************************************************************************
- *           RegDeleteKey   [SHELL.4]
- */
-DWORD WINAPI RegDeleteKey16( HKEY hkey, LPCSTR name )
-{
-    fix_win16_hkey( &hkey );
-    return RegDeleteKeyA( hkey, name );
-}
-
-/******************************************************************************
- *           RegSetValue   [SHELL.5]
- */
-DWORD WINAPI RegSetValue16( HKEY hkey, LPCSTR name, DWORD type, LPCSTR data, DWORD count )
-{
-    fix_win16_hkey( &hkey );
-    return RegSetValueA( hkey, name, type, data, count );
-}
-
-/******************************************************************************
- *           RegQueryValue   [SHELL.6]
- *
- * NOTES
- *    Is this HACK still applicable?
- *
- * HACK
- *    The 16bit RegQueryValue doesn't handle selectorblocks anyway, so we just
- *    mask out the high 16 bit.  This (not so much incidently) hopefully fixes
- *    Aldus FH4)
- */
-DWORD WINAPI RegQueryValue16( HKEY hkey, LPCSTR name, LPSTR data, LPDWORD count )
-{
-    fix_win16_hkey( &hkey );
-    if (count) *count &= 0xffff;
-    return RegQueryValueA( hkey, name, data, count );
-}
-
-/******************************************************************************
- *           RegEnumKey   [SHELL.7]
- */
-DWORD WINAPI RegEnumKey16( HKEY hkey, DWORD index, LPSTR name, DWORD name_len )
-{
-    fix_win16_hkey( &hkey );
-    return RegEnumKeyA( hkey, index, name, name_len );
-}
Index: dlls/shell32/shlexec.c
===================================================================
RCS file: /home/wine/wine/dlls/shell32/shlexec.c,v
retrieving revision 1.8
diff -u -r1.8 shlexec.c
--- dlls/shell32/shlexec.c	16 Sep 2002 19:27:51 -0000	1.8
+++ dlls/shell32/shlexec.c	12 Oct 2002 17:07:59 -0000
@@ -673,35 +673,6 @@
     return TRUE;
 }
 
-
-/*************************************************************************
- *				ShellExecute		[SHELL.20]
- */
-HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
-                                   LPCSTR lpFile, LPCSTR lpParameters,
-                                   LPCSTR lpDirectory, INT16 iShowCmd )
-{
-    SHELLEXECUTEINFOA sei;
-    HANDLE hProcess = 0;
-
-    sei.cbSize = sizeof(sei);
-    sei.fMask = 0;
-    sei.hwnd = HWND_32(hWnd);
-    sei.lpVerb = lpOperation;
-    sei.lpFile = lpFile;
-    sei.lpParameters = lpParameters;
-    sei.lpDirectory = lpDirectory;
-    sei.nShow = iShowCmd;
-    sei.lpIDList = 0;
-    sei.lpClass = 0;
-    sei.hkeyClass = 0;
-    sei.dwHotKey = 0;
-    sei.hProcess = hProcess;
-
-    ShellExecuteExA32 (&sei, FALSE);
-    return (HINSTANCE16)sei.hInstApp;
-}
-
 /*************************************************************************
  * ShellExecuteA			[SHELL32.290]
  */


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux