Release 980809

Sat Aug  8 19:11:46 1998  Marcus Meissner <marcus@jet.franken.de>

 	* [*/*]
	Added some missing WINAPI and some missing prototypes for
	functions.

	* [controls/static.c]
	Got rid of the MODULE32_LookupHMODULE error showing up for every
	message box.

	* [windows/winproc.c]
	WM_NOTIFY 16->32 mapping (AOL Instant Messenger or however it is called).

	* [misc/winsock.c]
	hostent/servent/protoent should not use the same static buffers.
	(has broken nt3.15 finger.exe which does hp=gethostbyname(), then
	getservbyname("finger","tcp") and the references hp->h_addr_list[0]).

Sat Aug  8 13:21:24 1998  Alexandre Julliard  <julliard@lrc.epfl.ch>

	* [include/server.h] [tools/make_requests] [server/request.c]
	  [server/trace.c]
	Automated part of the client/server request code generation.
	Added tracing of client/server communication.

	* [scheduler/*.c] [server/process.c]
	Added support for server-side handles.

	* [scheduler/thread.c]
	Added DLL_THREAD_ATTACH/DETACH notifications.

	* [configure.in]
	Added check for -lsocket.

	* [windows/winproc.c]
	Return the thunk address in WINPROC_GetProc if the function types
	don't match.

Sat Aug  8 02:44:04 1998  Douglas Ridgway  <ridgway@winehq.com>

	* [windows/winproc.c][windows/win.c][windows/message.c]  
	Documentation for CallWindowProc, SetWindowLong, DispatchMessage,
	WaitMessage, GetMessage, and PeekMessage.

Sat Aug  8 01:00:00 1998  Juergen Schmied <juergen.schmied@metronet.de>

	* [controls/commctrl.c][controls/widgets.c][include/builtin32.h]
	  [include/commctrl.h][relay32/builtin32.c][relay32/comctl32.spec]
	  [tools/build.c] [relay32/shell32.spec]
	Added the functionality of the LibMain function. The common 
	controls are properly initialized now.

	* [controls/treeview.c][memory/atom.c][scheduler/thread.c][windows/class.c]
	  [windows/msgbox.c][windows/win.c]
	Put TRACE in, put SetLastError() in.

	* [include/interfaces.h]
	Added IClassFactory::LockServer.

	* [include/ole2.h]
	Added struct for LPOLEMENUGROUPWIDTHS32, HOLEMENU32.

	* [include/shell.h][include/shlobj.h][misc/shell.c][ole/folders.c]
	Reorganized and many structs and classes (IShellBrowser,IShellView)
	added. shell32.dll should work in many cases now.
	Started SHGetFileInfoA implementeation, rewrote SHGetPathFromIDList32A.
	New Shell32LibMain started ShellIconCache Implementation.

	* [misc/shellord.c]
	Rewrote ILCombine, ILGetSize
	New stubs SHFind_InitMenuPopup, FileMenu_Create, ShellExecuteEx,
	SHSetInstanceExplorer, SHGetInstanceExplorer, SHFreeUnusedLibraries.

	* [include/winerror.h]
	Class and window related error codes added.

	* [memory/heap.c]
	Changed lstrlen32A to strlen to get rid of milions of TRACE lines.

	* [misc/ddeml.c]
	First lines for DdeCreateStringHandle32A / DdeFreeStringHandle32.

	* [misc/network.c][relay32/mpr.spec]
	Fixed some bugs, changed ordinals.

	* [windows/class.c]
	Workarounds for incorrect hInstance handling. Fixes parts of
	MSWord95/Excel95 and Money95.

Thu Aug  6 21:05:35 1998  Eric Kohl <ekohl@abo.rhein-zeitung.de>

	* [windows/nonclient.c][misc/tweak.c][include/tweak.h]
	  [documentation/win95look]
	Removed some tweak variables. They are no longer needed.

	* [files/dos_fs.c]
	Added check for null pointer in DOSFS_GetDevice().

	* [controls/tooltips.c][include/commctrl.h]
	Improved tooltips.

	* [controls/status.c][include/commctrl.h]
	Cleaned up code and added tooltip support.

	* [controls/toolbar.c][include/commctrl.h]
	Added tooltip support.

	* [documentation/common_controls]
	Updated.

Thu Aug  6 00:05:22 1998  Uwe Bonnes  <bon@elektron.ikp.physik.tu-darmstadt.de>

	* [include/ver.h] [misc/ver.c]
	Write VIF_BUFFTOOSMALL, not VIF_BUFTOSMALL.

	* [debugger/hash.c] [debugger/stabs.c]
	Make debug output more friendly for posting.

	* [files/file.c]
	Partial implementation of OF_SHARE_EXCLUSIVE.
	Needed for Quicklogic/QuickChip (InstallShield).

	* [files/profile.c]
	When a cached-only entry is found, return it.

	* [graphics/x11drv/xfont.c]
	Accept a space as delimiter for a fontname and inhibit overrun
	(Make xplasim.ex from the Phillips Coolrunner CPLD suite proceed).

	* [miscemu/main.c]
	Delay setting IF1632_CallLargeStack after loading the executables.
	Stops fpgaexp.exe from the Viewlogic FPGA suite from crashing when
 	showing the Blinker error Message Box.

	* [misc/network.c]
	Make WNetGetConnection16 recognise a CDROM as a local drive.

	* [multimedia/mmsystem.c]
	Preliminary check for MCI_ALL_DEVICE_ID in MCI_Close by a FIXME.


Tue Aug 4 21:15:23 1998  James Juran <jrj120@psu.edu>

	* [ole/ole2nls.c]
	Fixed bug in CompareString32A.  strcmp() doesn't necessarily
	return -1, 0, or 1, which the previous code depended on.
	Changed name of is_punctuation to OLE2NLS_isPunctuation.
	Made NORM_IGNOREWIDTH not print a FIXME message in 
	LCMapString32A.
	Other debugging messages, documentation, and code cleanups.

	* [objects/font.c] [relay32/gdi32.spec] [include/winerror.h]
	Added stub for GetFontData32, and added GDI_ERROR constant 
	to winerror.h.

Tue Aug  4 07:44:43 1998  Ove Kaaven <ovek@arcticnet.no>

	* [multimedia/mmio.c]
	Implemented mmioSetBuffer, mmioAdvance, mmioAscend, and
	mmioCreateChunk to the best of my knowledge. But watch out,
	there's bound to be bugs in there...

	* [include/mmsystem.h] [multimedia/mmsystem.c]
	Hacked in support for 32-bit multimedia function callbacks.

	* [AUTHORS] [misc/shell.c]
	Selfishly credited my authorship. Hopefully I'm excused.

	* [include/dosexe.h] [include/module.h] [loader/dos/*]
	  [loader/module.c] [loader/task.c] [Makefile.in]
	  [configure.in] [Makefile.in]
	Added DOS EXE (MZ) loader and virtual machine. Task
	structure integration thanks to Ulrich Weigand.

	* [files/dos_fs.c]
	Work around a null pointer dereference if ioctlGetDeviceInfo-ing
	a FILE_DupUnixHandle'd file (i.e. GetStdHandle'd).

	* [include/miscemu.h] [include/winnt.h] [loader/main.c]
	  [memory/global.c] [msdos/dpmi.c] [msdos/dosmem.c]
	Added support for DOS memory images, and added
	DOSMEM_ResizeBlock() and DOSMEM_Available().

	* [msdos/int21.c]
	Added support for the DOS virtual machine, tweaked handle
	assignment to avoid stdio clashes, forced INT21_FindNext to exit
	wildcardless searches after finding one entry, added AH=7, 8, 9,
	C, 48, 49, 4A, and 7160 CL=1 (Get Short Filename), and made the
	long filename calls only respond if running with with -winver
	win95.

	* [objects/cursoricon.c]
	DestroyCursor32 and DestroyIcon32 should now free the objects
	(hopefully) correctly.

Sun Aug  2 21:42:09 1998  Huw D M Davies <daviesh@abacus.physics.ox.ac.uk>

	* [graphics/psdrv/*] [include/psdrv.h]
	Added PPD file parsing - at the moment it reads a file called
	default.ppd from the directory in which you start Wine. Page sizes
	other than A4 should now work (landscape may not). All fonts that are
	present on your printer (according to the PPD) should be available,
	providing you have the AFM files. Fonts should now be the correct size.
	Graphics is still basically lines only. See graphics/psdrv/README .

	* [misc/printdrv.c]
	Yet more Drv[Get/Set]PrinterData fixes.

Fri Jul 31 21:33:22 1998  Per Lindström <pelinstr@algonet.se>

	* [relay32/crtdll.spec] [misc/crtdll.c]
	Added stub for freopen, _findfirst, _findnext, _fstat and _read.

	* [files/directory.c]
	Modified warning message.

Wed Jul 29 11:25:28 1998  Luiz Otavio L. Zorzella  <zorzella@nr.conexware.com>

	* [objects/font.c]
	Added stub for GetFontData.

	* [multimedia/msvideo.c]
	Created this file to hold the msvideo.dll calls (and maybe also
	msvfw32.dll). 

	* [objects/cursoricon.c]
	Added search in Global Heap for cursor when trying to destroy it
	with DestroyCursor16. This test should be done in many (all?)
	other functions that use FreeResource.

	* [controls/treeview.c] [include/commctrl.h]
	Minor correction in name and addition of many placeholders for TVM
	messages in TREEVIEW_WindowProc.

	* [msdos/dpmi.c]
	Fixed a bug in DPMI_xrealloc where in a copy of a memory region
	"A" of size "a" to a region "B" of size "b", "b" bytes were being
	copied, instead of "a", as the new version does. This both
	increases speed, as well as avoids segfaults.
diff --git a/misc/shellord.c b/misc/shellord.c
index 6661780..9076838 100644
--- a/misc/shellord.c
+++ b/misc/shellord.c
@@ -8,6 +8,7 @@
  * They are just here so that explorer.exe and iexplore.exe can be tested.
  *
  * Copyright 1997 Marcus Meissner
+ *           1998 Jürgen Schmied
  */
 #include <stdlib.h>
 #include <string.h>
@@ -30,6 +31,18 @@
 #include "debug.h"
 #include "winreg.h"
 
+void pdump (LPCITEMIDLIST pidl)
+{ DWORD type;
+  CHAR * szData;
+  LPITEMIDLIST pidltemp = pidl;
+  TRACE(shell,"---------- pidl=%p \n", pidl);
+  do
+  { szData = ((LPPIDLDATA )(pidltemp->mkid.abID))->szText;
+    type   = ((LPPIDLDATA )(pidltemp->mkid.abID))->type;
+    TRACE (shell,"---- pidl=%p size=%u type=%lx %s\n",pidltemp, pidltemp->mkid.cb,type,debugstr_a(szData));
+    pidltemp = (LPITEMIDLIST)(((BYTE*)pidltemp)+pidltemp->mkid.cb);
+  } while (pidltemp->mkid.cb);
+}
 /*************************************************************************
  * SHChangeNotifyRegister [SHELL32.2]
  * NOTES
@@ -85,9 +98,12 @@
 /*************************************************************************
  * ILFindLastID [SHELL32.17]
  * NOTES
- *  Creates a new list with the last tiem removed
+ *  Creates a new list with the last item removed
  */
- LPITEMIDLIST WINAPI ILRemoveLastID(LPCITEMIDLIST);
+LPITEMIDLIST WINAPI ILRemoveLastID(LPCITEMIDLIST pidl)
+{ TRACE(shell,"pidl=%p\n",pidl);
+  return NULL;
+}
 
 
 /*************************************************************************
@@ -96,15 +112,20 @@
  * NOTES
  *    dupicate an idlist
  */
-LPITEMIDLIST WINAPI ILClone (LPITEMIDLIST iil) {
-	DWORD		len;
-	LPITEMIDLIST	newiil;
-  TRACE(shell,"%p\n",iil);
-	len = ILGetSize(iil);
-	newiil = (LPITEMIDLIST)SHAlloc(len);
-	if (newiil)
-		memcpy(newiil,iil,len);
-	return newiil;
+LPITEMIDLIST WINAPI ILClone (LPCITEMIDLIST pidl)
+{ DWORD    len;
+  LPITEMIDLIST  newpidl;
+
+  TRACE(shell,"%p\n",pidl);
+
+  if (!pidl)
+    return NULL;
+    
+  len = ILGetSize(pidl);
+  newpidl = (LPITEMIDLIST)SHAlloc(len);
+  if (newpidl)
+    memcpy(newpidl,pidl,len);
+  return newpidl;
 }
 
 /*************************************************************************
@@ -113,7 +134,10 @@
  * NOTES
  *  duplicates the first idlist of a complex pidl
  */
-LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl);
+LPITEMIDLIST WINAPI ILCloneFirst(LPCITEMIDLIST pidl)
+{ FIXME(shell,"pidl=%p\n",pidl);
+  return NULL;
+}
 
 /*************************************************************************
  * ILCombine [SHELL32.25]
@@ -123,16 +147,37 @@
  *  The pidl is the first one, pidlsub the next one
  *  Does not destroy the passed in idlists!
  */
-LPITEMIDLIST WINAPI ILCombine(LPITEMIDLIST iil1,LPITEMIDLIST iil2) {
-	DWORD		len1,len2;
-	LPITEMIDLIST	newiil;
-	TRACE(shell,"%p %p\n",iil1,iil2);
-	len1 	= ILGetSize(iil1)-2;
-	len2	= ILGetSize(iil2);
-	newiil	= SHAlloc(len1+len2);
-	memcpy(newiil,iil1,len1);
-	memcpy(((char*)newiil)+len1,iil2,len2);
-	return newiil;
+LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
+{ DWORD    len1,len2;
+  LPITEMIDLIST  pidlNew;
+  
+  TRACE(shell,"pidl=%p pidl=%p\n",pidl1,pidl2);
+
+  if(!pidl1 && !pidl2)
+  {  return NULL;
+  }
+ 
+  if(!pidl1)
+  { pidlNew = ILClone(pidl2);
+    return pidlNew;
+  }
+
+  if(!pidl2)
+  { pidlNew = ILClone(pidl1);
+    return pidlNew;
+  }
+
+  len1  = ILGetSize(pidl1)-2;
+  len2  = ILGetSize(pidl2);
+  pidlNew  = SHAlloc(len1+len2);
+  
+  if (pidlNew)
+  { memcpy(pidlNew,pidl1,len1);
+    memcpy(((BYTE *)pidlNew)+len1,pidl2,len2);
+  }
+
+/*  TRACE(shell,"--new pidl=%p\n",pidlNew);*/
+  return pidlNew;
 }
 
 /*************************************************************************
@@ -291,6 +336,19 @@
 }
 
 /*************************************************************************
+ * PathAppend [SHELL32.36]
+ * 
+ * NOTES
+ *     concat_paths(char*target,const char*add);
+ *     concats "target\\add" and writes them to target
+ */
+LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
+  TRACE(shell,"%s %s\n",x1,x2);
+  while (x2[0]=='\\') x2++;
+  return PathCombine(x1,x1,x2);
+}
+
+/*************************************************************************
  * PathCombine [SHELL32.37]
  * 
  * NOTES
@@ -312,19 +370,6 @@
 }
 
 /*************************************************************************
- * PathAppend [SHELL32.36]
- * 
- * NOTES
- *     concat_paths(char*target,const char*add);
- *     concats "target\\add" and writes them to target
- */
-LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) {
-  TRACE(shell,"%s %s\n",x1,x2);
-	while (x2[0]=='\\') x2++;
-	return PathCombine(x1,x1,x2);
-}
-
-/*************************************************************************
  * PathIsUNC [SHELL32.39]
  * 
  * NOTES
@@ -457,69 +502,28 @@
  * Shell_GetCachedImageIndex [SHELL32.72]
  *
  */
