Skip to content

Commit

Permalink
Fix calling convention for WNet function pointers (#192)
Browse files Browse the repository at this point in the history
Nice and simple.  Thanks.
  • Loading branch information
carlo-bramini authored and Craig Wittenberg committed Jul 27, 2018
1 parent e5a117a commit cca6df3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/winfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -1012,31 +1012,31 @@ BOOL LoadUxTheme(VOID);
#define WAITNET_TYPELOADED bNetTypeLoad
#define WAITNET_SHARELOADED bNetShareLoad

Extern DWORD (*lpfnWNetCloseEnum)(HANDLE);
Extern DWORD (*lpfnWNetConnectionDialog2)(HWND, DWORD, LPWSTR, UINT);
Extern DWORD (*lpfnWNetDisconnectDialog2)(HWND, UINT, LPWSTR, UINT);
Extern DWORD (*lpfnWNetEnumResourceW)(HANDLE, LPDWORD, LPVOID, LPDWORD);
Extern DWORD (*lpfnWNetGetConnection2W)(LPWSTR, WNET_CONNECTIONINFO *, LPDWORD);
Extern DWORD (*lpfnWNetGetDirectoryTypeW)(LPWSTR, LPDWORD, BOOL);
Extern DWORD (*lpfnWNetGetLastErrorW)(LPDWORD, LPWSTR, DWORD, LPWSTR, DWORD);
Extern DWORD (*lpfnWNetGetPropertyTextW)(WORD, WORD, LPWSTR, LPWSTR, WORD, WORD);
Extern DWORD (*lpfnWNetOpenEnumW)(DWORD, DWORD, DWORD, LPNETRESOURCE, LPHANDLE);
Extern DWORD (*lpfnWNetPropertyDialogW)(HWND, WORD, WORD, LPWSTR, WORD);
Extern DWORD (*lpfnWNetRestoreConnectionW)(HWND, LPWSTR);
Extern DWORD (*lpfnWNetRestoreSingleConnectionW)(HWND, LPWSTR, BOOL);
Extern DWORD (*lpfnWNetFormatNetworkNameW)(
Extern DWORD (CALLBACK *lpfnWNetCloseEnum)(HANDLE);
Extern DWORD (CALLBACK *lpfnWNetConnectionDialog2)(HWND, DWORD, LPWSTR, UINT);
Extern DWORD (CALLBACK *lpfnWNetDisconnectDialog2)(HWND, UINT, LPWSTR, UINT);
Extern DWORD (CALLBACK *lpfnWNetEnumResourceW)(HANDLE, LPDWORD, LPVOID, LPDWORD);
Extern DWORD (CALLBACK *lpfnWNetGetConnection2W)(LPWSTR, WNET_CONNECTIONINFO *, LPDWORD);
Extern DWORD (CALLBACK *lpfnWNetGetDirectoryTypeW)(LPWSTR, LPDWORD, BOOL);
Extern DWORD (CALLBACK *lpfnWNetGetLastErrorW)(LPDWORD, LPWSTR, DWORD, LPWSTR, DWORD);
Extern DWORD (CALLBACK *lpfnWNetGetPropertyTextW)(WORD, WORD, LPWSTR, LPWSTR, WORD, WORD);
Extern DWORD (CALLBACK *lpfnWNetOpenEnumW)(DWORD, DWORD, DWORD, LPNETRESOURCE, LPHANDLE);
Extern DWORD (CALLBACK *lpfnWNetPropertyDialogW)(HWND, WORD, WORD, LPWSTR, WORD);
Extern DWORD (CALLBACK *lpfnWNetRestoreConnectionW)(HWND, LPWSTR);
Extern DWORD (CALLBACK *lpfnWNetRestoreSingleConnectionW)(HWND, LPWSTR, BOOL);
Extern DWORD (CALLBACK *lpfnWNetFormatNetworkNameW)(
LPCWSTR lpProvider,
LPCWSTR lpRemoteName,
LPWSTR lpFormattedName,
LPDWORD lpnLength,
DWORD dwFlags,
DWORD dwAveCharPerLine
);
Extern DWORD (*lpfnShareCreate)(HWND);
Extern DWORD (*lpfnShareStop)(HWND);
Extern DWORD (CALLBACK *lpfnShareCreate)(HWND);
Extern DWORD (CALLBACK *lpfnShareStop)(HWND);

#ifdef NETCHECK
Extern DWORD (*lpfnWNetDirectoryNotifyW)(HWND, LPWSTR, DWORD);
Extern DWORD (CALLBACK *lpfnWNetDirectoryNotifyW)(HWND, LPWSTR, DWORD);
#endif

#define NETWORK_WNetCloseEnum "WNetCloseEnum"
Expand Down

0 comments on commit cca6df3

Please sign in to comment.