From 1a882843bfdcd31f11ffa40aab5caa0f12a8ef99 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Wed, 3 Dec 2008 12:12:52 +0100 Subject: [PATCH] comdlg32: Make some functions static. --- dlls/comdlg32/cdlg.h | 4 ---- dlls/comdlg32/cdlg32.c | 8 -------- dlls/comdlg32/filedlg.c | 10 ++++++---- dlls/comdlg32/filedlgbrowser.h | 4 ---- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/dlls/comdlg32/cdlg.h b/dlls/comdlg32/cdlg.h index f6a9cbc232d..c85f877c473 100644 --- a/dlls/comdlg32/cdlg.h +++ b/dlls/comdlg32/cdlg.h @@ -182,12 +182,8 @@ extern UINT (WINAPI *COMDLG32_PIDL_ILGetSize)(LPCITEMIDLIST); /* SHELL */ extern LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD); extern DWORD (WINAPI *COMDLG32_SHFree)(LPVOID); -extern BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR); extern BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR); -extern BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType); -extern BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType); - /* * Internal Functions * Do NOT Export to other programs and dlls diff --git a/dlls/comdlg32/cdlg32.c b/dlls/comdlg32/cdlg32.c index 0f0f69bee17..afa3c61bf30 100644 --- a/dlls/comdlg32/cdlg32.c +++ b/dlls/comdlg32/cdlg32.c @@ -52,7 +52,6 @@ UINT (WINAPI *COMDLG32_PIDL_ILGetSize)(LPCITEMIDLIST); /* SHELL */ LPVOID (WINAPI *COMDLG32_SHAlloc)(DWORD); DWORD (WINAPI *COMDLG32_SHFree)(LPVOID); -BOOL (WINAPI *COMDLG32_SHGetFolderPathA)(HWND,int,HANDLE,DWORD,LPSTR); BOOL (WINAPI *COMDLG32_SHGetFolderPathW)(HWND,int,HANDLE,DWORD,LPWSTR); /*********************************************************************** @@ -102,13 +101,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD Reason, LPVOID Reserved) GPA(COMDLG32_SHAlloc, SHELL32_hInstance, (LPCSTR)196L); GPA(COMDLG32_SHFree, SHELL32_hInstance, (LPCSTR)195L); - /* for the first versions of shell32 SHGetFolderPathA is in SHFOLDER.DLL */ - COMDLG32_SHGetFolderPathA = (void*)GetProcAddress(SHELL32_hInstance,"SHGetFolderPathA"); - if (!COMDLG32_SHGetFolderPathA) - { - SHFOLDER_hInstance = LoadLibraryA("SHFOLDER.DLL"); - GPA(COMDLG32_SHGetFolderPathA, SHFOLDER_hInstance,"SHGetFolderPathA"); - } /* for the first versions of shell32 SHGetFolderPathW is in SHFOLDER.DLL */ COMDLG32_SHGetFolderPathW = (void*)GetProcAddress(SHELL32_hInstance,"SHGetFolderPathW"); diff --git a/dlls/comdlg32/filedlg.c b/dlls/comdlg32/filedlg.c index 953a5baabc2..e1eedd19eca 100644 --- a/dlls/comdlg32/filedlg.c +++ b/dlls/comdlg32/filedlg.c @@ -220,6 +220,8 @@ static HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPWST IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs); LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl); static LPITEMIDLIST GetPidlFromName(IShellFolder *psf,LPWSTR lpcstrFileName); +static BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl); +static UINT GetNumSelected( IDataObject *doSelected ); /* Shell memory allocation */ static void *MemAlloc(UINT size); @@ -312,7 +314,7 @@ static BOOL GetFileName95(FileOpenDlgInfos *fodInfos) * IN : The OPENFILENAMEA initialisation structure passed to * GetOpenFileNameA win api function (see filedlg.c) */ -BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) +static BOOL GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) { BOOL ret; FileOpenDlgInfos fodInfos; @@ -449,7 +451,7 @@ BOOL WINAPI GetFileDialog95A(LPOPENFILENAMEA ofn,UINT iDlgType) * Call GetFileName95 with this structure and clean the memory. * */ -BOOL WINAPI GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) +static BOOL GetFileDialog95W(LPOPENFILENAMEW ofn,UINT iDlgType) { BOOL ret; FileOpenDlgInfos fodInfos; @@ -3291,7 +3293,7 @@ LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex) * Return the number of selected items in the DataObject. * */ -UINT GetNumSelected( IDataObject *doSelected ) +static UINT GetNumSelected( IDataObject *doSelected ) { UINT retVal = 0; STGMEDIUM medium; @@ -3430,7 +3432,7 @@ static LPITEMIDLIST GetPidlFromName(IShellFolder *lpsf,LPWSTR lpcstrFileName) /* */ -BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl) +static BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl) { ULONG uAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER; HRESULT ret; diff --git a/dlls/comdlg32/filedlgbrowser.h b/dlls/comdlg32/filedlgbrowser.h index 2342d3d3ebb..f8da75eddf7 100644 --- a/dlls/comdlg32/filedlgbrowser.h +++ b/dlls/comdlg32/filedlgbrowser.h @@ -148,10 +148,6 @@ IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner); LPITEMIDLIST GetPidlFromDataObject ( IDataObject *doSelected, UINT nPidlIndex); -UINT GetNumSelected(IDataObject *doSelected); - -/* pidl handling */ -BOOL IsPidlFolder (LPSHELLFOLDER psf, LPCITEMIDLIST pidl); /* Functions used by the EDIT box */ void FILEDLG95_FILENAME_FillFromSelection (HWND hwnd);