-void WINAPI Shell_GetCachedImageIndex(LPSTR x,DWORD y,DWORD z) {
-	FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z);
+void WINAPI Shell_GetCachedImageIndex(LPSTR x,DWORD y,DWORD z) 
+{ FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z);
 }
+
 /*************************************************************************
  * SHShellFolderView_Message [SHELL32.73]
+ *
+ * PARAMETERS
+ *  hwndCabinet defines the explorer cabinet window that contains the 
+ *              shellview you need to communicate with
+ *  uMsg        identifying the SFVM enum to perform
+ *  lParam
+ *
  * NOTES
  *  Message SFVM_REARRANGE = 1
  *    This message gets sent when a column gets clicked to instruct the
  *    shell view to re-sort the item list. lParam identifies the column
  *    that was clicked.
  */
-int WINAPI SHShellFolderView_Message(
-    HWND32 hwndCabinet, /* This hwnd defines the explorer cabinet window that contains the 
-                         shellview you need to communicate with*/
-		UINT32 uMsg,        /* A parameter identifying the SFVM enum to perform */
-		LPARAM lParam);
-/*************************************************************************
- * SHCloneSpecialIDList [SHELL32.89]
- * 
- * NOTES
- *     exported by ordinal
- */
-DWORD WINAPI SHCloneSpecialIDList(DWORD x1,DWORD x2,DWORD x3) {
-	FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n",
-		x1,x2,x3
-	);
-	return 0;
-}
-
-/*************************************************************************
- * IsLFNDrive [SHELL32.119]
- * 
- * NOTES
- *     exported by ordinal Name
- */
-void WINAPI IsLFNDrive(LPVOID x) {
-    FIXME(shell,"(%p(%s)):stub.\n",x,(char *)x);
-}
-
-/*************************************************************************
- * SHGetSpecialFolderPath [SHELL32.175]
- * 
- * NOTES
- *     exported by ordinal
- */
-void WINAPI SHGetSpecialFolderPath(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
-    FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
-    	x1,x2,x3,x4
-    );
-}
-
-/*************************************************************************
- * RegisterShellHook [SHELL32.181]
- *
- * PARAMS
- *      hwnd [I]  window handle
- *      y    [I]  flag ????
- *
- * NOTES
- *     exported by ordinal
- */
-void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) {
-    FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y);
+int WINAPI SHShellFolderView_Message(HWND32 hwndCabinet,UINT32 uMsg,LPARAM lParam)
+{ FIXME(shell,"%04x %08ux %08lx stub\n",hwndCabinet,uMsg,lParam);
+  return 0;
 }
 
 /*************************************************************************
@@ -535,22 +539,22 @@
 
 /*************************************************************************
  * SHMapPIDLToSystemImageListIndex [SHELL32.77]
+ *
+ * PARAMETERS
+ * x  pointer to an instance of IShellFolder 
  * 
  * NOTES
  *     exported by ordinal
  *
  */
 DWORD WINAPI
