From c390bb2aea5343ef16713c7f56728a9bf1fb8cc0 Mon Sep 17 00:00:00 2001 From: Ge van Geldorp Date: Mon, 28 Jun 2004 20:32:53 +0000 Subject: [PATCH] Match prototypes to Platform SDK. --- dlls/shell32/pidl.c | 2 +- dlls/shell32/shell32_main.c | 2 +- dlls/shell32/shellole.c | 2 +- dlls/shell32/shellord.c | 18 ++++++++---------- dlls/shell32/shlfileop.c | 6 +++--- include/shlobj.h | 10 +++++----- 6 files changed, 19 insertions(+), 21 deletions(-) diff --git a/dlls/shell32/pidl.c b/dlls/shell32/pidl.c index 3b366c0c96e..0191bb09483 100644 --- a/dlls/shell32/pidl.c +++ b/dlls/shell32/pidl.c @@ -204,7 +204,7 @@ LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl) * NOTES * when pidl=Desktop return=FALSE */ -BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST pidl) +BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl) { TRACE_(shell)("pidl=%p\n",pidl); diff --git a/dlls/shell32/shell32_main.c b/dlls/shell32/shell32_main.c index df979bffc2e..a6473f1f5b1 100644 --- a/dlls/shell32/shell32_main.c +++ b/dlls/shell32/shell32_main.c @@ -712,7 +712,7 @@ DWORD WINAPI SHHelpShortcuts_RunDLL (DWORD dwArg1, DWORD dwArg2, DWORD dwArg3, D * the shell process and release it immediately */ -DWORD WINAPI SHLoadInProc (REFCLSID rclsid) +HRESULT WINAPI SHLoadInProc (REFCLSID rclsid) { void *ptr = NULL; diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c index a8f639b9408..365504a9e4d 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c @@ -473,7 +473,7 @@ void WINAPI SHFree(LPVOID pv) /************************************************************************* * SHGetDesktopFolder [SHELL32.@] */ -DWORD WINAPI SHGetDesktopFolder(IShellFolder **psf) +HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf) { HRESULT hres = S_OK; TRACE("\n"); diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c index a60eb748d29..e92a0d63154 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c @@ -606,10 +606,8 @@ static INT SHADD_create_add_mru_data(HANDLE mruhandle, LPSTR doc_name, LPSTR new * * NOTES * exported by name - * - * FIXME: ?? MSDN shows this as a VOID */ -DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) +void WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) { /* If list is a string list lpfnCompare has the following prototype * int CALLBACK MRUCompareString(LPCSTR s1, LPCSTR s2) @@ -648,20 +646,20 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) ret=SHADD_get_policy( "NoRecentDocsHistory", &type, &data, &datalen); if ((ret > 0) && (ret != ERROR_FILE_NOT_FOUND)) { ERR("Error %d getting policy \"NoRecentDocsHistory\"\n", ret); - return 0; + return; } if (ret == ERROR_SUCCESS) { if (!( (type == REG_DWORD) || ((type == REG_BINARY) && (datalen == 4)) )) { ERR("Error policy data for \"NoRecentDocsHistory\" not formated correctly, type=%ld, len=%ld\n", type, datalen); - return 0; + return; } TRACE("policy value for NoRecentDocsHistory = %08lx\n", data[0]); /* now test the actual policy value */ if ( data[0] != 0) - return 0; + return; } /* Open key to where the necessary info is @@ -674,7 +672,7 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer", 0, 0, 0, KEY_READ, 0, &HCUbasekey, 0)) { ERR("Failed to create 'Software\\Microsoft\\Windows\\CurrentVersion\\Explorer'\n"); - return 0; + return; } /* Get path to user's "Recent" directory @@ -724,7 +722,7 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) */ RegDeleteKeyA(HCUbasekey, "RecentDocs"); RegCloseKey(HCUbasekey); - return 0; + return; } /* Have data to add, the jobs to be done: @@ -780,7 +778,7 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) /* MRU failed */ ERR("MRU processing failed, handle zero\n"); RegCloseKey(HCUbasekey); - return 0; + return; } len = lstrlenA(doc_name); pos = FindMRUData(mruhandle, doc_name, len, 0); @@ -929,7 +927,7 @@ DWORD WINAPI SHAddToRecentDocs (UINT uFlags,LPCVOID pv) /* all done */ RegCloseKey(HCUbasekey); - return 0; + return; } /************************************************************************* diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index eb5d48f20bb..2acb2ed6004 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -545,7 +545,7 @@ DWORD WINAPI SHCreateDirectory(HWND hWnd, LPCVOID path) * ERROR_ALREADY_EXISTS when the directory already exists * ERROR_FILENAME_EXCED_RANGE if the filename was to long to process */ -DWORD WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) +int WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES sec) { WCHAR wPath[MAX_PATH]; TRACE("(%p, %s, %p)\n",hWnd, debugstr_a(path), sec); @@ -557,9 +557,9 @@ DWORD WINAPI SHCreateDirectoryExA(HWND hWnd, LPCSTR path, LPSECURITY_ATTRIBUTES /************************************************************************* * SHCreateDirectoryExW [SHELL32.@] */ -DWORD WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) +int WINAPI SHCreateDirectoryExW(HWND hWnd, LPCWSTR path, LPSECURITY_ATTRIBUTES sec) { - DWORD ret = ERROR_BAD_PATHNAME; + int ret = ERROR_BAD_PATHNAME; TRACE("(%p, %s, %p)\n",hWnd, debugstr_w(path), sec); if (PathIsRelativeW(path)) diff --git a/include/shlobj.h b/include/shlobj.h index de4fb725e58..a5c9b8a71d3 100644 --- a/include/shlobj.h +++ b/include/shlobj.h @@ -200,7 +200,7 @@ ICOM_DEFINE(IShellIcon, IUnknown) #define SHARD_PATHW 0x00000003L #define SHARD_PATH WINELIB_NAME_AW(SHARD_PATH) -DWORD WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv); +void WINAPI SHAddToRecentDocs(UINT uFlags, LPCVOID pv); /**************************************************************************** * SHBrowseForFolder API @@ -701,8 +701,8 @@ HRESULT WINAPI SHGetRealIDL(IShellFolder *psf, LPCITEMIDLIST pidlSimple, LPITEMI * SHCreateDirectory API */ DWORD WINAPI SHCreateDirectory(HWND, LPCVOID); -DWORD WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); -DWORD WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); +int WINAPI SHCreateDirectoryExA(HWND, LPCSTR, LPSECURITY_ATTRIBUTES); +int WINAPI SHCreateDirectoryExW(HWND, LPCWSTR, LPSECURITY_ATTRIBUTES); /**************************************************************************** * SHGetSpecialFolderLocation API @@ -791,7 +791,7 @@ HRESULT WINAPI SHGetFolderPathW(HWND hwnd, int nFolder, HANDLE hToken, DWORD dwF /**************************************************************************** * SHGetDesktopFolder API */ -DWORD WINAPI SHGetDesktopFolder(IShellFolder * *); +HRESULT WINAPI SHGetDesktopFolder(IShellFolder * *); /**************************************************************************** * SHBindToParent API @@ -1014,7 +1014,7 @@ LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST); UINT WINAPI ILGetSize(LPCITEMIDLIST); BOOL WINAPI ILIsEqual(LPCITEMIDLIST,LPCITEMIDLIST); BOOL WINAPI ILIsParent(LPCITEMIDLIST,LPCITEMIDLIST,BOOL); -BOOL WINAPI ILRemoveLastID(LPCITEMIDLIST); +BOOL WINAPI ILRemoveLastID(LPITEMIDLIST); #ifdef __cplusplus } /* extern "C" */