Skip to content

Commit 036ab3e

Browse files
committed
specify the calling convention for PFNRegGetValueA
This should fix crashes on 32-bit systems, such as this one: http://www.cpantesters.org/cpan/report/aea51067-79ae-1014-8029-261ce9d0f34b Strangely enough, despite using the wrong calling convention, this code wasn't crashing with 32-bit Visual C++.
1 parent 361e8d1 commit 036ab3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Win32.xs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ typedef int (__stdcall *PFNDllUnregisterServer)(void);
3030
typedef BOOL (__stdcall *PFNIsUserAnAdmin)(void);
3131
typedef BOOL (WINAPI *PFNGetProductInfo)(DWORD, DWORD, DWORD, DWORD, DWORD*);
3232
typedef void (WINAPI *PFNGetNativeSystemInfo)(LPSYSTEM_INFO lpSystemInfo);
33-
typedef LONG (*PFNRegGetValueA)(HKEY, LPCSTR, LPCSTR, DWORD, LPDWORD, PVOID, LPDWORD);
33+
typedef LONG (WINAPI *PFNRegGetValueA)(HKEY, LPCSTR, LPCSTR, DWORD, LPDWORD, PVOID, LPDWORD);
3434

3535
#ifndef CSIDL_MYMUSIC
3636
# define CSIDL_MYMUSIC 0x000D

0 commit comments

Comments
 (0)