Release 980712 Sun Jul 12 16:23:36 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [server/*] [scheduler/client.c] (new files) [scheduler/sysdeps.c] [scheduler/thread.c] [scheduler/process.c] Beginnings of client/server communication for inter-process synchronisation. Sat Jul 11 19:45:45 1998 Ulrich Weigand <weigand@informatik.uni-erlangen.de> * [include/bitmap.h] [objects/bitmap.c] [objects/dib.c] [objects/oembitmap.c] Speed up DIB section handling by using pre-allocated colormap and XImage. Moved DIB section data out of general BITMAPOBJ structure. Bugfix: GetDIBits32 would overwrite one byte beyond bitmap data. * [if1632/shell.spec] [if1632/kernel.spec] [win32/kernel32.c] More verbose error message if ThunkConnect fails. Implemented KERNEL_475. * [files/profile.c] [ole/ole2nls.c] Minor bugfixes. * [if1632/builtin.c] [if1632/kernel.spec] [include/task.h] [loader/ne/module.c] [loader/task.c] Implemented KERNEL.THHOOK. * [if1632/wprocs.spec] [include/process.h] [msdos/dpmi.c] [msdos/vxd.c] Implemented Win32s VxD services (W32S.386). Sat Jul 11 17:52:23 1998 Huw D M Davies <daviesh@abacus.physics.ox.ac.uk> * [graphics/x11drv/xfont.c] [graphics/x11drv/text.c] [include/x11font.h] Improve handling of rotated X11 fonts. Metrics/extents should now be correct. ExtTextOut should behave better (still doesn't handle lpDx). * [graphics/painting.c] DrawFocusRect32: Don't do anything if width or height are zero. Sat Jul 11 15:21:35 1998 Andreas Mohr <100.30936@germany.net> * [files/profile.c] [include/windows.h] The length arguments of *Profile*() need to be treated as UINTxx instead of INTxx. * [graphics/env.c] [graphics/win16drv/init.c] [include/print.h] [misc/printdrv.c] Many printer driver fixes/changes (many thanks go to Huw !). Most printers should work again ;) * [memory/atom.c] Fixed ATOM_AddAtom to store atoms exactly like Windows. * [*/*] Fixed misc compiler warnings. Fri Jul 10 15:58:36 1998 Marcus Meissner <marcus@jet.franken.de> * [files/drive.c] Fixed GetDriveType16 to return DRIVE_REMOTE again. * [loader/pe_image.c][loader/module.c] Look for modules that have the same modulename or the same filename (they sometimes differ). Fixed up fixup_imports, removed one of the loops. * [windows/winpos.c] Added some NULL ptr checks. Needs more. * [graphics/ddraw.c] Some stubs added. * [if1632/snoop.c] Updated, made WINELIB compatible. Fri Jul 10 04:39:56 1998 Douglas Ridgway <ridgway@winehq.com> * [objects/enhmetafile.c] [relay32/gdi32.spec] Small tweaks for documentation system. Thu Jul 9 22:00:18 1998 Eric Kohl <ekohl@abo.rhein-zeitung.de> * [controls/commctrl.c][include/commctrl.h][relay32/comctl32.spec] Fixed GetEffectiveClientRect, CreateToolbarEx and CreateMappedBitmap. Added stub for ShowHideMenuCtl. Added some documentation. * [documentation/common_controls] Added and updated some information. * [controls/toolbar.c][include/toolbar.h] Added string support. * [misc/shell.c][misc/shellord.c][relay32/shell.spec] Changed names of undocumented functions to their real names and fixed the export table. * [controls/imagelist.c][relay32/comctl32.spec] Added stub for ImageList_SetFilter. Fixed some minor bugs and typos. * [objects/font.c][include/windows.h][relay32/gdi32.spec] Added stubs for GetCharacterPlacement32[A/W]. * [objects/region.c][relay32/gdi32.spec] Added stub for UNDOCUMENTED GetRandomRgn. * [controls/commctrl.c][controls/*.c][include/*.h] Added dummy listview, pager, rebar, tooltips, trackbar and treeview control. This keeps some programs from complaining. Thu Jul 9 11:23:58 1998 Rein Klazes <rklazes@casema.net> * [graphics/painting.c] [graphics/*/init.c] [graphics/x11drv/graphics.c] [relay32/gdi32.spec] [if1632/gdi.spec] [include/gdi.h] [include/x11drv.h] Implemented drawing bezier curves: PolyBezier16/32 and PolyBezierTo16/32. * [graphics/x11drv/graphics.c] Improved accuracy of several graphic routines, especially the drawing of pie's. * [include/windows.h] [misc/spy.c] Added 25 window messages related to programs based on MFC and/or OLE. Wed Jul 8 22:00:00 1998 James Juran <jrj120@psu.edu> * [documentation/wine.man] Updated manpage. * [wine.ini] Added section for Win95Look=true (commented out by default). Wed Jul 8 06:23:19 1998 Matthew Becker <mbecker@glasscity.net> * [misc/registry.c] Fixed a crash in RegEnumValue32A when the dwType parameter is NULL. * [programs/regtest/regtest.c] Improved the printing of errors. * [misc/ntdll.c] Added stub for RtlFormatCurrentUserKeyPath. * [win32/console.c] Added stub for ScrollConsoleScreenBuffer. Mon Jul 6 16:41:47 1998 Per Lindström <pelinstr@algonet.se> * [include/windows.h] [relay32/kernel.spec] [win32/newfns.c] Added stubs for SleepEx and TerminateProcess. * [rc/README] Corrected a grammatical error. Mon Jul 3 12:00:00 1998 Juergen Schmied <juergen.schmied@metronet.de> * [misc/shellord.c] Put some TRACE in. * [memory/string.c] Deleted unused variable in lstrcmpi32A. * [include/windows.h][memory/string.c] Added functions WideCharToLocal32 LocalToWideChar32 for OLE-strings * [include/shlobj.h][include/winerror.h][misc/shell.c] [ole/folders.c] Added definition of internal class pidlmgr. Changed definitions of EnumIDList, IShellFolder. Added some OLE error constants. Implemented EnumIDList, IShellFolder, IClassFactory, PidlMgr, SHELL32_DllGetClassObject, SHGetDesktopFolder, SHGetSpecialFolderLocation (half), SHGetPathFromIDList (!!This stuff is not finished yet!!) * [include/windows.h][misc/network][reley32/mpr.spec] Added stubs for WNetConnectionDialog32[A|W|API]. Added struct LPCONNECTDLGSTRUCT32[A|W] and some constants. Added some SetLastError(WN_NO_NETWORK) to the stubs. Fixed bufferhandling in WNetCancelConnection Added stub for MultinetGetErrorText[A|W] * [ole/ole2nls.c] Rewrote GetTimeFormat32A. Fri Jul 3 10:27:30 1998 Michael Poole <poole+@andrew.cmu.edu> * [graphics/ddraw.c] [tsx11/X11_calls] Implement IDirectDrawPalette_GetEntries. Use CopyColormapAndFree to avoid erasing previously-set palette entries. * [graphics/ddraw.c] [include/ddraw.h] [tools/make_X11wrappers] [tsx11/X11_calls] Provide a preliminary, not-yet-working framework for doing DirectDraw via Xlib or XShm as well as DGA. Tue Jun 30 00:16:09 1998 Marcel Baur <mbaur@g26.ethz.ch> * [ole/nls/*.nls] Added remaining 22 locales (including arabic locales).
diff --git a/misc/comm.c b/misc/comm.c index a1f69d3..f0bcc0f 100644 --- a/misc/comm.c +++ b/misc/comm.c
@@ -14,6 +14,24 @@ * * August 12, 1997. Take a bash at SetCommEventMask - Lawson Whitney * <lawson_whitney@juno.com> + * July 6, 1998. Fixes and comments by Valentijn Sessink + * <vsessink@ic.uva.nl> [V] + * I only quick-fixed an error for the output buffers. The thing is this: if a + * WinApp starts using serial ports, it calls OpenComm, asking it to open two + * buffers, cbInQueue and cbOutQueue size, to hold data to/from the serial + * ports. Wine OpenComm only returns "OK". Now the kernel buffer size for + * serial communication is only 4096 bytes large. Error: (App asks for + * a 104,000 bytes size buffer, Wine returns "OK", App asks "How many char's + * are in the buffer", Wine returns "4000" and App thinks "OK, another + * 100,000 chars left, good!") + * The solution below is a bad but working quickfix for the transmit buffer: + * the cbInQueue is saved in a variable; when the program asks how many chars + * there are in the buffer, GetCommError returns # in buffer PLUS + * the additional (cbOutQeueu - 4096), which leaves the application thinking + * "wow, almost full". + * Sorry for the rather chatty explanation - but I think comm.c needs to be + * redefined with real working buffers make it work; maybe these comments are + * of help. */ #include "config.h" @@ -56,6 +74,14 @@ */ int commerror = 0, eventmask = 0; +/* + * [V] If above globals are wrong, the one below will be wrong as well. It + * should probably be in the DosDeviceStruct on per port basis too. +*/ +int iGlobalOutQueueFiller; + +#define SERIAL_XMIT_SIZE 4096 + struct DosDeviceStruct COM[MAX_PORTS]; struct DosDeviceStruct LPT[MAX_PORTS]; LPCVOID *unknown[MAX_PORTS]; @@ -439,6 +465,10 @@ ERR(comm, "BUG ! COM0 doesn't exist !\n"); commerror = IE_BADID; } + + /* to help GetCommError return left buffsize [V] */ + iGlobalOutQueueFiller = (cbOutQueue - SERIAL_XMIT_SIZE); + if (iGlobalOutQueueFiller < 0) iGlobalOutQueueFiller = 0; TRACE(comm, "%s = %s\n", device, COM[port].devicename); @@ -780,7 +810,7 @@ rc = ioctl(fd, TIOCOUTQ, &cnt); if (rc) WARN(comm, "Error !\n"); - lpStat->cbOutQue = cnt; + lpStat->cbOutQue = cnt + iGlobalOutQueueFiller; rc = ioctl(fd, TIOCINQ, &cnt); if (rc) WARN(comm, "Error !\n");
diff --git a/misc/imagelist.c b/misc/imagelist.c index 5ca6e24..0514c0f 100644 --- a/misc/imagelist.c +++ b/misc/imagelist.c
@@ -10,7 +10,7 @@ * ILD_TRANSPARENT error in ImageList_DrawIndirect). * - Fix drag functions. * - Fix ImageList_Read and ImageList_Write. - * - Add ImageList_SetFilter (undocumented). + * - Fix ImageList_SetFilter (undocumented). * BTW does anybody know anything about this function??? * - It removes 12 Bytes from the stack (3 Parameters). * - First parameter SHOULD be a HIMAGELIST. @@ -31,10 +31,7 @@ */ #define __WINE_IMAGELIST_C -/* This must be defined until "GetIconInfo" is implemented completely. - * To do that the cursor and icon code in objects/cursoricon.c must - * be rewritten. - */ +/* This must be defined until "GetIconInfo" is not fully implemented. */ #define __GET_ICON_INFO_HACK__ #include "windows.h" @@ -1446,21 +1443,23 @@ ptr->bBitsPerPixel, (char *)(ptr + 1) + ptr->nHeight * BITMAP_WIDTH_BYTES(ptr->nWidth, 1)); + GlobalUnlock16 (handle); himl = ImageList_Create (ptr->nWidth, ptr->nHeight, ILC_MASK | ILC_COLOR, 1, cGrow); ImageList_Add (himl, hbmImage, hbmMask); DeleteObject32 (hbmImage); DeleteObject32 (hbmMask); - GlobalUnlock16 (handle); #else ICONINFO32 ii; BITMAP32 bmp; GetIconInfo (hIcon, &ii); - GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); + GetObject32A (ii->hbmColor, sizeof(BITMAP32), (LPVOID)&bmp); himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, ILC_MASK | ILC_COLOR, 1, cGrow); ImageList_Add (himl, ii->hbmColor, ii->hbmMask); + DeleteObject32 (ii->hbmColor); + DeleteObject32 (ii->hbmMask); #endif } @@ -1543,6 +1542,8 @@ himl = ImageList_Create (bmp.bmWidth, bmp.bmHeight, ILC_MASK | ILC_COLOR, 1, cGrow); ImageList_Add (himl, ii->hbmColor, ii->hbmMask); + DeleteObject32 (ii->hbmColor); + DeleteObject32 (ii->hbmMask); #endif } @@ -1915,6 +1916,8 @@ BITMAP32 bmp; #endif + TRACE (imagelist, "(0x%x 0x%x 0x%x)\n", himl, i, hIcon); + if (himl == NULL) return (-1); if ((i >= himl->cCurImage) || (i < -1)) return (-1); @@ -1922,10 +1925,14 @@ if (!(ptr = (CURSORICONINFO *)GlobalLock16(hIcon))) return (-1); hbmMask = CreateBitmap32 (ptr->nWidth, ptr->nHeight, 1, 1, (char *)(ptr + 1)); + if (!(hbmMask)) + ERR (imagelist, " no mask!\n"); hbmImage = CreateBitmap32 (ptr->nWidth, ptr->nHeight, ptr->bPlanes, ptr->bBitsPerPixel, (char *)(ptr + 1) + ptr->nHeight * BITMAP_WIDTH_BYTES(ptr->nWidth, 1)); + if (!(hbmMask)) + ERR (imagelist, " no image!\n"); #else GetIconInfo (hIcon, &ii); GetObject32A (ii->hbmMask, sizeof(BITMAP32), (LPVOID)&bmp); @@ -1970,10 +1977,13 @@ DeleteDC32 (hdcImageList); DeleteDC32 (hdcImage); -#ifdef __GET_ICON_INFO_HACK +#ifdef __GET_ICON_INFO_HACK__ DeleteObject32 (hbmImage); DeleteObject32 (hbmMask); GlobalUnlock16 (hIcon); +#else + DeleteObject32 (ii->hbmColor); + DeleteObject32 (ii->hbmMask); #endif return (nIndex); } @@ -2071,15 +2081,14 @@ * empty stub. */ -#if 0 BOOL32 WINAPI ImageList_SetFilter (HIMAGELIST himl, INT32 i, DWORD dwFilter) { - FIXME (imagelist, "empty stub!\n"); + FIXME (imagelist, "(%p 0x%08x 0x%08x):empty stub!\n", + himl, i, dwFilter); - + return FALSE; } -#endif /* 0 */ /*************************************************************************
diff --git a/misc/main.c b/misc/main.c index 9819e55..6a459da 100644 --- a/misc/main.c +++ b/misc/main.c
@@ -1149,7 +1149,7 @@ case SPI_GETHIGHCONTRAST: { - LPHIGHCONTRASTA lpHighContrastW = (LPHIGHCONTRASTW)lpvParam; + LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)lpvParam; FIXME(system,"SPI_GETHIGHCONTRAST not fully implemented\n"); @@ -1178,7 +1178,8 @@ /*********************************************************************** * FileCDR (KERNEL.130) */ -void WINAPI FileCDR(FARPROC16 x) +FARPROC16 WINAPI FileCDR(FARPROC16 x) { FIXME(file,"(%8x): stub\n", (int) x); + return (FARPROC16)TRUE; }
diff --git a/misc/network.c b/misc/network.c index a0eedad..d955016 100644 --- a/misc/network.c +++ b/misc/network.c
@@ -14,6 +14,7 @@ #include "wnet.h" #include "debug.h" #include "win.h" +#include "heap.h" /******************************************************************** * WNetAddConnection16 [USER.517] Directs a local device to net @@ -27,7 +28,9 @@ return WNetAddConnection32A(lpNetPath, lpPassWord, lpLocalName); } -/* [MPR.50] */ +/********************************************************************* + * WNetAddConnection32 [MPR.50] + */ UINT32 WINAPI WNetAddConnection32A(LPCSTR NetPath, LPCSTR PassWord, LPCSTR LocalName) @@ -44,6 +47,7 @@ LPCWSTR LocalName) { FIXME(wnet, " stub!\n"); + SetLastError(WN_NO_NETWORK); return WN_NO_NETWORK; } @@ -108,7 +112,32 @@ flags); } +/******************************************************************* + * WNetConnectionDialog1_32A [MPR.59] + */ +UINT32 WNetConnectionDialog1_32A (LPCONNECTDLGSTRUCT32A lpConnDlgStruct) +{ FIXME(wnet,"%p stub\n", lpConnDlgStruct); + SetLastError(WN_NO_NETWORK); + return ERROR_NO_NETWORK; +} +/******************************************************************* + * WNetConnectionDialog1_32W [MPR.60] + */ +UINT32 WNetConnectionDialog1_32W (LPCONNECTDLGSTRUCT32W lpConnDlgStruct) +{ FIXME(wnet,"%p stub\n", lpConnDlgStruct); + SetLastError(WN_NO_NETWORK); + return ERROR_NO_NETWORK; +} + +/******************************************************************* + * WNetConnectionDialog1_32 [MPR.61] + */ +UINT32 WNetConnectionDialog1_32(HWND32 owner, DWORD flags ) +{ FIXME(wnet,"owner = 0x%x, flags=0x%lx stub\n", owner,flags); + SetLastError(WN_NO_NETWORK); + return ERROR_NO_NETWORK; +} /******************************************************************** * WNetCancelConnection [USER.518] undirects a local device */ @@ -285,15 +314,15 @@ * WNetGetConnectionW [MPR.72] */ DWORD WINAPI -WNetGetConnection32W(LPCWSTR localnameW,LPSTR remotenameW,LPDWORD buflen) +WNetGetConnection32W(LPCWSTR localnameW,LPWSTR remotenameW,LPDWORD buflen) { UINT16 x; CHAR buf[200]; LPSTR lnA = HEAP_strdupWtoA(GetProcessHeap(),0,localnameW); DWORD ret = WNetGetConnection16(lnA,buf,&x); - *buflen = x; /* FIXME: *2 ? */ lstrcpyAtoW(remotenameW,buf); + *buflen=lstrlen32W(remotenameW); HeapFree(GetProcessHeap(),0,lnA); return ret; } @@ -572,6 +601,7 @@ { FIXME(wnet, "(%08lX, %08lX, %08lX, %p, %p): stub\n", dwScope, dwType, dwUsage, lpNet, lphEnum); + SetLastError(WN_NO_NETWORK); return WN_NO_NETWORK; } @@ -584,6 +614,7 @@ LPNETRESOURCE32A netres,LPVOID buf,LPDWORD buflen,LPSTR systemstr ) { FIXME(wnet,"(%p,%p,%p,%p): stub!\n",netres,buf,buflen,systemstr); + SetLastError(WN_NO_NETWORK); return WN_NO_NETWORK; } @@ -667,4 +698,19 @@ FIXME(mpr,"(%lx,%lx): stub\n",x,y); return 1; } +/***************************************************************** + * MultinetGetErrorTextA [MPR.28] + */ +UINT32 WINAPI MultinetGetErrorText32A (DWORD x, DWORD y, DWORD z) +{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z); + return 0; +} +/***************************************************************** + * MultinetGetErrorTextW [MPR.29] + */ + +UINT32 WINAPI MultinetGetErrorText32W (DWORD x, DWORD y, DWORD z) +{ FIXME(mpr,"(%lx,%lx,%lx): stub\n",x,y,z); + return 0; +}
diff --git a/misc/ntdll.c b/misc/ntdll.c index 169cf45..faee4d8 100644 --- a/misc/ntdll.c +++ b/misc/ntdll.c
@@ -712,3 +712,9 @@ ); return 0; } + +DWORD WINAPI RtlFormatCurrentUserKeyPath() +{ + FIXME(ntdll,"(): stub\n"); + return 1; +}
diff --git a/misc/printdrv.c b/misc/printdrv.c index 37a1748..75a6a8f 100644 --- a/misc/printdrv.c +++ b/misc/printdrv.c
@@ -2,6 +2,7 @@ * Implementation of some printer driver bits * * Copyright 1996 John Harvey + * Copyright 1998 Andreas Mohr */ #include <stdlib.h> @@ -12,9 +13,7 @@ #include "winerror.h" #include "winreg.h" #include "debug.h" - -#define INT_PD_DEFAULT_DEVMODE 1 -#define INT_PD_DEFAULT_MODEL 2 +#include "print.h" static char PrinterModel[] = "Printer Model"; static char DefaultDevMode[] = "Default DevMode"; @@ -31,7 +30,8 @@ TRACE(print, "%d %s %s\n",lpdoc->cbSize, (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName), (LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszOutput)); - retVal = Escape16(hdc, STARTDOC, sizeof(DOCINFO16), lpdoc->lpszDocName, 0); + retVal = Escape16(hdc, STARTDOC, + strlen((LPSTR)PTR_SEG_TO_LIN(lpdoc->lpszDocName)), lpdoc->lpszDocName, 0); TRACE(print,"Escape16 returned %d\n",retVal); return retVal; } @@ -100,8 +100,8 @@ strcpy(RegStr_Printer, Printers); strcat(RegStr_Printer, lpPrinter); - if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || - (!lstrcmp32A(lpProfile, DefaultDevMode))) { + if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) && + (!strcmp(lpProfile, DefaultDevMode)))) { size = DrvGetPrinterDataInternal(RegStr_Printer, lpPrinterData, cbData); if (size+1) { *lpNeeded = size; @@ -111,8 +111,8 @@ else res = ERROR_INVALID_PRINTER_NAME; } else - if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || - (!lstrcmp32A(lpProfile, PrinterModel))) { + if (((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) && + (!strcmp(lpProfile, PrinterModel)))) { *lpNeeded = 32; if (!lpPrinterData) goto failed; if (cbData < 32) { @@ -130,13 +130,18 @@ if ((res = RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey))) goto failed; cbPrinterAttr = 4; - if ((res = RegQueryValueEx32A(hkey, "Attributes", 0, &dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr))) + if ((res = RegQueryValueEx32A(hkey, "Attributes", 0, + &dwType, (LPBYTE)&PrinterAttr, &cbPrinterAttr))) goto failed; if ((res = RegOpenKey32A(hkey, PrinterDriverData, &hkey2))) goto failed; *lpNeeded = cbData; - res = RegQueryValueEx32A(hkey2, lpProfile, 0, lpType, lpPrinterData, lpNeeded); - if ((res != ERROR_CANTREAD) && ((PrinterAttr & (0x800|0x10)) == 0x10)) + res = RegQueryValueEx32A(hkey2, lpProfile, 0, + lpType, lpPrinterData, lpNeeded); + if ((res != ERROR_CANTREAD) && + ((PrinterAttr & + (PRINTER_ATTRIBUTE_ENABLE_BIDI|PRINTER_ATTRIBUTE_NETWORK)) + == PRINTER_ATTRIBUTE_NETWORK)) { if (!(res) && (*lpType == REG_DWORD) && (*(LPDWORD)lpPrinterData == -1)) res = ERROR_INVALID_DATA; @@ -176,8 +181,8 @@ TRACE(print,"lpType %08lx\n",lpType); if ((!lpPrinter) || (!lpProfile) || - ((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || - (!lstrcmp32A(lpProfile, PrinterModel))) + ((DWORD)lpProfile == INT_PD_DEFAULT_MODEL) || (HIWORD(lpProfile) && + (!strcmp(lpProfile, PrinterModel)))) return ERROR_INVALID_PARAMETER; RegStr_Printer = HeapAlloc(GetProcessHeap(), 0, @@ -185,8 +190,8 @@ strcpy(RegStr_Printer, Printers); strcat(RegStr_Printer, lpPrinter); - if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || - (!lstrcmp32A(lpProfile, DefaultDevMode))) { + if (((DWORD)lpProfile == INT_PD_DEFAULT_DEVMODE) || (HIWORD(lpProfile) && + (!strcmp(lpProfile, DefaultDevMode)))) { if (!(RegOpenKey32A(HKEY_LOCAL_MACHINE, RegStr_Printer, &hkey)) || (RegSetValueEx32A(hkey, DefaultDevMode, 0, REG_BINARY, lpPrinterData, dwSize))) res = ERROR_INVALID_PRINTER_NAME;
diff --git a/misc/registry.c b/misc/registry.c index 01b7498..6f7ff91 100644 --- a/misc/registry.c +++ b/misc/registry.c
@@ -15,6 +15,7 @@ * TODO * Security access * Option handling + * Time for RegEnumKey*, RegQueryInfoKey* */ #include <stdlib.h> @@ -2080,7 +2081,7 @@ * * Callpath: * RegQueryValue16 -> RegQueryValue32A -> RegQueryValueEx32A \ - * RegQueryValue32W -> RegQueryValueEx32W + * RegQueryValue32W -> RegQueryValueEx32W */ @@ -2602,12 +2603,22 @@ * * Callpath: * RegEnumKey16 -> RegEnumKey32A -> RegEnumKeyEx32A \ - * RegEnumKey32W -> RegEnumKeyEx32W + * RegEnumKey32W -> RegEnumKeyEx32W */ /****************************************************************************** * RegEnumKeyEx32W [ADVAPI32.139] + * + * PARAMS + * hkey [I] Handle to key to enumerate + * iSubKey [I] Index of subkey to enumerate + * lpszName [O] Buffer for subkey name + * lpcchName [O] Size of subkey buffer + * lpdwReserved [I] Reserved + * lpszClass [O] Buffer for class string + * lpcchClass [O] Size of class buffer + * ft [O] Time key last written to */ DWORD WINAPI RegEnumKeyEx32W( HKEY hkey, DWORD iSubkey, LPWSTR lpszName, LPDWORD lpcchName, LPDWORD lpdwReserved, @@ -2626,17 +2637,24 @@ if (!lpkey->nextsub) return ERROR_NO_MORE_ITEMS; lpxkey=lpkey->nextsub; + + /* Traverse the subkeys */ while (iSubkey && lpxkey) { iSubkey--; lpxkey=lpxkey->next; } + if (iSubkey || !lpxkey) return ERROR_NO_MORE_ITEMS; if (2*lstrlen32W(lpxkey->keyname)+2>*lpcchName) return ERROR_MORE_DATA; memcpy(lpszName,lpxkey->keyname,lstrlen32W(lpxkey->keyname)*2+2); + + if (*lpcchName) + *lpcchName = lstrlen32W(lpszName); + if (lpszClass) { - /* what should we write into it? */ + /* FIXME: what should we write into it? */ *lpszClass = 0; *lpcchClass = 2; } @@ -2749,9 +2767,14 @@ * RegEnumValue32W [ADVAPI32.142] * * PARAMS - * hkey [I] - * iValue [I] - * ... + * hkey [I] Handle to key to query + * iValue [I] Index of value to query + * lpszValue [O] Value string + * lpcchValue [O] Size of value buffer + * lpdReserved [I] Reserved + * lpdwType [O] Type code + * lpbData [O] Value data + * lpcbData [O] Size of data buffer */ DWORD WINAPI RegEnumValue32W( HKEY hkey, DWORD iValue, LPWSTR lpszValue, LPDWORD lpcchValue, LPDWORD lpdReserved, @@ -2772,10 +2795,11 @@ if (!iValue) return ERROR_SUCCESS; - if (lpkey->nrofvalues<=iValue) - return ERROR_NO_MORE_ITEMS; + if (lpkey->nrofvalues <= iValue) + return ERROR_NO_MORE_ITEMS; - val = lpkey->values+iValue; + /* FIXME: Should this be lpkey->values + iValue * sizeof(KEYVALUE)? */ + val = lpkey->values + iValue; if (val->name) { if (lstrlen32W(val->name)*2+2>*lpcchValue) { @@ -2788,8 +2812,11 @@ *lpszValue = 0; *lpcchValue = 0; } - if (lpdwType) - *lpdwType=val->type; + + /* Can be NULL if the type code is not required */ + if (lpdwType) + *lpdwType = val->type; + if (lpbData) { if (val->len>*lpcbData) return ERROR_MORE_DATA; @@ -2811,10 +2838,10 @@ LPWSTR lpszValueW; LPBYTE lpbDataW; DWORD ret,lpcbDataW; + DWORD dwType; - TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n", - hkey,iValue,lpszValue,lpcchValue,lpdReserved,lpdwType,lpbData,lpcbData - ); + TRACE(reg,"(%x,%ld,%p,%p,%p,%p,%p,%p)\n",hkey,iValue,lpszValue,lpcchValue, + lpdReserved,lpdwType,lpbData,lpcbData); lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2); if (lpbData) { @@ -2822,21 +2849,17 @@ lpcbDataW = *lpcbData*2; } else lpbDataW = NULL; - ret=RegEnumValue32W( - hkey, - iValue, - lpszValueW, - lpcchValue, - lpdReserved, - lpdwType, - lpbDataW, - &lpcbDataW - ); + + ret = RegEnumValue32W( hkey, iValue, lpszValueW, lpcchValue, + lpdReserved, &dwType, lpbDataW, &lpcbDataW ); + + if (lpdwType) + *lpdwType = dwType; if (ret==ERROR_SUCCESS) { lstrcpyWtoA(lpszValue,lpszValueW); if (lpbData) { - if ((1<<*lpdwType) & UNICONVMASK) { + if ((1<<dwType) & UNICONVMASK) { lstrcpyWtoA(lpbData,(LPWSTR)lpbDataW); } else { if (lpcbDataW > *lpcbData) @@ -2847,11 +2870,9 @@ *lpcbData = lpcbDataW; } } - if (lpbDataW) - free(lpbDataW); - if (lpszValueW) - free(lpszValueW); - return ret; + if (lpbDataW) free(lpbDataW); + if (lpszValueW) free(lpszValueW); + return ret; } @@ -2906,8 +2927,8 @@ * RegDeleteKey32W [ADVAPI32.134] * * PARAMS - * hkey [I] - * lpszSubKey [I] + * hkey [I] Handle to open key + * lpszSubKey [I] Name of subkey to delete * * RETURNS * Success: ERROR_SUCCESS @@ -2925,10 +2946,11 @@ if (!lpNextKey) return ERROR_INVALID_HANDLE; - /* We need to know the previous key in the hier. */ + /* Subkey param cannot be NULL */ if (!lpszSubKey || !*lpszSubKey) return ERROR_BADKEY; + /* We need to know the previous key in the hier. */ split_keypath(lpszSubKey,&wps,&wpc); i = 0; lpxkey = lpNextKey; @@ -3133,28 +3155,37 @@ /* FIXME: lpcchXXXX ... is this counting in WCHARS or in BYTEs ?? */ + /****************************************************************************** * RegQueryInfoKey32W [ADVAPI32.153] + * + * PARAMS + * hkey [I] Handle to key to query + * lpszClass [O] Buffer for class string + * lpcchClass [O] Size of class string buffer + * lpdwReserved [I] Reserved + * lpcSubKeys [I] Buffer for number of subkeys + * lpcchMaxSubKey [O] Buffer for longest subkey name length + * lpcchMaxClass [O] Buffer for longest class string length + * lpcValues [O] Buffer for number of value entries + * lpcchMaxValueName [O] Buffer for longest value name length + * lpccbMaxValueData [O] Buffer for longest value data length + * lpcbSecurityDescriptor [O] Buffer for security descriptor length + * ft */ -DWORD WINAPI RegQueryInfoKey32W( - HKEY hkey, - LPWSTR lpszClass, - LPDWORD lpcchClass, - LPDWORD lpdwReserved, - LPDWORD lpcSubKeys, - LPDWORD lpcchMaxSubkey, - LPDWORD lpcchMaxClass, - LPDWORD lpcValues, - LPDWORD lpcchMaxValueName, - LPDWORD lpccbMaxValueData, - LPDWORD lpcbSecurityDescriptor, - FILETIME *ft -) { +DWORD WINAPI RegQueryInfoKey32W( HKEY hkey, LPWSTR lpszClass, + LPDWORD lpcchClass, LPDWORD lpdwReserved, + LPDWORD lpcSubKeys, LPDWORD lpcchMaxSubkey, + LPDWORD lpcchMaxClass, LPDWORD lpcValues, + LPDWORD lpcchMaxValueName, + LPDWORD lpccbMaxValueData, + LPDWORD lpcbSecurityDescriptor, FILETIME *ft ) +{ LPKEYSTRUCT lpkey,lpxkey; int nrofkeys,maxsubkey,maxclass,maxvname,maxvdata; int i; - TRACE(reg,"(%x,......)\n",hkey); + TRACE(reg,"(%x,%p,...)\n",hkey,lpszClass); lpkey = lookup_hkey(hkey); if (!lpkey) return ERROR_INVALID_HANDLE; @@ -3210,21 +3241,16 @@ } -/* RegQueryInfoKeyA [ADVAPI32.152] */ -DWORD WINAPI RegQueryInfoKey32A( - HKEY hkey, - LPSTR lpszClass, - LPDWORD lpcchClass, - LPDWORD lpdwReserved, - LPDWORD lpcSubKeys, - LPDWORD lpcchMaxSubkey, - LPDWORD lpcchMaxClass, - LPDWORD lpcValues, - LPDWORD lpcchMaxValueName, - LPDWORD lpccbMaxValueData, - LPDWORD lpcbSecurityDescriptor, - FILETIME *ft -) { +/****************************************************************************** + * RegQueryInfoKey32A [ADVAPI32.152] + */ +DWORD WINAPI RegQueryInfoKey32A( HKEY hkey, LPSTR lpszClass, LPDWORD lpcchClass, + LPDWORD lpdwReserved, LPDWORD lpcSubKeys, + LPDWORD lpcchMaxSubkey, LPDWORD lpcchMaxClass, + LPDWORD lpcValues, LPDWORD lpcchMaxValueName, + LPDWORD lpccbMaxValueData, + LPDWORD lpcbSecurityDescriptor, FILETIME *ft ) +{ LPWSTR lpszClassW; DWORD ret; @@ -3322,16 +3348,21 @@ { LPKEYSTRUCT lpkey; - FIXME(reg, "(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation, - pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); + TRACE(reg,"(%x,%ld,%p,%ld)\n",hkey,SecurityInformation,pSecurityDescriptor, + lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); lpkey = lookup_hkey( hkey ); if (!lpkey) return ERROR_INVALID_HANDLE; + /* FIXME: Check for valid SecurityInformation values */ + if (*lpcbSecurityDescriptor < sizeof(*pSecurityDescriptor)) return ERROR_INSUFFICIENT_BUFFER; + FIXME(reg, "(%x,%ld,%p,%ld): stub\n",hkey,SecurityInformation, + pSecurityDescriptor,lpcbSecurityDescriptor?*lpcbSecurityDescriptor:0); + return ERROR_SUCCESS; } @@ -3347,8 +3378,7 @@ LONG WINAPI RegLoadKey32W( HKEY hkey, LPCWSTR lpszSubKey, LPCWSTR lpszFile ) { LPKEYSTRUCT lpkey; - FIXME(reg,"(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey), - debugstr_w(lpszFile)); + TRACE(reg,"(%x,%s,%s)\n",hkey,debugstr_w(lpszSubKey),debugstr_w(lpszFile)); /* Do this check before the hkey check */ if (!lpszSubKey || !*lpszSubKey || !lpszFile || !*lpszFile) @@ -3358,6 +3388,9 @@ if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg,"(%x,%s,%s): stub\n",hkey,debugstr_w(lpszSubKey), + debugstr_w(lpszFile)); + return ERROR_SUCCESS; } @@ -3392,13 +3425,16 @@ BOOL32 fAsync ) { LPKEYSTRUCT lpkey; - FIXME(reg,"(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, + TRACE(reg,"(%x,%i,%ld,%x,%i)\n",hkey,fWatchSubTree,fdwNotifyFilter, hEvent,fAsync); lpkey = lookup_hkey( hkey ); if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg,"(%x,%i,%ld,%x,%i): stub\n",hkey,fWatchSubTree,fdwNotifyFilter, + hEvent,fAsync); + return ERROR_SUCCESS; } @@ -3443,7 +3479,7 @@ { LPKEYSTRUCT lpkey; - FIXME(reg, "(%x,%ld,%p): stub\n", hkey, SecurityInfo, pSecurityDesc); + TRACE(reg,"(%x,%ld,%p)\n",hkey,SecurityInfo,pSecurityDesc); /* It seems to perform this check before the hkey check */ if ((SecurityInfo & OWNER_SECURITY_INFORMATION) || @@ -3461,6 +3497,8 @@ if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg,":(%x,%ld,%p): stub\n",hkey,SecurityInfo,pSecurityDesc); + return ERROR_SUCCESS; } @@ -3478,7 +3516,7 @@ { LPKEYSTRUCT lpkey; - FIXME(reg, "(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa); + TRACE(reg, "(%x,%s,%p)\n", hkey, debugstr_w(lpFile), sa); /* It appears to do this check before the hkey check */ if (!lpFile || !*lpFile) @@ -3488,6 +3526,8 @@ if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg, "(%x,%s,%p): stub\n", hkey, debugstr_w(lpFile), sa); + return ERROR_SUCCESS; } @@ -3517,7 +3557,8 @@ LONG WINAPI RegRestoreKey32W( HKEY hkey, LPCWSTR lpFile, DWORD dwFlags ) { LPKEYSTRUCT lpkey; - FIXME(reg, "(%x,%s,%ld): stub\n", hkey, debugstr_w(lpFile), dwFlags); + + TRACE(reg, "(%x,%s,%ld)\n",hkey,debugstr_w(lpFile),dwFlags); /* It seems to do this check before the hkey check */ if (!lpFile || !*lpFile) @@ -3527,6 +3568,8 @@ if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg,"(%x,%s,%ld): stub\n",hkey,debugstr_w(lpFile),dwFlags); + /* Check for file existence */ return ERROR_SUCCESS; @@ -3560,13 +3603,16 @@ { LPKEYSTRUCT lpkey; - FIXME(reg, "(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), + TRACE(reg,"(%x,%s,%s,%s)\n",hkey,debugstr_w(lpSubKey), debugstr_w(lpNewFile),debugstr_w(lpOldFile)); lpkey = lookup_hkey( hkey ); if (!lpkey) return ERROR_INVALID_HANDLE; + FIXME(reg, "(%x,%s,%s,%s): stub\n", hkey, debugstr_w(lpSubKey), + debugstr_w(lpNewFile),debugstr_w(lpOldFile)); + return ERROR_SUCCESS; }
diff --git a/misc/shell.c b/misc/shell.c index b140083..75d830f 100644 --- a/misc/shell.c +++ b/misc/shell.c
@@ -1,6 +1,8 @@ /* * Shell Library Functions * + * 1998 Marcus Meissner + * 1998 Juergen Schmied (jsch) * currently work in progress on SH* and SHELL32_DllGetClassObject functions * <contact juergen.schmied@metronet.de 980624> */ @@ -27,12 +29,18 @@ #include "debug.h" #include "winreg.h" +/* FIXME should be moved to a header file. IsEqualGUID +is declared but not exported in compobj.c !!!*/ +#define IsEqualGUID(rguid1, rguid2) (!memcmp(rguid1, rguid2, sizeof(GUID))) +#define IsEqualIID(riid1, riid2) IsEqualGUID(riid1, riid2) +#define IsEqualCLSID(rclsid1, rclsid2) IsEqualGUID(rclsid1, rclsid2) + static const char * const SHELL_People[] = { "Bob Amstadt", "Dag Asheim", "Martin Ayotte", - "Karl Backstr\366m", + "Karl Backström", "Peter Bajusz", "Marcel Baur", "Georg Beyerle", @@ -81,6 +89,7 @@ "Pavel Kankovsky", "Jochen Karrer", "Andreas Kirschbaum", + "Rein Klazes", "Albrecht Kleine", "Eric Kohl", "Jon Konrath", @@ -90,6 +99,7 @@ "Scott A. Laird", "David Lee Lambert", "Andrew Lewycky", + "Per Lindström", "Martin von Loewis", "Michiel van Loon", "Kenneth MacDonald", @@ -126,6 +136,7 @@ "Peter Schlaile", "Ulrich Schmid", "Bernd Schmidt", + "Juergen Schmied", "Ingo Schneider", "Victor Schneider", "Yngvi Sigurjonsson", @@ -1574,65 +1585,88 @@ } /************************************************************************* - * SHELL32_DllGetClassObject [SHELL32.14] + * SHELL32_DllGetClassObject [SHELL32.128] * - * http://premium.microsoft.com/msdn/library/sdkdoc/api2_48fo.htm + * [Standart OLE/COM Interface Method] + * This Function retrives the pointer to a specified interface (iid) of + * a given class (rclsid). + * With this pointer it's possible to call the IClassFactory_CreateInstance + * method to get a instance of the requested Class. + * This function does NOT instantiate the Class!!! + * + * RETURNS + * HRESULT + * */ DWORD WINAPI SHELL32_DllGetClassObject(REFCLSID rclsid,REFIID iid,LPVOID *ppv) -{ - char xclsid[50],xiid[50]; - HRESULT hres = E_OUTOFMEMORY; +{ HRESULT hres = E_OUTOFMEMORY; + LPCLASSFACTORY lpclf; + char xclsid[50],xiid[50]; + WINE_StringFromCLSID((LPCLSID)rclsid,xclsid); + WINE_StringFromCLSID((LPCLSID)iid,xiid); + TRACE(shell,"\n\tCLSID:\t%s,\n\tIID:\t%s\n",xclsid,xiid); + + *ppv = NULL; + if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)|| + IsEqualCLSID(rclsid, &CLSID_ShellLink)) + { if(IsEqualCLSID(rclsid, &CLSID_ShellDesktop)) /*debug*/ + TRACE(shell,"requested CLSID_ShellDesktop\n"); + if(IsEqualCLSID(rclsid, &CLSID_ShellLink)) /*debug*/ + TRACE(shell,"requested CLSID_ShellLink\n"); - WINE_StringFromCLSID((LPCLSID)rclsid,xclsid); - WINE_StringFromCLSID((LPCLSID)iid,xiid); - TRACE(shell,"(%s,%s,%p)\n",xclsid,xiid,ppv); - - *ppv = NULL; -/* SDK example code looks like this: - * - HRESULT hres = E_OUTOFMEMORY; - - *ppv = NULL; - CClassFactory *pClassFactory = new CClassFactory(rclsid); - - if (pClassFactory) { - hRes = pClassFactory->QueryInterface(riid,ppv); - pClassFactory->Release(); - } - return hRes; - * - * The magic of the whole stuff is still unclear to me, so just hack together - * something. - */ - - if (!memcmp(rclsid,&CLSID_ShellDesktop,sizeof(CLSID_ShellDesktop))) - { TRACE(shell," requested CLSID_ShellDesktop, creating it.\n"); - *ppv = IShellFolder_Constructor(); -/* FIXME(shell,"Initialize this folder to be the shell desktop folder\n")*/ - return S_OK; + /* fixme: the IClassFactory_Constructor at the moment only + for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/ + lpclf = IClassFactory_Constructor(); + if(lpclf) + { hres = lpclf->lpvtbl->fnQueryInterface(lpclf,iid, ppv); + lpclf->lpvtbl->fnRelease(lpclf); + } } - - FIXME(shell, "clsid(%s) not found, return CLASS_E_CLASSNOTAVAILABLE.\n",xclsid); - *ppv=NULL; - return CLASS_E_CLASSNOTAVAILABLE; + else + { WARN(shell, "clsid(%s) not in buildin SHELL32\n",xclsid); + hres = CLASS_E_CLASSNOTAVAILABLE; + } + TRACE(shell,"RETURN pointer to interface: %p\n",ppv); + return hres; } /************************************************************************* - * SHGetDesktopFolder [SHELL32.216] - * returns the interface to the shell desktop folder. + * SHGetDesktopFolder [SHELL32.216] + * + * SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with + * CLSID_ShellDesktop + * CoCreateInstance(CLSID_Desktop, NULL, CLSCTX_INPROC, IID_IShellFolder, &pshf); * - * [SDK header win95/shlobj.h: This is equivalent to call CoCreateInstance with - * CLSID_ShellDesktop. + * RETURNS + * the interface to the shell desktop folder. * - * CoCreateInstance(CLSID_Desktop, NULL, - * CLSCTX_INPROC, IID_IShellFolder, &pshf); - * ] - * So what we are doing is currently wrong.... */ -DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) { - *shellfolder = IShellFolder_Constructor(); - return NOERROR; +LPSHELLFOLDER pdesktopfolder=NULL; + +DWORD WINAPI SHGetDesktopFolder(LPSHELLFOLDER *shellfolder) +{ HRESULT hres = E_OUTOFMEMORY; + LPCLASSFACTORY lpclf; + TRACE(shell,"%p->(%p)\n",shellfolder,*shellfolder); + + if (pdesktopfolder) + { *shellfolder = pdesktopfolder; + hres = NOERROR; + } + else + { lpclf = IClassFactory_Constructor(); + /* fixme: the buildin IClassFactory_Constructor is at the moment only + for rclsid=CLSID_ShellDesktop, so we get the right Interface (jsch)*/ + if(lpclf) + { hres = lpclf->lpvtbl->fnCreateInstance(lpclf,NULL,(REFIID)&IID_IShellFolder, (void*)&pdesktopfolder); + lpclf->lpvtbl->fnRelease(lpclf); + } + } + if (pdesktopfolder) + { *shellfolder = pdesktopfolder; + } + TRACE(shell,"-- %p->(%p)\n",shellfolder, *shellfolder); + return hres; } /************************************************************************* @@ -1645,61 +1679,95 @@ * What we are currently doing is not very wrong, since we always use the same * heap (ProcessHeap). */ -DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) { - TRACE(shell,"(%p)\n", lpmal); +DWORD WINAPI SHGetMalloc(LPMALLOC32 *lpmal) +{ TRACE(shell,"(%p)\n", lpmal); return CoGetMalloc32(0,lpmal); } /************************************************************************* * SHGetSpecialFolderLocation [SHELL32.223] - * returns the PIDL of a special folder + * nFolder is a CSIDL_xxxxx. * - * nFolder is a CSIDL_xxxxx. + * RETURNS + * returns the PIDL of a special folder + * + * FIXME + * the path is every time x:\\windows\\desktop + * we should get the path's from the registry */ -HRESULT WINAPI SHGetSpecialFolderLocation(HWND32 hwndOwner, INT32 nFolder, LPITEMIDLIST * ppidl) -{ FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl); +HRESULT WINAPI SHGetSpecialFolderLocation( + HWND32 hwndOwner, + INT32 nFolder, + LPITEMIDLIST * ppidl) +{ LPSHELLFOLDER shellfolder; + DWORD pchEaten; + CHAR pszTemp[256]; + LPWSTR lpszDisplayName = (LPWSTR)&pszTemp[0]; + + FIXME(shell,"(%04x,%d,%p),stub!\n", hwndOwner,nFolder,ppidl); - switch (nFolder) - { case CSIDL_BITBUCKET: TRACE (shell,"looking for Recyceler\n"); - break; - case CSIDL_CONTROLS: TRACE (shell,"looking for Control\n"); - break; - case CSIDL_DESKTOP: TRACE (shell,"looking for Desktop\n"); - break; - case CSIDL_DESKTOPDIRECTORY: TRACE (shell,"looking for DeskDir\n"); - break; - case CSIDL_DRIVES: TRACE (shell,"looking for Drives\n"); - break; - case CSIDL_FONTS: TRACE (shell,"looking for Fonts\n"); - break; - case CSIDL_NETHOOD: TRACE (shell,"looking for Nethood\n"); - break; - case CSIDL_NETWORK: TRACE (shell,"looking for Network\n"); - break; - case CSIDL_PERSONAL: TRACE (shell,"looking for Personal\n"); - break; - case CSIDL_PRINTERS: TRACE (shell,"looking for Printers\n"); - break; - case CSIDL_PROGRAMS: TRACE (shell,"looking for Programms\n"); - break; - case CSIDL_RECENT: TRACE (shell,"looking for Recent\n"); - break; - case CSIDL_SENDTO: TRACE (shell,"looking for Sendto\n"); - break; - case CSIDL_STARTMENU: TRACE (shell,"looking for Startmenu\n"); - break; - case CSIDL_STARTUP: TRACE (shell,"looking for Startup\n"); - break; - case CSIDL_TEMPLATES: TRACE (shell,"looking for Templates\n"); - break; - default: ERR (shell,"unknown CSIDL\n"); - break; + LocalToWideChar32(lpszDisplayName, "x:\\windows\\desktop\\", 256); + + if (SHGetDesktopFolder(&shellfolder)==S_OK) + { shellfolder->lpvtbl->fnParseDisplayName(shellfolder,hwndOwner, + NULL,lpszDisplayName,&pchEaten,ppidl,NULL); } - *ppidl = (LPITEMIDLIST)HeapAlloc(GetProcessHeap(),0,sizeof(ITEMIDLIST)); - (*ppidl)->mkid.cb = 0; /*the first ITEMIDLIST*/ + switch (nFolder) + { case CSIDL_BITBUCKET: + TRACE (shell,"looking for Recyceler\n"); + break; + case CSIDL_CONTROLS: + TRACE (shell,"looking for Control\n"); + break; + case CSIDL_DESKTOP: + TRACE (shell,"looking for Desktop\n"); + break; + case CSIDL_DESKTOPDIRECTORY: + TRACE (shell,"looking for DeskDir\n"); + break; + case CSIDL_DRIVES: + TRACE (shell,"looking for Drives\n"); + break; + case CSIDL_FONTS: + TRACE (shell,"looking for Fonts\n"); + break; + case CSIDL_NETHOOD: + TRACE (shell,"looking for Nethood\n"); + break; + case CSIDL_NETWORK: + TRACE (shell,"looking for Network\n"); + break; + case CSIDL_PERSONAL: + TRACE (shell,"looking for Personal\n"); + break; + case CSIDL_PRINTERS: + TRACE (shell,"looking for Printers\n"); + break; + case CSIDL_PROGRAMS: + TRACE (shell,"looking for Programms\n"); + break; + case CSIDL_RECENT: + TRACE (shell,"looking for Recent\n"); + break; + case CSIDL_SENDTO: + TRACE (shell,"looking for Sendto\n"); + break; + case CSIDL_STARTMENU: + TRACE (shell,"looking for Startmenu\n"); + break; + case CSIDL_STARTUP: + TRACE (shell,"looking for Startup\n"); + break; + case CSIDL_TEMPLATES: + TRACE (shell,"looking for Templates\n"); + break; + default: + ERR (shell,"unknown CSIDL\n"); + break; + } - FIXME(shell, "return empty ITEMIDLIST only (pidl %p)\n",*ppidl); + TRACE(shell, "-- (new pidl %p)\n",*ppidl); return NOERROR; } @@ -1709,8 +1777,16 @@ * returns the path from a passed PIDL. */ BOOL32 WINAPI SHGetPathFromIDList(LPCITEMIDLIST pidl,LPSTR pszPath) -{ FIXME(shell,"(pidl %p,%p),stub, returning E:\\\\ \n",pidl,pszPath); - strcpy(pszPath,"E:\\"); /* FIXME */ +{ STRRET lpName; + LPSHELLFOLDER shellfolder; + TRACE(shell,"(pidl=%p,%p)\n",pidl,pszPath); + + if (SHGetDesktopFolder(&shellfolder)==S_OK) + { shellfolder->lpvtbl->fnGetDisplayNameOf(shellfolder,pidl,SHGDN_FORPARSING,&lpName); + } + WideCharToLocal32(pszPath, lpName.u.pOleStr, MAX_PATH); + /* fixme free the olestring*/ + TRACE(shell,"-- (%s)\n",pszPath); return NOERROR; } @@ -1721,14 +1797,25 @@ DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, DWORD dwArg4) +{ FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n", + dwArg1, dwArg2, dwArg3, dwArg4); + + return 0; +} + +/************************************************************************* + * SHLoadInProc [SHELL32.225] + * + */ + +DWORD WINAPI +SHLoadInProc (DWORD dwArg1) { - FIXME (exec, "(%lx, %lx, %lx, %lx) empty stub!\n", - dwArg1, dwArg2, dwArg3, dwArg4); + FIXME (shell, "(%lx) empty stub!\n", dwArg1); return 0; } - /************************************************************************* * SHBrowseForFolderA [SHELL32.209] * @@ -1736,10 +1823,8 @@ LPITEMIDLIST WINAPI SHBrowseForFolder32A (LPBROWSEINFO32A lpbi) -{ - FIXME (exec, "(%lx) empty stub!\n", (DWORD)lpbi); - FIXME (exec, "(%s) empty stub!\n", lpbi->lpszTitle); - - return NULL; +{ FIXME (shell, "(%lx) empty stub!\n", (DWORD)lpbi); + FIXME (shell, "(%s) empty stub!\n", lpbi->lpszTitle); + return NULL; }
diff --git a/misc/shellord.c b/misc/shellord.c index 432e5ca..2f6a343 100644 --- a/misc/shellord.c +++ b/misc/shellord.c
@@ -31,24 +31,32 @@ #include "winreg.h" /************************************************************************* - * SHELL32_2 [SHELL32.2] + * SHChangeNotifyRegister [SHELL32.2] */ -DWORD WINAPI SHELL32_2(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) { +DWORD WINAPI +SHChangeNotifyRegister(HWND32 hwnd,DWORD x2,DWORD x3,DWORD x4,DWORD x5,DWORD x6) { FIXME(shell,"(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n", hwnd,x2,x3,x4,x5,x6 ); return 0; } + /************************************************************************* - * SHELL32_16 [SHELL32.16] - * find_lastitem_in_itemidlist() - * - * NOTES - * Original name: ILFindLast (exported by ordinal) + * ILGetDisplayName [SHELL32.15] + * get_path_from_itemlist(itemlist,path); ? not sure... */ -LPSHITEMID WINAPI SHELL32_16(LPITEMIDLIST iil) { +BOOL32 WINAPI ILGetDisplayName(LPCITEMIDLIST iil,LPSTR path) { + FIXME(shell,"(%p,%p),stub, return e:!\n",iil,path); + strcpy(path,"e:\\"); + return TRUE; +} +/************************************************************************* + * ILFindLastID [SHELL32.16] + */ +LPSHITEMID WINAPI ILFindLastID(LPITEMIDLIST iil) { LPSHITEMID lastsii,sii; + TRACE(shell,"%p\n",iil); if (!iil) return NULL; sii = &(iil->mkid); @@ -61,13 +69,10 @@ } /************************************************************************* - * SHELL32_29 [SHELL32.29] - * is_rootdir(const char*path) - * - * NOTES - * Original Name: PathIsRoot + * PathIsRoot [SHELL32.29] */ -BOOL32 WINAPI SHELL32_29(LPCSTR x) { +BOOL32 WINAPI PathIsRoot(LPCSTR x) { + TRACE(shell,"%s\n",x); if (!strcmp(x+1,":\\")) /* "X:\" */ return 1; if (!strcmp(x,"\\")) /* "\" */ @@ -86,25 +91,24 @@ } /************************************************************************* - * SHELL32_30 [SHELL32.30] - * get_rootdir(char*path,int drive) - * - * NOTES - * Original Name: PathBuildRoot + * PathBuildRoot [SHELL32.30] */ -LPSTR WINAPI SHELL32_30(LPSTR root,BYTE drive) { +LPSTR WINAPI PathBuildRoot(LPSTR root,BYTE drive) { + TRACE(shell,"%p %i\n",root, drive); strcpy(root,"A:\\"); root[0]+=drive; return root; } /************************************************************************* - * SHELL32_31 [SHELL32.31] - * returns pointer to last . in last pathcomponent or at \0. + * PathFindExtension [SHELL32.31] + * + * NOTES + * returns pointer to last . in last pathcomponent or at \0. */ -LPSTR WINAPI SHELL32_31(LPSTR path) { - LPSTR lastpoint = NULL; - +LPSTR WINAPI PathFindExtension(LPSTR path) { + LPSTR lastpoint = NULL; + TRACE(shell,"%p %s\n",path,path); while (*path) { if (*path=='\\'||*path==' ') lastpoint=NULL; @@ -116,12 +120,14 @@ } /************************************************************************* - * SHELL32_32 [SHELL32.32] - * append \ if there is none + * PathAddBackslash [SHELL32.32] + * + * NOTES + * append \ if there is none */ -LPSTR WINAPI SHELL32_32(LPSTR path) { +LPSTR WINAPI PathAddBackslash(LPSTR path) { int len; - + TRACE(shell,"%p->%s\n",path,path); len = lstrlen32A(path); if (len && path[len-1]!='\\') { path[len+0]='\\'; @@ -132,12 +138,14 @@ } /************************************************************************* - * SHELL32_33 [SHELL32.33] - * remove spaces from beginning and end of passed string + * PathRemoveBlanks [SHELL32.33] + * + * NOTES + * remove spaces from beginning and end of passed string */ -LPSTR WINAPI SHELL32_33(LPSTR str) { +LPSTR WINAPI PathRemoveBlanks(LPSTR str) { LPSTR x = str; - + TRACE(shell,"PathRemoveBlanks %s\n",str); while (*x==' ') x++; if (x!=str) lstrcpy32A(str,x); @@ -153,12 +161,14 @@ /************************************************************************* - * SHELL32_34 [SHELL32.34] - * basename(char *fn); + * PathFindFilename [SHELL32.34] + * + * NOTES + * basename(char *fn); */ -LPSTR WINAPI SHELL32_34(LPSTR fn) { +LPSTR WINAPI PathFindFilename(LPSTR fn) { LPSTR basefn; - + TRACE(shell,"PathFindFilename %s\n",fn); basefn = fn; while (fn[0]) { if (((fn[0]=='\\') || (fn[0]==':')) && fn[1] && fn[1]!='\\') @@ -169,16 +179,18 @@ } /************************************************************************* - * SHELL32_35 [SHELL32.35] - * bool getpath(char *pathname); truncates passed argument to a valid path - * returns if the string was modified or not. - * "\foo\xx\foo"-> "\foo\xx" - * "\" -> "\" - * "a:\foo" -> "a:\" + * PathRemoveFileSpec [SHELL32.35] + * + * NOTES + * bool getpath(char *pathname); truncates passed argument to a valid path + * returns if the string was modified or not. + * "\foo\xx\foo"-> "\foo\xx" + * "\" -> "\" + * "a:\foo" -> "a:\" */ -DWORD WINAPI SHELL32_35(LPSTR fn) { +DWORD WINAPI PathRemoveFileSpec(LPSTR fn) { LPSTR x,cutplace; - + TRACE(shell,"%s\n",fn); if (!fn[0]) return 0; x=fn; @@ -211,71 +223,84 @@ } /************************************************************************* - * SHELL32_37 [SHELL32.37] - * concat_paths(char*target,const char*add); - * concats "target\\add" and writes them to target + * PathCombine [SHELL32.37] + * + * NOTES + * concat_paths(char*target,const char*add); + * concats "target\\add" and writes them to target */ -LPSTR WINAPI SHELL32_37(LPSTR target,LPSTR x1,LPSTR x2) { +LPSTR WINAPI PathCombine(LPSTR target,LPSTR x1,LPSTR x2) { char buf[260]; - + TRACE(shell,"%s %s\n",x1,x2); if (!x2 || !x2[0]) { lstrcpy32A(target,x1); return target; } lstrcpy32A(buf,x1); - SHELL32_32(buf); /* append \ if not there */ + PathAddBackslash(buf); /* append \ if not there */ lstrcat32A(buf,x2); lstrcpy32A(target,buf); return target; } /************************************************************************* - * SHELL32_36 [SHELL32.36] - * concat_paths(char*target,const char*add); - * concats "target\\add" and writes them to target + * PathAppend [SHELL32.36] + * + * NOTES + * concat_paths(char*target,const char*add); + * concats "target\\add" and writes them to target */ -LPSTR WINAPI SHELL32_36(LPSTR x1,LPSTR x2) { +LPSTR WINAPI PathAppend(LPSTR x1,LPSTR x2) { + TRACE(shell,"%s %s\n",x1,x2); while (x2[0]=='\\') x2++; - return SHELL32_37(x1,x1,x2); + return PathCombine(x1,x1,x2); } /************************************************************************* - * SHELL32_39 [SHELL32.39] - * isUNC(const char*path); + * PathIsUNC [SHELL32.39] + * + * NOTES + * isUNC(const char*path); */ -BOOL32 WINAPI SHELL32_39(LPCSTR path) { +BOOL32 WINAPI PathIsUNC(LPCSTR path) { + TRACE(shell,"%s\n",path); if ((path[0]=='\\') && (path[1]=='\\')) return TRUE; return FALSE; } /************************************************************************* - * SHELL32_45 [SHELL32.45] - * file_exists(char *fn); + * PathFileExists [SHELL32.45] + * + * NOTES + * file_exists(char *fn); */ -BOOL32 WINAPI SHELL32_45(LPSTR fn) { - if (GetFileAttributes32A(fn)==-1) +BOOL32 WINAPI PathFileExists(LPSTR fn) { + TRACE(shell,"%s\n",fn); + if (GetFileAttributes32A(fn)==-1) return FALSE; else return TRUE; } /************************************************************************* - * SHELL32_51 [SHELL32.51] + * PathResolve [SHELL32.51] */ -DWORD WINAPI SHELL32_51(LPCSTR s,DWORD x2,DWORD x3) { +DWORD WINAPI PathResolve(LPCSTR s,DWORD x2,DWORD x3) { FIXME(shell,"(%s,0x%08lx,0x%08lx),stub!\n",s,x2,x3); return 0; } /************************************************************************* - * SHELL32_52 [SHELL32.52] - * look for next arg in string. handle "quoted" strings - * returns pointer to argument *AFTER* the space. Or to the \0. + * PathGetArgs [SHELL32.52] + * + * NOTES + * look for next arg in string. handle "quoted" strings + * returns pointer to argument *AFTER* the space. Or to the \0. */ -LPSTR WINAPI SHELL32_52(LPSTR cmdline) { +LPSTR WINAPI PathGetArgs(LPSTR cmdline) { BOOL32 qflag = FALSE; - + TRACE(shell,"%s\n",cmdline); while (*cmdline) { if ((*cmdline==' ') && !qflag) return cmdline+1; @@ -287,12 +312,14 @@ } /************************************************************************* - * SHELL32_56 [SHELL32.56] - * unquote string (remove ") + * PathUnquoteSpaces [SHELL32.56] + * + * NOTES + * unquote string (remove ") */ -VOID WINAPI SHELL32_56(LPSTR str) { +VOID WINAPI PathUnquoteSpaces(LPSTR str) { DWORD len = lstrlen32A(str); - + TRACE(shell,"%s\n",str); if (*str!='"') return; if (str[len-1]!='"') return; str[len-1]='\0'; @@ -301,9 +328,10 @@ } /************************************************************************* - * SHELL32_58 [SHELL32.58] + * ParseField [SHELL32.58] + * */ -DWORD WINAPI SHELL32_58(LPCSTR src,DWORD x2,LPSTR target,DWORD pathlen) { +DWORD WINAPI ParseField(LPCSTR src,DWORD x2,LPSTR target,DWORD pathlen) { FIXME(shell,"(%s,0x%08lx,%p,%ld):stub.\n", src,x2,target,pathlen ); @@ -313,17 +341,19 @@ } /************************************************************************* - * SHELL32_62 [SHELL32.62] + * PickIconDlg [SHELL32.62] + * */ -DWORD WINAPI SHELL32_62(DWORD x,DWORD y,DWORD z,DWORD a) { +DWORD WINAPI PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a) { FIXME(shell,"(%08lx,%08lx,%08lx,%08lx):stub.\n",x,y,z,a); return 0xffffffff; } /************************************************************************* - * SHELL32_63 [SHELL32.63] + * GetFileNameFromBrowse [SHELL32.63] + * */ -DWORD WINAPI SHELL32_63(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd) { +DWORD WINAPI GetFileNameFromBrowse(HWND32 howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd) { FIXME(shell,"(%04x,%p,%ld,%08lx,%s,%s,%s):stub.\n", howner,targetbuf,len,x,suffix,y,cmd ); @@ -334,36 +364,42 @@ } /************************************************************************* - * SHELL32_68 [SHELL32.68] + * SHGetSettings [SHELL32.68] + * */ -DWORD WINAPI SHELL32_68(DWORD x,DWORD y,DWORD z) { +DWORD WINAPI SHGetSettings(DWORD x,DWORD y,DWORD z) { FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n", x,y,z ); return 0; } /************************************************************************* - * SHELL32_71 [SHELL32.71] - * returns internal shell values in the passed pointers + * Shell_GetImageList [SHELL32.71] + * + * NOTES + * returns internal shell values in the passed pointers */ -BOOL32 WINAPI SHELL32_71(LPDWORD x,LPDWORD y) { +BOOL32 WINAPI Shell_GetImageList(LPDWORD x,LPDWORD y) { FIXME(shell,"(%p,%p):stub.\n",x,y); return TRUE; } /************************************************************************* - * SHELL32_72 [SHELL32.72] - * dunno. something with icons + * Shell_GetCachedImageIndex [SHELL32.72] + * */ -void WINAPI SHELL32_72(LPSTR x,DWORD y,DWORD z) { +void WINAPI Shell_GetCachedImageIndex(LPSTR x,DWORD y,DWORD z) { FIXME(shell,"(%s,%08lx,%08lx):stub.\n",x,y,z); } /************************************************************************* - * SHELL32_89 [SHELL32.89] + * SHCloneSpecialIDList [SHELL32.89] + * + * NOTES + * exported by ordinal */ -DWORD WINAPI SHELL32_89(DWORD x1,DWORD x2,DWORD x3) { +DWORD WINAPI SHCloneSpecialIDList(DWORD x1,DWORD x2,DWORD x3) { FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx):stub.\n", x1,x2,x3 ); @@ -371,58 +407,70 @@ } /************************************************************************* - * SHELL32_119 [SHELL32.119] - * unknown + * IsLFNDrive [SHELL32.119] + * + * NOTES + * exported by ordinal Name */ -void WINAPI SHELL32_119(LPVOID x) { +void WINAPI IsLFNDrive(LPVOID x) { FIXME(shell,"(%p(%s)):stub.\n",x,(char *)x); } /************************************************************************* - * SHELL32_175 [SHELL32.175] - * unknown + * SHGetSpecialFolderPath [SHELL32.175] + * + * NOTES + * exported by ordinal */ -void WINAPI SHELL32_175(DWORD x1,DWORD x2,DWORD x3,DWORD x4) { +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 ); } /************************************************************************* - * SHELL32_181 [SHELL32.181] - * unknown + * RegisterShellHook [SHELL32.181] * * PARAMS * hwnd [I] window handle * y [I] flag ???? * * NOTES - * Original name: RegisterShellHook (exported by ordinal) + * exported by ordinal */ -void WINAPI SHELL32_181(HWND32 hwnd, DWORD y) { - FIXME(shell,"(0x%08lx,0x%08x):stub.\n",hwnd,y); +void WINAPI RegisterShellHook32(HWND32 hwnd, DWORD y) { + FIXME(shell,"(0x%08x,0x%08lx):stub.\n",hwnd,y); } /************************************************************************* - * SHELL32_75 [SHELL32.75] - * unknown + * PathYetAnotherMakeUniqueName [SHELL32.75] + * + * NOTES + * exported by ordinal */ -BOOL32 WINAPI SHELL32_75(LPDWORD x,LPDWORD y) { +BOOL32 WINAPI PathYetAnotherMakeUniqueName(LPDWORD x,LPDWORD y) { FIXME(shell,"(%p,%p):stub.\n",x,y); return TRUE; } /************************************************************************* - * SHELL32_77 [SHELL32.77] + * SHMapPIDLToSystemImageListIndex [SHELL32.77] + * + * NOTES + * exported by ordinal */ -DWORD WINAPI SHELL32_77(DWORD x,DWORD y,DWORD z) { +DWORD WINAPI +SHMapPIDLToSystemImageListIndex(DWORD x,DWORD y,DWORD z) { FIXME(shell,"(%08lx,%08lx,%08lx):stub.\n",x,y,z); return 0; } /************************************************************************* - * SHELL32_79 [SHELL32.79] + * SHELL32_79 [SHELL32.79] * create_directory_and_notify(...) + * + * NOTES + * (isn't it StrToOleStrN ??? jsch) */ DWORD WINAPI SHELL32_79(LPCSTR dir,LPVOID xvoid) { TRACE(shell,"mkdir %s,%p\n",dir,xvoid); @@ -432,6 +480,9 @@ return TRUE; } +/************************************************************************* + * + */ typedef DWORD (* WINAPI GetClassPtr)(REFCLSID,REFIID,LPVOID); static GetClassPtr SH_find_moduleproc(LPSTR dllname,HMODULE32 *xhmod, @@ -441,7 +492,7 @@ FARPROC32 dllunload,nameproc; if (xhmod) *xhmod = 0; - if (!strcasecmp(SHELL32_34(dllname),"shell32.dll")) + if (!strcasecmp(PathFindFilename(dllname),"shell32.dll")) return (GetClassPtr)SHELL32_DllGetClassObject; hmod = LoadLibraryEx32A(dllname,0,LOAD_WITH_ALTERED_SEARCH_PATH); @@ -458,7 +509,9 @@ /* register unloadable dll with unloadproc ... */ return (GetClassPtr)nameproc; } - +/************************************************************************* + * + */ static DWORD SH_get_instance(REFCLSID clsid,LPSTR dllname, LPVOID unknownouter,REFIID refiid,LPVOID inst ) { @@ -466,6 +519,8 @@ DWORD hres; LPCLASSFACTORY classfac; + TRACE(shell,"%s\n",dllname); + dllgetclassob = SH_find_moduleproc(dllname,NULL,"DllGetClassObject"); if (!dllgetclassob) return 0x80070000|GetLastError(); @@ -490,10 +545,12 @@ } /************************************************************************* - * SHELL32_102 [SHELL32.102] - * unknown + * SHCoCreateInstance [SHELL32.102] + * + * NOTES + * exported by ordinal */ -LRESULT WINAPI SHELL32_102( +LRESULT WINAPI SHCoCreateInstance( LPSTR aclsid,CLSID *clsid,LPUNKNOWN unknownouter,REFIID refiid,LPVOID inst ) { char buffer[256],xclsid[48],xiid[48],path[260],tmodel[100]; @@ -510,9 +567,7 @@ return 0x80040154; strcpy(xclsid,aclsid); } - TRACE(shell,"(%p,%s,%p,%s,%p)\n", - aclsid,xclsid,unknownouter,xiid,inst - ); + TRACE(shell,"(%p,\n\tSID:\t%s,%p,\n\tIID:\t%s,%p)\n",aclsid,xclsid,unknownouter,xiid,inst); sprintf(buffer,"CLSID\\%s\\InProcServer32",xclsid); if (RegOpenKeyEx32A(HKEY_CLASSES_ROOT,buffer,0,0x02000000,&inprockey)) @@ -539,21 +594,23 @@ /************************************************************************* - * SHELL32_183 [SHELL32.183] + * ShellMessageBoxA [SHELL32.183] + * * Format and output errormessage. * * NOTES - * Original name: ShellMessageBoxA + * exported by ordinal */ -void __cdecl SHELL32_183(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,LPVOID arglist) { +void __cdecl +ShellMessageBoxA(HMODULE32 hmod,HWND32 hwnd,DWORD id,DWORD x,DWORD type,LPVOID arglist) { char buf[100],buf2[100],*buf3; LPVOID args = &arglist; if (!LoadString32A(hmod,x,buf,100)) strcpy(buf,"Desktop"); - LoadString32A(hmod,id,buf2,100); +// LoadString32A(hmod,id,buf2,100); /* FIXME: the varargs handling doesn't. */ - FormatMessage32A(0x500,buf2,0,0,(LPSTR)&buf3,256,(LPDWORD)&args); +// FormatMessage32A(0x500,buf2,0,0,(LPSTR)&buf3,256,(LPDWORD)&args); FIXME(shell,"(%08lx,%08lx,%08lx(%s),%08lx(%s),%08lx,%p):stub.\n", (DWORD)hmod,(DWORD)hwnd,id,buf2,x,buf,type,arglist @@ -563,7 +620,8 @@ /************************************************************************* - * SHELL32_100 [SHELL32.100] + * SHRestricted [SHELL32.100] + * * walks through policy table, queries <app> key, <type> value, returns * queried (DWORD) value. * {0x00001,Explorer,NoRun} @@ -586,8 +644,11 @@ * {0x20000,Explorer,NoStartMenuSubFolders} * {0x40000,Explorer,MyDocsOnNet} * {0x80000,WinOldApp,NoRealMode} + * + * NOTES + * exported by ordinal */ -DWORD WINAPI SHELL32_100(DWORD pol) { +DWORD WINAPI SHRestricted (DWORD pol) { HKEY xhkey; FIXME(shell,"(%08lx):stub.\n",pol); @@ -596,17 +657,18 @@ /* FIXME: do nothing for now, just return 0 (== "allowed") */ RegCloseKey(xhkey); return 0; - } /************************************************************************* - * SHELL32_152 [SHELL32.152] - * itemlist_length + * ILGetSize [SHELL32.152] + * + * NOTES + * exported by ordinal */ -DWORD WINAPI SHELL32_152(LPITEMIDLIST iil) { +DWORD WINAPI ILGetSize(LPITEMIDLIST iil) { LPSHITEMID si; DWORD len; - + TRACE(shell,"%p\n",iil); if (!iil) return 0; si = &(iil->mkid); @@ -619,96 +681,114 @@ } /************************************************************************* - * SHELL32_158 [SHELL32.158] + * PathGetExtension [SHELL32.158] + * + * NOTES + * exported by ordinal */ -LPSTR WINAPI SHELL32_158(LPSTR path,DWORD y,DWORD z) { +LPSTR WINAPI PathGetExtension(LPSTR path,DWORD y,DWORD z) { TRACE(shell,"(%s,%08lx,%08lx)\n",path,y,z); - path = SHELL32_31(path); + path = PathFindExtension(path); return *path?(path+1):path; } /************************************************************************* - * SHELL32_165 [SHELL32.165] - * create_path_and_notify(...) + * SHCreateDirectory [SHELL32.165] + * + * NOTES + * exported by ordinal */ -DWORD WINAPI SHELL32_165(DWORD x,LPCSTR path) { +DWORD WINAPI SHCreateDirectory(DWORD x,LPCSTR path) { + TRACE(shell,"(%08lx,%s):stub.\n",x,path); + if (CreateDirectory32A(path,x)) + return TRUE; + /* SHChangeNotify(8,1,path,0); */ + return FALSE; +#if 0 if (SHELL32_79(path,(LPVOID)x)) return 0; FIXME(shell,"(%08lx,%s):stub.\n",x,path); return 0; +#endif } /************************************************************************* - * SHELL32_195 [SHELL32.195] - * free_ptr() - frees memory using IMalloc + * SHFree [SHELL32.195] * * NOTES - * Original name: SHFree (exported by ordinal) + * free_ptr() - frees memory using IMalloc + * exported by ordinal */ -DWORD WINAPI SHELL32_195(LPVOID x) { +DWORD WINAPI SHFree(LPVOID x) { + TRACE(shell,"%p\n",x); return LocalFree32((HANDLE32)x); } /************************************************************************* - * SHELL32_196 [SHELL32.196] - * void *task_alloc(DWORD len), uses SHMalloc allocator + * SHAlloc [SHELL32.196] + * + * NOTES + * void *task_alloc(DWORD len), uses SHMalloc allocator + * exported by ordinal */ -LPVOID WINAPI SHELL32_196(DWORD len) { +LPVOID WINAPI SHAlloc(DWORD len) { + TRACE(shell,"%lu\n",len); return (LPVOID)LocalAlloc32(len,LMEM_ZEROINIT); /* FIXME */ } /************************************************************************* - * SHELL32_18 [SHELL32.18] - * copy_itemidlist() + * ILClone [SHELL32.18] + * */ -LPITEMIDLIST WINAPI SHELL32_18(LPITEMIDLIST iil) { +LPITEMIDLIST WINAPI ILClone (LPITEMIDLIST iil) { DWORD len; LPITEMIDLIST newiil; - - len = SHELL32_152(iil); - newiil = (LPITEMIDLIST)SHELL32_196(len); + TRACE(shell,"%p\n",iil); + len = ILGetSize(iil); + newiil = (LPITEMIDLIST)SHAlloc(len); if (newiil) memcpy(newiil,iil,len); return newiil; } /************************************************************************* - * SHELL32_25 [SHELL32.25] - * merge_itemidlist() + * ILCombine [SHELL32.25] + * */ -LPITEMIDLIST WINAPI SHELL32_25(LPITEMIDLIST iil1,LPITEMIDLIST iil2) { +LPITEMIDLIST WINAPI ILCombine(LPITEMIDLIST iil1,LPITEMIDLIST iil2) { DWORD len1,len2; LPITEMIDLIST newiil; - - len1 = SHELL32_152(iil1)-2; - len2 = SHELL32_152(iil2); - newiil = SHELL32_196(len1+len2); + 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; } /************************************************************************* - * SHELL32_155 [SHELL32.155] - * free_check_ptr - frees memory (if not NULL) allocated by SHMalloc allocator + * ILFree [SHELL32.155] * * NOTES - * Original name: ILFree (exported by ordinal) + * free_check_ptr - frees memory (if not NULL) + * allocated by SHMalloc allocator + * exported by ordinal */ -DWORD WINAPI SHELL32_155(LPVOID x) { +DWORD WINAPI ILFree(LPVOID x) { FIXME (shell,"(0x%08lx):stub.\n", (DWORD)x); -// if (!x) + if (!x) return 0; -// return SHELL32_195(x); + return SHFree(x); } /************************************************************************* - * SHELL32_85 [SHELL32.85] + * OpenRegStream [SHELL32.85] * * NOTES - * Original name: OpenRegStream (exported by ordinal) + * exported by ordinal */ -DWORD WINAPI SHELL32_85(DWORD x1,DWORD x2,DWORD x3,DWORD x4) { +DWORD WINAPI OpenRegStream(DWORD x1,DWORD x2,DWORD x3,DWORD x4) { FIXME(shell,"(0x%08lx,0x%08lx,0x%08lx,0x%08lx):stub.\n", x1,x2,x3,x4 ); @@ -716,38 +796,36 @@ } /************************************************************************* - * SHELL32_86 [SHELL32.86] - * unknown + * SHRegisterDragDrop [SHELL32.86] * * NOTES - * Original name: SHRegisterDragDrop (exported by ordinal) + * exported by ordinal */ -DWORD WINAPI SHELL32_86(HWND32 hwnd,DWORD x2) { - FIXME (shell, "(0x%08lx,0x%08x):stub.\n", hwnd, x2); +DWORD WINAPI SHRegisterDragDrop(HWND32 hwnd,DWORD x2) { + FIXME (shell, "(0x%08x,0x%08lx):stub.\n", hwnd, x2); return 0; } /************************************************************************* - * SHELL32_87 [SHELL32.87] - * unknown + * SHRevokeDragDrop [SHELL32.87] * * NOTES - * Original name: SHRevokeDragDrop (exported by ordinal) + * exported by ordinal */ -DWORD WINAPI SHELL32_87(DWORD x) { +DWORD WINAPI SHRevokeDragDrop(DWORD x) { FIXME(shell,"(0x%08lx):stub.\n",x); return 0; } /************************************************************************* - * SHELL32_61 [SHELL32.61] + * RunFileDlg [SHELL32.61] * * NOTES * Original name: RunFileDlg (exported by ordinal) */ DWORD WINAPI -SHELL32_61 (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2, +RunFileDlg (HWND32 hwndOwner, DWORD dwParam1, DWORD dwParam2, LPSTR lpszTitle, LPSTR lpszPrompt, UINT32 uFlags) { FIXME (shell,"(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n", @@ -757,11 +835,13 @@ /************************************************************************* - * SHELL32_60 [SHELL32.60] - * Shell/Shutdown-Dialog + * ExitWindowsDialog [SHELL32.60] + * + * NOTES + * exported by ordinal */ DWORD WINAPI -SHELL32_60 (HWND32 hwndOwner) +ExitWindowsDialog (HWND32 hwndOwner) { FIXME (shell,"(0x%08x):stub.\n", hwndOwner); return 0; @@ -769,12 +849,12 @@ /************************************************************************* - * SHELL32_184 [SHELL32.184] - * unknown + * ArrangeWindows [SHELL32.184] + * */ DWORD WINAPI -SHELL32_184 (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, - DWORD dwParam4, DWORD dwParam5) +ArrangeWindows (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, + DWORD dwParam4, DWORD dwParam5) { FIXME (shell,"(0x%lx 0x%lx 0x%lx 0x%lx 0x%lx):stub.\n", dwParam1, dwParam2, dwParam3, dwParam4, dwParam5); @@ -783,15 +863,33 @@ /************************************************************************* - * SHELL32_147 [SHELL32.147] + * SHCLSIDFromString [SHELL32.147] * * NOTES - * Original name: SHCLSIDFromString (exported by ordinal) + * exported by ordinal */ DWORD WINAPI -SHELL32_147 (DWORD dwParam1, DWORD dwParam2) +SHCLSIDFromString (DWORD dwParam1, DWORD dwParam2) { FIXME (shell,"(0x%lx 0x%lx):stub.\n", dwParam1, dwParam2); + + FIXME (shell,"(\"%s\" \"%s\"):stub.\n", (LPSTR)dwParam1, (LPSTR)dwParam2); + + return 0; +} + + +/************************************************************************* + * SignalFileOpen [SHELL32.103] + * + * NOTES + * exported by ordinal + */ +DWORD WINAPI +SignalFileOpen (DWORD dwParam1) +{ + FIXME (shell,"(0x%08lx):stub.\n", dwParam1); + return 0; }
diff --git a/misc/spy.c b/misc/spy.c index 0419c05..3996003 100644 --- a/misc/spy.c +++ b/misc/spy.c
@@ -492,10 +492,34 @@ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, + "WM_QUERYAFXWNDPROC", /* 0x0360 */ + "WM_SIZEPARENT", /* 0x0361 */ + "WM_SETMESSAGESTRING", /* 0x0362 */ + "WM_IDLEUPDATECMDUI", /* 0x0363 */ + "WM_INITIALUPDATE", /* 0x0364 */ + "WM_COMMANDHELP", /* 0x0365 */ + "WM_HELPHITTEST", /* 0x0366 */ + "WM_EXITHELPMODE", /* 0x0367 */ + "WM_RECALCPARENT", /* 0x0368 */ + "WM_SIZECHILD", /* 0x0369 */ + "WM_KICKIDLE", /* 0x036A */ + "WM_QUERYCENTERWND", /* 0x036B */ + "WM_DISABLEMODAL", /* 0x036C */ + "WM_FLOATSTATUS", /* 0x036D */ + "WM_ACTIVATETOPLEVEL", /* 0x036E */ + "WM_QUERY3DCONTROLS", /* 0x036F */ + NULL,NULL,NULL, + "WM_SOCKET_NOTIFY", /* 0x0373 */ + "WM_SOCKET_DEAD", /* 0x0374 */ + "WM_POPMESSAGESTRING", /* 0x0375 */ + "WM_OCC_LOADFROMSTREAM", /* 0x0376 */ + "WM_OCC_LOADFROMSTORAGE", /* 0x0377 */ + "WM_OCC_INITNEW", /* 0x0378 */ + "WM_QUEUE_SENTINEL", /* 0x0379 */ + "WM_OCC_LOADFROMSTREAM_EX", /* 0x037A */ + "WM_OCC_LOADFROMSTORAGE_EX", /* 0x037B */ + + NULL,NULL,NULL,NULL, /* 0x0380 */ "WM_PENWINFIRST",