2 * The parameters of many functions changes between different OS versions
3 * (NT uses Unicode strings, 95 uses ASCII strings)
5 * Copyright 1997 Marcus Meissner
12 #include "debugtools.h"
14 #include "winversion.h"
19 #include "shell32_main.h"
20 #include "wine/undocshell.h"
22 DEFAULT_DEBUG_CHANNEL(shell
);
24 /*************************************************************************
25 * ParseFieldA [internal]
27 * copys a field from a ',' delimited string
29 * first field is nField = 1
31 DWORD WINAPI
ParseFieldA(
37 WARN("('%s',0x%08lx,%p,%ld) semi-stub.\n",src
,nField
,dst
,len
);
39 if (!src
|| !src
[0] || !dst
|| !len
)
42 /* skip n fields delimited by ',' */
45 if (*src
=='\0') return FALSE
;
46 if (*(src
++)==',') nField
--;
49 /* copy part till the next ',' to dst */
50 while ( *src
!='\0' && *src
!=',' && (len
--)>0 ) *(dst
++)=*(src
++);
52 /* finalize the string */
58 /*************************************************************************
59 * ParseFieldW [internal]
61 * copys a field from a ',' delimited string
63 * first field is nField = 1
65 DWORD WINAPI
ParseFieldW(LPCWSTR src
, DWORD nField
, LPWSTR dst
, DWORD len
)
67 FIXME("('%s',0x%08lx,%p,%ld) stub.\n",
68 debugstr_w(src
), nField
, dst
, len
);
72 /*************************************************************************
73 * ParseFieldAW [SHELL32.58]
75 DWORD WINAPI
ParseFieldAW(LPCVOID src
, DWORD nField
, LPVOID dst
, DWORD len
)
77 if (VERSION_OsIsUnicode())
78 return ParseFieldW(src
, nField
, dst
, len
);
79 return ParseFieldA(src
, nField
, dst
, len
);
82 /*************************************************************************
83 * GetFileNameFromBrowse [SHELL32.63]
86 BOOL WINAPI
GetFileNameFromBrowse(
90 LPCSTR lpstrInitialDir
,
95 FIXME("(%04x,%s,%ld,%s,%s,%s,%s):stub.\n",
96 hwndOwner
, lpstrFile
, nMaxFile
, lpstrInitialDir
, lpstrDefExt
,
97 lpstrFilter
, lpstrTitle
);
99 /* puts up a Open Dialog and requests input into targetbuf */
100 /* OFN_HIDEREADONLY|OFN_NOCHANGEDIR|OFN_FILEMUSTEXIST|OFN_unknown */
101 lstrcpyA(lpstrFile
,"x:\\dummy.exe");
105 /*************************************************************************
106 * SHGetSettings [SHELL32.68]
109 * the registry path are for win98 (tested)
110 * and possibly are the same in nt40
112 void WINAPI
SHGetSettings(LPSHELLFLAGSTATE lpsfs
, DWORD dwMask
, DWORD dwx
)
116 DWORD dwDataSize
= sizeof (DWORD
);
118 TRACE("(%p 0x%08lx 0x%08lx)\n",lpsfs
,dwMask
, dwx
);
120 if (RegCreateKeyExA(HKEY_CURRENT_USER
, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced",
121 0, 0, 0, KEY_ALL_ACCESS
, 0, &hKey
, 0))
124 if ( (SSF_SHOWEXTENSIONS
& dwMask
) && !RegQueryValueExA(hKey
, "HideFileExt", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
125 lpsfs
->fShowExtensions
= ((dwData
== 0) ? 0 : 1);
127 if ( (SSF_SHOWINFOTIP
& dwMask
) && !RegQueryValueExA(hKey
, "ShowInfoTip", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
128 lpsfs
->fShowInfoTip
= ((dwData
== 0) ? 0 : 1);
130 if ( (SSF_DONTPRETTYPATH
& dwMask
) && !RegQueryValueExA(hKey
, "DontPrettyPath", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
131 lpsfs
->fDontPrettyPath
= ((dwData
== 0) ? 0 : 1);
133 if ( (SSF_HIDEICONS
& dwMask
) && !RegQueryValueExA(hKey
, "HideIcons", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
134 lpsfs
->fHideIcons
= ((dwData
== 0) ? 0 : 1);
136 if ( (SSF_MAPNETDRVBUTTON
& dwMask
) && !RegQueryValueExA(hKey
, "MapNetDrvBtn", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
137 lpsfs
->fMapNetDrvBtn
= ((dwData
== 0) ? 0 : 1);
139 if ( (SSF_SHOWATTRIBCOL
& dwMask
) && !RegQueryValueExA(hKey
, "ShowAttribCol", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
140 lpsfs
->fShowAttribCol
= ((dwData
== 0) ? 0 : 1);
142 if (((SSF_SHOWALLOBJECTS
| SSF_SHOWSYSFILES
) & dwMask
) && !RegQueryValueExA(hKey
, "Hidden", 0, 0, (LPBYTE
)&dwData
, &dwDataSize
))
144 { if (SSF_SHOWALLOBJECTS
& dwMask
) lpsfs
->fShowAllObjects
= 0;
145 if (SSF_SHOWSYSFILES
& dwMask
) lpsfs
->fShowSysFiles
= 0;
147 else if (dwData
== 1)
148 { if (SSF_SHOWALLOBJECTS
& dwMask
) lpsfs
->fShowAllObjects
= 1;
149 if (SSF_SHOWSYSFILES
& dwMask
) lpsfs
->fShowSysFiles
= 0;
151 else if (dwData
== 2)
152 { if (SSF_SHOWALLOBJECTS
& dwMask
) lpsfs
->fShowAllObjects
= 0;
153 if (SSF_SHOWSYSFILES
& dwMask
) lpsfs
->fShowSysFiles
= 1;
158 TRACE("-- 0x%04x\n", *(WORD
*)lpsfs
);
161 /*************************************************************************
162 * SHShellFolderView_Message [SHELL32.73]
165 * hwndCabinet defines the explorer cabinet window that contains the
166 * shellview you need to communicate with
167 * uMsg identifying the SFVM enum to perform
171 * Message SFVM_REARRANGE = 1
172 * This message gets sent when a column gets clicked to instruct the
173 * shell view to re-sort the item list. lParam identifies the column
176 int WINAPI
SHShellFolderView_Message(
181 FIXME("%04x %08lx %08lx stub\n",hwndCabinet
, dwMessage
, dwParam
);
185 /*************************************************************************
186 * RegisterShellHook [SHELL32.181]
189 * hwnd [I] window handle
193 * exported by ordinal
195 BOOL WINAPI
RegisterShellHook(
199 FIXME("(0x%08x,0x%08lx):stub.\n",hWnd
, dwType
);
202 /*************************************************************************
203 * ShellMessageBoxW [SHELL32.182]
205 * Format and output errormessage.
207 * idText resource ID of title or LPSTR
208 * idTitle resource ID of title or LPSTR
211 * exported by ordinal
213 int WINAPIV
ShellMessageBoxW(
221 WCHAR szText
[100],szTitle
[100],szTemp
[256];
222 LPCWSTR pszText
= szText
, pszTitle
= szTitle
;
224 va_start(args
, uType
);
225 /* wvsprintfA(buf,fmt, args); */
227 TRACE("(%08lx,%08lx,%p,%p,%08x)\n",
228 (DWORD
)hInstance
,(DWORD
)hWnd
,lpText
,lpCaption
,uType
);
230 if (!HIWORD(lpCaption
))
231 LoadStringW(hInstance
, (DWORD
)lpCaption
, szTitle
, 100);
233 pszTitle
= lpCaption
;
236 LoadStringW(hInstance
, (DWORD
)lpText
, szText
, 100);
240 FormatMessageW(FORMAT_MESSAGE_FROM_STRING
| FORMAT_MESSAGE_ARGUMENT_ARRAY
,
241 szText
, 0, 0, szTemp
, 256, (LPDWORD
) args
);
245 return MessageBoxW(hWnd
,szTemp
,szTitle
,uType
);
248 /*************************************************************************
249 * ShellMessageBoxA [SHELL32.183]
251 int WINAPIV
ShellMessageBoxA(
259 char szText
[100],szTitle
[100],szTemp
[256];
260 LPCSTR pszText
= szText
, pszTitle
= szTitle
;
262 va_start(args
, uType
);
263 /* wvsprintfA(buf,fmt, args); */
265 TRACE("(%08lx,%08lx,%p,%p,%08x)\n",
266 (DWORD
)hInstance
,(DWORD
)hWnd
,lpText
,lpCaption
,uType
);
268 if (!HIWORD(lpCaption
))
269 LoadStringA(hInstance
, (DWORD
)lpCaption
, szTitle
, 100);
271 pszTitle
= lpCaption
;
274 LoadStringA(hInstance
, (DWORD
)lpText
, szText
, 100);
278 FormatMessageA(FORMAT_MESSAGE_FROM_STRING
| FORMAT_MESSAGE_ARGUMENT_ARRAY
,
279 szText
, 0, 0, szTemp
, 256, (LPDWORD
) args
);
283 return MessageBoxA(hWnd
,szTemp
,szTitle
,uType
);
286 /*************************************************************************
287 * SHFree [SHELL32.195]
290 * free_ptr() - frees memory using IMalloc
291 * exported by ordinal
294 void WINAPI
SHFree(LPVOID x
)
297 WORD len
= *(LPWORD
)((LPBYTE
)x
-2);
299 if ( *(LPWORD
)((LPBYTE
)x
+len
) != 0x7384)
302 if ( (*(LPWORD
)((LPBYTE
)x
-4)) != 0x8271)
305 memset((LPBYTE
)x
-4, 0xde, len
+6);
307 TRACE("%p len=%u\n",x
, len
);
313 HeapFree(GetProcessHeap(), 0, x
);
316 /*************************************************************************
317 * SHAlloc [SHELL32.196]
320 * void *task_alloc(DWORD len), uses SHMalloc allocator
321 * exported by ordinal
323 LPVOID WINAPI
SHAlloc(DWORD len
)
328 ret
= (LPVOID
) HeapAlloc(GetProcessHeap(),0,len
+6);
330 ret
= (LPVOID
) HeapAlloc(GetProcessHeap(),0,len
);
334 *(LPWORD
)(ret
) = 0x8271;
335 *(LPWORD
)(ret
+2) = (WORD
)len
;
336 *(LPWORD
)(ret
+4+len
) = 0x7384;
338 memset(ret
, 0xdf, len
);
340 TRACE("%lu bytes at %p\n",len
, ret
);
344 /*************************************************************************
345 * SHRegisterDragDrop [SHELL32.86]
348 * exported by ordinal
350 HRESULT WINAPI
SHRegisterDragDrop(
352 LPDROPTARGET pDropTarget
)
354 FIXME("(0x%08x,%p):stub.\n", hWnd
, pDropTarget
);
355 if (GetShellOle()) return pRegisterDragDrop(hWnd
, pDropTarget
);
359 /*************************************************************************
360 * SHRevokeDragDrop [SHELL32.87]
363 * exported by ordinal
365 HRESULT WINAPI
SHRevokeDragDrop(HWND hWnd
)
367 FIXME("(0x%08x):stub.\n",hWnd
);
371 /*************************************************************************
372 * SHDoDragDrop [SHELL32.88]
375 * exported by ordinal
377 HRESULT WINAPI
SHDoDragDrop(
379 LPDATAOBJECT lpDataObject
,
380 LPDROPSOURCE lpDropSource
,
384 FIXME("(0x%04x %p %p 0x%08lx %p):stub.\n",
385 hWnd
, lpDataObject
, lpDropSource
, dwOKEffect
, pdwEffect
);
389 /*************************************************************************
390 * ArrangeWindows [SHELL32.184]
393 WORD WINAPI
ArrangeWindows(
400 FIXME("(0x%08x 0x%08lx %p 0x%04x %p):stub.\n",
401 hwndParent
, dwReserved
, lpRect
, cKids
, lpKids
);
405 /*************************************************************************
406 * SignalFileOpen [SHELL32.103]
409 * exported by ordinal
412 SignalFileOpen (DWORD dwParam1
)
414 FIXME("(0x%08lx):stub.\n", dwParam1
);
419 /*************************************************************************
420 * SHAddToRecentDocs [SHELL32.234]
423 * uFlags [IN] SHARD_PATH or SHARD_PIDL
424 * pv [IN] string or pidl, NULL clears the list
429 DWORD WINAPI
SHAddToRecentDocs (UINT uFlags
,LPCVOID pv
)
430 { if (SHARD_PIDL
==uFlags
)
431 { FIXME("(0x%08x,pidl=%p):stub.\n", uFlags
,pv
);
434 { FIXME("(0x%08x,%s):stub.\n", uFlags
,(char*)pv
);
438 /*************************************************************************
439 * SHCreateShellFolderViewEx [SHELL32.174]
442 * see IShellFolder::CreateViewObject
444 HRESULT WINAPI
SHCreateShellFolderViewEx(
445 LPCSHELLFOLDERVIEWINFO psvcbi
, /*[in ] shelltemplate struct*/
446 LPSHELLVIEW
* ppv
) /*[out] IShellView pointer*/
451 TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=0x%08lx\n",
452 psvcbi
->pshf
, psvcbi
->pidlFolder
, psvcbi
->lpfnCallback
,
453 psvcbi
->uViewMode
, psvcbi
->dwUser
);
455 psf
= IShellView_Constructor(psvcbi
->pshf
);
458 return E_OUTOFMEMORY
;
460 IShellView_AddRef(psf
);
461 hRes
= IShellView_QueryInterface(psf
, &IID_IShellView
, (LPVOID
*)ppv
);
462 IShellView_Release(psf
);
466 /*************************************************************************
467 * SHWinHelp [SHELL32.127]
470 HRESULT WINAPI
SHWinHelp (DWORD v
, DWORD w
, DWORD x
, DWORD z
)
471 { FIXME("0x%08lx 0x%08lx 0x%08lx 0x%08lx stub\n",v
,w
,x
,z
);
474 /*************************************************************************
475 * SHRunControlPanel [SHELL32.161]
478 HRESULT WINAPI
SHRunControlPanel (DWORD x
, DWORD z
)
479 { FIXME("0x%08lx 0x%08lx stub\n",x
,z
);
482 /*************************************************************************
483 * ShellExecuteEx [SHELL32.291]
486 BOOL WINAPI
ShellExecuteExAW (LPVOID sei
)
487 { if (VERSION_OsIsUnicode())
488 return ShellExecuteExW (sei
);
489 return ShellExecuteExA (sei
);
491 /*************************************************************************
492 * ShellExecuteExA [SHELL32.292]
494 * placeholder in the commandline:
499 * %I adress of a global item ID (explorer switch /idlist)
500 * %L ??? path/url/current file ???
502 * %* all following parameters (see batfile)
504 #include "process.h" /* we can get rid of it hopefully */
506 BOOL WINAPI
ShellExecuteExA (LPSHELLEXECUTEINFOA sei
)
507 { CHAR szApplicationName
[MAX_PATH
],szCommandline
[MAX_PATH
],szPidl
[20];
510 STARTUPINFOA startup
;
511 PROCESS_INFORMATION info
;
513 WARN("mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
514 sei
->fMask
, sei
->hwnd
, sei
->lpVerb
, sei
->lpFile
,
515 sei
->lpParameters
, sei
->lpDirectory
, sei
->nShow
,
516 (sei
->fMask
& SEE_MASK_CLASSNAME
) ? sei
->lpClass
: "not used");
518 ZeroMemory(szApplicationName
,MAX_PATH
);
520 strcpy(szApplicationName
, sei
->lpFile
);
522 ZeroMemory(szCommandline
,MAX_PATH
);
523 if (sei
->lpParameters
)
524 strcpy(szCommandline
, sei
->lpParameters
);
526 if (sei
->fMask
& (SEE_MASK_CLASSKEY
| SEE_MASK_INVOKEIDLIST
| SEE_MASK_ICON
| SEE_MASK_HOTKEY
|
527 SEE_MASK_CONNECTNETDRV
| SEE_MASK_FLAG_DDEWAIT
|
528 SEE_MASK_DOENVSUBST
| SEE_MASK_FLAG_NO_UI
| SEE_MASK_UNICODE
|
529 SEE_MASK_NO_CONSOLE
| SEE_MASK_ASYNCOK
| SEE_MASK_HMONITOR
))
531 FIXME("flags ignored: 0x%08lx\n", sei
->fMask
);
534 /* launch a document by fileclass like 'Wordpad.Document.1' */
535 if (sei
->fMask
& SEE_MASK_CLASSNAME
)
537 /* the commandline contains 'c:\Path\wordpad.exe "%1"' */
538 HCR_GetExecuteCommand(sei
->lpClass
, (sei
->lpVerb
) ? sei
->lpVerb
: "open", szCommandline
, 256);
539 /* fixme: get the extension of lpFile, check if it fits to the lpClass */
540 TRACE("SEE_MASK_CLASSNAME->'%s'\n", szCommandline
);
543 /* process the IDList */
544 if ( (sei
->fMask
& SEE_MASK_INVOKEIDLIST
) == SEE_MASK_INVOKEIDLIST
) /*0x0c*/
546 SHGetPathFromIDListA (sei
->lpIDList
,szApplicationName
);
547 TRACE("-- idlist=%p (%s)\n", sei
->lpIDList
, szApplicationName
);
551 if (sei
->fMask
& SEE_MASK_IDLIST
)
553 pos
= strstr(szCommandline
, "%I");
557 HGLOBAL hmem
= SHAllocShared ( sei
->lpIDList
, ILGetSize(sei
->lpIDList
), 0);
558 pv
= SHLockShared(hmem
,0);
559 sprintf(szPidl
,":%p",pv
);
562 gap
= strlen(szPidl
);
564 memmove(pos
+gap
,pos
+2,len
);
565 memcpy(pos
,szPidl
,gap
);
571 TRACE("execute:'%s','%s'\n",szApplicationName
, szCommandline
);
573 strcat(szApplicationName
, " ");
574 strcat(szApplicationName
, szCommandline
);
576 ZeroMemory(&startup
,sizeof(STARTUPINFOA
));
577 startup
.cb
= sizeof(STARTUPINFOA
);
579 if (! CreateProcessA(NULL
, szApplicationName
,
580 NULL
, NULL
, FALSE
, 0,
581 NULL
, NULL
, &startup
, &info
))
583 sei
->hInstApp
= GetLastError();
589 /* Give 30 seconds to the app to come up */
590 if ( WaitForInputIdle ( info
.hProcess
, 30000 ) == 0xFFFFFFFF )
591 ERR("WaitForInputIdle failed: Error %ld\n", GetLastError() );
593 if(sei
->fMask
& SEE_MASK_NOCLOSEPROCESS
)
594 sei
->hProcess
= info
.hProcess
;
596 CloseHandle( info
.hProcess
);
597 CloseHandle( info
.hThread
);
600 /*************************************************************************
601 * ShellExecuteExW [SHELL32.293]
604 BOOL WINAPI
ShellExecuteExW (LPSHELLEXECUTEINFOW sei
)
605 { SHELLEXECUTEINFOA seiA
;
610 memcpy(&seiA
, sei
, sizeof(SHELLEXECUTEINFOA
));
613 seiA
.lpVerb
= HEAP_strdupWtoA( GetProcessHeap(), 0, sei
->lpVerb
);
616 seiA
.lpFile
= HEAP_strdupWtoA( GetProcessHeap(), 0, sei
->lpFile
);
618 if (sei
->lpParameters
)
619 seiA
.lpParameters
= HEAP_strdupWtoA( GetProcessHeap(), 0, sei
->lpParameters
);
621 if (sei
->lpDirectory
)
622 seiA
.lpDirectory
= HEAP_strdupWtoA( GetProcessHeap(), 0, sei
->lpDirectory
);
624 if ((sei
->fMask
& SEE_MASK_CLASSNAME
) && sei
->lpClass
)
625 seiA
.lpClass
= HEAP_strdupWtoA( GetProcessHeap(), 0, sei
->lpClass
);
629 ret
= ShellExecuteExA(&seiA
);
631 if (seiA
.lpVerb
) HeapFree( GetProcessHeap(), 0, (LPSTR
) seiA
.lpVerb
);
632 if (seiA
.lpFile
) HeapFree( GetProcessHeap(), 0, (LPSTR
) seiA
.lpFile
);
633 if (seiA
.lpParameters
) HeapFree( GetProcessHeap(), 0, (LPSTR
) seiA
.lpParameters
);
634 if (seiA
.lpDirectory
) HeapFree( GetProcessHeap(), 0, (LPSTR
) seiA
.lpDirectory
);
635 if (seiA
.lpClass
) HeapFree( GetProcessHeap(), 0, (LPSTR
) seiA
.lpClass
);
640 static LPUNKNOWN SHELL32_IExplorerInterface
=0;
641 /*************************************************************************
642 * SHSetInstanceExplorer [SHELL32.176]
647 HRESULT WINAPI
SHSetInstanceExplorer (LPUNKNOWN lpUnknown
)
648 { TRACE("%p\n", lpUnknown
);
649 SHELL32_IExplorerInterface
= lpUnknown
;
650 return (HRESULT
) lpUnknown
;
652 /*************************************************************************
653 * SHGetInstanceExplorer [SHELL32.256]
656 * gets the interface pointer of the explorer and a reference
658 HRESULT WINAPI
SHGetInstanceExplorer (LPUNKNOWN
* lpUnknown
)
659 { TRACE("%p\n", lpUnknown
);
661 *lpUnknown
= SHELL32_IExplorerInterface
;
663 if (!SHELL32_IExplorerInterface
)
666 IUnknown_AddRef(SHELL32_IExplorerInterface
);
669 /*************************************************************************
670 * SHFreeUnusedLibraries [SHELL32.123]
675 void WINAPI
SHFreeUnusedLibraries (void)
679 /*************************************************************************
680 * DAD_SetDragImage [SHELL32.136]
685 BOOL WINAPI
DAD_SetDragImage(
686 HIMAGELIST himlTrack
,
689 FIXME("%p %p stub\n",himlTrack
, lppt
);
692 /*************************************************************************
693 * DAD_ShowDragImage [SHELL32.137]
698 BOOL WINAPI
DAD_ShowDragImage(BOOL bShow
)
700 FIXME("0x%08x stub\n",bShow
);
703 /*************************************************************************
704 * ReadCabinetState [NT 4.0:SHELL32.651]
707 HRESULT WINAPI
ReadCabinetState(DWORD u
, DWORD v
)
708 { FIXME("0x%04lx 0x%04lx stub\n",u
,v
);
711 /*************************************************************************
712 * WriteCabinetState [NT 4.0:SHELL32.652]
715 HRESULT WINAPI
WriteCabinetState(DWORD u
)
716 { FIXME("0x%04lx stub\n",u
);
719 /*************************************************************************
720 * FileIconInit [SHELL32.660]
723 BOOL WINAPI
FileIconInit(BOOL bFullInit
)
724 { FIXME("(%s)\n", bFullInit
? "true" : "false");
727 /*************************************************************************
728 * IsUserAdmin [NT 4.0:SHELL32.680]
731 HRESULT WINAPI
IsUserAdmin(void)
736 /*************************************************************************
737 * SHAllocShared [SHELL32.520]
740 * parameter1 is return value from HeapAlloc
741 * parameter2 is equal to the size allocated with HeapAlloc
742 * parameter3 is return value from GetCurrentProcessId
744 * the return value is posted as lParam with 0x402 (WM_USER+2) to somewhere
745 * WM_USER+2 could be the undocumented CWM_SETPATH
746 * the allocated memory contains a pidl
748 HGLOBAL WINAPI
SHAllocShared(LPVOID psrc
, DWORD size
, DWORD procID
)
752 TRACE("ptr=%p size=0x%04lx procID=0x%04lx\n",psrc
,size
,procID
);
753 hmem
= GlobalAlloc(GMEM_FIXED
, size
);
757 pmem
= GlobalLock (hmem
);
762 memcpy (pmem
, psrc
, size
);
766 /*************************************************************************
767 * SHLockShared [SHELL32.521]
770 * parameter1 is return value from SHAllocShared
771 * parameter2 is return value from GetCurrentProcessId
772 * the receiver of (WM_USER+2) trys to lock the HANDLE (?)
773 * the returnvalue seems to be a memoryadress
775 LPVOID WINAPI
SHLockShared(HANDLE hmem
, DWORD procID
)
776 { TRACE("handle=0x%04x procID=0x%04lx\n",hmem
,procID
);
777 return GlobalLock(hmem
);
779 /*************************************************************************
780 * SHUnlockShared [SHELL32.522]
783 * parameter1 is return value from SHLockShared
785 BOOL WINAPI
SHUnlockShared(LPVOID pv
)
788 return GlobalUnlock((HANDLE
)pv
);
790 /*************************************************************************
791 * SHFreeShared [SHELL32.523]
794 * parameter1 is return value from SHAllocShared
795 * parameter2 is return value from GetCurrentProcessId
797 BOOL WINAPI
SHFreeShared(
801 TRACE("handle=0x%04x 0x%04lx\n",hMem
,pid
);
802 return GlobalFree(hMem
);
805 /*************************************************************************
806 * SetAppStartingCursor [SHELL32.99]
808 HRESULT WINAPI
SetAppStartingCursor(HWND u
, DWORD v
)
809 { FIXME("hwnd=0x%04x 0x%04lx stub\n",u
,v
);
812 /*************************************************************************
813 * SHLoadOLE [SHELL32.151]
816 HRESULT WINAPI
SHLoadOLE(DWORD u
)
817 { FIXME("0x%04lx stub\n",u
);
820 /*************************************************************************
821 * DriveType [SHELL32.64]
824 HRESULT WINAPI
DriveType(DWORD u
)
825 { FIXME("0x%04lx stub\n",u
);
828 /*************************************************************************
829 * SHAbortInvokeCommand [SHELL32.198]
832 HRESULT WINAPI
SHAbortInvokeCommand(void)
836 /*************************************************************************
837 * SHOutOfMemoryMessageBox [SHELL32.126]
840 int WINAPI
SHOutOfMemoryMessageBox(
845 FIXME("0x%04x %s 0x%08x stub\n",hwndOwner
, lpCaption
, uType
);
848 /*************************************************************************
849 * SHFlushClipboard [SHELL32.121]
852 HRESULT WINAPI
SHFlushClipboard(void)
857 /*************************************************************************
858 * SHWaitForFileToOpen [SHELL32.97]
861 BOOL WINAPI
SHWaitForFileToOpen(
866 FIXME("%p 0x%08lx 0x%08lx stub\n", pidl
, dwFlags
, dwTimeout
);
869 /*************************************************************************
870 * Control_FillCache_RunDLL [SHELL32.8]
873 HRESULT WINAPI
Control_FillCache_RunDLL(HWND hWnd
, HANDLE hModule
, DWORD w
, DWORD x
)
874 { FIXME("0x%04x 0x%04x 0x%04lx 0x%04lx stub\n",hWnd
, hModule
,w
,x
);
877 /*************************************************************************
878 * RunDLL_CallEntry16 [SHELL32.122]
879 * the name is propably wrong
881 HRESULT WINAPI
RunDLL_CallEntry16(DWORD v
, DWORD w
, DWORD x
, DWORD y
, DWORD z
)
882 { FIXME("0x%04lx 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",v
,w
,x
,y
,z
);
886 /************************************************************************
887 * shell32_654 [SHELL32.654]
889 * NOTES: first parameter seems to be a pointer (same as passed to WriteCabinetState)
890 * second one could be a size (0x0c). The size is the same as the structure saved to
891 * HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState
892 * I'm (js) guessing: this one is just ReadCabinetState ;-)
894 HRESULT WINAPI
shell32_654 (DWORD x
, DWORD y
)
895 { FIXME("0x%08lx 0x%08lx stub\n",x
,y
);
899 /************************************************************************
900 * RLBuildListOfPaths [SHELL32.146]
905 DWORD WINAPI
RLBuildListOfPaths (void)
909 /************************************************************************
910 * SHValidateUNC [SHELL32.173]
913 HRESULT WINAPI
SHValidateUNC (DWORD x
, DWORD y
, DWORD z
)
915 FIXME("0x%08lx 0x%08lx 0x%08lx stub\n",x
,y
,z
);
919 /************************************************************************
920 * DoEnvironmentSubstA [SHELL32.1222]
923 HRESULT WINAPI
DoEnvironmentSubstA(LPSTR x
, LPSTR y
)
925 FIXME("(%s, %s) stub\n", debugstr_a(x
), debugstr_a(y
));
929 /************************************************************************
930 * DoEnvironmentSubstW [SHELL32.1223]
933 HRESULT WINAPI
DoEnvironmentSubstW(LPWSTR x
, LPWSTR y
)
935 FIXME("(%s, %s): stub\n", debugstr_w(x
), debugstr_w(y
));
939 /************************************************************************
940 * DoEnvironmentSubst [SHELL32.53]
943 HRESULT WINAPI
DoEnvironmentSubstAW(LPVOID x
, LPVOID y
)
945 if (VERSION_OsIsUnicode())
946 return DoEnvironmentSubstW(x
, y
);
947 return DoEnvironmentSubstA(x
, y
);
950 /*************************************************************************
951 * shell32_243 [SHELL32.243]
953 * Win98+ by-ordinal routine. In Win98 this routine returns zero and
954 * does nothing else. Possibly this does something in NT or SHELL32 5.0?
958 BOOL WINAPI
shell32_243(DWORD a
, DWORD b
)
963 /*************************************************************************
964 * SHCreateShellPalette
966 HPALETTE WINAPI
SHCreateShellPalette(HDC hdc
)
969 return CreateHalftonePalette(hdc
);
971 /*************************************************************************
972 * wnsprintfA [SHLWAPI]
974 int WINAPIV
wnsprintfA(LPSTR lpOut
, int cchLimitIn
, LPCSTR lpFmt
, ...)
979 va_start( valist
, lpFmt
);
980 res
= wvsnprintfA( lpOut
, cchLimitIn
, lpFmt
, valist
);
985 /*************************************************************************
986 * wnsprintfW [SHLWAPI]
988 int WINAPIV
wnsprintfW(LPWSTR lpOut
, int cchLimitIn
, LPCWSTR lpFmt
, ...)
993 va_start( valist
, lpFmt
);
994 res
= wvsnprintfW( lpOut
, cchLimitIn
, lpFmt
, valist
);
998 /*************************************************************************
999 * UrlEscapeA [SHLWAPI]
1001 HRESULT WINAPI
UrlEscapeA(
1004 LPDWORD pcchEscaped
,
1007 FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_a(pszUrl
),
1008 pszEscaped
, pcchEscaped
, dwFlags
);
1012 /*************************************************************************
1013 * UrlEscapeW [SHLWAPI]
1015 HRESULT WINAPI
UrlEscapeW(
1018 LPDWORD pcchEscaped
,
1021 FIXME("(%s %p %p 0x%08lx)stub\n",debugstr_w(pszUrl
),
1022 pszEscaped
, pcchEscaped
, dwFlags
);
1026 /*************************************************************************
1027 * SHELL32_714 [SHELL32]
1029 DWORD WINAPI
SHELL32_714(LPVOID x
)
1031 FIXME("(%s)stub\n", debugstr_w(x
));
1035 /*************************************************************************
1036 * SHIsLowMemoryMachine [SHLWAPI.@]
1038 DWORD WINAPI
SHIsLowMemoryMachine (DWORD x
)
1040 FIXME("0x%08lx\n", x
);