Changeset 4032 for trunk/src/shell32/shellord.cpp
- Timestamp:
- Aug 18, 2000, 4:01:27 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/shell32/shellord.cpp
r3935 r4032 1 /* $Id: shellord.cpp,v 1. 9 2000-08-02 17:53:33 birdExp $ */1 /* $Id: shellord.cpp,v 1.10 2000-08-18 02:01:22 phaller Exp $ */ 2 2 /* 3 3 * The parameters of many functions changes between different OS versions … … 49 49 ODINDEBUGCHANNEL(shell32-shellord) 50 50 51 52 /*************************************************************************53 * SHChangeNotifyRegister [SHELL32.2]54 *55 * NOTES56 * Idlist is an array of structures and Count specifies how many items in the array57 * (usually just one I think).58 */59 DWORD WINAPI60 SHChangeNotifyRegister(61 HWND hwnd,62 LONG events1,63 LONG events2,64 DWORD msg,65 int count,66 IDSTRUCT *idlist)67 {68 FIXME("SHChangeNotifyRegister: (0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.\n",69 hwnd,events1,events2,msg,count,idlist);70 return 0;71 }72 /*************************************************************************73 * SHChangeNotifyDeregister [SHELL32.4]74 */75 DWORD WINAPI76 SHChangeNotifyDeregister(LONG x1)77 { FIXME("(0x%08lx):stub.\n",x1);78 return 0;79 }80 /*************************************************************************81 * NTSHChangeNotifyRegister [SHELL32.640]82 * NOTES83 * Idlist is an array of structures and Count specifies how many items in the array84 * (usually just one I think).85 */86 DWORD WINAPI NTSHChangeNotifyRegister(87 HWND hwnd,88 LONG events1,89 LONG events2,90 DWORD msg,91 int count,92 IDSTRUCT *idlist)93 { FIXME("(0x%04x,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):stub.\n",94 hwnd,events1,events2,msg,count,idlist);95 return 0;96 }97 /*************************************************************************98 * NTSHChangeNotifyDeregister [SHELL32.641]99 */100 DWORD WINAPI NTSHChangeNotifyDeregister(LONG x1)101 { FIXME("(0x%08lx):stub.\n",x1);102 return 0;103 }104 51 105 52 /************************************************************************* … … 130 77 } 131 78 132 /*************************************************************************133 * PickIconDlg [SHELL32.62]134 *135 */136 DWORD WINAPI PickIconDlg(DWORD x,DWORD y,DWORD z,DWORD a)137 { FIXME("PickIconDlg(%08lx,%08lx,%08lx,%08lx):stub.\n",x,y,z,a);138 return 0xffffffff;139 }140 79 141 80 /************************************************************************* … … 143 82 * 144 83 */ 145 DWORD WINAPI GetFileNameFromBrowse(HWND howner, LPSTR targetbuf, DWORD len, DWORD x, LPCSTR suffix, LPCSTR y, LPCSTR cmd) 146 { FIXME("(%04x,%p,%ld,%08lx,%s,%s,%s):stub.\n", 147 howner,targetbuf,len,x,suffix,y,cmd); 84 ODINFUNCTION7(BOOL, GetFileNameFromBrowse, 85 HWND, hwndOwner, 86 LPSTR, lpstrFile, 87 DWORD, nMaxFile, 88 LPCSTR, lpstrInitialDir, 89 LPCSTR, lpstrDefExt, 90 LPCSTR, lpstrFIlter, 91 LPCSTR, lpstrTitle) 92 { 93 dprintf(("SHELL32: GetFileNameFromBrowse not implemented")); 94 148 95 /* puts up a Open Dialog and requests input into targetbuf */ 149 96 /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */ 150 lstrcpyA(targetbuf,"x:\\dummy.exe"); 151 return 1; 97 lstrcpynA(lpstrFile, 98 "x:\\dummy.exe", 99 nMaxFile); 100 return 1; 152 101 } 153 102 … … 223 172 * that was clicked. 224 173 */ 225 int WINAPI SHShellFolderView_Message(HWND hwndCabinet,UINT uMsg,LPARAM lParam) 226 { FIXME("%04x %08ux %08lx stub\n",hwndCabinet,uMsg,lParam); 174 ODINFUNCTION3(int, SHShellFolderView_Message, 175 HWND, hwndCabinet, 176 DWORD, dwMessage, 177 DWORD, dwParam) 178 { 179 dprintf(("SHELL32: SHShellFolderView_Message not implemented")); 227 180 return 0; 228 181 } 229 182 230 /*************************************************************************231 * OleStrToStrN [SHELL32.78]232 */233 BOOL WINAPI OleStrToStrNA (LPSTR lpStr, INT nStr, LPCWSTR lpOle, INT nOle)234 {235 TRACE("%p %x %s %x\n", lpStr, nStr, debugstr_w(lpOle), nOle);236 return WideCharToMultiByte (0, 0, lpOle, nOle, lpStr, nStr, NULL, NULL);237 }238 239 BOOL WINAPI OleStrToStrNW (LPWSTR lpwStr, INT nwStr, LPCWSTR lpOle, INT nOle)240 {241 TRACE("%p %x %s %x\n", lpwStr, nwStr, debugstr_w(lpOle), nOle);242 243 if (lstrcpynW ( lpwStr, lpOle, nwStr))244 { return lstrlenW (lpwStr);245 }246 return 0;247 }248 249 BOOL WINAPI OleStrToStrNAW (LPVOID lpOut, INT nOut, LPCVOID lpIn, INT nIn)250 {251 if (VERSION_OsIsUnicode())252 return OleStrToStrNW ((LPWSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);253 return OleStrToStrNA ((LPSTR)lpOut, nOut, (LPCWSTR)lpIn, nIn);254 }255 256 /*************************************************************************257 * StrToOleStrN [SHELL32.79]258 * lpMulti, nMulti, nWide [IN]259 * lpWide [OUT]260 */261 BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr)262 {263 TRACE("%p %x %s %x\n", lpWide, nWide, lpStrA, nStr);264 return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide);265 }266 BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)267 {268 TRACE("%p %x %s %x\n", lpWide, nWide, debugstr_w(lpStrW), nStr);269 270 if (lstrcpynW (lpWide, lpStrW, nWide))271 { return lstrlenW (lpWide);272 }273 return 0;274 }275 276 BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr)277 {278 if (VERSION_OsIsUnicode())279 return StrToOleStrNW (lpWide, nWide, (LPWSTR)lpStr, nStr);280 return StrToOleStrNA (lpWide, nWide, (LPSTR)lpStr, nStr);281 }282 183 283 184 /************************************************************************* … … 291 192 * exported by ordinal 292 193 */ 293 void WINAPI RegisterShellHook(HWND hwnd, DWORD y) { 294 FIXME("(0x%08x,0x%08lx):stub.\n",hwnd,y); 194 ODINFUNCTION2(BOOL, RegisterShellHook, 195 HWND, hWnd, 196 DWORD, dwType) 197 { 198 dprintf(("SHELL32: RegisterShellHook not implemented")); 199 return FALSE; 295 200 } 296 201 /************************************************************************* … … 358 263 } 359 264 360 /*************************************************************************361 * SHRestricted [SHELL32.100]362 *363 * walks through policy table, queries <app> key, <type> value, returns364 * queried (DWORD) value, and caches it between called to SHInitRestricted365 * to prevent unnecessary registry access.366 *367 * NOTES368 * exported by ordinal369 *370 * REFERENCES:371 * MS System Policy Editor372 * 98Lite 2.0 (which uses many of these policy keys) http://www.98lite.net/373 * "The Windows 95 Registry", by John Woram, 1996 MIS: Press374 */375 DWORD WINAPI SHRestricted (DWORD pol) {376 char regstr[256];377 HKEY xhkey;378 DWORD retval, polidx, i, datsize = 4;379 380 TRACE("(%08lx)\n",pol);381 382 polidx = -1;383 384 /* scan to see if we know this policy ID */385 for (i = 0; i < SHELL_MAX_POLICIES; i++)386 {387 if (pol == sh32_policy_table[i].polflags)388 {389 polidx = i;390 break;391 }392 }393 394 if (polidx == -1)395 {396 /* we don't know this policy, return 0 */397 TRACE("unknown policy: (%08lx)\n", pol);398 return 0;399 }400 401 /* we have a known policy */402 lstrcpyA(regstr, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\");403 lstrcatA(regstr, sh32_policy_table[polidx].appstr);404 405 /* first check if this policy has been cached, return it if so */406 if (sh32_policy_table[polidx].cache != SHELL_NO_POLICY)407 {408 return sh32_policy_table[polidx].cache;409 }410 411 /* return 0 and don't set the cache if any registry errors occur */412 retval = 0;413 if (RegOpenKeyA(HKEY_CURRENT_USER, regstr, &xhkey) == ERROR_SUCCESS)414 {415 if (RegQueryValueExA(xhkey, sh32_policy_table[polidx].keystr, NULL, NULL, (LPBYTE)&retval, &datsize) == ERROR_SUCCESS)416 {417 sh32_policy_table[polidx].cache = retval;418 }419 420 RegCloseKey(xhkey);421 }422 423 return retval;424 }425 426 /*************************************************************************427 * SHInitRestricted [SHELL32.244]428 *429 * Win98+ by-ordinal only routine called by Explorer and MSIE 4 and 5.430 * Inits the policy cache used by SHRestricted to avoid excess431 * registry access.432 *433 * INPUTS434 * Two inputs: one is a string or NULL. If non-NULL the pointer435 * should point to a string containing the following exact text:436 * "Software\Microsoft\Windows\CurrentVersion\Policies".437 * The other input is unused.438 *439 * NOTES440 * If the input is non-NULL and does not point to a string containing441 * that exact text the routine will do nothing.442 *443 * If the text does match or the pointer is NULL, then the routine444 * will init SHRestricted()'s policy cache to all 0xffffffff and445 * returns 0xffffffff as well.446 *447 * I haven't yet run into anything calling this with inputs other than448 * (NULL, NULL), so I may have the inputs reversed.449 */450 451 BOOL WINAPI SHInitRestricted(LPSTR inpRegKey, LPSTR parm2)452 {453 int i;454 455 dprintf(("SHELL32:SHELLORD:SHInitRestricted(%p, %p)\n", inpRegKey, parm2));456 457 /* first check - if input is non-NULL and points to the secret458 key string, then pass. Otherwise return 0.459 */460 461 if (inpRegKey != (LPSTR)NULL)462 {463 if (lstrcmpiA(inpRegKey, "Software\\Microsoft\\Windows\\CurrentVersion\\Policies"))464 {465 /* doesn't match, fail */466 return 0;467 }468 }469 470 /* check passed, init all policy cache entries with SHELL_NO_POLICY */471 for (i = 0; i < SHELL_MAX_POLICIES; i++)472 {473 sh32_policy_table[i].cache = SHELL_NO_POLICY;474 }475 476 return SHELL_NO_POLICY;477 }478 479 /*************************************************************************480 * SHCreateDirectory [SHELL32.165]481 *482 * NOTES483 * exported by ordinal484 * not sure about LPSECURITY_ATTRIBUTES485 */486 DWORD WINAPI SHCreateDirectory(LPSECURITY_ATTRIBUTES sec,LPCSTR path) {487 TRACE("(%p,%s):stub.\n",sec,path);488 if (CreateDirectoryA(path,sec))489 return TRUE;490 /* SHChangeNotify(8,1,path,0); */491 return FALSE;492 #if 0493 if (SHELL32_79(path,(LPVOID)x))494 return 0;495 FIXME("(%08lx,%s):stub.\n",x,path);496 return 0;497 #endif498 }499 265 500 266 /************************************************************************* … … 506 272 */ 507 273 #define MEM_DEBUG 0 508 DWORDWINAPI SHFree(LPVOID x)274 void WINAPI SHFree(LPVOID x) 509 275 { 510 276 #if MEM_DEBUG 511 512 513 514 515 516 517 518 519 520 521 522 523 277 WORD len = *(LPWORD)(x-2); 278 279 if ( *(LPWORD)(x+len) != 0x7384) 280 ERR("MAGIC2!\n"); 281 282 if ( (*(LPWORD)(x-4)) != 0x8271) 283 ERR("MAGIC1!\n"); 284 else 285 memset(x-4, 0xde, len+6); 286 287 TRACE("%p len=%u\n",x, len); 288 289 x -= 4; 524 290 #else 525 291 TRACE("%p\n",x); 526 292 #endif 527 return HeapFree(GetProcessHeap(), 0, x); 293 294 HeapFree(GetProcessHeap(), 0, x); 528 295 } 529 296 … … 562 329 * exported by ordinal 563 330 */ 564 DWORD WINAPI SHRegisterDragDrop(HWND hWnd,IDropTarget * pDropTarget) 565 { 566 FIXME("(0x%08x,%p):stub.\n", hWnd, pDropTarget); 567 return RegisterDragDrop(hWnd, pDropTarget); 331 ODINFUNCTION2(HRESULT, SHRegisterDragDrop, 332 HWND, hWnd, 333 LPDROPTARGET, lpDropTarget) 334 { 335 dprintf(("SHELL32: SHRegisterDragDrop not correctly implemented")); 336 return RegisterDragDrop(hWnd, lpDropTarget); 568 337 } 569 338 … … 574 343 * exported by ordinal 575 344 */ 576 DWORD WINAPI SHRevokeDragDrop(DWORD x) { 577 FIXME("(0x%08lx):stub.\n",x); 578 return 0; 345 ODINFUNCTION1(HRESULT, SHRevokeDragDrop, 346 HWND, hWnd) 347 { 348 dprintf(("SHELL32: SHRevokeDragDrop not implemented")); 349 return 0; 579 350 } 580 351 … … 585 356 * exported by ordinal 586 357 */ 587 DWORD WINAPI SHDoDragDrop(DWORD u, DWORD v, DWORD w, DWORD x, DWORD y, DWORD z) { 588 FIXME("(0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx 0x%08lx):stub.\n",u,v,w,x,y,z); 589 return 0; 590 } 591 592 /************************************************************************* 593 * RunFileDlg [SHELL32.61] 594 * 595 * NOTES 596 * Original name: RunFileDlg (exported by ordinal) 597 */ 598 DWORD WINAPI 599 RunFileDlg (HWND hwndOwner, DWORD dwParam1, DWORD dwParam2, 600 LPSTR lpszTitle, LPSTR lpszPrompt, UINT uFlags) 601 { 602 FIXME("(0x%08x 0x%lx 0x%lx \"%s\" \"%s\" 0x%x):stub.\n", 603 hwndOwner, dwParam1, dwParam2, lpszTitle, lpszPrompt, uFlags); 604 return 0; 605 } 606 607 /************************************************************************* 608 * ExitWindowsDialog [SHELL32.60] 609 * 610 * NOTES 611 * exported by ordinal 612 */ 613 void WINAPI ExitWindowsDialog (HWND hWndOwner) 614 { 615 TRACE("(0x%08x)\n", hWndOwner); 616 if (MessageBoxA( hWndOwner, "Do you want to exit Odin?", "Shutdown", MB_YESNO|MB_ICONQUESTION) == IDYES) 617 { SendMessageA ( hWndOwner, WM_QUIT, 0, 0); 618 } 619 } 358 ODINFUNCTION5(HRESULT, SHDoDragDrop, 359 HWND, hWnd, 360 LPDATAOBJECT, lpDataObject, 361 LPDROPSOURCE, lpDropSource, 362 DWORD, dwOKEffect, 363 LPDWORD, pdwEffect) 364 { 365 dprintf(("SHELL32: SHDoDragDrop not implemented")); 366 return 0; 367 } 368 620 369 621 370 /************************************************************************* … … 623 372 * 624 373 */ 625 DWORD WINAPI 626 ArrangeWindows (DWORD dwParam1, DWORD dwParam2, DWORD dwParam3, 627 DWORD dwParam4, DWORD dwParam5) 628 { 629 FIXME("(0x%lx 0x%lx 0x%lx 0x%lx 0x%lx):stub.\n", 630 dwParam1, dwParam2, dwParam3, dwParam4, dwParam5); 631 return 0; 374 ODINFUNCTION5(WORD, ArrangeWindows, 375 HWND, hwndParent, 376 DWORD, dwReserved, 377 LPCRECT, lpRect, 378 WORD, cKids, 379 CONST HWND*, lpKids) 380 { 381 dprintf(("SHELL32: ArrangeWindows not implemented")); 382 return 0; 632 383 } 633 384 … … 664 415 } 665 416 return 0; 666 }667 /*************************************************************************668 * SHFileOperation [SHELL32.242]669 *670 */671 DWORD WINAPI SHFileOperationAW(DWORD x)672 { FIXME("0x%08lx stub\n",x);673 return 0;674 675 }676 677 /*************************************************************************678 * SHFileOperationA [SHELL32.243]679 *680 * NOTES681 * exported by name682 */683 DWORD WINAPI SHFileOperationA (LPSHFILEOPSTRUCTA lpFileOp)684 { FIXME("(%p):stub.\n", lpFileOp);685 return 1;686 }687 /*************************************************************************688 * SHFileOperationW [SHELL32.244]689 *690 * NOTES691 * exported by name692 */693 DWORD WINAPI SHFileOperationW (LPSHFILEOPSTRUCTW lpFileOp)694 { FIXME("(%p):stub.\n", lpFileOp);695 return 1;696 417 } 697 418 … … 716 437 * see IShellFolder::CreateViewObject 717 438 */ 718 HRESULT WINAPI SHCreateShellFolderViewEx( 719 LPSHELLVIEWDATA psvcbi, /*[in ] shelltemplate struct*/ 720 LPVOID* ppv) /*[out] IShellView pointer*/ 721 { 722 IShellView * psf; 723 HRESULT hRes; 724 725 TRACE("sf=%p pidl=%p cb=%p mode=0x%08lx parm=0x%08lx\n", 726 psvcbi->pShellFolder, psvcbi->pidl, psvcbi->pCallBack, psvcbi->viewmode, psvcbi->dwUserParam); 727 728 psf = IShellView_Constructor(psvcbi->pShellFolder); 729 730 if (!psf) 731 return E_OUTOFMEMORY; 732 733 IShellView_AddRef(psf); 734 hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppv); 735 IShellView_Release(psf); 736 737 return hRes; 439 ODINFUNCTION2(HRESULT, SHCreateShellFolderViewEx, 440 LPCSHELLFOLDERVIEWINFO, pshfvi, 441 LPSHELLVIEW*, ppshv) 442 { 443 IShellView * psf; 444 HRESULT hRes; 445 446 psf = IShellView_Constructor(pshfvi->pshf); 447 448 if (!psf) 449 return E_OUTOFMEMORY; 450 451 IShellView_AddRef(psf); 452 hRes = IShellView_QueryInterface(psf, &IID_IShellView, (LPVOID *)ppshv); 453 IShellView_Release(psf); 454 455 return hRes; 738 456 } 739 457 /************************************************************************* … … 831 549 pv = SHLockShared(hmem,0); 832 550 sprintf(szPidl,":%p",pv ); 833 SHUnlockShared( (HANDLE)pv);551 SHUnlockShared(pv); 834 552 835 553 gap = strlen(szPidl); … … 947 665 * exported by name 948 666 */ 949 HRESULT WINAPI SHFreeUnusedLibraries (void)950 { FIXME("stub\n");951 return TRUE;667 ODINPROCEDURE0(SHFreeUnusedLibraries) 668 { 669 dprintf(("SHELL32: SHFreeUnusedLibraries not implemented")); 952 670 } 953 671 /************************************************************************* … … 957 675 * exported by name 958 676 */ 959 HRESULT WINAPI DAD_SetDragImage (DWORD u, DWORD v) 960 { FIXME("0x%08lx 0x%08lx stub\n",u, v); 677 ODINFUNCTION2(BOOL, DAD_SetDragImage, 678 HIMAGELIST, himlTrack, 679 LPPOINT, lppt) 680 { 681 dprintf(("SHELL32: DAD_SetDragImage not implemented")); 961 682 return 0; 962 683 } … … 967 688 * exported by name 968 689 */ 969 HRESULT WINAPI DAD_ShowDragImage (DWORD u) 970 { FIXME("0x%08lx stub\n",u); 690 ODINFUNCTION1(BOOL, DAD_ShowDragImage, 691 BOOL, bShow) 692 { 693 dprintf(("SHELL32: DAD_ShowDragImage not implemented")); 971 694 return 0; 972 }973 /*************************************************************************974 * SHRegCloseKey [NT4.0:SHELL32.505]975 *976 */977 HRESULT WINAPI SHRegCloseKey (HKEY hkey)978 { TRACE("0x%04x\n",hkey);979 return RegCloseKey( hkey );980 }981 /*************************************************************************982 * SHRegOpenKeyA [SHELL32.506]983 *984 */985 HRESULT WINAPI SHRegOpenKeyA(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult)986 {987 TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);988 return RegOpenKeyA(hKey, lpSubKey, phkResult);989 }990 991 /*************************************************************************992 * SHRegOpenKeyW [NT4.0:SHELL32.507]993 *994 */995 HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)996 { WARN("0x%04x %s %p\n",hkey,debugstr_w(lpszSubKey),retkey);997 return RegOpenKeyW( hkey, lpszSubKey, retkey );998 }999 /*************************************************************************1000 * SHRegQueryValueExA [SHELL32.509]1001 *1002 */1003 HRESULT WINAPI SHRegQueryValueExA(1004 HKEY hkey,1005 LPSTR lpValueName,1006 LPDWORD lpReserved,1007 LPDWORD lpType,1008 LPBYTE lpData,1009 LPDWORD lpcbData)1010 {1011 TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);1012 return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);1013 }1014 /*************************************************************************1015 * SHRegQueryValueW [NT4.0:SHELL32.510]1016 *1017 */1018 HRESULT WINAPI SHRegQueryValueW (HKEY hkey, LPWSTR lpszSubKey,1019 LPWSTR lpszData, LPDWORD lpcbData )1020 { WARN("0x%04x %s %p %p semi-stub\n",1021 hkey, debugstr_w(lpszSubKey), lpszData, lpcbData);1022 return RegQueryValueW( hkey, lpszSubKey, lpszData, (LPLONG)lpcbData );1023 }1024 1025 /*************************************************************************1026 * SHRegQueryValueExW [NT4.0:SHELL32.511]1027 *1028 * FIXME1029 * if the datatype REG_EXPAND_SZ then expand the string and change1030 * *pdwType to REG_SZ.1031 */1032 HRESULT WINAPI SHRegQueryValueExW (HKEY hkey, LPWSTR pszValue, LPDWORD pdwReserved,1033 LPDWORD pdwType, LPVOID pvData, LPDWORD pcbData)1034 { DWORD ret;1035 WARN("0x%04x %s %p %p %p %p semi-stub\n",1036 hkey, debugstr_w(pszValue), pdwReserved, pdwType, pvData, pcbData);1037 ret = RegQueryValueExW ( hkey, pszValue, pdwReserved, pdwType, (LPBYTE)pvData, pcbData);1038 return ret;1039 695 } 1040 696 … … 1084 740 } 1085 741 1086 HRESULT WINAPI StrRetToStrNA (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)1087 {1088 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);1089 1090 switch (src->uType)1091 {1092 case STRRET_WSTR:1093 WideCharToMultiByte(CP_ACP, 0, src->u.pOleStr, -1, (LPSTR)dest, len, NULL, NULL);1094 SHFree(src->u.pOleStr);1095 break;1096 1097 case STRRET_CSTRA:1098 lstrcpynA((LPSTR)dest, src->u.cStr, len);1099 break;1100 1101 case STRRET_OFFSETA:1102 lstrcpynA((LPSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);1103 break;1104 1105 default:1106 FIXME("unknown type!\n");1107 if (len)1108 {1109 *(LPSTR)dest = '\0';1110 }1111 return(FALSE);1112 }1113 return S_OK;1114 }1115 1116 742 HRESULT WINAPI StrRetToBufW (LPSTRRET src, LPITEMIDLIST pidl, LPWSTR dest, DWORD len) 1117 743 { … … 1119 745 } 1120 746 1121 HRESULT WINAPI StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)1122 {1123 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);1124 1125 switch (src->uType)1126 {1127 case STRRET_WSTR:1128 lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);1129 SHFree(src->u.pOleStr);1130 break;1131 1132 case STRRET_CSTRA:1133 lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);1134 break;1135 1136 case STRRET_OFFSETA:1137 if (pidl)1138 {1139 lstrcpynAtoW((LPWSTR)dest, ((LPSTR)&pidl->mkid)+src->u.uOffset, len);1140 }1141 break;1142 1143 default:1144 FIXME("unknown type!\n");1145 if (len)1146 { *(LPSTR)dest = '\0';1147 }1148 return(FALSE);1149 }1150 return S_OK;1151 }1152 HRESULT WINAPI StrRetToStrNAW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)1153 {1154 if(VERSION_OsIsUnicode())1155 return StrRetToStrNW (dest, len, src, pidl);1156 return StrRetToStrNA (dest, len, src, pidl);1157 }1158 747 1159 748 /************************************************************************* … … 1257 846 * parameter1 is return value from SHLockShared 1258 847 */ 1259 BOOL WINAPI SHUnlockShared(HANDLE pmem) 1260 { TRACE("handle=0x%04x\n",pmem); 1261 return GlobalUnlock(pmem); 848 ODINFUNCTION1(BOOL, SHUnlockShared, 849 LPVOID, pv) 850 { 851 TRACE("handle=0x%08x\n",pv); 852 //@@@PH rather VirtualUnlock ? 853 return GlobalUnlock((HANDLE)pv); 1262 854 } 1263 855 /************************************************************************* … … 1309 901 * 1310 902 */ 1311 HRESULT WINAPI SHOutOfMemoryMessageBox(DWORD u, DWORD v, DWORD w) 1312 { FIXME("0x%04lx 0x%04lx 0x%04lx stub\n",u,v,w); 1313 return 0; 903 ODINFUNCTION3(int, SHOutOfMemoryMessageBox, 904 HWND, hwndOwner, 905 LPCSTR, lpCaption, 906 UINT, uType) 907 { 908 dprintf(("SHELL32: SHOutOfMemoryMessageBox not implemented.")); 909 return 0; 1314 910 } 1315 911 /************************************************************************* … … 1408 1004 * 1409 1005 */ 1410 HRESULT WINAPI SHWaitForFileToOpen(DWORD u, DWORD v, DWORD w) 1411 { FIXME("0x%04lx 0x%04lx 0x%04lx stub\n",u,v,w); 1412 return 0; 1006 ODINFUNCTION3(BOOL, SHWaitForFileToOpen, 1007 LPCITEMIDLIST, pidl, 1008 DWORD, dwFlags, 1009 DWORD, dwTimeout) 1010 { 1011 dprintf(("SHELL32: SHWaitForFileToOpen not implemented")); 1012 return 0; 1413 1013 } 1414 1014 /************************************************************************* … … 1452 1052 return 0; 1453 1053 } 1454 /************************************************************************1455 * StrToOleStr [SHELL32.163]1456 *1457 */1458 int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)1459 {1460 TRACE("%p %p(%s)\n",1461 lpWideCharStr, lpMultiByteString, lpMultiByteString);1462 1463 return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH);1464 1465 }1466 int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString)1467 {1468 TRACE("%p %p(%s)\n",1469 lpWideCharStr, lpWString, debugstr_w(lpWString));1470 1471 if (lstrcpyW (lpWideCharStr, lpWString ))1472 { return lstrlenW (lpWideCharStr);1473 }1474 return 0;1475 }1476 1477 BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString)1478 {1479 if (VERSION_OsIsUnicode())1480 return StrToOleStrW (lpWideCharStr, (LPCWSTR)lpString);1481 return StrToOleStrA (lpWideCharStr, (LPCSTR)lpString);1482 }1483 1054 1484 1055 /************************************************************************ … … 1526 1097 { 1527 1098 return FALSE; 1528 }1529 1530 /************************************************************************1531 * Win32DeleteFile [SHELL32.164]1532 *1533 * Deletes a file. Also triggers a change notify if one exists, but1534 * that mechanism doesn't yet exist in Wine's SHELL32.1535 *1536 * FIXME:1537 * Verified on Win98 / IE 5 (SHELL32 4.72, March 1999 build) to be1538 * ANSI. Is this Unicode on NT?1539 *1540 */1541 1542 BOOL WINAPI Win32DeleteFile(LPSTR fName)1543 {1544 dprintf(("SHELL32:SHELLORD:Win32DeleteFile %p(%s): partial stub\n", fName, fName));1545 1546 DeleteFileA(fName);1547 1548 return TRUE;1549 1099 } 1550 1100
Note:
See TracChangeset
for help on using the changeset viewer.