- many new Path* stubs

- many bugfixes
- class functions expanding environments variables now
This commit is contained in:
Juergen Schmied 2000-06-24 12:56:08 +00:00 committed by Alexandre Julliard
parent fd92ebdb4c
commit 1dbf403db4
6 changed files with 590 additions and 380 deletions

View File

@ -48,27 +48,31 @@ BOOL HCR_MapTypeToValue ( LPCSTR szExtension, LPSTR szFileType, DWORD len, BOOL
return TRUE; return TRUE;
} }
BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len ) BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD len )
{ HKEY hkey; {
char sTemp[256]; HKEY hkey;
char sTemp[MAX_PATH];
DWORD dwType;
BOOL ret = FALSE;
TRACE("%s %s\n",szClass, szVerb ); TRACE("%s %s\n",szClass, szVerb );
sprintf(sTemp, "%s\\shell\\%s\\command",szClass, szVerb); sprintf(sTemp, "%s\\shell\\%s\\command",szClass, szVerb);
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey)) if (!RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
{ return FALSE; {
if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len))
{
if (dwType == REG_EXPAND_SZ)
{
ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH);
strcpy(szDest, sTemp);
} }
ret = TRUE;
if (RegQueryValueA(hkey,NULL,szDest,&len))
{ RegCloseKey(hkey);
return FALSE;
} }
RegCloseKey(hkey); RegCloseKey(hkey);
}
TRACE("-- %s\n", szDest ); TRACE("-- %s\n", szDest );
return ret;
return TRUE;
} }
/*************************************************************************************** /***************************************************************************************
* HCR_GetDefaultIcon [internal] * HCR_GetDefaultIcon [internal]
@ -76,34 +80,34 @@ BOOL HCR_GetExecuteCommand ( LPCSTR szClass, LPCSTR szVerb, LPSTR szDest, DWORD
* Gets the icon for a filetype * Gets the icon for a filetype
*/ */
BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr) BOOL HCR_GetDefaultIcon (LPCSTR szClass, LPSTR szDest, DWORD len, LPDWORD dwNr)
{ HKEY hkey; {
char sTemp[256]; HKEY hkey;
char sTemp[MAX_PATH];
char sNum[5]; char sNum[5];
DWORD dwType;
BOOL ret = FALSE;
TRACE("%s\n",szClass ); TRACE("%s\n",szClass );
sprintf(sTemp, "%s\\DefaultIcon",szClass); sprintf(sTemp, "%s\\DefaultIcon",szClass);
if (RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey)) if (!RegOpenKeyExA(HKEY_CLASSES_ROOT,sTemp,0,0x02000000,&hkey))
{ return FALSE; {
if (!RegQueryValueExA(hkey, NULL, 0, &dwType, szDest, &len))
{
if (dwType == REG_EXPAND_SZ)
{
ExpandEnvironmentStringsA(szDest, sTemp, MAX_PATH);
strcpy(szDest, sTemp);
} }
if (ParseFieldA (szDest, 2, sNum, 5)) *dwNr=atoi(sNum);
if (RegQueryValueA(hkey,NULL,szDest,&len))
{ RegCloseKey(hkey);
return FALSE;
}
RegCloseKey(hkey);
if (ParseFieldA (szDest, 2, sNum, 5))
{ *dwNr=atoi(sNum);
}
ParseFieldA (szDest, 1, szDest, len); ParseFieldA (szDest, 1, szDest, len);
ret = TRUE;
}
RegCloseKey(hkey);
}
TRACE("-- %s %li\n", szDest, *dwNr ); TRACE("-- %s %li\n", szDest, *dwNr );
return ret;
return TRUE;
} }
/*************************************************************************************** /***************************************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -55,8 +55,8 @@ init ShlwapiLibMain
51 stub @ 51 stub @
52 stub @ 52 stub @
53 stub @ 53 stub @
54 stub @ 54 forward SHLWAPI_54 user32.CreateICW
55 stub @ 55 forward SHLWAPI_55 user32.CreateWindowExW
56 forward SHLWAPI_56 user32.DefWindowProcW 56 forward SHLWAPI_56 user32.DefWindowProcW
57 stub @ 57 stub @
58 stub @ 58 stub @
@ -468,12 +468,12 @@ init ShlwapiLibMain
@ stdcall PathCombineW (ptr ptr ptr) PathCombineW @ stdcall PathCombineW (ptr ptr ptr) PathCombineW
@ stdcall PathCommonPrefixA(str str ptr)PathCommonPrefixA @ stdcall PathCommonPrefixA(str str ptr)PathCommonPrefixA
@ stdcall PathCommonPrefixW(wstr wstr ptr)PathCommonPrefixW @ stdcall PathCommonPrefixW(wstr wstr ptr)PathCommonPrefixW
@ stub PathCompactPathA @ stdcall PathCompactPathA(long str long)PathCompactPathA
@ stub PathCompactPathExA @ stdcall PathCompactPathExA(ptr str long long)PathCompactPathExA
@ stub PathCompactPathExW @ stdcall PathCompactPathExW(ptr wstr long long)PathCompactPathExW
@ stub PathCompactPathW @ stdcall PathCompactPathW(long wstr long)PathCompactPathW
@ stub PathCreateFromUrlA @ stdcall PathCreateFromUrlA(str ptr ptr long)PathCreateFromUrlA
@ stub PathCreateFromUrlW @ stdcall PathCreateFromUrlW(wstr ptr ptr long)PathCreateFromUrlW
@ stdcall PathFileExistsA (str) PathFileExistsA @ stdcall PathFileExistsA (str) PathFileExistsA
@ stdcall PathFileExistsW (wstr) PathFileExistsW @ stdcall PathFileExistsW (wstr) PathFileExistsW
@ stdcall PathFindExtensionA (str) PathFindExtensionA @ stdcall PathFindExtensionA (str) PathFindExtensionA
@ -486,26 +486,26 @@ init ShlwapiLibMain
@ stdcall PathFindOnPathW (wstr ptr) PathFindOnPathW @ stdcall PathFindOnPathW (wstr ptr) PathFindOnPathW
@ stdcall PathGetArgsA (str) PathGetArgsA @ stdcall PathGetArgsA (str) PathGetArgsA
@ stdcall PathGetArgsW (wstr) PathGetArgsW @ stdcall PathGetArgsW (wstr) PathGetArgsW
@ stub PathGetCharTypeA @ stdcall PathGetCharTypeA(long)PathGetCharTypeA
@ stub PathGetCharTypeW @ stdcall PathGetCharTypeW(long)PathGetCharTypeW
@ stdcall PathGetDriveNumberA (str) PathGetDriveNumberA @ stdcall PathGetDriveNumberA (str) PathGetDriveNumberA
@ stdcall PathGetDriveNumberW (wstr) PathGetDriveNumberW @ stdcall PathGetDriveNumberW (wstr) PathGetDriveNumberW
@ stub PathIsContentTypeA @ stdcall PathIsContentTypeA(str str)PathIsContentTypeA
@ stub PathIsContentTypeW @ stdcall PathIsContentTypeW(wstr wstr)PathIsContentTypeW
@ stdcall PathIsDirectoryA(str) PathIsDirectoryA @ stdcall PathIsDirectoryA(str) PathIsDirectoryA
@ stdcall PathIsDirectoryW(wstr) PathIsDirectoryW @ stdcall PathIsDirectoryW(wstr) PathIsDirectoryW
@ stub PathIsFileSpecA @ stdcall PathIsFileSpecA(str)PathIsFileSpecA
@ stub PathIsFileSpecW @ stdcall PathIsFileSpecW(wstr)PathIsFileSpecW
@ stub PathIsPrefixA @ stdcall PathIsPrefixA(str str)PathIsPrefixA
@ stub PathIsPrefixW @ stdcall PathIsPrefixW(wstr wstr)PathIsPrefixW
@ stdcall PathIsRelativeA (str) PathIsRelativeA @ stdcall PathIsRelativeA (str) PathIsRelativeA
@ stdcall PathIsRelativeW (wstr) PathIsRelativeW @ stdcall PathIsRelativeW (wstr) PathIsRelativeW
@ stdcall PathIsRootA(str) PathIsRootA @ stdcall PathIsRootA(str) PathIsRootA
@ stdcall PathIsRootW(wstr) PathIsRootW @ stdcall PathIsRootW(wstr) PathIsRootW
@ stdcall PathIsSameRootA(str str) PathIsSameRootA @ stdcall PathIsSameRootA(str str) PathIsSameRootA
@ stdcall PathIsSameRootW(wstr wstr) PathIsSameRootW @ stdcall PathIsSameRootW(wstr wstr) PathIsSameRootW
@ stub PathIsSystemFolderA @ stdcall PathIsSystemFolderA(str long)PathIsSystemFolderA
@ stub PathIsSystemFolderW @ stdcall PathIsSystemFolderW(wstr long)PathIsSystemFolderW
@ stdcall PathIsUNCA (str) PathIsUNCA @ stdcall PathIsUNCA (str) PathIsUNCA
@ stdcall PathIsUNCServerA(str)PathIsUNCServerA @ stdcall PathIsUNCServerA(str)PathIsUNCServerA
@ stdcall PathIsUNCServerShareA(str)PathIsUNCServerShareA @ stdcall PathIsUNCServerShareA(str)PathIsUNCServerShareA
@ -516,16 +516,16 @@ init ShlwapiLibMain
@ stdcall PathIsURLW(wstr) PathIsURLW @ stdcall PathIsURLW(wstr) PathIsURLW
@ stdcall PathMakePrettyA(str)PathMakePrettyA @ stdcall PathMakePrettyA(str)PathMakePrettyA
@ stdcall PathMakePrettyW(wstr)PathMakePrettyW @ stdcall PathMakePrettyW(wstr)PathMakePrettyW
@ stub PathMakeSystemFolderA @ stdcall PathMakeSystemFolderA(str)PathMakeSystemFolderA
@ stub PathMakeSystemFolderW @ stdcall PathMakeSystemFolderW(wstr)PathMakeSystemFolderW
@ stdcall PathMatchSpecA (str str) PathMatchSpecA @ stdcall PathMatchSpecA (str str) PathMatchSpecA
@ stdcall PathMatchSpecW (wstr wstr) PathMatchSpecW @ stdcall PathMatchSpecW (wstr wstr) PathMatchSpecW
@ stdcall PathParseIconLocationA (str) PathParseIconLocationA @ stdcall PathParseIconLocationA (str) PathParseIconLocationA
@ stdcall PathParseIconLocationW (wstr) PathParseIconLocationW @ stdcall PathParseIconLocationW (wstr) PathParseIconLocationW
@ stdcall PathQuoteSpacesA (str) PathQuoteSpacesA @ stdcall PathQuoteSpacesA (str) PathQuoteSpacesA
@ stdcall PathQuoteSpacesW (wstr) PathQuoteSpacesW @ stdcall PathQuoteSpacesW (wstr) PathQuoteSpacesW
@ stub PathRelativePathToA @ stdcall PathRelativePathToA(ptr str long str long)PathRelativePathToA
@ stub PathRelativePathToW @ stdcall PathRelativePathToW(ptr str long str long)PathRelativePathToW
@ stdcall PathRemoveArgsA(str)PathRemoveArgsA @ stdcall PathRemoveArgsA(str)PathRemoveArgsA
@ stdcall PathRemoveArgsW(wstr)PathRemoveArgsW @ stdcall PathRemoveArgsW(wstr)PathRemoveArgsW
@ stdcall PathRemoveBackslashA (str) PathRemoveBackslashA @ stdcall PathRemoveBackslashA (str) PathRemoveBackslashA
@ -536,20 +536,20 @@ init ShlwapiLibMain
@ stdcall PathRemoveExtensionW(wstr)PathRemoveExtensionW @ stdcall PathRemoveExtensionW(wstr)PathRemoveExtensionW
@ stdcall PathRemoveFileSpecA (str) PathRemoveFileSpecA @ stdcall PathRemoveFileSpecA (str) PathRemoveFileSpecA
@ stdcall PathRemoveFileSpecW (wstr) PathRemoveFileSpecW @ stdcall PathRemoveFileSpecW (wstr) PathRemoveFileSpecW
@ stub PathRenameExtensionA @ stdcall PathRenameExtensionA(str str)PathRenameExtensionA
@ stub PathRenameExtensionW @ stdcall PathRenameExtensionW(wstr wstr)PathRenameExtensionW
@ stub PathSearchAndQualifyA @ stdcall PathSearchAndQualifyA(str ptr long)PathSearchAndQualifyA
@ stub PathSearchAndQualifyW @ stdcall PathSearchAndQualifyW(wstr ptr long)PathSearchAndQualifyW
@ stdcall PathSetDlgItemPathA (long long ptr) PathSetDlgItemPathA @ stdcall PathSetDlgItemPathA (long long ptr) PathSetDlgItemPathA
@ stdcall PathSetDlgItemPathW (long long ptr) PathSetDlgItemPathW @ stdcall PathSetDlgItemPathW (long long ptr) PathSetDlgItemPathW
@ stub PathSkipRootA @ stdcall PathSkipRootA(str)PathSkipRootA
@ stub PathSkipRootW @ stdcall PathSkipRootW(wstr)PathSkipRootW
@ stdcall PathStripPathA(str)PathStripPathA @ stdcall PathStripPathA(str)PathStripPathA
@ stdcall PathStripPathW(wstr)PathStripPathW @ stdcall PathStripPathW(wstr)PathStripPathW
@ stdcall PathStripToRootA(str)PathStripToRootA @ stdcall PathStripToRootA(str)PathStripToRootA
@ stdcall PathStripToRootW(wstr)PathStripToRootW @ stdcall PathStripToRootW(wstr)PathStripToRootW
@ stub PathUnmakeSystemFolderA @ stdcall PathUnmakeSystemFolderA(str)PathUnmakeSystemFolderA
@ stub PathUnmakeSystemFolderW @ stdcall PathUnmakeSystemFolderW(wstr)PathUnmakeSystemFolderW
@ stdcall PathUnquoteSpacesA (str) PathUnquoteSpacesA @ stdcall PathUnquoteSpacesA (str) PathUnquoteSpacesA
@ stdcall PathUnquoteSpacesW (wstr) PathUnquoteSpacesW @ stdcall PathUnquoteSpacesW (wstr) PathUnquoteSpacesW
@ stdcall SHCreateShellPalette(long)SHCreateShellPalette @ stdcall SHCreateShellPalette(long)SHCreateShellPalette

View File

@ -41,6 +41,11 @@ LPSTR WINAPI StrChrA(LPCSTR lpStart, WORD wMatch);
LPWSTR WINAPI StrChrW(LPCWSTR lpStart, WCHAR wMatch); LPWSTR WINAPI StrChrW(LPCWSTR lpStart, WCHAR wMatch);
#define StrChr WINELIB_NAME_AW(StrChr) #define StrChr WINELIB_NAME_AW(StrChr)
void WINAPI PathRemoveBlanksA(LPSTR lpszPath);
void WINAPI PathRemoveBlanksW(LPWSTR lpszPath);
#define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
void WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
#ifdef __cplusplus #ifdef __cplusplus
} /* extern "C" */ } /* extern "C" */
#endif /* defined(__cplusplus) */ #endif /* defined(__cplusplus) */

