16 shell seperation

Michael Stefaniuc mstefani at redhat.de
Sat Oct 12 18:32:25 CDT 2002


I'm terrible sorry for this email, but i'm ill and seeing the
16-functions the HKEY16's started to dance in front of my eyes ... but
they aren't there  :/

bye
	michael

On Sun, Oct 13, 2002 at 01:23:06AM +0200, Michael Stefaniuc wrote:
> You forgot to do the right HKEY <--> HKEY16 conversions with HKEY_16() and
> HKEY_32(), examples how to do it should be in the code.
> 
> bye
> 	michael
> 
> On Sat, Oct 12, 2002 at 05:20:31PM -0000, György 'Nog' Jeney wrote:
> > 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]
> >   */
> > 
> 
> 

-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20021013/d9dd88d8/attachment.pgp


More information about the wine-devel mailing list