-SHMapPIDLToSystemImageListIndex(
-    DWORD x,	/* pointer to an instance of IShellFolder */
-		DWORD y,
-		DWORD z)
-{	FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z);
-	return 0;
+SHMapPIDLToSystemImageListIndex(DWORD x,DWORD y,DWORD z)
+{ FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z);
+  return 0;
 }
 
 /*************************************************************************
- * OleStrToStrN	[SHELL32.78]
+ * OleStrToStrN  [SHELL32.78]
  * 
  * NOTES
  *     exported by ordinal
@@ -558,12 +562,12 @@
 BOOL32 WINAPI
 OleStrToStrN (LPSTR lpMulti, INT32 nMulti, LPCWSTR lpWide, INT32 nWide) {
     return WideCharToMultiByte (0, 0, lpWide, nWide,
-				lpMulti, nMulti, NULL, NULL);
+        lpMulti, nMulti, NULL, NULL);
 }
 
 /*************************************************************************
- * StrToOleStrN	[SHELL32.79]
- * 
+ * StrToOleStrN  [SHELL32.79]
+ *
  * NOTES
  *     exported by ordinal
  */
@@ -573,14 +577,68 @@
 }
 
 /*************************************************************************
+ * SHCloneSpecialIDList [SHELL32.89]
+ * 
+ * PARAMETERS
+ *  hwnd 
+ * NOTES
+ *     exported by ordinal
+ */
+DWORD WINAPI SHCloneSpecialIDList(HWND32 hwnd,DWORD x2,DWORD x3) {
+  FIXME(shell,"(hwnd=0x%x,0x%lx,0x%lx):stub.\n",
+    hwnd,x2,x3
+  );
+  return S_OK;
+}
+
+/*************************************************************************
+ * IsLFNDrive [SHELL32.119]
+ * 
+ * NOTES
+ *     exported by ordinal Name
+ */
+BOOL32 WINAPI IsLFNDrive(LPCSTR path) {
+    DWORD	fnlen;
+
+    if (!GetVolumeInformation32A(path,NULL,0,NULL,&fnlen,NULL,NULL,0))
+	return FALSE;
+    return fnlen>12;
+}
+
+/*************************************************************************
+ * SHGetSpecialFolderPath [SHELL32.175]
+ * 
+ * NOTES
+ *     exported by ordinal
+ */
+void WINAPI SHGetSpecialFolderPath(DWORD x1,DWORD x2,DWORD x3,DWORD x4) {
+    FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n",
+      x1,x2,x3,x4
+    );
+}
+
+/*************************************************************************
+ * RegisterShellHook [SHELL32.181]
+ *
+ * PARAMS
+ *      hwnd [I]  window handle
+ *      y    [I]  flag ????
+ * 
+ * NOTES
+ *     exported by ordinal
+ */
+void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) {
+    FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y);
+}
+
+/*************************************************************************
  *
  */
 typedef DWORD (* WINAPI GetClassPtr)(REFCLSID,REFIID,LPVOID);
 
 static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod,
                                       LPSTR name)