View File

@ -89,6 +89,7 @@ typedef struct IShellView IShellView, *LPSHELLVIEW;
#define FCIDM_TB_NEWFOLDER 0xA002 #define FCIDM_TB_NEWFOLDER 0xA002
#define FCIDM_TB_SMALLICON 0xA003 #define FCIDM_TB_SMALLICON 0xA003
#define FCIDM_TB_REPORTVIEW 0xA004 #define FCIDM_TB_REPORTVIEW 0xA004
#define FCIDM_TB_DESKTOP 0xA005 /* fixme */
#define FCIDM_BROWSERLAST 0xbf00 #define FCIDM_BROWSERLAST 0xbf00
#define FCIDM_GLOBALFIRST 0x8000 #define FCIDM_GLOBALFIRST 0x8000

View File

@ -583,11 +583,6 @@ BOOL WINAPI PathRemoveFileSpec(LPSTR lpszPath);
LPSTR WINAPI PathGetShortPath(LPSTR lpszPath); LPSTR WINAPI PathGetShortPath(LPSTR lpszPath);
LPSTR WINAPI PathRemoveBlanksA(LPSTR lpszPath);
LPWSTR WINAPI PathRemoveBlanksW(LPWSTR lpszPath);
#define PathRemoveBlanks WINELIB_NAME_AW(PathRemoveBlanks)
LPVOID WINAPI PathRemoveBlanksAW(LPVOID lpszPath);
LPSTR WINAPI PathQuoteSpacesA(LPSTR path); LPSTR WINAPI PathQuoteSpacesA(LPSTR path);
LPWSTR WINAPI PathQuoteSpacesW(LPWSTR path); LPWSTR WINAPI PathQuoteSpacesW(LPWSTR path);
#define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces) #define PathQuoteSpaces WINELIB_NAME_AW(PathQuoteSpaces)