Merge in Winehq commits.

svn path=/trunk/; revision=9952
This commit is contained in:
Steven Edwards 2004-06-30 20:42:18 +00:00
parent 8eb23c9e6c
commit 6cfb2b5848
2 changed files with 20 additions and 8 deletions

View file

@ -391,7 +391,8 @@ static INT_PTR CALLBACK BrsFolderDlgProc(HWND hWnd, UINT msg, WPARAM wParam,
switch (wParam)
{ case IDOK:
pdump ( pidlRet );
SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName);
if (lpBrowseInfo->pszDisplayName)
SHGetPathFromIDListW(pidlRet, lpBrowseInfo->pszDisplayName);
EndDialog(hWnd, (DWORD) ILClone(pidlRet));
return TRUE;
@ -438,7 +439,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc(HWND hWnd, UINT msg, WPARAM wParam,
return FALSE;
}
static WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
static const WCHAR swBrowseTempName[] = {'S','H','B','R','S','F','O','R','F','O','L','D','E','R','_','M','S','G','B','O','X',0};
/*************************************************************************
* SHBrowseForFolderA [SHELL32.@]
@ -460,9 +461,9 @@ LPITEMIDLIST WINAPI SHBrowseForFolderA (LPBROWSEINFOA lpbi)
bi.pidlRoot = lpbi->pidlRoot;
if (lpbi->pszDisplayName)
{
len = MultiByteToWideChar(CP_ACP, 0, lpbi->pszDisplayName, -1, NULL, 0);
bi.pszDisplayName = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpbi->pszDisplayName, -1, bi.pszDisplayName, len);
/*lpbi->pszDisplayName is assumed to be MAX_PATH (MSDN) */
bi.pszDisplayName = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, lpbi->pszDisplayName, -1, bi.pszDisplayName, MAX_PATH);
}
else
bi.pszDisplayName = NULL;

View file

@ -53,9 +53,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell);
#define FO_MASK 0xF
CHAR aWildcardFile[] = {'*','.','*',0};
WCHAR wWildcardFile[] = {'*','.','*',0};
WCHAR wWildcardChars[] = {'*','?',0};
WCHAR wBackslash[] = {'\\',0};
static const WCHAR wWildcardFile[] = {'*','.','*',0};
static const WCHAR wWildcardChars[] = {'*','?',0};
static const WCHAR wBackslash[] = {'\\',0};
static DWORD SHNotifyCreateDirectoryA(LPCSTR path, LPSECURITY_ATTRIBUTES sec);
static DWORD SHNotifyCreateDirectoryW(LPCWSTR path, LPSECURITY_ATTRIBUTES sec);
@ -1310,3 +1310,14 @@ BOOL WINAPI IsNetDrive(DWORD drive)
root[0] += (char)drive;
return (GetDriveTypeA(root) == DRIVE_REMOTE);
}
/*************************************************************************
* RealDriveType [SHELL32.524]
*/
INT WINAPI RealDriveType(INT drive, BOOL bQueryNet)
{
char root[] = "A:\\";
root[0] += (char)drive;
return GetDriveTypeA(root);
}