#include "shlguid.h"
#include "winerror.h"
#include "winnls.h"
-#include "winternl.h"
#include "undocshell.h"
#include "shell32_main.h"
#include "shellapi.h"
flag = SHGDN_INFOLDER;
break;
default:
- FIXME("Unknown type parameter = %lx", type);
+ FIXME("Unknown type parameter = %lx\n", type);
flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR;
break;
}
*/
LPITEMIDLIST WINAPI SHSimpleIDListFromPathA(LPCSTR lpszPath)
{
- LPITEMIDLIST pidl = NULL;
-
-#if 0 /* don't link directly to ntdll */
- UNICODE_STRING wPath;
-
- RtlCreateUnicodeStringFromAsciiz(&wPath, lpszPath);
- _ILParsePathW(wPath.Buffer, NULL, TRUE, &pidl, NULL);
- RtlFreeUnicodeString(&wPath);
-#else
- LPWSTR wPath;
+ LPITEMIDLIST pidl = NULL;
+ LPWSTR wPath = NULL;
int len;
- TRACE("%s\n", debugstr_a(lpszPath));
+ TRACE("%s\n", debugstr_a(lpszPath));
- if (lpszPath) {
- len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
- wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
- } else
- wPath = NULL;
+ if (lpszPath)
+ {
+ len = MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, NULL, 0);
+ wPath = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, lpszPath, -1, wPath, len);
+ }
_ILParsePathW(wPath, NULL, TRUE, &pidl, NULL);
- if (wPath)
- HeapFree(GetProcessHeap(), 0, wPath);
-#endif
-
- TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
- return pidl;
+ if (wPath) HeapFree(GetProcessHeap(), 0, wPath);
+ TRACE("%s %p\n", debugstr_a(lpszPath), pidl);
+ return pidl;
}
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath)
#include "winbase.h"
#include "winerror.h"
#include "winreg.h"
-#include "winternl.h"
#include "dlgs.h"
#include "shellapi.h"
#include "winuser.h"
BOOL WINAPI ShellAboutA( HWND hWnd, LPCSTR szApp, LPCSTR szOtherStuff, HICON hIcon )
{
BOOL ret;
-
-#if 0 /* don't link directly to ntdll */
- UNICODE_STRING appW, otherW;
-
- RtlCreateUnicodeStringFromAsciiz( &appW, szApp );
- RtlCreateUnicodeStringFromAsciiz( &otherW, szOtherStuff );
- ret = ShellAboutW( hWnd, appW.Buffer, otherW.Buffer, hIcon );
- RtlFreeUnicodeString( &appW );
- RtlFreeUnicodeString( &otherW );
-#else
- LPWSTR appW, otherW;
+ LPWSTR appW = NULL, otherW = NULL;
int len;
- if (szApp) {
- len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0);
- appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len);
- } else
- appW = NULL;
-
- if (szOtherStuff) {
- len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0);
- otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
- MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len);
- } else
- otherW = NULL;
+ if (szApp)
+ {
+ len = MultiByteToWideChar(CP_ACP, 0, szApp, -1, NULL, 0);
+ appW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, szApp, -1, appW, len);
+ }
+ if (szOtherStuff)
+ {
+ len = MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, NULL, 0);
+ otherW = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ MultiByteToWideChar(CP_ACP, 0, szOtherStuff, -1, otherW, len);
+ }
ret = ShellAboutW(hWnd, appW, otherW, hIcon);
- if (otherW)
- HeapFree(GetProcessHeap(), 0, otherW);
-
- if (appW)
- HeapFree(GetProcessHeap(), 0, appW);
-#endif
-
+ if (otherW) HeapFree(GetProcessHeap(), 0, otherW);
+ if (appW) HeapFree(GetProcessHeap(), 0, appW);
return ret;
}
* all are once per process
*
*/
-void (WINAPI *pDLLInitComctl)(LPVOID);
-
HINSTANCE shell32_hInstance = 0;
HIMAGELIST ShellSmallIconList = 0;
HIMAGELIST ShellBigIconList = 0;
{
case DLL_PROCESS_ATTACH:
shell32_hInstance = hinstDLL;
-
- /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
- GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
- WideCharToMultiByte(CP_ACP, 0, swShell32Name, -1, sShell32Name, MAX_PATH, NULL, NULL);
-
-#if 0 /* why not directly link to InitCommonControlsEx()? */
- hComctl32 = GetModuleHandleA("COMCTL32.DLL");
DisableThreadLibraryCalls(shell32_hInstance);
- if (!hComctl32)
- {
- ERR("P A N I C SHELL32 loading failed\n");
- return FALSE;
- }
+ /* get full path to this DLL for IExtractIconW_fnGetIconLocation() */
+ GetModuleFileNameW(hinstDLL, swShell32Name, MAX_PATH);
+ WideCharToMultiByte(CP_ACP, 0, swShell32Name, -1, sShell32Name, MAX_PATH, NULL, NULL);
- /* comctl32 */
- pDLLInitComctl = (void*)GetProcAddress(hComctl32,"InitCommonControlsEx");
- /* initialize the common controls */
- if (pDLLInitComctl)
- {
- pDLLInitComctl(NULL);
- }
-#else
- InitCommonControlsEx(NULL);
-#endif
+ InitCommonControlsEx(NULL);
SIC_Initialize();
SYSTRAY_Init();