Dmitry Timoshkov : shell32: Fix calling convention of LPFNOFN, don' t use static buffers.
Alexandre Julliard
julliard at winehq.org
Mon May 12 07:12:19 CDT 2008
Module: wine
Branch: master
Commit: ca3b8741b5ea454bd14ad488d603a06201c1bcfa
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ca3b8741b5ea454bd14ad488d603a06201c1bcfa
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Sat May 10 13:09:12 2008 +0900
shell32: Fix calling convention of LPFNOFN, don't use static buffers.
---
dlls/shell32/dialogs.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/shell32/dialogs.c b/dlls/shell32/dialogs.c
index 6c5db44..fd401b5 100644
--- a/dlls/shell32/dialogs.c
+++ b/dlls/shell32/dialogs.c
@@ -49,7 +49,7 @@ typedef struct
UINT uFlags ;
} RUNFILEDLGPARAMS ;
-typedef BOOL (*LPFNOFN) (OPENFILENAMEA *) ;
+typedef BOOL (*WINAPI LPFNOFN) (OPENFILENAMEA *) ;
WINE_DEFAULT_DEBUG_CHANNEL(shell);
static INT_PTR CALLBACK RunDlgProc (HWND, UINT, WPARAM, LPARAM) ;
@@ -178,8 +178,8 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
{
HMODULE hComdlg = NULL ;
LPFNOFN ofnProc = NULL ;
- static char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ;
- static OPENFILENAMEA ofn =
+ char szFName[1024] = "", szFileTitle[256] = "", szInitDir[768] = "" ;
+ OPENFILENAMEA ofn =
{
sizeof (OPENFILENAMEA),
NULL,
@@ -211,7 +211,7 @@ static INT_PTR CALLBACK RunDlgProc (HWND hwnd, UINT message, WPARAM wParam, LPAR
return TRUE ;
}
- if ((LPFNOFN)NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameA")))
+ if (NULL == (ofnProc = (LPFNOFN)GetProcAddress (hComdlg, "GetOpenFileNameA")))
{
MessageBoxA (hwnd, "Unable to display dialog box (GetProcAddress) !", "Nix", MB_OK | MB_ICONEXCLAMATION) ;
return TRUE ;
More information about the wine-cvs
mailing list