-{
-	HMODULE32	hmod;
+{ HMODULE32  hmod;
 	FARPROC32	dllunload,nameproc;
 
 	if (xhmod) *xhmod = 0;
@@ -760,23 +818,31 @@
 
 /*************************************************************************
  * ILGetSize [SHELL32.152]
+ *  gets the byte size of an idlist including zero terminator (pidl)
+ *
+ * PARAMETERS
+ *  pidl ITEMIDLIST
+ *
+ * RETURNS
+ *  size of pidl
  *
  * NOTES
  *  exported by ordinal
- *  Gets the byte size of an idlist including zero terminator
  */
-DWORD WINAPI ILGetSize(LPITEMIDLIST iil) {
-	LPSHITEMID	si;
-	DWORD		len;
-	TRACE(shell,"%p\n",iil);
-	if (!iil)
-		return 0;
-	si = &(iil->mkid);
-	len = 2;
-	while (si->cb) {
-		len	+= si->cb;
-		si	 = (LPSHITEMID)(((char*)si)+si->cb);
+DWORD WINAPI ILGetSize(LPITEMIDLIST pidl)
+{ LPSHITEMID si = &(pidl->mkid);
+  DWORD  len=0;
+
+  TRACE(shell,"pidl=%p\n",pidl);
+
+  if (pidl)
+  { while (si->cb) 
+    { len += si->cb;
+      si  = (LPSHITEMID)(((LPBYTE)si)+si->cb);
+    }
+    len += 2;
 	}
+/*  TRACE(shell,"-- size=%lu\n",len);*/
 	return len;
 }
 /*************************************************************************
@@ -788,7 +854,10 @@
  *  otherwise adds the item to the end.
  *  Destroys the passed in idlist!
  */
-LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd);
+LPITEMIDLIST WINAPI ILAppend(LPITEMIDLIST pidl,LPCITEMIDLIST item,BOOL32 bEnd)
+{ TRACE(shell,"(pidl=%p,pidl=%p,%08u)\n",pidl,item,bEnd);
+  return NULL;
+}
 
 /*************************************************************************
  * PathGetExtension [SHELL32.158]
@@ -796,8 +865,8 @@
  * NOTES
  *     exported by ordinal
  */
-LPSTR WINAPI PathGetExtension(LPSTR path,DWORD y,DWORD z) {
-    TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z);
+LPSTR WINAPI PathGetExtension(LPSTR path,DWORD y,DWORD z)
+{ TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z);
     path = PathFindExtension(path);
     return *path?(path+1):path;
 }
@@ -831,7 +900,8 @@
  */
 DWORD WINAPI SHFree(LPVOID x) {
   TRACE(shell,"%p\n",x);
-	return LocalFree32((HANDLE32)x);
+  /*return LocalFree32((HANDLE32)x);*/ /* crashes */
+  return HeapFree(GetProcessHeap(),0,x);
 }
 
 /*************************************************************************
@@ -842,8 +912,10 @@
  *     exported by ordinal
  */
 LPVOID WINAPI SHAlloc(DWORD len) {
-  TRACE(shell,"%lu\n",len);
-	return (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT); /* FIXME */
+ /* void * ret = (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT);*/ /* chrashes */
+ void * ret = (LPVOID) HeapAlloc(GetProcessHeap(),0,len);
+  TRACE(shell,"%lu bytes at %p\n",len, ret);
+  return ret;
 }
 
 
@@ -855,11 +927,11 @@
  *     allocated by SHMalloc allocator
  *     exported by ordinal
  */
-DWORD WINAPI ILFree(LPVOID x) {
-	FIXME (shell,"(0x%08lx):stub.\n", (DWORD)x);
-	if (!x)
+DWORD WINAPI ILFree(LPVOID pidl) 
+{ TRACE (shell,"(pidl=0x%08lx)\n",(DWORD)pidl);
+  if (!pidl)
 		return 0;
-	return SHFree(x);
+  return SHFree(pidl);
 }
 
 /*************************************************************************
@@ -976,12 +1048,14 @@
 /*************************************************************************
  * SHAddToRecentDocs [SHELL32.234]
  *
+ * PARAMETERS
+ *   uFlags  [IN] SHARD_PATH or SHARD_PIDL
+ *   pv      [IN] string or pidl, NULL clears the list
+ *
  * NOTES
  *     exported by name
  */
-DWORD WINAPI SHAddToRecentDocs32 (
-    UINT32 uFlags,  /* [IN] SHARD_PATH or SHARD_PIDL */
-		LPCVOID pv)     /* [IN] string or pidl, NULL clears the list */
+DWORD WINAPI SHAddToRecentDocs32 (UINT32 uFlags,LPCVOID pv)   
 { if (SHARD_PIDL==uFlags)
   { FIXME (shell,"(0x%08x,pidl=%p):stub.\n", uFlags,pv);
 	}
@@ -1020,6 +1094,8 @@
 /*************************************************************************
  * SHCreateShellFolderViewEx [SHELL32.174]
  *
+ * NOTES
+ *  see IShellFolder::CreateViewObject
  */
 HRESULT WINAPI SHCreateShellFolderViewEx32(
   LPSHELLVIEWDATA psvcbi, /*[in ] shelltemplate struct*/
@@ -1027,3 +1103,55 @@
 { FIXME (shell,"(%p,%p):stub.\n", psvcbi,ppv);
   return 0;
 }
+/*************************************************************************
+ * SHFind_InitMenuPopup [SHELL32.149]
+ *
+ */
+HRESULT WINAPI SHFind_InitMenuPopup (DWORD u, DWORD v, DWORD w, DWORD x)
+{ FIXME(shell,"0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x);
+  return 0;
+}
+/*************************************************************************
+ * FileMenu_Create [SHELL32.114]
+ *
+ */
+HRESULT WINAPI FileMenu_Create (DWORD u, DWORD v, DWORD w, DWORD x, DWORD z)
+{ FIXME(shell,"0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",u,v,w,x,z);
+  return 0;
+}
+/*************************************************************************
+ * ShellExecuteEx [SHELL32.291]
+ *
+ */
+HRESULT WINAPI ShellExecuteEx (DWORD u)
+{ FIXME(shell,"0x%08lx stub\n",u);
+  return 0;
+}
+/*************************************************************************
+ * SHSetInstanceExplorer [SHELL32.176]
+ *
+ */
+HRESULT WINAPI SHSetInstanceExplorer (DWORD u)
+{ FIXME(shell,"0x%08lx stub\n",u);
+  return 0;
+}
+/*************************************************************************
+ * SHGetInstanceExplorer [SHELL32.256]
+ *
+ * NOTES
+ *  exported by name
+ */
+HRESULT WINAPI SHGetInstanceExplorer (DWORD u)
+{ FIXME(shell,"0x%08lx stub\n",u);
+  return 0;
+}
+/*************************************************************************
+ * SHFreeUnusedLibraries [SHELL32.123]
+ *
+ * NOTES
+ *  exported by name
+ */
+HRESULT WINAPI SHFreeUnusedLibraries (DWORD u)
+{ FIXME(shell,"0x%08lx stub\n",u);
+  return 0;
+}