OSDN Git Service

Redo the filters based on assumptions discussed in mingw-dvlpr list.
authorEarnie Boyd <earnie@users.sourceforge.net>
Thu, 13 Sep 2012 20:50:21 +0000 (16:50 -0400)
committerEarnie Boyd <earnie@users.sourceforge.net>
Thu, 13 Sep 2012 20:50:21 +0000 (16:50 -0400)
* include/rapi.h (_mingw.h): Include.
* include/raserror.h: Ditto.
* include/rassapi.h: Ditto.
* include/regstr.h: Ditto.
* include/richole.h: Ditto.
* include/rpc.h: Ditto.
* include/rpcndr.h: Ditto.
* include/rpcnsip.h: Ditto.
* include/rpcnterr.h: Ditto.
* include/rpcproxy.h: Ditto.
* include/schannel.h: Ditto.
* include/schnlsp.h: Ditto.
* include/scrnsave.h: Ditto.
* include/security.h: Ditto.
* include/servprov.h: Ditto.

* include/search.h (_mingw.h): Remove comment and move to top of file.
* include/setjmp.h: Ditto.
* include/share.h: Ditto.

* include/rasdlg.h (_mingw.h): Include.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
* include/richedit.h: Ditto.
* include/rpcdce2.h: Ditto.
* include/rpcdcep.h: Ditto.
* include/rpcnsi.h: Ditto.
* include/setupapi.h: Ditto.

* include/reason.h (_mingw.h): Include.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.
* include/routprot.h: Ditto.

* include/shellapi.h (_mingw.h): Include.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer.
(UNICODE): Use __AW() macro for mapping non-specific symbols.

* include/shldisp.h (_mingw.h): Include.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer.

* include/rpcdce.h (_mingw.h): Include.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.
* include/rtutils.h: Ditto.
* include/sddl.h: Ditto.
* include/secext.h: Ditto.
* include/shlguid.h: Ditto.

* include/ras.h (_mingw.h): Include.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
(WINVER): Use _WIN32_WINNT instead.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.

* include/shlobj.h (_mingw.h): Include.
(UNICODE): Use __AW() macro for mapping non-specific symbols.
(_WIN32_WINNT): Use MACRO constant for comparison instead of integer
and move filters to the end of the file.
(_WIN32_IE): Move filters to the end of the file.

* include/sdkddkver.h (_WIN32_WINNT_WIN4E): Add new symbol.
(_mingw.h): Document to not include the file since _mingw.h includes
this file.

* TODO: Add entries.

* NOTES: New file.

39 files changed:
ChangeLog
NOTES [new file with mode: 0644]
TODO
include/rapi.h
include/ras.h
include/rasdlg.h
include/raserror.h
include/rassapi.h
include/reason.h
include/regstr.h
include/richedit.h
include/richole.h
include/routprot.h
include/rpc.h
include/rpcdce.h
include/rpcdce2.h
include/rpcdcep.h
include/rpcndr.h
include/rpcnsi.h
include/rpcnsip.h
include/rpcnterr.h
include/rpcproxy.h
include/rtutils.h
include/schannel.h
include/schnlsp.h
include/scrnsave.h
include/sddl.h
include/sdkddkver.h
include/search.h
include/secext.h
include/security.h
include/servprov.h
include/setjmp.h
include/setupapi.h
include/share.h
include/shellapi.h
include/shldisp.h
include/shlguid.h
include/shlobj.h

index 7bda1ad..8143cff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,76 @@
+2012-09-13  Earnie Boyd  <earnie@users.sourceforge.net>
+
+       Redo the filters based on assumptions discussed in mingw-dvlpr list.
+
+       * include/rapi.h (_mingw.h): Include.
+       * include/raserror.h: Ditto.
+       * include/rassapi.h: Ditto.
+       * include/regstr.h: Ditto.
+       * include/richole.h: Ditto.
+       * include/rpc.h: Ditto.
+       * include/rpcndr.h: Ditto.
+       * include/rpcnsip.h: Ditto.
+       * include/rpcnterr.h: Ditto.
+       * include/rpcproxy.h: Ditto.
+       * include/schannel.h: Ditto.
+       * include/schnlsp.h: Ditto.
+       * include/scrnsave.h: Ditto.
+       * include/security.h: Ditto.
+       * include/servprov.h: Ditto.
+
+       * include/search.h (_mingw.h): Remove comment and move to top of file.
+       * include/setjmp.h: Ditto.
+       * include/share.h: Ditto.
+
+       * include/rasdlg.h (_mingw.h): Include.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       * include/richedit.h: Ditto.
+       * include/rpcdce2.h: Ditto.
+       * include/rpcdcep.h: Ditto.
+       * include/rpcnsi.h: Ditto.
+       * include/setupapi.h: Ditto.
+
+       * include/reason.h (_mingw.h): Include.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+       * include/routprot.h: Ditto.
+
+       * include/shellapi.h (_mingw.h): Include.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+
+       * include/shldisp.h (_mingw.h): Include.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer.
+
+       * include/rpcdce.h (_mingw.h): Include.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+       * include/rtutils.h: Ditto.
+       * include/sddl.h: Ditto.
+       * include/secext.h: Ditto.
+       * include/shlguid.h: Ditto.
+
+       * include/ras.h (_mingw.h): Include.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       (WINVER): Use _WIN32_WINNT instead.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+
+       * include/shlobj.h (_mingw.h): Include.
+       (UNICODE): Use __AW() macro for mapping non-specific symbols.
+       (_WIN32_WINNT): Use MACRO constant for comparison instead of integer
+       and move filters to the end of the file.
+       (_WIN32_IE): Move filters to the end of the file.
+
+       * include/sdkddkver.h (_WIN32_WINNT_WIN4E): Add new symbol.
+       (_mingw.h): Document to not include the file since _mingw.h includes
+       this file.
+
+       * TODO: Add entries.
+
+       * NOTES: New file.
+
 2012-09-12  Earnie Boyd  <earnie@users.sourceforge.net>
 
        Redo the filters based on assumptions discussed in mingw-dvlpr list.
diff --git a/NOTES b/NOTES
new file mode 100644 (file)
index 0000000..7c44fb4
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,4 @@
+WINVER < 0x0400 indicates Windows NT 3.5 and 3.51
+WINVER = 0x0400 indicates Windows 95, 98 and NT4.
+WINVER > 0x0400 indicates NT4 with enhancements.
+WINVER = 0x0500 indicates Windows 2000
diff --git a/TODO b/TODO
index d32d0e6..431e529 100644 (file)
--- a/TODO
+++ b/TODO
@@ -9,3 +9,18 @@
 ** objbase.h - DBG, how does MS set this macro?
 ** objidl.h - Commented out code in PROVARIANT struct.
 ** odbcinst.h - UNICODE??
+** ras.h - WINNT35COMPATIBLE??
+** rpc.h - SEH??
+** rpcdce.h - RPC_UNICODE_SUPPORTED
+** rpcdce2.h - RPC_UNICODE_SUPPORTED
+** rpcdcep.h - __RPC_NT__??
+** rpcndr.h - CONST_VTABLE, _M_IX86, __MIDL_USER_DEFINED
+** rpcnsi.h - UNICODE_ONLY, RPC_UNICODE_SUPPORTED
+** rpcproxy.h - NT35_STRICT, PROXY_CLSID, PROXY_CLSID_IS, PROXY_DELEGATION,
+               REGISTER_PROXY_DLL, USE_SUBLESS_PROXY
+             - Should the CINTERFACE warning be and error?
+** sddl.h - WINADVAPI
+** servprov.h - COBJMACROS
+** setupapi.h - _SETUPAPI_VER???, USE_SP_DRVINFO_DATA_V1
+** shldisp.h - COBJMACROS
+** shlobj.h - COBJMACROS, _FIX_ENABLEMODELESS_CONFLICT
index b54f730..dd5e049 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RAPI_H
 #define _RAPI_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 typedef struct IRAPIStream
 {
index b3a516f..36ea906 100644 (file)
 #ifndef _RAS_H
 #define _RAS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C"
 {
 #endif
 
-#ifndef _LMCONS_H
 #include <lmcons.h>
-#endif
 
 /* TODO
 include <basetsd.h> from winnt.h so that this typedef is not necessary
@@ -94,18 +93,6 @@ typedef unsigned long ULONG_PTR, *PULONG_PTR;
 #define RASEO_NetworkLogon              0x00002000
 #define RASEO_UseLogonCredentials       0x00004000
 #define RASEO_PromoteAlternates         0x00008000
-#if (WINVER >= 0x501)
-#define RASEO2_SecureFileAndPrint       0x00000001
-#define RASEO2_SecureClientForMSNet     0x00000002
-#define RASEO2_DontNegotiateMultilink   0x00000004
-#define RASEO2_DontUseRasCredentials    0x00000008
-#define RASEO2_UsePreSharedKey          0x00000010
-#define RASEO2_Internet                 0x00000020
-#define RASEO2_DisableNbtOverIP         0x00000040
-#define RASEO2_UseGlobalDeviceSettings  0x00000080
-#define RASEO2_ReconnectIfDropped       0x00000100
-#define RASEO2_SharePhoneNumbers        0x00000200
-#endif         
 #define RASNP_NetBEUI                   0x00000001
 #define RASNP_Ipx                       0x00000002
 #define RASNP_Ip                        0x00000004
@@ -129,75 +116,6 @@ typedef unsigned long ULONG_PTR, *PULONG_PTR;
 #define RASET_Vpn       2
 #define RASET_Direct    3
 #define RASET_Internet  4
-#if (WINVER >= 0x401)
-#define RASEO_SecureLocalFiles  0x00010000
-#define RASCN_Connection        0x00000001
-#define RASCN_Disconnection     0x00000002
-#define RASCN_BandwidthAdded    0x00000004
-#define RASCN_BandwidthRemoved  0x00000008
-#define RASEDM_DialAll          1
-#define RASEDM_DialAsNeeded     2
-#define RASIDS_Disabled         0xffffffff
-#define RASIDS_UseGlobalValue   0
-#define RASADFLG_PositionDlg    0x00000001
-#define RASCM_UserName       0x00000001
-#define RASCM_Password       0x00000002
-#define RASCM_Domain         0x00000004
-#define RASADP_DisableConnectionQuery   0
-#define RASADP_LoginSessionDisable      1
-#define RASADP_SavedAddressesLimit      2
-#define RASADP_FailedConnectionTimeout  3
-#define RASADP_ConnectionQueryTimeout   4
-#endif  /* (WINVER >= 0x401) */
-#if (WINVER >= 0x500)
-#define RDEOPT_CustomDial   0x00001000
-#define RASLCPAP_PAP        0xC023
-#define RASLCPAP_SPAP       0xC027
-#define RASLCPAP_CHAP       0xC223
-#define RASLCPAP_EAP        0xC227
-#define RASLCPAD_CHAP_MD5   0x05
-#define RASLCPAD_CHAP_MS    0x80
-#define RASLCPAD_CHAP_MSV2  0x81
-#define RASLCPO_PFC         0x00000001
-#define RASLCPO_ACFC        0x00000002
-#define RASLCPO_SSHF        0x00000004
-#define RASLCPO_DES_56      0x00000008
-#define RASLCPO_3_DES       0x00000010
-#define RASCCPCA_MPPC       0x00000006
-#define RASCCPCA_STAC       0x00000005
-#define RASCCPO_Compression         0x00000001
-#define RASCCPO_HistoryLess         0x00000002
-#define RASCCPO_Encryption56bit     0x00000010
-#define RASCCPO_Encryption40bit     0x00000020
-#define RASCCPO_Encryption128bit    0x00000040
-#define RASEO_RequireEAP            0x00020000
-#define RASEO_RequirePAP            0x00040000
-#define RASEO_RequireSPAP           0x00080000
-#define RASEO_Custom                0x00100000
-#define RASEO_PreviewPhoneNumber    0x00200000
-#define RASEO_SharedPhoneNumbers    0x00800000
-#define RASEO_PreviewUserPw         0x01000000
-#define RASEO_PreviewDomain         0x02000000
-#define RASEO_ShowDialingProgress   0x04000000
-#define RASEO_RequireCHAP           0x08000000
-#define RASEO_RequireMsCHAP         0x10000000
-#define RASEO_RequireMsCHAP2        0x20000000
-#define RASEO_RequireW95MSCHAP      0x40000000
-#define RASEO_CustomScript          0x80000000
-#define RASIPO_VJ                   0x00000001
-#define RCD_SingleUser              0
-#define RCD_AllUsers                0x00000001
-#define RCD_Eap                     0x00000002
-#define RASEAPF_NonInteractive      0x00000002
-#define RASEAPF_Logon               0x00000004
-#define RASEAPF_Preview             0x00000008
-#define ET_40Bit        1
-#define ET_128Bit       2
-#define ET_None         0
-#define ET_Require      1
-#define ET_RequireMax   2
-#define ET_Optional     3
-#endif /* (WINVER >= 0x500) */
 
 #define RASCS_PAUSED 0x1000
 #define RASCS_DONE   0x2000
@@ -230,7 +148,7 @@ typedef enum tagRASCONNSTATE {
       RASCS_RetryAuthentication,
       RASCS_CallbackSetByCaller,
       RASCS_PasswordExpired,
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
       RASCS_InvokeEapUI,
 #endif
       RASCS_Connected = RASCS_DONE,
@@ -242,7 +160,7 @@ typedef enum tagRASPROJECTION {
     RASP_PppNbf =   0x803F,
     RASP_PppIpx =   0x802B,
     RASP_PppIp =    0x8021,
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     RASP_PppCcp =   0x80FD,
 #endif
     RASP_PppLcp =   0xC021,
@@ -256,18 +174,16 @@ typedef struct tagRASCONNW {
     DWORD dwSize;
     HRASCONN hrasconn;
     WCHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x400) 
     WCHAR szDeviceType[RAS_MaxDeviceType + 1];
     WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-#endif
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     WCHAR szPhonebook[MAX_PATH];
     DWORD dwSubEntry;
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     GUID guidEntry;
 #endif
-#if (WINVER >= 0x501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
     DWORD dwFlags;
     LUID luid;
 #endif
@@ -277,18 +193,16 @@ typedef struct tagRASCONNA {
     DWORD dwSize;
     HRASCONN hrasconn;
     CHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x400) 
     CHAR szDeviceType[RAS_MaxDeviceType + 1];
     CHAR szDeviceName[RAS_MaxDeviceName + 1];
-#endif
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     CHAR szPhonebook[MAX_PATH];
     DWORD dwSubEntry;
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     GUID guidEntry;
 #endif
-#if (WINVER >= 0x501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
     DWORD dwFlags;
     LUID luid;
 #endif
@@ -300,7 +214,7 @@ typedef struct tagRASCONNSTATUSW {
     DWORD dwError;
     WCHAR szDeviceType[RAS_MaxDeviceType + 1];
     WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
 #endif
 } RASCONNSTATUSW, *LPRASCONNSTATUSW;
@@ -311,7 +225,7 @@ typedef struct tagRASCONNSTATUSA {
     DWORD dwError;
     CHAR szDeviceType[RAS_MaxDeviceType + 1];
     CHAR szDeviceName[RAS_MaxDeviceName + 1];
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
 #endif
 } RASCONNSTATUSA, *LPRASCONNSTATUSA;
@@ -324,7 +238,7 @@ typedef struct tagRASDIALPARAMSW {
     WCHAR szUserName[UNLEN + 1];
     WCHAR szPassword[PWLEN + 1];
     WCHAR szDomain[DNLEN + 1];
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     DWORD dwSubEntry;
     ULONG_PTR dwCallbackId;
 #endif
@@ -338,25 +252,18 @@ typedef struct tagRASDIALPARAMSA {
     CHAR szUserName[UNLEN + 1];
     CHAR szPassword[PWLEN + 1];
     CHAR szDomain[DNLEN + 1];
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     DWORD dwSubEntry;
     ULONG_PTR dwCallbackId;
 #endif
 } RASDIALPARAMSA, *LPRASDIALPARAMSA;
 
-#if (WINVER >= 0x500)
-typedef struct tagRASEAPINFO {
-    DWORD dwSizeofEapInfo;
-    BYTE *pbEapInfo;
-} RASEAPINFO;
-#endif
-
 typedef struct tagRASDIALEXTENSIONS {
     DWORD dwSize;
     DWORD dwfOptions;
     HWND hwndParent;
     ULONG_PTR reserved;
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     ULONG_PTR reserved1;
     RASEAPINFO RasEapInfo;
 #endif
@@ -365,7 +272,7 @@ typedef struct tagRASDIALEXTENSIONS {
 typedef struct tagRASENTRYNAMEW {
     DWORD dwSize;
     WCHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwFlags;
     WCHAR szPhonebookPath[MAX_PATH + 1];
 #endif
@@ -374,7 +281,7 @@ typedef struct tagRASENTRYNAMEW {
 typedef struct tagRASENTRYNAMEA {
     DWORD dwSize;
     CHAR szEntryName[RAS_MaxEntryName + 1];
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwFlags;
     CHAR szPhonebookPath[MAX_PATH + 1];
 #endif
@@ -431,7 +338,7 @@ typedef struct tagRASPPPIPW {
 #ifndef WINNT35COMPATIBLE
     WCHAR szServerIpAddress[RAS_MaxIpAddress + 1];
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwOptions;
     DWORD dwServerOptions;
 #endif
@@ -444,7 +351,7 @@ typedef struct tagRASPPPIPA {
 #ifndef WINNT35COMPATIBLE
     CHAR szServerIpAddress[RAS_MaxIpAddress + 1];
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwOptions;
     DWORD dwServerOptions;
 #endif
@@ -453,7 +360,7 @@ typedef struct tagRASPPPIPA {
 typedef struct tagRASPPPLCPW {
     DWORD dwSize;
     BOOL fBundled;
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwError;
     DWORD dwAuthenticationProtocol;
     DWORD dwAuthenticationData;
@@ -473,7 +380,7 @@ typedef struct tagRASPPPLCPW {
 typedef struct tagRASPPPLCPA {
     DWORD dwSize;
     BOOL fBundled;
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwError;
     DWORD dwAuthenticationProtocol;
     DWORD dwAuthenticationData;
@@ -561,7 +468,7 @@ typedef struct tagRASENTRYW {
     DWORD dwChannels;
     DWORD dwReserved1;
     DWORD dwReserved2;
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     DWORD dwSubEntries;
     DWORD dwDialMode;
     DWORD dwDialExtraPercent;
@@ -570,7 +477,7 @@ typedef struct tagRASENTRYW {
     DWORD dwHangUpExtraSampleSeconds;
     DWORD dwIdleDisconnectSeconds;
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwType;
     DWORD dwEncryptionType;
     DWORD dwCustomAuthKey;
@@ -578,7 +485,7 @@ typedef struct tagRASENTRYW {
     WCHAR szCustomDialDll[MAX_PATH];
     DWORD dwVpnStrategy;
 #endif
-#if (WINVER >= 0x501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
        DWORD dwfOptions2;
        DWORD dwfOptions3;
        WCHAR szDnsSuffix[RAS_MaxDnsSuffix];
@@ -618,7 +525,7 @@ typedef struct tagRASENTRYA {
     DWORD dwChannels;
     DWORD dwReserved1;
     DWORD dwReserved2;
-#if (WINVER >= 0x401)
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
     DWORD dwSubEntries;
     DWORD dwDialMode;
     DWORD dwDialExtraPercent;
@@ -627,7 +534,7 @@ typedef struct tagRASENTRYA {
     DWORD dwHangUpExtraSampleSeconds;
     DWORD dwIdleDisconnectSeconds;
 #endif
-#if (WINVER >= 0x500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
     DWORD dwType;
     DWORD dwEncryptionType;
     DWORD dwCustomAuthKey;
@@ -635,7 +542,7 @@ typedef struct tagRASENTRYA {
     CHAR szCustomDialDll[MAX_PATH];
     DWORD dwVpnStrategy;
 #endif
-#if (WINVER >= 0x501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
        DWORD dwfOptions2;
        DWORD dwfOptions3;
        CHAR szDnsSuffix[RAS_MaxDnsSuffix];
@@ -648,154 +555,21 @@ typedef struct tagRASENTRYA {
 } RASENTRYA, *LPRASENTRYA;
 
 
-#if (WINVER >= 0x401)
-typedef struct tagRASADPARAMS {
-    DWORD dwSize;
-    HWND hwndOwner;
-    DWORD dwFlags;
-    LONG xDlg;
-    LONG yDlg;
-} RASADPARAMS, *LPRASADPARAMS;
-
-typedef struct tagRASSUBENTRYW {
-    DWORD dwSize;
-    DWORD dwfFlags;
-    WCHAR szDeviceType[RAS_MaxDeviceType + 1];
-    WCHAR szDeviceName[RAS_MaxDeviceName + 1];
-    WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
-    DWORD dwAlternateOffset;
-} RASSUBENTRYW, *LPRASSUBENTRYW;
-
-typedef struct tagRASSUBENTRYA {
-    DWORD dwSize;
-    DWORD dwfFlags;
-    CHAR szDeviceType[RAS_MaxDeviceType + 1];
-    CHAR szDeviceName[RAS_MaxDeviceName + 1];
-    CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
-    DWORD dwAlternateOffset;
-} RASSUBENTRYA, *LPRASSUBENTRYA;
-
-typedef struct tagRASCREDENTIALSW {
-    DWORD dwSize;
-    DWORD dwMask;
-    WCHAR szUserName[UNLEN + 1];
-    WCHAR szPassword[PWLEN + 1];
-    WCHAR szDomain[DNLEN + 1];
-} RASCREDENTIALSW, *LPRASCREDENTIALSW;
-
-typedef struct tagRASCREDENTIALSA {
-    DWORD dwSize;
-    DWORD dwMask;
-    CHAR szUserName[UNLEN + 1];
-    CHAR szPassword[PWLEN + 1];
-    CHAR szDomain[DNLEN + 1];
-} RASCREDENTIALSA, *LPRASCREDENTIALSA;
-
-typedef struct tagRASAUTODIALENTRYW {
-    DWORD dwSize;
-    DWORD dwFlags;
-    DWORD dwDialingLocation;
-    WCHAR szEntry[RAS_MaxEntryName + 1];
-} RASAUTODIALENTRYW, *LPRASAUTODIALENTRYW;
-
-typedef struct tagRASAUTODIALENTRYA {
-    DWORD dwSize;
-    DWORD dwFlags;
-    DWORD dwDialingLocation;
-    CHAR szEntry[RAS_MaxEntryName + 1];
-} RASAUTODIALENTRYA, *LPRASAUTODIALENTRYA;
-#endif /* (WINVER >= 0x401) */
-
-#if (WINVER >= 0x500)
-typedef struct tagRASPPPCCP {
-    DWORD dwSize;
-    DWORD dwError;
-    DWORD dwCompressionAlgorithm;
-    DWORD dwOptions;
-    DWORD dwServerCompressionAlgorithm;
-    DWORD dwServerOptions;
-} RASPPPCCP, *LPRASPPPCCP;
-
-typedef struct tagRASEAPUSERIDENTITYW {
-    WCHAR szUserName[UNLEN + 1];
-    DWORD dwSizeofEapInfo;
-    BYTE pbEapInfo[1];
-} RASEAPUSERIDENTITYW, *LPRASEAPUSERIDENTITYW;
-
-typedef struct tagRASEAPUSERIDENTITYA {
-    CHAR szUserName[UNLEN + 1];
-    DWORD dwSizeofEapInfo;
-    BYTE pbEapInfo[1];
-} RASEAPUSERIDENTITYA, *LPRASEAPUSERIDENTITYA;
-
-typedef struct tagRAS_STATS {
-    DWORD dwSize;
-    DWORD dwBytesXmited;
-    DWORD dwBytesRcved;
-    DWORD dwFramesXmited;
-    DWORD dwFramesRcved;
-    DWORD dwCrcErr;
-    DWORD dwTimeoutErr;
-    DWORD dwAlignmentErr;
-    DWORD dwHardwareOverrunErr;
-    DWORD dwFramingErr;
-    DWORD dwBufferOverrunErr;
-    DWORD dwCompressionRatioIn;
-    DWORD dwCompressionRatioOut;
-    DWORD dwBps;
-    DWORD dwConnectDuration;
-} RAS_STATS, *PRAS_STATS;
-#endif /* (WINVER >= 0x500) */
-
 
 /* UNICODE typedefs for structures*/
-#ifdef UNICODE
-typedef RASCONNW RASCONN, *LPRASCONN;
-typedef RASENTRYW  RASENTRY, *LPRASENTRY;
-typedef RASCONNSTATUSW RASCONNSTATUS, *LPRASCONNSTATUS;
-typedef RASDIALPARAMSW RASDIALPARAMS, *LPRASDIALPARAMS;
-typedef RASAMBW RASAMB, *LPRASAM;
-typedef RASPPPNBFW RASPPPNBF, *LPRASPPPNBF;
-typedef RASPPPIPXW RASPPPIPX, *LPRASPPPIPX;
-typedef RASPPPIPW RASPPPIP, *LPRASPPPIP; 
-typedef RASPPPLCPW RASPPPLCP, *LPRASPPPLCP;
-typedef RASSLIPW RASSLIP, *LPRASSLIP;
-typedef RASDEVINFOW  RASDEVINFO, *LPRASDEVINFO;
-typedef RASENTRYNAMEW RASENTRYNAME, *LPRASENTRYNAME;
-
-#if (WINVER >= 0x401)
-typedef RASSUBENTRYW RASSUBENTRY, *LPRASSUBENTRY;
-typedef RASCREDENTIALSW RASCREDENTIALS, *LPRASCREDENTIALS;
-typedef RASAUTODIALENTRYW RASAUTODIALENTRY, *LPRASAUTODIALENTRY;
-#endif /* (WINVER >= 0x401) */
-
-#if (WINVER >= 0x500)
-typedef RASEAPUSERIDENTITYW RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
-#endif /* (WINVER >= 0x500) */
-
-#else  /* ! defined UNICODE */
-typedef RASCONNA RASCONN, *LPRASCONN;
-typedef RASENTRYA  RASENTRY, *LPRASENTRY;
-typedef RASCONNSTATUSA RASCONNSTATUS, *LPRASCONNSTATUS;
-typedef RASDIALPARAMSA RASDIALPARAMS, *LPRASDIALPARAMS;
-typedef RASAMBA RASAMB, *LPRASAM;
-typedef RASPPPNBFA RASPPPNBF, *LPRASPPPNBF;
-typedef RASPPPIPXA RASPPPIPX, *LPRASPPPIPX;
-typedef RASPPPIPA RASPPPIP, *LPRASPPPIP;
-typedef RASPPPLCPA RASPPPLCP, *LPRASPPPLCP;
-typedef RASSLIPA RASSLIP, *LPRASSLIP;
-typedef RASDEVINFOA  RASDEVINFO, *LPRASDEVINFO;
-typedef RASENTRYNAMEA RASENTRYNAME, *LPRASENTRYNAME;
-
-#if (WINVER >= 0x401)
-typedef RASSUBENTRYA RASSUBENTRY, *LPRASSUBENTRY;
-typedef RASCREDENTIALSA RASCREDENTIALS, *LPRASCREDENTIALS;
-typedef RASAUTODIALENTRYA RASAUTODIALENTRY, *LPRASAUTODIALENTRY;
-#endif /*(WINVER >= 0x401)*/
-#if (WINVER >= 0x500)
-typedef RASEAPUSERIDENTITYA RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
-#endif /* (WINVER >= 0x500) */
-#endif /* ! UNICODE */
+typedef __AW(RASCONN) RASCONN, *LPRASCONN;
+typedef __AW(RASENTRYW) RASENTRY, *LPRASENTRY;
+typedef __AW(RASCONNSTATUS) RASCONNSTATUS, *LPRASCONNSTATUS;
+typedef __AW(RASDIALPARAMS) RASDIALPARAMS, *LPRASDIALPARAMS;
+typedef __AW(RASAMB) RASAMB, *LPRASAM;
+typedef __AW(RASPPPNBF) RASPPPNBF, *LPRASPPPNBF;
+typedef __AW(RASPPPIPX) RASPPPIPX, *LPRASPPPIPX;
+typedef __AW(RASPPPIP) RASPPPIP, *LPRASPPPIP; 
+typedef __AW(RASPPPLCP) RASPPPLCP, *LPRASPPPLCP;
+typedef __AW(RASSLIP) RASSLIP, *LPRASSLIP;
+typedef __AW(RASDEVINFOW) RASDEVINFO, *LPRASDEVINFO;
+typedef __AW(RASENTRYNAME) RASENTRYNAME, *LPRASENTRYNAME;
+
 
 /* Callback prototypes */
 typedef BOOL (WINAPI * ORASADFUNC) (HWND, LPSTR, DWORD, LPDWORD); /* deprecated */
@@ -853,7 +627,61 @@ DWORD APIENTRY RasDeleteEntryW (LPCWSTR, LPCWSTR);
 DWORD APIENTRY RasValidateEntryNameA (LPCSTR, LPCSTR);
 DWORD APIENTRY RasValidateEntryNameW (LPCWSTR, LPCWSTR);
 
-#if (WINVER >= 0x401)
+
+/* UNICODE defines for functions */
+#define RasDial __AW(RasDial)
+#define RasEnumConnections __AW(RasEnumConnections)
+#define RasEnumEntries __AW(RasEnumEntries)
+#define RasGetConnectStatus __AW(RasGetConnectStatus)
+#define RasGetErrorString __AW(RasGetErrorString)
+#define RasHangUp __AW(RasHangUp)
+#define RasGetProjectionInfo __AW(RasGetProjectionInfo)
+#define RasCreatePhonebookEntry __AW(RasCreatePhonebookEntry)
+#define RasEditPhonebookEntry __AW(RasEditPhonebookEntry)
+#define RasSetEntryDialParams __AW(RasSetEntryDialParams)
+#define RasGetEntryDialParams __AW(RasGetEntryDialParams)
+#define RasEnumDevices __AW(RasEnumDevices)
+#define RasGetCountryInfo __AW(RasGetCountryInfo)
+#define RasGetEntryProperties __AW(RasGetEntryProperties)
+#define RasSetEntryProperties __AW(RasSetEntryProperties)
+#define RasRenameEntry __AW(RasRenameEntry)
+#define RasDeleteEntry __AW(RasDeleteEntry)
+#define RasValidateEntryName __AW(RasValidateEntryName)
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_NT4E)
+#define RASADFUNC __AW(RASADFUNC)
+#define RasGetSubEntryHandle __AW(RasGetSubEntryHandle)
+#define RasConnectionNotification __AW(RasConnectionNotification)
+#define RasGetSubEntryProperties __AW(RasGetSubEntryProperties)
+#define RasSetSubEntryProperties __AW(RasSetSubEntryProperties)
+#define RasGetCredentials __AW(RasGetCredentials)
+#define RasSetCredentials __AW(RasSetCredentials)
+#define RasGetAutodialAddress __AW(RasGetAutodialAddress)
+#define RasSetAutodialAddress __AW(RasSetAutodialAddress)
+#define RasEnumAutodialAddresses __AW(RasEnumAutodialAddresses)
+#define RasGetAutodialEnable __AW(RasGetAutodialEnable)
+#define RasSetAutodialEnable __AW(RasSetAutodialEnable)
+#define RasGetAutodialParam __AW(RasGetAutodialParam)
+#define RasSetAutodialParam __AW(RasSetAutodialParam)
+#define RASEO_SecureLocalFiles  0x00010000
+#define RASCN_Connection        0x00000001
+#define RASCN_Disconnection     0x00000002
+#define RASCN_BandwidthAdded    0x00000004
+#define RASCN_BandwidthRemoved  0x00000008
+#define RASEDM_DialAll          1
+#define RASEDM_DialAsNeeded     2
+#define RASIDS_Disabled         0xffffffff
+#define RASIDS_UseGlobalValue   0
+#define RASADFLG_PositionDlg    0x00000001
+#define RASCM_UserName       0x00000001
+#define RASCM_Password       0x00000002
+#define RASCM_Domain         0x00000004
+#define RASADP_DisableConnectionQuery   0
+#define RASADP_LoginSessionDisable      1
+#define RASADP_SavedAddressesLimit      2
+#define RASADP_FailedConnectionTimeout  3
+#define RASADP_ConnectionQueryTimeout   4
+
 typedef BOOL (WINAPI * RASADFUNCA) (LPSTR, LPSTR, LPRASADPARAMS, LPDWORD);
 typedef BOOL (WINAPI * RASADFUNCW) (LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD);
 
@@ -891,9 +719,126 @@ DWORD APIENTRY RasGetAutodialParamA (DWORD, LPVOID, LPDWORD);
 DWORD APIENTRY RasGetAutodialParamW (DWORD, LPVOID, LPDWORD);
 DWORD APIENTRY RasSetAutodialParamA (DWORD, LPVOID, DWORD);
 DWORD APIENTRY RasSetAutodialParamW (DWORD, LPVOID, DWORD);
-#endif
+typedef __AW(RASSUBENTRY) RASSUBENTRY, *LPRASSUBENTRY;
+typedef __AW(RASCREDENTIALS) RASCREDENTIALS, *LPRASCREDENTIALS;
+typedef __AW(RASAUTODIALENTRY) RASAUTODIALENTRY, *LPRASAUTODIALENTRY;
+typedef struct tagRASADPARAMS {
+    DWORD dwSize;
+    HWND hwndOwner;
+    DWORD dwFlags;
+    LONG xDlg;
+    LONG yDlg;
+} RASADPARAMS, *LPRASADPARAMS;
+
+typedef struct tagRASSUBENTRYW {
+    DWORD dwSize;
+    DWORD dwfFlags;
+    WCHAR szDeviceType[RAS_MaxDeviceType + 1];
+    WCHAR szDeviceName[RAS_MaxDeviceName + 1];
+    WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
+    DWORD dwAlternateOffset;
+} RASSUBENTRYW, *LPRASSUBENTRYW;
+
+typedef struct tagRASSUBENTRYA {
+    DWORD dwSize;
+    DWORD dwfFlags;
+    CHAR szDeviceType[RAS_MaxDeviceType + 1];
+    CHAR szDeviceName[RAS_MaxDeviceName + 1];
+    CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
+    DWORD dwAlternateOffset;
+} RASSUBENTRYA, *LPRASSUBENTRYA;
 
-#if (WINVER >= 0x500)
+typedef struct tagRASCREDENTIALSW {
+    DWORD dwSize;
+    DWORD dwMask;
+    WCHAR szUserName[UNLEN + 1];
+    WCHAR szPassword[PWLEN + 1];
+    WCHAR szDomain[DNLEN + 1];
+} RASCREDENTIALSW, *LPRASCREDENTIALSW;
+
+typedef struct tagRASCREDENTIALSA {
+    DWORD dwSize;
+    DWORD dwMask;
+    CHAR szUserName[UNLEN + 1];
+    CHAR szPassword[PWLEN + 1];
+    CHAR szDomain[DNLEN + 1];
+} RASCREDENTIALSA, *LPRASCREDENTIALSA;
+
+typedef struct tagRASAUTODIALENTRYW {
+    DWORD dwSize;
+    DWORD dwFlags;
+    DWORD dwDialingLocation;
+    WCHAR szEntry[RAS_MaxEntryName + 1];
+} RASAUTODIALENTRYW, *LPRASAUTODIALENTRYW;
+
+typedef struct tagRASAUTODIALENTRYA {
+    DWORD dwSize;
+    DWORD dwFlags;
+    DWORD dwDialingLocation;
+    CHAR szEntry[RAS_MaxEntryName + 1];
+} RASAUTODIALENTRYA, *LPRASAUTODIALENTRYA;
+
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_NT4E) */
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
+#define RasGetEapUserData __AW(RasGetEapUserData)
+#define RasSetEapUserData __AW(RasSetEapUserData)
+#define RasGetCustomAuthData __AW(RasGetCustomAuthData)
+#define RasSetCustomAuthData __AW(RasSetCustomAuthData)
+#define RasGetEapUserIdentity __AW(RasGetEapUserIdentity)
+#define RasFreeEapUserIdentity __AW(RasFreeEapUserIdentity)
+#define RDEOPT_CustomDial   0x00001000
+#define RASLCPAP_PAP        0xC023
+#define RASLCPAP_SPAP       0xC027
+#define RASLCPAP_CHAP       0xC223
+#define RASLCPAP_EAP        0xC227
+#define RASLCPAD_CHAP_MD5   0x05
+#define RASLCPAD_CHAP_MS    0x80
+#define RASLCPAD_CHAP_MSV2  0x81
+#define RASLCPO_PFC         0x00000001
+#define RASLCPO_ACFC        0x00000002
+#define RASLCPO_SSHF        0x00000004
+#define RASLCPO_DES_56      0x00000008
+#define RASLCPO_3_DES       0x00000010
+#define RASCCPCA_MPPC       0x00000006
+#define RASCCPCA_STAC       0x00000005
+#define RASCCPO_Compression         0x00000001
+#define RASCCPO_HistoryLess         0x00000002
+#define RASCCPO_Encryption56bit     0x00000010
+#define RASCCPO_Encryption40bit     0x00000020
+#define RASCCPO_Encryption128bit    0x00000040
+#define RASEO_RequireEAP            0x00020000
+#define RASEO_RequirePAP            0x00040000
+#define RASEO_RequireSPAP           0x00080000
+#define RASEO_Custom                0x00100000
+#define RASEO_PreviewPhoneNumber    0x00200000
+#define RASEO_SharedPhoneNumbers    0x00800000
+#define RASEO_PreviewUserPw         0x01000000
+#define RASEO_PreviewDomain         0x02000000
+#define RASEO_ShowDialingProgress   0x04000000
+#define RASEO_RequireCHAP           0x08000000
+#define RASEO_RequireMsCHAP         0x10000000
+#define RASEO_RequireMsCHAP2        0x20000000
+#define RASEO_RequireW95MSCHAP      0x40000000
+#define RASEO_CustomScript          0x80000000
+#define RASIPO_VJ                   0x00000001
+#define RCD_SingleUser              0
+#define RCD_AllUsers                0x00000001
+#define RCD_Eap                     0x00000002
+#define RASEAPF_NonInteractive      0x00000002
+#define RASEAPF_Logon               0x00000004
+#define RASEAPF_Preview             0x00000008
+#define ET_40Bit        1
+#define ET_128Bit       2
+#define ET_None         0
+#define ET_Require      1
+#define ET_RequireMax   2
+#define ET_Optional     3
+
+typedef struct tagRASEAPINFO {
+    DWORD dwSizeofEapInfo;
+    BYTE *pbEapInfo;
+} RASEAPINFO;
 typedef DWORD (WINAPI * RasCustomHangUpFn) (HRASCONN);
 typedef DWORD (WINAPI * RasCustomDeleteEntryNotifyFn) (LPCTSTR,        LPCTSTR, DWORD);
 typedef DWORD (WINAPI * RasCustomDialFn) (HINSTANCE, LPRASDIALEXTENSIONS,
@@ -916,103 +861,65 @@ DWORD APIENTRY RasGetEapUserIdentityW (LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUS
 DWORD APIENTRY RasGetEapUserIdentityA (LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);
 VOID APIENTRY RasFreeEapUserIdentityW (LPRASEAPUSERIDENTITYW);
 VOID APIENTRY RasFreeEapUserIdentityA (LPRASEAPUSERIDENTITYA);
-#endif  /* (WINVER >= 0x500) */
+typedef __AW(RASEAPUSERIDENTITY) RASEAPUSERIDENTITY, *LPRASEAPUSERIDENTITY;
+typedef struct tagRASPPPCCP {
+    DWORD dwSize;
+    DWORD dwError;
+    DWORD dwCompressionAlgorithm;
+    DWORD dwOptions;
+    DWORD dwServerCompressionAlgorithm;
+    DWORD dwServerOptions;
+} RASPPPCCP, *LPRASPPPCCP;
 
+typedef struct tagRASEAPUSERIDENTITYW {
+    WCHAR szUserName[UNLEN + 1];
+    DWORD dwSizeofEapInfo;
+    BYTE pbEapInfo[1];
+} RASEAPUSERIDENTITYW, *LPRASEAPUSERIDENTITYW;
 
-/* UNICODE defines for functions */
-#ifdef UNICODE
-#define RasDial RasDialW
-#define RasEnumConnections RasEnumConnectionsW
-#define RasEnumEntries RasEnumEntriesW
-#define RasGetConnectStatus RasGetConnectStatusW
-#define RasGetErrorString RasGetErrorStringW
-#define RasHangUp RasHangUpW
-#define RasGetProjectionInfo RasGetProjectionInfoW
-#define RasCreatePhonebookEntry RasCreatePhonebookEntryW
-#define RasEditPhonebookEntry RasEditPhonebookEntryW
-#define RasSetEntryDialParams RasSetEntryDialParamsW
-#define RasGetEntryDialParams RasGetEntryDialParamsW
-#define RasEnumDevices RasEnumDevicesW
-#define RasGetCountryInfo RasGetCountryInfoW
-#define RasGetEntryProperties RasGetEntryPropertiesW
-#define RasSetEntryProperties RasSetEntryPropertiesW
-#define RasRenameEntry RasRenameEntryW
-#define RasDeleteEntry RasDeleteEntryW
-#define RasValidateEntryName RasValidateEntryNameW
-#if (WINVER >= 0x401)
-#define RASADFUNC RASADFUNCW
-#define RasGetSubEntryHandle RasGetSubEntryHandleW
-#define RasConnectionNotification RasConnectionNotificationW
-#define RasGetSubEntryProperties RasGetSubEntryPropertiesW
-#define RasSetSubEntryProperties RasSetSubEntryPropertiesW
-#define RasGetCredentials RasGetCredentialsW
-#define RasSetCredentials RasSetCredentialsW
-#define RasGetAutodialAddress RasGetAutodialAddressW
-#define RasSetAutodialAddress RasSetAutodialAddressW
-#define RasEnumAutodialAddresses RasEnumAutodialAddressesW
-#define RasGetAutodialEnable RasGetAutodialEnableW
-#define RasSetAutodialEnable RasSetAutodialEnableW
-#define RasGetAutodialParam RasGetAutodialParamW
-#define RasSetAutodialParam RasSetAutodialParamW
-#endif /* (WINVER >= 0x401) */
-#if (WINVER >= 0x500)
-#define RasGetEapUserData RasGetEapUserDataW
-#define RasSetEapUserData RasSetEapUserDataW
-#define RasGetCustomAuthData RasGetCustomAuthDataW
-#define RasSetCustomAuthData RasSetCustomAuthDataW
-#define RasGetEapUserIdentity RasGetEapUserIdentityW
-#define RasFreeEapUserIdentity RasFreeEapUserIdentityW
-#endif /* (WINVER >= 0x500) */
-
-#else  /* ! defined UNICODE */
-#define RasDial RasDialA
-#define RasEnumConnections RasEnumConnectionsA
-#define RasEnumEntries RasEnumEntriesA
-#define RasGetConnectStatus RasGetConnectStatusA
-#define RasGetErrorString RasGetErrorStringA
-#define RasHangUp RasHangUpA
-#define RasGetProjectionInfo RasGetProjectionInfoA
-#define RasCreatePhonebookEntry RasCreatePhonebookEntryA
-#define RasEditPhonebookEntry RasEditPhonebookEntryA
-#define RasSetEntryDialParams RasSetEntryDialParamsA
-#define RasGetEntryDialParams RasGetEntryDialParamsA
-#define RasEnumDevices RasEnumDevicesA
-#define RasGetCountryInfo RasGetCountryInfoA
-#define RasGetEntryProperties RasGetEntryPropertiesA
-#define RasSetEntryProperties RasSetEntryPropertiesA
-#define RasRenameEntry RasRenameEntryA
-#define RasDeleteEntry RasDeleteEntryA
-#define RasValidateEntryName RasValidateEntryNameA
-
-#if (WINVER >= 0x401)
-#define RASADFUNC RASADFUNCA
-#define RasGetSubEntryHandle RasGetSubEntryHandleA
-#define RasConnectionNotification RasConnectionNotificationA
-#define RasGetSubEntryProperties RasGetSubEntryPropertiesA
-#define RasSetSubEntryProperties RasSetSubEntryPropertiesA
-#define RasGetCredentials RasGetCredentialsA
-#define RasSetCredentials RasSetCredentialsA
-#define RasGetAutodialAddress RasGetAutodialAddressA
-#define RasSetAutodialAddress RasSetAutodialAddressA
-#define RasEnumAutodialAddressesRasEnumAutodialAddressesA
-#define RasGetAutodialEnable RasGetAutodialEnableA
-#define RasSetAutodialEnable RasSetAutodialEnableA
-#define RasGetAutodialParam RasGetAutodialParamA
-#define RasSetAutodialParam RasSetAutodialParamA
-#endif /*(WINVER >= 0x401)*/
-
-#if (WINVER >= 0x500)
-#define RasGetEapUserData RasGetEapUserDataA
-#define RasSetEapUserData RasSetEapUserDataA
-#define RasGetCustomAuthData RasGetCustomAuthDataA
-#define RasSetCustomAuthData RasSetCustomAuthDataA
-#define RasGetEapUserIdentity RasGetEapUserIdentityA
-#define RasFreeEapUserIdentity RasFreeEapUserIdentityA
-#endif /* (WINVER >= 0x500) */
-#endif /* ! UNICODE */
+typedef struct tagRASEAPUSERIDENTITYA {
+    CHAR szUserName[UNLEN + 1];
+    DWORD dwSizeofEapInfo;
+    BYTE pbEapInfo[1];
+} RASEAPUSERIDENTITYA, *LPRASEAPUSERIDENTITYA;
+
+typedef struct tagRAS_STATS {
+    DWORD dwSize;
+    DWORD dwBytesXmited;
+    DWORD dwBytesRcved;
+    DWORD dwFramesXmited;
+    DWORD dwFramesRcved;
+    DWORD dwCrcErr;
+    DWORD dwTimeoutErr;
+    DWORD dwAlignmentErr;
+    DWORD dwHardwareOverrunErr;
+    DWORD dwFramingErr;
+    DWORD dwBufferOverrunErr;
+    DWORD dwCompressionRatioIn;
+    DWORD dwCompressionRatioOut;
+    DWORD dwBps;
+    DWORD dwConnectDuration;
+} RAS_STATS, *PRAS_STATS;
+
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
+#define RASEO2_SecureFileAndPrint       0x00000001
+#define RASEO2_SecureClientForMSNet     0x00000002
+#define RASEO2_DontNegotiateMultilink   0x00000004
+#define RASEO2_DontUseRasCredentials    0x00000008
+#define RASEO2_UsePreSharedKey          0x00000010
+#define RASEO2_Internet                 0x00000020
+#define RASEO2_DisableNbtOverIP         0x00000040
+#define RASEO2_UseGlobalDeviceSettings  0x00000080
+#define RASEO2_ReconnectIfDropped       0x00000100
+#define RASEO2_SharePhoneNumbers        0x00000200
+#endif         
 
 #ifdef __cplusplus
 }
 #endif
+
 #include <poppack.h>
+
 #endif /* _RAS_H */ 
index 070eff3..cd2926d 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RASDLG_H
 #define _RASDLG_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -149,25 +150,17 @@ BOOL APIENTRY RasEntryDlgW(LPWSTR,LPWSTR,LPRASENTRYDLGW);
 BOOL APIENTRY RasPhonebookDlgA(LPSTR,LPSTR,LPRASPBDLGA);
 BOOL APIENTRY RasPhonebookDlgW(LPWSTR,LPWSTR,LPRASPBDLGW);
 
-#ifdef UNICODE
-typedef RASENTRYDLGW   RASENTRYDLG, *LPRASENTRYDLG;
-typedef RASPBDLGW      RASPBDLG, *LPRASPBDLG;
-typedef RASNOUSERW     RASNOUSER, *LPRASNOUSER;
-#define RasDialDlg     RasDialDlgW
-#define RasEntryDlg    RasEntryDlgW
-#define RasPhonebookDlg        RasPhonebookDlgW
-#else
-typedef RASENTRYDLGA   RASENTRYDLG, *LPRASENTRYDLG;
-typedef RASPBDLGA      RASPBDLG, *LPRASPBDLG;
-typedef RASNOUSERA     RASNOUSER, *LPRASNOUSER;
-#define RasDialDlg     RasDialDlgA
-#define RasEntryDlg    RasEntryDlgA
-#define RasPhonebookDlg        RasPhonebookDlgA
-#endif /* UNICODE */
+typedef __AW(RASENTRYDLG)      RASENTRYDLG, *LPRASENTRYDLG;
+typedef __AW(RASPBDLG) RASPBDLG, *LPRASPBDLG;
+typedef __AW(RASNOUSER)        RASNOUSER, *LPRASNOUSER;
+#define RasDialDlg     __AW(RasDialDlg)
+#define RasEntryDlg    __AW(RasEntryDlg)
+#define RasPhonebookDlg        __AW(RasPhonebookDlg)
 
 #endif /* RC_INVOKED */
 
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 55f6939..4d70885 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RASERROR_H
 #define _RASERROR_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #define RASBASE 600
 #define SUCCESS 0
index 573df29..b1bef06 100644 (file)
 #ifndef _RASSAPI_H
 #define _RASSAPI_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #ifndef UNLEN
 #include <lmcons.h>
 #endif
+
 #define RASSAPI_MAX_PHONENUMBER_SIZE    128
 #define RASSAPI_MAX_MEDIA_NAME         16
 #define RASSAPI_MAX_PORT_NAME          16
index 645a5dd..0eddfbf 100644 (file)
@@ -24,8 +24,9 @@
 #ifndef _REASON_H
 #define _REASON_H
 #pragma GCC system_header
+#include <_mingw.h>
 
-#if (_WIN32_WINNT >= 0x0501)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
 #define SHTDN_REASON_MAJOR_APPLICATION 0x00040000
 #define SHTDN_REASON_MAJOR_HARDWARE 0x00010000
 #define SHTDN_REASON_MAJOR_LEGACY_API 0x00070000
@@ -63,6 +64,6 @@
 #define SHTDN_REASON_MINOR_WMI 0x00000015
 #define SHTDN_REASON_FLAG_USER_DEFINED 0x40000000
 #define SHTDN_REASON_FLAG_PLANNED 0x80000000
-#endif /* (WIN32_WINNT >= 0x0501) */
+#endif /* (WIN32_WINNT >= _WIN32_WINNT_WINXP) */
 
 #endif
index 7c2fd5d..6c86616 100644 (file)
 #ifndef _REGSTR_H
 #define _REGSTR_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define REGSTR_KEY_CLASS TEXT("Class")
 #define REGSTR_KEY_CONFIG TEXT("Config")
 #define REGSTR_KEY_ENUM TEXT("Enum")
@@ -53,9 +55,11 @@ extern "C" {
 #define REGSTR_PATH_RUN        TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Run")
 #define REGSTR_PATH_RUNSERVICESONCE    TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServicesOnce")
 #define REGSTR_PATH_RUNSERVICES        TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\RunServices")
+
 #ifndef REGSTR_PATH_EXPLORER /* also in shlobj.h */
 #define REGSTR_PATH_EXPLORER   TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
 #endif
+
 #define REGSTR_PATH_DETECT     TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Detect")
 #define REGSTR_PATH_APPPATHS   TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths")
 #define REGSTR_PATH_UNINSTALL TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall")
@@ -517,11 +521,13 @@ extern "C" {
 #define REGSTR_KEY_USER TEXT("User")
 #define REGSTR_VAL_DPI TEXT("dpi")
 #define REGSTR_VAL_PCICOPTIONS TEXT("PCICOptions")
+
 #ifndef NEC_98
 #define PCIC_DEFAULT_IRQMASK   0x4EB8
 #else
 #define PCIC_DEFAULT_IRQMASK   0x1468
 #endif
+
 #define PCIC_DEFAULT_NUMSOCKETS 0
 #define REGSTR_VAL_PCICIRQMAP  TEXT("PCICIRQMap")
 #define REGSTR_PATH_APPEARANCE TEXT("Control Panel\\Appearance")
@@ -756,6 +762,7 @@ extern "C" {
 #define REGSTR_VAL_JOYOEMCAL10 TEXT("OEMCal10")
 #define REGSTR_VAL_JOYOEMCAL11 TEXT("OEMCal11")
 #define REGSTR_VAL_JOYOEMCAL12 TEXT("OEMCal12")
+
 #ifndef NEC_98
 #define REGSTR_KEY_ISAENUM     TEXT("ISAPnP")
 #define REGSTR_KEY_EISAENUM    TEXT("EISA")
@@ -773,6 +780,7 @@ extern "C" {
 #define        REGSTR_VAL_EISA_FLAGS   TEXT("NESAFlags")
 #define        REGSTR_VAL_EISA_SIMULATE_INT15  TEXT("NESASimulateInt15")
 #endif
+
 typedef struct _DSKTLSYSTEMTIME {
        WORD wYear;
        WORD wMonth;
@@ -784,7 +792,9 @@ typedef struct _DSKTLSYSTEMTIME {
        WORD wMilliseconds;
        WORD wResult;
 } DSKTLSYSTEMTIME,*PDSKTLSYSTEMTIME,*LPDSKTLSYSTEMTIME;
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 45febee..5cb2240 100644 (file)
 #ifndef _RICHEDIT_H
 #define _RICHEDIT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #pragma pack(push,4)
 
+/* Impossible to use __STR() */
 #ifdef UNICODE 
 #define RICHEDIT_CLASS L"RichEdit20W"
 #else
 #define RICHEDIT_CLASS "RichEdit20A"
 #endif
+
 #define RICHEDIT_CLASS10A    "RICHEDIT"
 #define CF_RTF TEXT("Rich Text Format")
 #define CF_RTFNOOBJS TEXT("Rich Text Format Without Objects")
@@ -524,21 +528,16 @@ typedef struct _gettextlengthex {
        DWORD flags;
        UINT codepage;
 } GETTEXTLENGTHEX;
-#ifdef UNICODE
-typedef CHARFORMATW CHARFORMAT;
-typedef CHARFORMAT2W CHARFORMAT2;
-typedef FINDTEXTW FINDTEXT;
-typedef FINDTEXTEXW FINDTEXTEX;
-typedef TEXTRANGEW TEXTRANGE;
-#else
-typedef CHARFORMATA CHARFORMAT;
-typedef CHARFORMAT2A CHARFORMAT2;
-typedef FINDTEXTA FINDTEXT;
-typedef FINDTEXTEXA FINDTEXTEX;
-typedef TEXTRANGEA TEXTRANGE;
-#endif
+typedef __AW(CHARFORMAT) CHARFORMAT;
+typedef __AW(CHARFORMAT2) CHARFORMAT2;
+typedef __AW(FINDTEXT) FINDTEXT;
+typedef __AW(FINDTEXTEX) FINDTEXTEX;
+typedef __AW(TEXTRANGE) TEXTRANGE;
+
 #pragma pack(pop)
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index cd46d74..d813dc7 100644 (file)
 #ifndef _RICHOLE_H
 #define _RICHOLE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #pragma pack(push,4)
+
 #define REO_GETOBJ_NO_INTERFACES       0
 #define REO_GETOBJ_POLEOBJ     1
 #define REO_GETOBJ_PSTG        2
@@ -61,6 +64,7 @@ extern "C" {
 
 extern const GUID IID_IRichEditOle;
 extern const GUID IID_IRichEditOleCallback;
+
 #ifndef INITGUID
 typedef struct _reobject {
        DWORD cbStruct;
@@ -121,7 +125,9 @@ DECLARE_INTERFACE_(IRichEditOleCallback, IUnknown)
 #undef INTERFACE
 typedef IRichEditOleCallback FAR * LPRICHEDITOLECALLBACK;
 #endif
+
 #pragma pack(pop)
+
 #ifdef __cplusplus
 }
 #endif
index 56093de..4ef6928 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _ROUTPROT_H
 #define _ROUTPROT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -54,7 +55,8 @@ extern "C" {
 #define IPX_PROTOCOL_SAP 0x00020001
 #define IPX_PROTOCOL_NLSP 0x00020002
 /*--- Router Management Reference - Router Management Structures */
-#if (_WIN32_WINNT >= 0x0500)
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 typedef struct IP_LOCAL_BINDING {
        DWORD Address;
        DWORD Mask;
@@ -74,7 +76,7 @@ typedef struct IPX_ADAPTER_BINDING_INFO {
        ULONG MaxPacketSize;
        ULONG LinkSpeed;
 } IPX_ADAPTER_BINDING_INFO,*PIPX_ADAPTER_BINDING_INFO;
-#endif /* (_WIN32_WINNT >= 0x0500) */
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
index cf58f38..852d64e 100644 (file)
 #ifndef _RPC_H
 #define _RPC_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifndef RPC_NO_WINDOWS_H
 #include <windows.h>
 #endif
 
-
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define __RPC_WIN32__
 #ifndef _WIN95
 #define __RPC_NT__
@@ -81,7 +82,9 @@ typedef long RPC_STATUS;
 RPC_STATUS RPC_ENTRY RpcImpersonateClient(RPC_BINDING_HANDLE);
 RPC_STATUS RPC_ENTRY RpcRevertToSelf(void);
 long RPC_ENTRY I_RpcMapWin32Status(RPC_STATUS);
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index fc7bb2a..7bf7cc6 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RPCDCE_H
 #define _RPCDCE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -33,9 +34,11 @@ extern "C" {
 #ifndef _NO_W32_PSEUDO_MODIFIERS
 #define IN
 #define OUT
+
 #ifndef OPTIONAL
 #define OPTIONAL
 #endif
+
 #endif
 
 #define uuid_t UUID
@@ -246,75 +249,42 @@ RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS,unsigned char*);
 RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS,unsigned short*);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned short**);
+
 #ifdef UNICODE
-#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORW
-#define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_W
-#define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_W
-#define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_W
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextW
-#define RpcBindingFromStringBinding RpcBindingFromStringBindingW
-#define RpcBindingToStringBinding RpcBindingToStringBindingW
-#define RpcStringBindingCompose RpcStringBindingComposeW
-#define RpcStringBindingParse RpcStringBindingParseW
-#define RpcStringFree RpcStringFreeW
-#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidW
-#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsW
-#define RpcProtseqVectorFree RpcProtseqVectorFreeW
-#define RpcServerUseProtseq RpcServerUseProtseqW
-#define RpcServerUseProtseqEx RpcServerUseProtseqExW
-#define RpcServerUseProtseqEp RpcServerUseProtseqEpW
-#define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExW
-#define RpcServerUseProtseqIf RpcServerUseProtseqIfW
-#define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExW
-#define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameW
-#define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameW
-#define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameW
-#define RpcBindingInqAuthClient RpcBindingInqAuthClientW
-#define RpcBindingInqAuthInfo RpcBindingInqAuthInfoW
-#define RpcBindingSetAuthInfo RpcBindingSetAuthInfoW
-#define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoW
-#define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExW
-#define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExW
-#define UuidFromString UuidFromStringW
-#define UuidToString UuidToStringW
-#define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceW
-#define RpcEpRegister RpcEpRegisterW
-#define DceErrorInqText DceErrorInqTextW
-#else /* UNICODE */
-#define RPC_PROTSEQ_VECTOR RPC_PROTSEQ_VECTORA
-#define SEC_WINNT_AUTH_IDENTITY SEC_WINNT_AUTH_IDENTITY_A
-#define PSEC_WINNT_AUTH_IDENTITY PSEC_WINNT_AUTH_IDENTITY_A
-#define _SEC_WINNT_AUTH_IDENTITY _SEC_WINNT_AUTH_IDENTITY_A
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextA
-#define RpcBindingFromStringBinding RpcBindingFromStringBindingA
-#define RpcBindingToStringBinding RpcBindingToStringBindingA
-#define RpcStringBindingCompose RpcStringBindingComposeA
-#define RpcStringBindingParse RpcStringBindingParseA
-#define RpcStringFree RpcStringFreeA
-#define RpcNetworkIsProtseqValid RpcNetworkIsProtseqValidA
-#define RpcNetworkInqProtseqs RpcNetworkInqProtseqsA
-#define RpcProtseqVectorFree RpcProtseqVectorFreeA
-#define RpcServerUseProtseq RpcServerUseProtseqA
-#define RpcServerUseProtseqEx RpcServerUseProtseqExA
-#define RpcServerUseProtseqEp RpcServerUseProtseqEpA
-#define RpcServerUseProtseqEpEx RpcServerUseProtseqEpExA
-#define RpcServerUseProtseqIf RpcServerUseProtseqIfA
-#define RpcServerUseProtseqIfEx RpcServerUseProtseqIfExA
-#define RpcMgmtInqServerPrincName RpcMgmtInqServerPrincNameA
-#define RpcServerInqDefaultPrincName RpcServerInqDefaultPrincNameA
-#define RpcNsBindingInqEntryName RpcNsBindingInqEntryNameA
-#define RpcBindingInqAuthClient RpcBindingInqAuthClientA
-#define RpcBindingInqAuthInfo RpcBindingInqAuthInfoA
-#define RpcBindingSetAuthInfo RpcBindingSetAuthInfoA
-#define RpcServerRegisterAuthInfo RpcServerRegisterAuthInfoA
-#define RpcBindingInqAuthInfoEx RpcBindingInqAuthInfoExA
-#define RpcBindingSetAuthInfoEx RpcBindingSetAuthInfoExA
-#define UuidFromString UuidFromStringA
-#define UuidToString UuidToStringA
-#define RpcEpRegisterNoReplace RpcEpRegisterNoReplaceA
-#define RpcEpRegister RpcEpRegisterA
-#define DceErrorInqText DceErrorInqTextA
-#endif /* UNICODE */
+#define RPC_PROTSEQ_VECTOR __AW(RPC_PROTSEQ_VECTOR)
+#define SEC_WINNT_AUTH_IDENTITY __AW(SEC_WINNT_AUTH_IDENTITY_)
+#define PSEC_WINNT_AUTH_IDENTITY __AW(PSEC_WINNT_AUTH_IDENTITY_)
+#define _SEC_WINNT_AUTH_IDENTITY __AW(_SEC_WINNT_AUTH_IDENTITY_)
+#define RpcMgmtEpEltInqNext __AW(RpcMgmtEpEltInqNext)
+#define RpcBindingFromStringBinding __AW(RpcBindingFromStringBinding)
+#define RpcBindingToStringBinding __AW(RpcBindingToStringBinding)
+#define RpcStringBindingCompose __AW(RpcStringBindingCompose)
+#define RpcStringBindingParse __AW(RpcStringBindingParse)
+#define RpcStringFree __AW(RpcStringFree)
+#define RpcNetworkIsProtseqValid __AW(RpcNetworkIsProtseqValid)
+#define RpcNetworkInqProtseqs __AW(RpcNetworkInqProtseqs)
+#define RpcProtseqVectorFree __AW(RpcProtseqVectorFree)
+#define RpcServerUseProtseq __AW(RpcServerUseProtseq)
+#define RpcServerUseProtseqEx __AW(RpcServerUseProtseqEx)
+#define RpcServerUseProtseqEp __AW(RpcServerUseProtseqEp)
+#define RpcServerUseProtseqEpEx __AW(RpcServerUseProtseqEpEx)
+#define RpcServerUseProtseqIf __AW(RpcServerUseProtseqIf)
+#define RpcServerUseProtseqIfEx __AW(RpcServerUseProtseqIfEx)
+#define RpcMgmtInqServerPrincName __AW(RpcMgmtInqServerPrincName)
+#define RpcServerInqDefaultPrincName __AW(RpcServerInqDefaultPrincName)
+#define RpcNsBindingInqEntryName __AW(RpcNsBindingInqEntryName)
+#define RpcBindingInqAuthClient __AW(RpcBindingInqAuthClient)
+#define RpcBindingInqAuthInfo __AW(RpcBindingInqAuthInfo)
+#define RpcBindingSetAuthInfo __AW(RpcBindingSetAuthInfo)
+#define RpcServerRegisterAuthInfo __AW(RpcServerRegisterAuthInfo)
+#define RpcBindingInqAuthInfoEx __AW(RpcBindingInqAuthInfoEx)
+#define RpcBindingSetAuthInfoEx __AW(RpcBindingSetAuthInfoEx)
+#define UuidFromString __AW(UuidFromString)
+#define UuidToString __AW(UuidToString)
+#define RpcEpRegisterNoReplace __AW(RpcEpRegisterNoReplace)
+#define RpcEpRegister __AW(RpcEpRegister)
+#define DceErrorInqText __AW(DceErrorInqText)
+
 #else /* RPC_UNICODE_SUPPORTED */
 typedef struct _RPC_PROTSEQ_VECTOR {
        unsigned int Count;
@@ -406,12 +376,14 @@ RPC_STATUS RPC_ENTRY RpcMgmtSetParameter(unsigned int,unsigned long);
 RPC_STATUS RPC_ENTRY RpcMgmtBindingInqParameter(RPC_BINDING_HANDLE,unsigned int,unsigned long*);
 RPC_STATUS RPC_ENTRY RpcMgmtBindingSetParameter(RPC_BINDING_HANDLE,unsigned int,unsigned long);
 
-#if _WIN32_WINNT >= 0x0500
+#if _WIN32_WINNT >= _WIN32_WINNT_WIN2K
 RPC_STATUS RPC_ENTRY UuidCreateSequential(UUID*);
-#endif
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_WIN2K */
 
 #include <rpcdcep.h>
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 5a98982..4266913 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RPCDCE2_H
 #define _RPCDCE2_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -51,27 +52,28 @@ RPC_STATUS RPC_ENTRY UuidCreateNil(UUID*);
 int RPC_ENTRY UuidEqual(UUID*,UUID*,RPC_STATUS*);
 unsigned short RPC_ENTRY UuidHash(UUID*,RPC_STATUS*);
 int RPC_ENTRY UuidIsNil(UUID*,RPC_STATUS*);
+
 #ifdef RPC_UNICODE_SUPPORTED
 RPC_STATUS RPC_ENTRY DceErrorInqTextA(RPC_STATUS,unsigned char*);
 RPC_STATUS RPC_ENTRY DceErrorInqTextW(RPC_STATUS,unsigned short*);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned short**);
-#ifdef UNICODE
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextW
-#define DceErrorInqText DceErrorInqTextW
-#else
-#define RpcMgmtEpEltInqNext RpcMgmtEpEltInqNextA
-#define DceErrorInqText DceErrorInqTextA
-#endif /* UNICODE */
+
+#define RpcMgmtEpEltInqNext __AW(RpcMgmtEpEltInqNext)
+#define DceErrorInqText __AW(DceErrorInqText)
+
 #else /* RPC_UNICODE_SUPPORTED */
 RPC_STATUS RPC_ENTRY DceErrorInqText(RPC_STATUS,unsigned char*);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNext(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**);
 #endif
+
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE,unsigned long,RPC_IF_ID*,unsigned long,UUID*,RPC_EP_INQ_HANDLE*);
 RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE*);
 RPC_STATUS RPC_ENTRY RpcMgmtEpUnregister(RPC_BINDING_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE,UUID*);
 RPC_STATUS RPC_ENTRY RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN);
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 502fd72..d683591 100644 (file)
 #ifndef _RPCDCEP_H
 #define _RPCDCEP_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define RPC_NCA_FLAGS_DEFAULT 0
 #define RPC_NCA_FLAGS_IDEMPOTENT 1
 #define RPC_NCA_FLAGS_BROADCAST 2
@@ -116,6 +118,7 @@ long __stdcall I_RpcStopMonitorAssociation(HANDLE);
 HANDLE __stdcall I_RpcGetCurrentCallHandle(void);
 long __stdcall I_RpcGetAssociationContext(void**);
 long __stdcall I_RpcSetAssociationContext(void*);
+
 #ifdef __RPC_NT__
 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned short*);
 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE, unsigned short**);
@@ -123,6 +126,7 @@ long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE, unsigned short**);
 long __stdcall I_RpcNsBindingSetEntryName(HANDLE,unsigned long,unsigned char*);
 long __stdcall I_RpcBindingInqDynamicEndpoint(HANDLE,unsigned char**);
 #endif
+
 long __stdcall I_RpcBindingInqTransportType(HANDLE,unsigned int*);
 long __stdcall I_RpcIfInqTransferSyntaxes(HANDLE,RPC_TRANSFER_SYNTAX*,unsigned int,unsigned int*);
 long __stdcall I_UuidCreate(GUID*);
@@ -139,12 +143,11 @@ long __stdcall I_RpcServerThreadPauseListening(void);
 long __stdcall I_RpcServerThreadContinueListening(void);
 long __stdcall I_RpcServerUnregisterEndpointA(unsigned char*,unsigned char*);
 long __stdcall I_RpcServerUnregisterEndpointW(unsigned short*,unsigned short*);
-#ifdef UNICODE
-#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointW
-#else
-#define I_RpcServerUnregisterEndpoint I_RpcServerUnregisterEndpointA
-#endif
+
+#define I_RpcServerUnregisterEndpoint __AW(I_RpcServerUnregisterEndpoint)
+
 #ifdef __cplusplus
 }
+
 #endif
 #endif
index ece08f7..6381af4 100644 (file)
 #define _RPCNDR_H
 #define __RPCNDR_H__
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifndef __RPCNDR_H_VERSION__
 #define __RPCNDR_H_VERSION__        ( 450 )
 #endif /* __RPCNDR_H_VERSION__ */
+
 #include <rpcnsip.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #include <objfwd.h>
+
 #define DECLSPEC_UUID(x)
 #define MIDL_INTERFACE(x) struct
 #define NDR_CHAR_REP_MASK (unsigned long)0xFL
@@ -48,12 +53,15 @@ extern "C" {
 #define NDR_LOCAL_DATA_REPRESENTATION (unsigned long)0x10L
 #define NDR_LOCAL_ENDIAN NDR_LITTLE_ENDIAN
 #define __RPC_CALLEE __stdcall
+
 #ifndef __MIDL_USER_DEFINED
 #define midl_user_allocate MIDL_user_allocate
 #define midl_user_free MIDL_user_free
 #define __MIDL_USER_DEFINED
 #endif
+
 #define RPC_VAR_ENTRY __cdecl
+
 #ifdef _M_IX86
 #define __MIDL_DECLSPEC_DLLIMPORT __declspec(dllimport)
 #define __MIDL_DECLSPEC_DLLEXPORT __declspec(dllexport)
@@ -61,6 +69,7 @@ extern "C" {
 #define __MIDL_DECLSPEC_DLLIMPORT
 #define __MIDL_DECLSPEC_DLLEXPORT
 #endif
+
 #if defined(_HAVE_INT64) || (defined(_INTEGRAL_MAX_BITS) && _INTEGRAL_MAX_BITS >= 64)
 #define hyper __int64
 #define MIDL_uhyper unsigned __int64
@@ -68,6 +77,7 @@ extern "C" {
 #define hyper double
 #define MIDL_uhyper double
 #endif
+
 #define small char
 typedef unsigned char byte;
 typedef unsigned char boolean;
@@ -109,11 +119,13 @@ typedef unsigned char boolean;
 #define NdrFieldPad(s,f,p,t) (NdrFieldOffset(s,f) - NdrFieldOffset(s,p) - sizeof(t))
 #define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
 #define NdrFcLong(s) (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
+
 #ifdef CONST_VTABLE
 #define CONST_VTBL const
 #else
 #define CONST_VTBL
 #endif
+
 typedef void *NDR_CCONTEXT;
 typedef struct {
        void *pad[2];
@@ -533,7 +545,9 @@ unsigned char*RPC_ENTRY NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE,unsigned cha
 void RPC_ENTRY NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
 unsigned long RPC_ENTRY NdrUserMarshalMemorySize(PMIDL_STUB_MESSAGE,PFORMAT_STRING);
 void RPC_ENTRY NdrUserMarshalFree(PMIDL_STUB_MESSAGE,unsigned char*,PFORMAT_STRING);
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index d4a7612..df9e302 100644 (file)
 #ifndef _RPCNSI_H
 #define _RPCNSI_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 typedef void *RPC_NS_HANDLE;
 #define RPC_C_NS_SYNTAX_DEFAULT 0
 #define RPC_C_NS_SYNTAX_DCE 3
@@ -94,50 +96,30 @@ RPC_STATUS RPC_ENTRY RpcNsMgmtEntryDeleteW(unsigned long,unsigned short*);
 RPC_STATUS RPC_ENTRY RpcNsMgmtEntryInqIfIdsW(unsigned long,unsigned short , RPC_IF_ID_VECTOR**);
 RPC_STATUS RPC_ENTRY RpcNsBindingImportBeginW(unsigned long,unsigned short*,RPC_IF_HANDLE,UUID*,RPC_NS_HANDLE*);
 #endif /* RPC_UNICODE_SUPPORTED */
-#ifdef UNICODE
-#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginW
-#define RpcNsBindingImportBegin RpcNsBindingImportBeginW
-#define RpcNsBindingExport RpcNsBindingExportW
-#define RpcNsBindingUnexport RpcNsBindingUnexportW
-#define RpcNsGroupDelete RpcNsGroupDeleteW
-#define RpcNsGroupMbrAdd RpcNsGroupMbrAddW
-#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveW
-#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginW
-#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextW
-#define RpcNsEntryExpandName RpcNsEntryExpandNameW
-#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginW
-#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportW
-#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateW
-#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteW
-#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsW
-#define RpcNsProfileDelete RpcNsProfileDeleteW
-#define RpcNsProfileEltAdd RpcNsProfileEltAddW
-#define RpcNsProfileEltRemove RpcNsProfileEltRemoveW
-#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginW
-#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextW
-#else
-#define RpcNsBindingLookupBegin RpcNsBindingLookupBeginA
-#define RpcNsBindingImportBegin RpcNsBindingImportBeginA
-#define RpcNsBindingExport RpcNsBindingExportA
-#define RpcNsBindingUnexport RpcNsBindingUnexportA
-#define RpcNsGroupDelete RpcNsGroupDeleteA
-#define RpcNsGroupMbrAdd RpcNsGroupMbrAddA
-#define RpcNsGroupMbrRemove RpcNsGroupMbrRemoveA
-#define RpcNsGroupMbrInqBegin RpcNsGroupMbrInqBeginA
-#define RpcNsGroupMbrInqNext RpcNsGroupMbrInqNextA
-#define RpcNsEntryExpandName RpcNsEntryExpandNameA
-#define RpcNsEntryObjectInqBegin RpcNsEntryObjectInqBeginA
-#define RpcNsMgmtBindingUnexport RpcNsMgmtBindingUnexportA
-#define RpcNsMgmtEntryCreate RpcNsMgmtEntryCreateA
-#define RpcNsMgmtEntryDelete RpcNsMgmtEntryDeleteA
-#define RpcNsMgmtEntryInqIfIds RpcNsMgmtEntryInqIfIdsA
-#define RpcNsProfileDelete RpcNsProfileDeleteA
-#define RpcNsProfileEltAdd RpcNsProfileEltAddA
-#define RpcNsProfileEltRemove RpcNsProfileEltRemoveA
-#define RpcNsProfileEltInqBegin RpcNsProfileEltInqBeginA
-#define RpcNsProfileEltInqNext RpcNsProfileEltInqNextA
-#endif
+
+#define RpcNsBindingLookupBegin __AW(RpcNsBindingLookupBegin)
+#define RpcNsBindingImportBegin __AW(RpcNsBindingImportBegin)
+#define RpcNsBindingExport __AW(RpcNsBindingExport)
+#define RpcNsBindingUnexport __AW(RpcNsBindingUnexport)
+#define RpcNsGroupDelete __AW(RpcNsGroupDelete)
+#define RpcNsGroupMbrAdd __AW(RpcNsGroupMbrAdd)
+#define RpcNsGroupMbrRemove __AW(RpcNsGroupMbrRemove)
+#define RpcNsGroupMbrInqBegin __AW(RpcNsGroupMbrInqBegin)
+#define RpcNsGroupMbrInqNext __AW(RpcNsGroupMbrInqNext)
+#define RpcNsEntryExpandName __AW(RpcNsEntryExpandName)
+#define RpcNsEntryObjectInqBegin __AW(RpcNsEntryObjectInqBegin)
+#define RpcNsMgmtBindingUnexport __AW(RpcNsMgmtBindingUnexport)
+#define RpcNsMgmtEntryCreate __AW(RpcNsMgmtEntryCreate)
+#define RpcNsMgmtEntryDelete __AW(RpcNsMgmtEntryDelete)
+#define RpcNsMgmtEntryInqIfIds __AW(RpcNsMgmtEntryInqIfIds)
+#define RpcNsProfileDelete __AW(RpcNsProfileDelete)
+#define RpcNsProfileEltAdd __AW(RpcNsProfileEltAdd)
+#define RpcNsProfileEltRemove __AW(RpcNsProfileEltRemove)
+#define RpcNsProfileEltInqBegin __AW(RpcNsProfileEltInqBegin)
+#define RpcNsProfileEltInqNext __AW(RpcNsProfileEltInqNext)
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 6d4d74f..bd75fa7 100644 (file)
 #ifndef _RPCNSIP_H
 #define _RPCNSIP_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 typedef struct {
        RPC_NS_HANDLE LookupContext;
        RPC_BINDING_HANDLE ProposedHandle;
@@ -40,7 +42,9 @@ RPC_STATUS RPC_ENTRY I_RpcReBindBuffer(/*IN*/ PRPC_MESSAGE);
 RPC_STATUS RPC_ENTRY I_NsServerBindSearch(void);
 RPC_STATUS RPC_ENTRY I_NsClientBindSearch(void);
 void RPC_ENTRY I_NsClientBindDone(void);
+
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index b90e0ee..17fea65 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _RPCNTERR_H
 #define _RPCNTERR_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #define RPC_S_OK ERROR_SUCCESS
 #define RPC_S_INVALID_ARG ERROR_INVALID_PARAMETER
@@ -41,4 +42,5 @@
 #define RPC_X_SS_CONTEXT_MISMATCH ERROR_INVALID_HANDLE
 #define RPC_X_INVALID_BUFFER ERROR_INVALID_USER_BUFFER
 #define RPC_X_INVALID_PIPE_OPERATION RPC_X_WRONG_PIPE_ORDER
+
 #endif
index c3f01c2..5536715 100644 (file)
  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  * DEALINGS IN THE SOFTWARE.
  */
+#ifndef _RPCPROXY_H
+#define _RPCPROXY_H
+#pragma GCC system_header
+#include <_mingw.h>
+
 /*
  *  -DREGISTER_PROXY_DLL Generates DllMain, DllRegisterServer, and
  *    DllUnregisterServer
  *  -DPROXY_CLSID_IS={..} Specifies the class ID to be used by the proxy DLL.
  *  -DNT35_STRICT No new features
 */
-#ifndef _RPCPROXY_H
-#define _RPCPROXY_H
-#pragma GCC system_header
 
 #if defined  __cplusplus  && !defined CINTERFACE
 #warning "rpcproxy type definitions require CINTERFACE"
+
 #else
+
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #include <rpc.h>
 #include <rpcndr.h>
 #include <string.h>
@@ -66,21 +71,28 @@ HRESULT STDAPICALLTYPE DllUnregisterServer(void)\
 {\
 return NdrDllUnregisterProxy(hProxyDll, pProxyFileList, pClsID);\
 }
+
 #ifdef PROXY_CLSID
 #define CLSID_PSFACTORYBUFFER extern CLSID PROXY_CLSID;
 #else
+
 #ifdef PROXY_CLSID_IS
 #define CLSID_PSFACTORYBUFFER const CLSID CLSID_PSFactoryBuffer = PROXY_CLSID_IS;
 #define PROXY_CLSID CLSID_PSFactoryBuffer
+
 #else
 #define CLSID_PSFACTORYBUFFER
+
 #endif
+
 #endif
+
 #ifndef PROXY_CLSID
 #define GET_DLL_CLSID (aProxyFileList[0]->pStubVtblList[0] != 0 ? aProxyFileList[0]->pStubVtblList[0]->header.piid : 0)
 #else
 #define GET_DLL_CLSID &PROXY_CLSID
 #endif
+
 #define EXTERN_PROXY_FILE(name) EXTERN_C const ProxyFileInfo name##_ProxyFileInfo;
 #define PROXYFILE_LIST_START const ProxyFileInfo * aProxyFileList[] = {
 #define REFERENCE_PROXY_FILE(name) & name##_ProxyFileInfo
@@ -95,6 +107,7 @@ void RPC_ENTRY GetProxyDllInfo( const ProxyFileInfo*** pInfo, const CLSID ** pId
 #define DLLDUMMYPURECALL void __cdecl _purecall(void) { }
 #define CSTDSTUBBUFFERRELEASE(pFactory) ULONG STDMETHODCALLTYPE CStdStubBuffer_Release(IRpcStubBuffer *This) \
 { return NdrCStdStubBuffer_Release(This,(IPSFactoryBuffer *)pFactory); }
+
 #ifdef PROXY_DELEGATION
 #define CSTDSTUBBUFFER2RELEASE(pFactory) ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release(IRpcStubBuffer *This) \
 { return NdrCStdStubBuffer2_Release(This,(IPSFactoryBuffer *)pFactory); }
@@ -107,6 +120,7 @@ void RPC_ENTRY GetProxyDllInfo( const ProxyFileInfo*** pInfo, const CLSID ** pId
 #else
 #define DLLREGISTRY_ROUTINES(pProxyFileList,pClsID)
 #endif
+
 #define DLLDATA_ROUTINES(pProxyFileList,pClsID) \
 CLSID_PSFACTORYBUFFER \
 CStdPSFactoryBuffer gPFactory = {0,0,0,0}; \
@@ -143,6 +157,7 @@ typedef struct tagProxyFileInfo {
 typedef ProxyFileInfo ExtendedProxyFileInfo;
 
 typedef struct tagCInterfaceProxyHeader {
+
 #ifdef USE_STUBLESS_PROXY
     const void *pStublessProxyInfo;
 #endif
@@ -201,6 +216,7 @@ HRESULT STDMETHODCALLTYPE CStdStubBuffer_DebugServerQueryInterface(IRpcStubBuffe
 void STDMETHODCALLTYPE CStdStubBuffer_DebugServerRelease(IRpcStubBuffer*,void*);
 HRESULT RPC_ENTRY NdrDllGetClassObject(REFCLSID,REFIID,void**,const ProxyFileInfo**,const CLSID*,CStdPSFactoryBuffer*);
 HRESULT RPC_ENTRY NdrDllCanUnloadNow(CStdPSFactoryBuffer*);
+
 #ifndef NT35_STRICT
 HRESULT RPC_ENTRY NdrDllRegisterProxy(HMODULE,const ProxyFileInfo**,const CLSID*);
 HRESULT RPC_ENTRY NdrDllUnregisterProxy(HMODULE,const ProxyFileInfo**,const CLSID*);
@@ -215,6 +231,8 @@ NdrCStdStubBuffer2_Release(IRpcStubBuffer*,IPSFactoryBuffer*);
 #ifdef __cplusplus
 }
 #endif
+
 #endif  /* defined  __cplusplus  && !defined CINTERFACE  */
+
 #endif  /* ndef _RPCPROXY_H  */
 
index 9b8afc3..6ce4d5a 100644 (file)
 #ifndef _RTUTILS_H
 #define _RTUTILS_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 /*--- Tracing Reference */
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 DWORD WINAPI TraceDeregisterA(DWORD);
 DWORD WINAPI TraceDeregisterW(DWORD);
 DWORD WINAPI TraceDeregisterExA(DWORD,DWORD);
@@ -62,36 +63,24 @@ DWORD WINAPI TraceVprintfExW(DWORD,DWORD,LPCWSTR,va_list);
 #define TRACE_NO_STDINFO 0x00000001
 #define TRACE_USE_MASK 0x00000002
 #define TRACE_USE_MSEC 0x00000004
-#ifdef UNICODE
-#define TraceDeregister TraceDeregisterW
-#define TraceDeregisterEx TraceDeregisterExW
-#define TraceDump TraceDumpW
-#define TraceDumpEx TraceDumpExW
-#define TracePrintf TracePrintfW
-#define TracePrintfEx TracePrintfExW
-#define TracePuts TracePutsW
-#define TracePutsEx TracePutsExW
-#define TraceRegister TraceRegisterW
-#define TraceRegisterEx TraceRegisterExW
-#define TraceVprintf TraceVprintfW
-#define TraceVprintfEx TraceVprintfExW
-#else
-#define TraceDeregister TraceDeregisterA
-#define TraceDeregisterEx TraceDeregisterExA
-#define TraceDump TraceDumpA
-#define TraceDumpEx TraceDumpExA
-#define TracePrintf TracePrintfA
-#define TracePrintfEx TracePrintfExA
-#define TracePuts TracePutsA
-#define TracePutsEx TracePutsExA
-#define TraceRegister TraceRegisterA
-#define TraceRegisterEx TraceRegisterExA
-#define TraceVprintf TraceVprintfA
-#define TraceVprintfEx TraceVprintfExA
-#endif
-#endif /* (_WIN32_WINNT >= 0x0500) */
+
+#define TraceDeregister __AW(TraceDeregister)
+#define TraceDeregisterEx __AW(TraceDeregisterEx)
+#define TraceDump __AW(TraceDump)
+#define TraceDumpEx __AW(TraceDumpEx)
+#define TracePrintf __AW(TracePrintf)
+#define TracePrintfEx __AW(TracePrintfEx)
+#define TracePuts __AW(TracePuts)
+#define TracePutsEx __AW(TracePutsEx)
+#define TraceRegister __AW(TraceRegister)
+#define TraceRegisterEx __AW(TraceRegisterEx)
+#define TraceVprintf __AW(TraceVprintf)
+#define TraceVprintfEx __AW(TraceVprintfEx)
+
+#endif /* (_WIN32_WINNT >= _WIN32_WINNT_WIN2K) */
 
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index 10714f6..e1ebd68 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SCHANNEL_H
 #define _SCHANNEL_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #include <wincrypt.h>
 
index 2144094..cfdc02f 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _SCHNLSP_H
 #define _SCHNLSP_H
 #pragma GCC system_header
-
+#include <_mingw.h>
 
 #define SECPKG_ATTR_SUPPORTED_ALGS 86
 #define SECPKG_ATTR_CIPHER_STRENGTHS 87
index 6f8b0cc..6b6cf8c 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SCRNSAVE_H
 #define _SCRNSAVE_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -62,6 +63,7 @@ BOOL WINAPI RegisterDialogClasses(HANDLE);
 LONG WINAPI ScreenSaverProc(HWND,UINT,WPARAM,LPARAM);
 
 /* Change name of function if we are using UNICODE */
+/* Cannot use _AW() since there is no A version. */
 #ifdef UNICODE
 #define DefScreenSaverProc DefScreenSaverProcW
 #endif
index 77a5e9d..4fa10da 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SDDL_H
 #define _SDDL_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifndef WINADVAPI
 #define WINADVAPI
 extern "C" {
 #endif
 
-#if (WINVER >= 0x0500)
+#if (WINVER >= _WIN32_WINNT_WIN2K)
 WINADVAPI BOOL WINAPI ConvertSidToStringSidA(PSID Sid, LPSTR* StringSid);
 WINADVAPI BOOL WINAPI ConvertSidToStringSidW(PSID Sid, LPWSTR* StringSid);
 WINADVAPI BOOL WINAPI ConvertStringSidToSidA(LPSTR StringSid, PSID *Sid);
 WINADVAPI BOOL WINAPI ConvertStringSidToSidW(LPWSTR StringSid, PSID *Sid);
-#endif
+#endif /* (WINVER >= _WIN32_WINNT_WIN2K) */
 
-#ifdef UNICODE
-#define ConvertSidToStringSid ConvertSidToStringSidW
-#define ConvertStringSidToSid ConvertStringSidToSidW
-#else
-#define ConvertSidToStringSid ConvertSidToStringSidA
-#define ConvertStringSidToSid ConvertStringSidToSidA
-#endif
+#define ConvertSidToStringSid __AW(ConvertSidToStringSid)
+#define ConvertStringSidToSid __AW(ConvertStringSidToSid)
 
 #ifdef __cplusplus
 }
index 6e723bd..a2d8066 100644 (file)
@@ -24,6 +24,9 @@
 #ifndef _SDKDDKVER_H
 #define _SDKDDKVER_H
 #pragma GCC system_header
+/* Do not include _mingw.h since _mingw.h includes this file.
+#include <_mingw.h>
+*/
 
 /**
  * Define version masks
@@ -53,6 +56,7 @@
  * http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
  */
 #define _WIN32_WINNT_NT4          0x0400
+#define _WIN32_WINNT_NT4E        0x0401
 #define _WIN32_WINNT_WIN95       0x0400
 #define _WIN32_WINNT_WIN98       0x0410
 #define _WIN32_WINNT_WINME       0x0490
index 77d8bf4..69f1a7e 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _SEARCH_H
 #define _SEARCH_H
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 #ifndef RC_INVOKED
index 720636a..69c1dcd 100644 (file)
 #ifndef _SECEXT_H
 #define _SECEXT_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 #ifndef RC_INVOKED
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 typedef enum 
 {
   NameUnknown = 0, 
@@ -52,18 +53,12 @@ BOOLEAN WINAPI GetUserNameExW(EXTENDED_NAME_FORMAT,LPWSTR,PULONG);
 BOOLEAN WINAPI TranslateNameA(LPCSTR,EXTENDED_NAME_FORMAT,EXTENDED_NAME_FORMAT,LPSTR,PULONG);
 BOOLEAN WINAPI TranslateNameW(LPCWSTR,EXTENDED_NAME_FORMAT,EXTENDED_NAME_FORMAT,LPWSTR,PULONG);
 
-#ifdef UNICODE
-#define GetComputerObjectName GetComputerObjectNameW
-#define GetUserNameEx GetUserNameExW
-#define TranslateName TranslateNameW
-#else
-#define GetComputerObjectName GetComputerObjectNameA
-#define GetUserNameEx GetUserNameExA
-#define TranslateName TranslateNameA
-#endif
+#define GetComputerObjectName __AW(GetComputerObjectName)
+#define GetUserNameEx __AW(GetUserNameEx)
+#define TranslateName __AW(TranslateName)
 
 #endif /* ! RC_INVOKED */
-#endif /* _WIN32_WINNT >= 0x0500 */
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_WIN2K */
 
 #ifdef __cplusplus
 }
index 3d26aa2..569f920 100644 (file)
@@ -24,7 +24,7 @@
 #ifndef _SECURITY_H
 #define _SECURITY_H
 #pragma GCC system_header
-
+#include <_mingw.h>
 
 #define SEC_E_OK 0
 #define SEC_E_CERT_EXPIRED (-2146893016)
index 06ee9f6..0e78140 100644 (file)
@@ -25,6 +25,7 @@
 #define _SERVPROV_H
 #define _OLEIDL_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -51,4 +52,5 @@ DECLARE_INTERFACE_(IServiceProvider,IUnknown)
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index ed5e802..2a6fb10 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef _SETJMP_H
 #define _SETJMP_H
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 #ifndef RC_INVOKED
index 6dcfc57..c9d11f0 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SETUPAPI_H
 #define _SETUPAPI_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #include <commctrl.h>
 #include <pshpack1.h>
@@ -333,12 +334,14 @@ extern "C" {
 #define FLG_ADDREG_APPEND      0x00000008
 #define FLG_ADDREG_KEYONLY     0x00000010
 #define FLG_ADDREG_OVERWRITEONLY       0x00000020
+
 #if (_SETUPAPI_VER >= 0x0501)
 #define FLG_ADDREG_64BITKEY    0x00001000
 #define FLG_ADDREG_KEYONLY_COMMON      0x00002000
 #define FLG_ADDREG_32BITKEY    0x00004000
 #define FLG_ADDREG_DELREG_BIT  0x00008000
 #endif
+
 #define FLG_ADDREG_TYPE_MULTI_SZ       0x00010000
 #define FLG_ADDREG_TYPE_EXPAND_SZ      0x00020000
 #define FLG_ADDREG_TYPE_BINARY (0x00000000|FLG_ADDREG_BINVALUETYPE)
@@ -346,6 +349,7 @@ extern "C" {
 #define FLG_ADDREG_TYPE_NONE   (0x00020000|FLG_ADDREG_BINVALUETYPE)
 #define FLG_ADDREG_TYPE_MASK   (0xFFFF0000|FLG_ADDREG_BINVALUETYPE)
 #define FLG_DELREG_VALUE       0x00000000
+
 #if (_SETUPAPI_VER >= 0x0501)
 #define FLG_DELREG_TYPE_MASK   FLG_ADDREG_TYPE_MASK
 #define FLG_DELREG_TYPE_SZ     FLG_ADDREG_TYPE_SZ
@@ -360,6 +364,7 @@ extern "C" {
 #define FLG_DELREG_OPERATION_MASK      0x000000FE
 #define FLG_DELREG_MULTI_SZ_DELSTRING  (0x00000002|FLG_DELREG_TYPE_MULTI_SZ|FLG_ADDREG_DELREG_BIT)
 #endif
+
 #define FLG_BITREG_CLEARBITS   0x00000000
 #define FLG_BITREG_SETBITS     0x00000001
 #define FLG_PROFITEM_CURRENTUSER       0x00000001
@@ -434,9 +439,11 @@ extern "C" {
 #define NDW_INSTALLFLAG_KNOWNCLASS     0x00080000
 #define NDW_INSTALLFLAG_NEEDRESTART    0x00000080
 #define NDW_INSTALLFLAG_NEEDREBOOT     0x00000100
+
 #if (_SETUPAPI_VER >= 0x0502)
 #define SCWMI_CLOBBER_SECURITY  0x00000001
 #endif
+
 #define SETDIRID_NOT_FULL_PATH 0x00000001
 #define SP_COPY_DELETESOURCE   0x0000001
 #define SP_COPY_REPLACEONLY    0x0000002
@@ -552,12 +559,14 @@ extern "C" {
 #define SPINST_REGSVR  0x00000040
 #define SPINST_UNREGSVR        0x00000080
 #define SPINST_PROFILEITEMS    0x00000100
+
 #if (_SETUPAPI_VER >= 0x0501)
 #define SPINST_COPYINF 0x00000200
 #define SPINST_ALL     0x000003ff
 #else
 #define SPINST_ALL     0x000001ff
 #endif
+
 #define SPINST_SINGLESECTION   0x00010000
 #define SPINST_LOGCONFIG_IS_FORCED     0x00020000
 #define SPINST_LOGCONFIGS_ARE_OVERRIDES        0x00040000
@@ -927,13 +936,8 @@ typedef struct _SP_DRVINFO_DATA_V1_W {
     WCHAR     ProviderName[LINE_LEN];
 } SP_DRVINFO_DATA_V1_W, *PSP_DRVINFO_DATA_V1_W;
 
-#ifdef UNICODE
-typedef SP_DRVINFO_DATA_V1_W SP_DRVINFO_DATA_V1, *PSP_DRVINFO_DATA_V1;
-typedef SP_DRVINFO_DATA_V2_W SP_DRVINFO_DATA_V2, *PSP_DRVINFO_DATA_V2;
-#else
-typedef SP_DRVINFO_DATA_V1_A SP_DRVINFO_DATA_V1, *PSP_DRVINFO_DATA_V1;
-typedef SP_DRVINFO_DATA_V2_A SP_DRVINFO_DATA_V2, *PSP_DRVINFO_DATA_V2;
-#endif
+typedef __AW(SP_DRVINFO_DATA_V1_) SP_DRVINFO_DATA_V1, *PSP_DRVINFO_DATA_V1;
+typedef __AW(SP_DRVINFO_DATA_V2_) SP_DRVINFO_DATA_V2, *PSP_DRVINFO_DATA_V2;
 
 #if USE_SP_DRVINFO_DATA_V1
 typedef SP_DRVINFO_DATA_V1_A SP_DRVINFO_DATA_A, *PSP_DRVINFO_DATA_A;
@@ -1005,55 +1009,28 @@ typedef struct _SP_BACKUP_QUEUE_PARAMS_W {
     INT      FilenameOffset;
 } SP_BACKUP_QUEUE_PARAMS_W, *PSP_BACKUP_QUEUE_PARAMS_W;
 
-
-#ifdef UNICODE
-typedef SP_ORIGINAL_FILE_INFO_W SP_ORIGINAL_FILE_INFO, *PSP_ORIGINAL_FILE_INFO;
-typedef FILEPATHS_W FILEPATHS, *PFILEPATHS;
-typedef SOURCE_MEDIA_W SOURCE_MEDIA, *PSOURCE_MEDIA;
-typedef CABINET_INFO_W CABINET_INFO, *PCABINET_INFO;
-typedef FILE_IN_CABINET_INFO_W FILE_IN_CABINET_INFO, *PFILE_IN_CABINET_INFO;
-typedef SP_FILE_COPY_PARAMS_W SP_FILE_COPY_PARAMS, PSP_FILE_COPY_PARAMS;
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_W SP_DEVICE_INTERFACE_DETAIL_DATA,
+typedef __AW(SP_ORIGINAL_FILE_INFO_) SP_ORIGINAL_FILE_INFO, *PSP_ORIGINAL_FILE_INFO;
+typedef __AW(FILEPATHS_) FILEPATHS, *PFILEPATHS;
+typedef __AW(SOURCE_MEDIA_) SOURCE_MEDIA, *PSOURCE_MEDIA;
+typedef __AW(CABINET_INFO_) CABINET_INFO, *PCABINET_INFO;
+typedef __AW(FILE_IN_CABINET_INFO_) FILE_IN_CABINET_INFO, *PFILE_IN_CABINET_INFO;
+typedef __AW(SP_FILE_COPY_PARAMS_) SP_FILE_COPY_PARAMS, PSP_FILE_COPY_PARAMS;
+typedef __AW(SP_DEVICE_INTERFACE_DETAIL_DATA_) SP_DEVICE_INTERFACE_DETAIL_DATA,
     *PSP_DEVICE_INTERFACE_DETAIL_DATA;
-typedef SP_INTERFACE_DEVICE_DETAIL_DATA_W SP_INTERFACE_DEVICE_DETAIL_DATA,
+typedef __AW(SP_INTERFACE_DEVICE_DETAIL_DATA_) SP_INTERFACE_DEVICE_DETAIL_DATA,
     *PSP_INTERFACE_DEVICE_DETAIL_DATA; /* deprecated */
-typedef SP_DEVINFO_LIST_DETAIL_DATA_W SP_DEVINFO_LIST_DETAIL_DATA,
+typedef __AW(SP_DEVINFO_LIST_DETAIL_DATA_) SP_DEVINFO_LIST_DETAIL_DATA,
     *PSP_DEVINFO_LIST_DETAIL_DATA;
-typedef SP_DEVINSTALL_PARAMS_W SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;
-typedef SP_SELECTDEVICE_PARAMS_W SP_SELECTDEVICE_PARAMS, *PSP_SELECTDEVICE_PARAMS;
-typedef SP_TROUBLESHOOTER_PARAMS_W SP_TROUBLESHOOTER_PARAMS,
+typedef __AW(SP_DEVINSTALL_PARAMS_) SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;
+typedef __AW(SP_SELECTDEVICE_PARAMS_) SP_SELECTDEVICE_PARAMS, *PSP_SELECTDEVICE_PARAMS;
+typedef __AW(SP_TROUBLESHOOTER_PARAMS_) SP_TROUBLESHOOTER_PARAMS,
     *PSP_TROUBLESHOOTER_PARAMS;
-typedef SP_POWERMESSAGEWAKE_PARAMS_W SP_POWERMESSAGEWAKE_PARAMS,
+typedef __AW(SP_POWERMESSAGEWAKE_PARAMS_) SP_POWERMESSAGEWAKE_PARAMS,
     *PSP_POWERMESSAGEWAKE_PARAMS;
-typedef SP_DRVINFO_DETAIL_DATA_W SP_DRVINFO_DETAIL_DATA,
+typedef __AW(SP_DRVINFO_DETAIL_DATA_) SP_DRVINFO_DETAIL_DATA,
      *PSP_DRVINFO_DETAIL_DATA;
-typedef SP_BACKUP_QUEUE_PARAMS_W SP_BACKUP_QUEUE_PARAMS,
-    *PSP_BACKUP_QUEUE_PARAMS;
-#else
-typedef SP_ORIGINAL_FILE_INFO_A SP_ORIGINAL_FILE_INFO, *PSP_ORIGINAL_FILE_INFO;
-typedef FILEPATHS_A FILEPATHS, *PFILEPATHS;
-typedef SOURCE_MEDIA_A SOURCE_MEDIA, *PSOURCE_MEDIA;
-typedef CABINET_INFO_A CABINET_INFO, *PCABINET_INFO;
-typedef FILE_IN_CABINET_INFO_A FILE_IN_CABINET_INFO, *PFILE_IN_CABINET_INFO;
-typedef SP_FILE_COPY_PARAMS_A SP_FILE_COPY_PARAMS, *PSP_FILE_COPY_PARAMS;
-typedef SP_DEVICE_INTERFACE_DETAIL_DATA_A SP_DEVICE_INTERFACE_DETAIL_DATA,
-    *PSP_DEVICE_INTERFACE_DETAIL_DATA;
-typedef SP_INTERFACE_DEVICE_DETAIL_DATA_A SP_INTERFACE_DEVICE_DETAIL_DATA,
-    *PSP_INTERFACE_DEVICE_DETAIL_DATA; /* deprecated */
-typedef SP_DEVINFO_LIST_DETAIL_DATA_A SP_DEVINFO_LIST_DETAIL_DATA,
-    *PSP_DEVINFO_LIST_DETAIL_DATA;
-typedef SP_DEVINSTALL_PARAMS_A SP_DEVINSTALL_PARAMS, *PSP_DEVINSTALL_PARAMS;
-typedef SP_SELECTDEVICE_PARAMS_A SP_SELECTDEVICE_PARAMS,
-    *PSP_SELECTDEVICE_PARAMS;
-typedef SP_TROUBLESHOOTER_PARAMS_A SP_TROUBLESHOOTER_PARAMS,
-    *PSP_TROUBLESHOOTER_PARAMS;
-typedef SP_POWERMESSAGEWAKE_PARAMS_A SP_POWERMESSAGEWAKE_PARAMS,
-    *PSP_POWERMESSAGEWAKE_PARAMS;
-typedef SP_DRVINFO_DETAIL_DATA_A SP_DRVINFO_DETAIL_DATA,
-    *PSP_DRVINFO_DETAIL_DATA;
-typedef SP_BACKUP_QUEUE_PARAMS_A SP_BACKUP_QUEUE_PARAMS,
+typedef __AW(SP_BACKUP_QUEUE_PARAMS_) SP_BACKUP_QUEUE_PARAMS,
     *PSP_BACKUP_QUEUE_PARAMS;
-#endif /* UNICODE */
 
 WINSETUPAPI BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC,HINF,HINF,PCSTR,PVOID,UINT);
 WINSETUPAPI BOOL WINAPI SetupAddInstallSectionToDiskSpaceListW(HDSKSPC,HINF,HINF,PCWSTR,PVOID,UINT);
@@ -1073,10 +1050,12 @@ WINSETUPAPI VOID WINAPI SetupCloseInfFile(HINF);
 WINSETUPAPI VOID WINAPI SetupCloseLog(VOID);
 WINSETUPAPI BOOL WINAPI SetupCommitFileQueueA(HWND,HSPFILEQ,PSP_FILE_CALLBACK_A,PVOID);
 WINSETUPAPI BOOL WINAPI SetupCommitFileQueueW(HWND,HSPFILEQ,PSP_FILE_CALLBACK_W,PVOID);
+
 #if (_SETUPAPI_VER >= 0x502)
 WINSETUPAPI BOOL WINAPI SetupConfigureWmiFromInfSectionA(HINF,PCSTR,DWORD);
 WINSETUPAPI BOOL WINAPI SetupConfigureWmiFromInfSectionW(HINF,PCWSTR,DWORD);
 #endif
+
 WINSETUPAPI UINT WINAPI SetupCopyErrorA(HWND,PCSTR,PCSTR,PCSTR,PCSTR,PCSTR,UINT,DWORD,PSTR,DWORD,PDWORD);
 WINSETUPAPI UINT WINAPI SetupCopyErrorW(HWND,PCWSTR,PCWSTR,PCWSTR,PCWSTR,PCWSTR,UINT,DWORD,PWSTR,DWORD,PDWORD);
 WINSETUPAPI BOOL WINAPI SetupCopyOEMInfA(PCSTR,PCSTR,DWORD,DWORD,PSTR,DWORD,PDWORD,PSTR*);
@@ -1355,257 +1334,136 @@ WINSETUPAPI BOOL WINAPI SetupTerminateFileLog(HSPFILELOG);
 #define SetupDiOpenInterfaceDeviceA    SetupDiOpenDeviceInterfaceA
 #define SetupDiGetInterfaceDeviceDetailA       SetupDiGetDeviceInterfaceDetailA
 
-#ifdef UNICODE         
-#define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_W
-#define SetupAddInstallSectionToDiskSpaceList  SetupAddInstallSectionToDiskSpaceListW
-#define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListW
-#define SetupAddToDiskSpaceList        SetupAddToDiskSpaceListW
-#define SetupAddToSourceList   SetupAddToSourceListW
-#define SetupAdjustDiskSpaceList       SetupAdjustDiskSpaceListW
-#define SetupBackupError       SetupBackupErrorW
-#define SetupCommitFileQueue   SetupCommitFileQueueW
-#if (_SETUPAPI_VER >= 0x0502)
-#define SetupConfigureWmiFromInfSection SetupConfigureWmiFromInfSectionW
-#endif
-#define SetupCopyError SetupCopyErrorW
-#define SetupCopyOEMInf        SetupCopyOEMInfW
-#define SetupCreateDiskSpaceList       SetupCreateDiskSpaceListW
-#define SetupDecompressOrCopyFile      SetupDecompressOrCopyFileW
-#define SetupDefaultQueueCallback      SetupDefaultQueueCallbackW
-#define SetupDeleteError       SetupDeleteErrorW
-#define SetupDiBuildClassInfoListEx    SetupDiBuildClassInfoListExW
-#define SetupDiClassGuidsFromNameEx    SetupDiClassGuidsFromNameExW
-#define SetupDiClassGuidsFromName      SetupDiClassGuidsFromNameW
-#define SetupDiClassNameFromGuidEx     SetupDiClassNameFromGuidExW
-#define SetupDiClassNameFromGuid       SetupDiClassNameFromGuidW
-#define SetupDiCreateDeviceInfoListEx  SetupDiCreateDeviceInfoListExW
-#define SetupDiCreateDeviceInfo        SetupDiCreateDeviceInfoW
-#define SetupDiCreateDeviceInterfaceRegKey     SetupDiCreateDeviceInterfaceRegKeyW
-#define SetupDiCreateInterfaceDeviceRegKey     SetupDiCreateDeviceInterfaceRegKeyW
-#define SetupDiCreateDeviceInterface   SetupDiCreateDeviceInterfaceW
-#define SetupDiCreateInterfaceDevice   SetupDiCreateDeviceInterfaceW
-#define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyW
-#define SetupDiEnumDriverInfo  SetupDiEnumDriverInfoW
-#define SetupDiGetActualSectionToInstall       SetupDiGetActualSectionToInstallW
-#define SetupDiGetClassDescriptionEx   SetupDiGetClassDescriptionExW
-#define SetupDiGetClassDescription     SetupDiGetClassDescriptionW
-#define SetupDiGetClassDevPropertySheets       SetupDiGetClassDevPropertySheetsW
-#define SetupDiGetClassDevsEx  SetupDiGetClassDevsExW
-#define SetupDiGetClassDevs    SetupDiGetClassDevsW
-#define SetupDiGetClassImageListEx     SetupDiGetClassImageListExW
-#define SetupDiGetClassInstallParams   SetupDiGetClassInstallParamsW
-#define SetupDiGetClassRegistryProperty        SetupDiGetClassRegistryPropertyW
-#define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailW
-#define SetupDiGetDeviceInstallParams  SetupDiGetDeviceInstallParamsW
-#define SetupDiGetDeviceInstanceId     SetupDiGetDeviceInstanceIdW
-#define SetupDiGetDeviceInterfaceDetail        SetupDiGetDeviceInterfaceDetailW
-#define SetupDiGetInterfaceDeviceDetail        SetupDiGetDeviceInterfaceDetailW
-#define SetupDiGetDeviceRegistryProperty       SetupDiGetDeviceRegistryPropertyW
-#define SetupDiGetDriverInfoDetail     SetupDiGetDriverInfoDetailW
-#define SetupDiGetDriverInstallParams  SetupDiGetDriverInstallParamsW
-#define SetupDiGetHwProfileFriendlyNameEx      SetupDiGetHwProfileFriendlyNameExW
-#define SetupDiGetHwProfileFriendlyName        SetupDiGetHwProfileFriendlyNameW
-#define SetupDiGetHwProfileListEx      SetupDiGetHwProfileListExW
-#define SetupDiGetINFClass     SetupDiGetINFClassW
-#define SetupDiGetSelectedDriver       SetupDiGetSelectedDriverW
-#define SetupDiInstallClassEx  SetupDiInstallClassExW
-#define SetupDiInstallClass    SetupDiInstallClassW
-#define SetupDiOpenClassRegKeyEx       SetupDiOpenClassRegKeyExW
-#define SetupDiOpenDeviceInfo  SetupDiOpenDeviceInfoW
-#define SetupDiOpenDeviceInterface     SetupDiOpenDeviceInterfaceW
-#define SetupDiOpenInterfaceDevice     SetupDiOpenDeviceInterfaceW
-#define SetupDiSetClassInstallParams   SetupDiSetClassInstallParamsW
-#define SetupDiSetClassRegistryProperty        SetupDiSetClassRegistryPropertyW
-#define SetupDiSetDeviceInstallParams  SetupDiSetDeviceInstallParamsW
-#define SetupDiSetDeviceRegistryProperty       SetupDiSetDeviceRegistryPropertyW
-#define SetupDiSetDriverInstallParams  SetupDiSetDriverInstallParamsW
-#define SetupDiSetSelectedDriver       SetupDiSetSelectedDriverW
-#define SetupDuplicateDiskSpaceList    SetupDuplicateDiskSpaceListW
-#define SetupFindFirstLine     SetupFindFirstLineW
-#define SetupFindNextMatchLine SetupFindNextMatchLineW
-#define SetupFreeSourceList    SetupFreeSourceListW
-#define SetupGetBackupInformation      SetupGetBackupInformationW
-#define SetupGetFileCompressionInfo    SetupGetFileCompressionInfoW
-#define SetupGetInfFileList    SetupGetInfFileListW
-#define SetupGetInfInformation SetupGetInfInformationW
-#define SetupGetLineByIndex    SetupGetLineByIndexW
-#define SetupGetLineCount      SetupGetLineCountW
-#define SetupGetLineText       SetupGetLineTextW
-#define SetupGetMultiSzField   SetupGetMultiSzFieldW
-#define SetupGetSourceFileLocation     SetupGetSourceFileLocationW
-#define SetupGetSourceFileSize SetupGetSourceFileSizeW
-#define SetupGetSourceInfo     SetupGetSourceInfoW
-#define SetupGetStringField    SetupGetStringFieldW
-#define SetupGetTargetPath     SetupGetTargetPathW
-#define SetupInitializeFileLog SetupInitializeFileLogW
-#define SetupInstallFileEx     SetupInstallFileExW
-#define SetupInstallFilesFromInfSection        SetupInstallFilesFromInfSectionW
-#define SetupInstallFile       SetupInstallFileW
-#define SetupInstallFromInfSection     SetupInstallFromInfSectionW
-#define SetupInstallServicesFromInfSectionEx   SetupInstallServicesFromInfSectionExW
-#define SetupInstallServicesFromInfSection     SetupInstallServicesFromInfSectionW
-#define SetupIterateCabinet    SetupIterateCabinetW
-#define SetupLogError  SetupLogErrorW
-#define SetupLogFile   SetupLogFileW
-#define SetupOpenAppendInfFile SetupOpenAppendInfFileW
-#define SetupOpenInfFile       SetupOpenInfFileW
-#define SetupPromptForDisk     SetupPromptForDiskW
-#define SetupQueryDrivesInDiskSpaceList        SetupQueryDrivesInDiskSpaceListW
-#define SetupQueryFileLog      SetupQueryFileLogW
-#define SetupQueryInfFileInformation   SetupQueryInfFileInformationW
-#define SetupQueryInfOriginalFileInformation   SetupQueryInfOriginalFileInformationW
-#define SetupQueryInfVersionInformation        SetupQueryInfVersionInformationW
-#define SetupQuerySourceList   SetupQuerySourceListW
-#define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveW
-#define SetupQueueCopyIndirect SetupQueueCopyIndirectW
-#define SetupQueueCopySection  SetupQueueCopySectionW
-#define SetupQueueCopy SetupQueueCopyW
-#define SetupQueueDefaultCopy  SetupQueueDefaultCopyW
-#define SetupQueueDeleteSection        SetupQueueDeleteSectionW
-#define SetupQueueDelete       SetupQueueDeleteW
-#define SetupQueueRenameSection        SetupQueueRenameSectionW
-#define SetupQueueRename       SetupQueueRenameW
-#define SetupRemoveFileLogEntry        SetupRemoveFileLogEntryW
-#define SetupRemoveFromDiskSpaceList   SetupRemoveFromDiskSpaceListW
-#define SetupRemoveFromSourceList      SetupRemoveFromSourceListW
-#define SetupRemoveInstallSectionFromDiskSpaceList     SetupRemoveInstallSectionFromDiskSpaceListW
-#define SetupRemoveSectionFromDiskSpaceList    SetupRemoveSectionFromDiskSpaceListW
-#define SetupRenameError       SetupRenameErrorW
-#define SetupScanFileQueue     SetupScanFileQueueW
-#define SetupSetDirectoryIdEx  SetupSetDirectoryIdExW
-#define SetupSetDirectoryId    SetupSetDirectoryIdW
-#define SetupSetFileQueueAlternatePlatform     SetupSetFileQueueAlternatePlatformW
-#define SetupSetPlatformPathOverride   SetupSetPlatformPathOverrideW
-#define SetupSetSourceList     SetupSetSourceListW
-#else          
-#define PSP_FILE_CALLBACK PSP_FILE_CALLBACK_A
-#define SetupAddInstallSectionToDiskSpaceList  SetupAddInstallSectionToDiskSpaceListA
-#define SetupAddSectionToDiskSpaceList SetupAddSectionToDiskSpaceListA
-#define SetupAddToDiskSpaceList        SetupAddToDiskSpaceListA
-#define SetupAddToSourceList   SetupAddToSourceListA
-#define SetupAdjustDiskSpaceList       SetupAdjustDiskSpaceListA
-#define SetupBackupError       SetupBackupErrorA
-#define SetupCommitFileQueue   SetupCommitFileQueueA
+#define PSP_FILE_CALLBACK __AW(PSP_FILE_CALLBACK_)
+#define SetupAddInstallSectionToDiskSpaceList  __AW(SetupAddInstallSectionToDiskSpaceList)
+#define SetupAddSectionToDiskSpaceList __AW(SetupAddSectionToDiskSpaceList)
+#define SetupAddToDiskSpaceList        __AW(SetupAddToDiskSpaceList)
+#define SetupAddToSourceList   __AW(SetupAddToSourceList)
+#define SetupAdjustDiskSpaceList       __AW(SetupAdjustDiskSpaceList)
+#define SetupBackupError       __AW(SetupBackupError)
+#define SetupCommitFileQueue   __AW(SetupCommitFileQueue)
+
 #if (_SETUPAPI_VER >= 0x0502)
-#define SetupConfigureWmiFromInfSection SetupConfigureWmiFromInfSectionW
+#define SetupConfigureWmiFromInfSection __AW(SetupConfigureWmiFromInfSection)
 #endif
-#define SetupCopyError SetupCopyErrorA
-#define SetupCopyOEMInf        SetupCopyOEMInfA
-#define SetupCreateDiskSpaceList       SetupCreateDiskSpaceListA
-#define SetupDecompressOrCopyFile      SetupDecompressOrCopyFileA
-#define SetupDefaultQueueCallback      SetupDefaultQueueCallbackA
-#define SetupDeleteError       SetupDeleteErrorA
-#define SetupDiBuildClassInfoListEx    SetupDiBuildClassInfoListExA
-#define SetupDiClassGuidsFromName      SetupDiClassGuidsFromNameA
-#define SetupDiClassGuidsFromNameEx    SetupDiClassGuidsFromNameExA
-#define SetupDiClassNameFromGuid       SetupDiClassNameFromGuidA
-#define SetupDiClassNameFromGuidEx     SetupDiClassNameFromGuidExA
-#define SetupDiCreateDeviceInfo        SetupDiCreateDeviceInfoA
-#define SetupDiCreateDeviceInfoListEx  SetupDiCreateDeviceInfoListExA
-#define SetupDiCreateDeviceInterface   SetupDiCreateDeviceInterfaceA
-#define SetupDiCreateInterfaceDevice   SetupDiCreateDeviceInterfaceA
-#define SetupDiCreateDeviceInterfaceRegKey     SetupDiCreateDeviceInterfaceRegKeyA
-#define SetupDiCreateInterfaceDeviceRegKey     SetupDiCreateDeviceInterfaceRegKeyA
-#define SetupDiCreateDevRegKey SetupDiCreateDevRegKeyA
-#define SetupDiDeleteInterfaceDeviceData       SetupDiDeleteDeviceInterfaceData
-#define SetupDiEnumDriverInfo  SetupDiEnumDriverInfoA
-#define SetupDiGetActualSectionToInstall       SetupDiGetActualSectionToInstallA
-#define SetupDiGetClassDescription     SetupDiGetClassDescriptionA
-#define SetupDiGetClassDescriptionEx   SetupDiGetClassDescriptionExA
-#define SetupDiGetClassDevPropertySheets       SetupDiGetClassDevPropertySheetsA
-#define SetupDiGetClassDevs    SetupDiGetClassDevsA
-#define SetupDiGetClassDevsEx  SetupDiGetClassDevsExA
-#define SetupDiGetClassImageListEx     SetupDiGetClassImageListExA
-#define SetupDiGetClassInstallParams   SetupDiGetClassInstallParamsA
-#define SetupDiGetClassRegistryProperty        SetupDiGetClassRegistryPropertyA
-#define SetupDiGetDeviceInfoListDetail SetupDiGetDeviceInfoListDetailA
-#define SetupDiGetDeviceInstallParams  SetupDiGetDeviceInstallParamsA
-#define SetupDiGetDeviceInstanceId     SetupDiGetDeviceInstanceIdA
-#define SetupDiGetDeviceInterfaceDetail        SetupDiGetDeviceInterfaceDetailA
-#define SetupDiGetInterfaceDeviceDetail        SetupDiGetDeviceInterfaceDetailA
-#define SetupDiGetDeviceRegistryProperty       SetupDiGetDeviceRegistryPropertyA
-#define SetupDiGetDriverInfoDetail     SetupDiGetDriverInfoDetailA
-#define SetupDiGetDriverInstallParams  SetupDiGetDriverInstallParamsA
-#define SetupDiGetHwProfileFriendlyName        SetupDiGetHwProfileFriendlyNameA
-#define SetupDiGetHwProfileFriendlyNameEx      SetupDiGetHwProfileFriendlyNameExA
-#define SetupDiGetHwProfileListEx      SetupDiGetHwProfileListExA
-#define SetupDiGetINFClass     SetupDiGetINFClassA
-#define SetupDiGetSelectedDriver       SetupDiGetSelectedDriverA
-#define SetupDiInstallClass    SetupDiInstallClassA
-#define SetupDiInstallClassEx  SetupDiInstallClassExA
-#define SetupDiOpenClassRegKeyEx       SetupDiOpenClassRegKeyExA
-#define SetupDiOpenDeviceInfo  SetupDiOpenDeviceInfoA
-#define SetupDiOpenDeviceInterface     SetupDiOpenDeviceInterfaceA
-#define SetupDiOpenInterfaceDevice     SetupDiOpenDeviceInterfaceA
-#define SetupDiSetClassInstallParams   SetupDiSetClassInstallParamsA
-#define SetupDiSetClassRegistryProperty        SetupDiSetClassRegistryPropertyA
-#define SetupDiSetDeviceInstallParams  SetupDiSetDeviceInstallParamsA
-#define SetupDiSetDeviceRegistryProperty       SetupDiSetDeviceRegistryPropertyA
-#define SetupDiSetDriverInstallParams  SetupDiSetDriverInstallParamsA
-#define SetupDiSetSelectedDriver       SetupDiSetSelectedDriverA
-#define SetupDuplicateDiskSpaceList    SetupDuplicateDiskSpaceListA
-#define SetupFindFirstLine     SetupFindFirstLineA
-#define SetupFindNextMatchLine SetupFindNextMatchLineA
-#define SetupFreeSourceList    SetupFreeSourceListA
-#define SetupGetBackupInformation      SetupGetBackupInformationA
-#define SetupGetFileCompressionInfo    SetupGetFileCompressionInfoA
-#define SetupGetInfFileList    SetupGetInfFileListA
-#define SetupGetInfInformation SetupGetInfInformationA
-#define SetupGetLineByIndex    SetupGetLineByIndexA
-#define SetupGetLineCount      SetupGetLineCountA
-#define SetupGetLineText       SetupGetLineTextA
-#define SetupGetMultiSzField   SetupGetMultiSzFieldA
-#define SetupGetSourceFileLocation     SetupGetSourceFileLocationA
-#define SetupGetSourceFileSize SetupGetSourceFileSizeA
-#define SetupGetSourceInfo     SetupGetSourceInfoA
-#define SetupGetStringField    SetupGetStringFieldA
-#define SetupGetTargetPath     SetupGetTargetPathA
-#define SetupInitializeFileLog SetupInitializeFileLogA
-#define SetupInstallFile       SetupInstallFileA
-#define SetupInstallFileEx     SetupInstallFileExA
-#define SetupInstallFilesFromInfSection        SetupInstallFilesFromInfSectionA
-#define SetupInstallFromInfSection     SetupInstallFromInfSectionA
-#define SetupInstallServicesFromInfSection     SetupInstallServicesFromInfSectionA
-#define SetupInstallServicesFromInfSectionEx   SetupInstallServicesFromInfSectionExA
-#define SetupIterateCabinet    SetupIterateCabinetA
-#define SetupLogError  SetupLogErrorA
-#define SetupLogFile   SetupLogFileA
-#define SetupOpenAppendInfFile SetupOpenAppendInfFileA
-#define SetupOpenInfFile       SetupOpenInfFileA
-#define SetupPromptForDisk     SetupPromptForDiskA
-#define SetupQueryDrivesInDiskSpaceList        SetupQueryDrivesInDiskSpaceListA
-#define SetupQueryFileLog      SetupQueryFileLogA
-#define SetupQueryInfFileInformation   SetupQueryInfFileInformationA
-#define SetupQueryInfOriginalFileInformation   SetupQueryInfOriginalFileInformationA
-#define SetupQueryInfVersionInformation        SetupQueryInfVersionInformationA
-#define SetupQuerySourceList   SetupQuerySourceListA
-#define SetupQuerySpaceRequiredOnDrive SetupQuerySpaceRequiredOnDriveA
-#define SetupQueueCopy SetupQueueCopyA
-#define SetupQueueCopyIndirect SetupQueueCopyIndirectA
-#define SetupQueueCopySection  SetupQueueCopySectionA
-#define SetupQueueDefaultCopy  SetupQueueDefaultCopyA
-#define SetupQueueDelete       SetupQueueDeleteA
-#define SetupQueueDeleteSection        SetupQueueDeleteSectionA
-#define SetupQueueRename       SetupQueueRenameA
-#define SetupQueueRenameSection        SetupQueueRenameSectionA
-#define SetupRemoveFileLogEntry        SetupRemoveFileLogEntryA
-#define SetupRemoveFromDiskSpaceList   SetupRemoveFromDiskSpaceListA
-#define SetupRemoveFromSourceList      SetupRemoveFromSourceListA
-#define SetupRemoveInstallSectionFromDiskSpaceList     SetupRemoveInstallSectionFromDiskSpaceListA
-#define SetupRemoveSectionFromDiskSpaceList    SetupRemoveSectionFromDiskSpaceListA
-#define SetupRenameError       SetupRenameErrorA
-#define SetupScanFileQueue     SetupScanFileQueueA
-#define SetupSetDirectoryId    SetupSetDirectoryIdA
-#define SetupSetDirectoryIdEx  SetupSetDirectoryIdExA
-#define SetupSetFileQueueAlternatePlatform     SetupSetFileQueueAlternatePlatformA
-#define SetupSetPlatformPathOverride   SetupSetPlatformPathOverrideA
-#define SetupSetSourceList     SetupSetSourceListA
-#endif /* UNICODE */   
+
+#define SetupCopyError __AW(SetupCopyError)
+#define SetupCopyOEMInf        __AW(SetupCopyOEMInf)
+#define SetupCreateDiskSpaceList       __AW(SetupCreateDiskSpaceList)
+#define SetupDecompressOrCopyFile      __AW(SetupDecompressOrCopyFile)
+#define SetupDefaultQueueCallback      __AW(SetupDefaultQueueCallback)
+#define SetupDeleteError       __AW(SetupDeleteError)
+#define SetupDiBuildClassInfoListEx    __AW(SetupDiBuildClassInfoListEx)
+#define SetupDiClassGuidsFromNameEx    __AW(SetupDiClassGuidsFromNameEx)
+#define SetupDiClassGuidsFromName      __AW(SetupDiClassGuidsFromName)
+#define SetupDiClassNameFromGuidEx     __AW(SetupDiClassNameFromGuidEx)
+#define SetupDiClassNameFromGuid       __AW(SetupDiClassNameFromGuid)
+#define SetupDiCreateDeviceInfoListEx  __AW(SetupDiCreateDeviceInfoListEx)
+#define SetupDiCreateDeviceInfo        __AW(SetupDiCreateDeviceInfo)
+#define SetupDiCreateDeviceInterfaceRegKey     __AW(SetupDiCreateDeviceInterfaceRegKey)
+#define SetupDiCreateInterfaceDeviceRegKey     __AW(SetupDiCreateDeviceInterfaceRegKey)
+#define SetupDiCreateDeviceInterface   __AW(SetupDiCreateDeviceInterface)
+#define SetupDiCreateInterfaceDevice   __AW(SetupDiCreateDeviceInterface)
+#define SetupDiCreateDevRegKey __AW(SetupDiCreateDevRegKey)
+#define SetupDiEnumDriverInfo  __AW(SetupDiEnumDriverInfo)
+#define SetupDiGetActualSectionToInstall       __AW(SetupDiGetActualSectionToInstall)
+#define SetupDiGetClassDescriptionEx   __AW(SetupDiGetClassDescriptionEx)
+#define SetupDiGetClassDescription     __AW(SetupDiGetClassDescription)
+#define SetupDiGetClassDevPropertySheets       __AW(SetupDiGetClassDevPropertySheets)
+#define SetupDiGetClassDevsEx  __AW(SetupDiGetClassDevsEx)
+#define SetupDiGetClassDevs    __AW(SetupDiGetClassDevs)
+#define SetupDiGetClassImageListEx     __AW(SetupDiGetClassImageListEx)
+#define SetupDiGetClassInstallParams   __AW(SetupDiGetClassInstallParams)
+#define SetupDiGetClassRegistryProperty        __AW(SetupDiGetClassRegistryProperty)
+#define SetupDiGetDeviceInfoListDetail __AW(SetupDiGetDeviceInfoListDetail)
+#define SetupDiGetDeviceInstallParams  __AW(SetupDiGetDeviceInstallParams)
+#define SetupDiGetDeviceInstanceId     __AW(SetupDiGetDeviceInstanceId)
+#define SetupDiGetDeviceInterfaceDetail        __AW(SetupDiGetDeviceInterfaceDetail)
+#define SetupDiGetInterfaceDeviceDetail        __AW(SetupDiGetDeviceInterfaceDetail)
+#define SetupDiGetDeviceRegistryProperty       __AW(SetupDiGetDeviceRegistryProperty)
+#define SetupDiGetDriverInfoDetail     __AW(SetupDiGetDriverInfoDetail)
+#define SetupDiGetDriverInstallParams  __AW(SetupDiGetDriverInstallParams)
+#define SetupDiGetHwProfileFriendlyNameEx      __AW(SetupDiGetHwProfileFriendlyNameEx)
+#define SetupDiGetHwProfileFriendlyName        __AW(SetupDiGetHwProfileFriendlyName)
+#define SetupDiGetHwProfileListEx      __AW(SetupDiGetHwProfileListEx)
+#define SetupDiGetINFClass     __AW(SetupDiGetINFClass)
+#define SetupDiGetSelectedDriver       __AW(SetupDiGetSelectedDriver)
+#define SetupDiInstallClassEx  __AW(SetupDiInstallClassEx)
+#define SetupDiInstallClass    __AW(SetupDiInstallClass)
+#define SetupDiOpenClassRegKeyEx       __AW(SetupDiOpenClassRegKeyEx)
+#define SetupDiOpenDeviceInfo  __AW(SetupDiOpenDeviceInfo)
+#define SetupDiOpenDeviceInterface     __AW(SetupDiOpenDeviceInterface)
+#define SetupDiOpenInterfaceDevice     __AW(SetupDiOpenDeviceInterface)
+#define SetupDiSetClassInstallParams   __AW(SetupDiSetClassInstallParams)
+#define SetupDiSetClassRegistryProperty        __AW(SetupDiSetClassRegistryProperty)
+#define SetupDiSetDeviceInstallParams  __AW(SetupDiSetDeviceInstallParams)
+#define SetupDiSetDeviceRegistryProperty       __AW(SetupDiSetDeviceRegistryProperty)
+#define SetupDiSetDriverInstallParams  __AW(SetupDiSetDriverInstallParams)
+#define SetupDiSetSelectedDriver       __AW(SetupDiSetSelectedDriver)
+#define SetupDuplicateDiskSpaceList    __AW(SetupDuplicateDiskSpaceList)
+#define SetupFindFirstLine     __AW(SetupFindFirstLine)
+#define SetupFindNextMatchLine __AW(SetupFindNextMatchLine)
+#define SetupFreeSourceList    __AW(SetupFreeSourceList)
+#define SetupGetBackupInformation      __AW(SetupGetBackupInformation)
+#define SetupGetFileCompressionInfo    __AW(SetupGetFileCompressionInfo)
+#define SetupGetInfFileList    __AW(SetupGetInfFileList)
+#define SetupGetInfInformation __AW(SetupGetInfInformation)
+#define SetupGetLineByIndex    __AW(SetupGetLineByIndex)
+#define SetupGetLineCount      __AW(SetupGetLineCount)
+#define SetupGetLineText       __AW(SetupGetLineText)
+#define SetupGetMultiSzField   __AW(SetupGetMultiSzField)
+#define SetupGetSourceFileLocation     __AW(SetupGetSourceFileLocation)
+#define SetupGetSourceFileSize __AW(SetupGetSourceFileSize)
+#define SetupGetSourceInfo     __AW(SetupGetSourceInfo)
+#define SetupGetStringField    __AW(SetupGetStringField)
+#define SetupGetTargetPath     __AW(SetupGetTargetPath)
+#define SetupInitializeFileLog __AW(SetupInitializeFileLog)
+#define SetupInstallFileEx     __AW(SetupInstallFileEx)
+#define SetupInstallFilesFromInfSection        __AW(SetupInstallFilesFromInfSection)
+#define SetupInstallFile       __AW(SetupInstallFile)
+#define SetupInstallFromInfSection     __AW(SetupInstallFromInfSection)
+#define SetupInstallServicesFromInfSectionEx   __AW(SetupInstallServicesFromInfSectionEx)
+#define SetupInstallServicesFromInfSection     __AW(SetupInstallServicesFromInfSection)
+#define SetupIterateCabinet    __AW(SetupIterateCabinet)
+#define SetupLogError  __AW(SetupLogError)
+#define SetupLogFile   __AW(SetupLogFile)
+#define SetupOpenAppendInfFile __AW(SetupOpenAppendInfFile)
+#define SetupOpenInfFile       __AW(SetupOpenInfFile)
+#define SetupPromptForDisk     __AW(SetupPromptForDisk)
+#define SetupQueryDrivesInDiskSpaceList        __AW(SetupQueryDrivesInDiskSpaceList)
+#define SetupQueryFileLog      __AW(SetupQueryFileLog)
+#define SetupQueryInfFileInformation   __AW(SetupQueryInfFileInformation)
+#define SetupQueryInfOriginalFileInformation   __AW(SetupQueryInfOriginalFileInformation)
+#define SetupQueryInfVersionInformation        __AW(SetupQueryInfVersionInformation)
+#define SetupQuerySourceList   __AW(SetupQuerySourceList)
+#define SetupQuerySpaceRequiredOnDrive __AW(SetupQuerySpaceRequiredOnDrive)
+#define SetupQueueCopyIndirect __AW(SetupQueueCopyIndirect)
+#define SetupQueueCopySection  __AW(SetupQueueCopySection)
+#define SetupQueueCopy __AW(SetupQueueCopy)
+#define SetupQueueDefaultCopy  __AW(SetupQueueDefaultCopy)
+#define SetupQueueDeleteSection        __AW(SetupQueueDeleteSection)
+#define SetupQueueDelete       __AW(SetupQueueDelete)
+#define SetupQueueRenameSection        __AW(SetupQueueRenameSection)
+#define SetupQueueRename       __AW(SetupQueueRename)
+#define SetupRemoveFileLogEntry        __AW(SetupRemoveFileLogEntry)
+#define SetupRemoveFromDiskSpaceList   __AW(SetupRemoveFromDiskSpaceList)
+#define SetupRemoveFromSourceList      __AW(SetupRemoveFromSourceList)
+#define SetupRemoveInstallSectionFromDiskSpaceList     __AW(SetupRemoveInstallSectionFromDiskSpaceList)
+#define SetupRemoveSectionFromDiskSpaceList    __AW(SetupRemoveSectionFromDiskSpaceList)
+#define SetupRenameError       __AW(SetupRenameError)
+#define SetupScanFileQueue     __AW(SetupScanFileQueue)
+#define SetupSetDirectoryIdEx  __AW(SetupSetDirectoryIdEx)
+#define SetupSetDirectoryId    __AW(SetupSetDirectoryId)
+#define SetupSetFileQueueAlternatePlatform     __AW(SetupSetFileQueueAlternatePlatform)
+#define SetupSetPlatformPathOverride   __AW(SetupSetPlatformPathOverride)
+#define SetupSetSourceList     __AW(SetupSetSourceList)
+
 
 #endif /* RC_INVOKED */
 
 #ifdef __cplusplus
 }
 #endif
+
 #include <poppack.h>
 #endif
index 3b1a04e..0726a78 100644 (file)
@@ -24,8 +24,6 @@
 #ifndef        _SHARE_H
 #define        _SHARE_H
 #pragma GCC system_header
-
-/* All the headers include this file. */
 #include <_mingw.h>
 
 #define _SH_COMPAT     0x00    /* Compatibility */
index e25e4db..dc4c349 100644 (file)
 #ifndef _SHELLAPI_H
 #define _SHELLAPI_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define WINSHELLAPI DECLSPEC_IMPORT
 #define ABE_LEFT       0
 #define ABE_TOP        1
@@ -50,10 +52,12 @@ extern "C" {
 #define SEE_MASK_UNICODE           0x10000
 #define SEE_MASK_ASYNCOK           0x100000
 #define SEE_MASK_HMONITOR          0x200000
+
 #if (_WIN32_IE >= 0x0600)
 #define SEE_MASK_NOZONECHECKS      0x800000
 #define SEE_MASK_FLAG_LOG_USAGE    0x4000000
 #endif
+
 #define ABM_NEW        0
 #define ABM_REMOVE     1
 #define ABM_QUERYPOS   2
@@ -71,40 +75,50 @@ extern "C" {
 #define NIM_ADD        0
 #define NIM_MODIFY     1
 #define NIM_DELETE     2
+
 #if (_WIN32_IE >= 0x0500)
 #define NOTIFYICON_VERSION 3
-#if (_WIN32_WINNT >= 0x600)
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
 #define NOTIFYICON_VERSION_4  4
 #endif
+
 #define NIM_SETFOCUS   3
 #define NIM_SETVERSION 4
 #define NIN_POPUPOPEN WM_USER+6
 #define NIN_POPUPCLOSE WM_USER+7
 #endif
+
 #define NIF_MESSAGE    0x00000001
 #define NIF_ICON       0x00000002
 #define NIF_TIP                0x00000004
 #define NIF_STATE      0x00000008
+
 #if (_WIN32_IE >= 0x0500)
 #define NIF_INFO       0x00000010
 #endif
+
 #if (_WIN32_IE >= 0x0600)
 #define NIF_GUID       0x00000020
 #endif
+
 #if (_WIN32_IE >= 0x0500)
 #define NIIF_NONE      0x00000000
 #define NIIF_INFO      0x00000001
 #define NIIF_WARNING   0x00000002
 #define NIIF_ERROR     0x00000003
 #endif
+
 #if (_WIN32_IE >= 0x0600)
 #define NIIF_ICON_MASK 0x0000000F
 #define NIIF_NOSOUND   0x00000010
 #endif
+
 #if (_WIN32_IE >= 0x0500)
 #define NIS_HIDDEN     0x00000001
 #define NIS_SHAREDICON 0x00000002
 #endif
+
 #define SE_ERR_FNF     2
 #define SE_ERR_PNF     3
 #define SE_ERR_ACCESSDENIED    5
@@ -155,6 +169,7 @@ extern "C" {
 #define SHERB_NOCONFIRMATION 1
 #define SHERB_NOPROGRESSUI 2
 #define SHERB_NOSOUND 4
+
 #ifdef UNICODE
 #define NOTIFYICONDATA_V2_SIZE 936
 #define NOTIFYICONDATA_V1_SIZE 152
@@ -183,6 +198,7 @@ typedef struct _NOTIFYICONDATAA {
   UINT uFlags;
   UINT uCallbackMessage;
   HICON hIcon;
+
 #if _WIN32_IE >= 0x0500
   CHAR szTip[128];
   DWORD dwState;
@@ -197,10 +213,12 @@ typedef struct _NOTIFYICONDATAA {
 #else
   CHAR szTip[64];
 #endif
+
 #if _WIN32_IE >= 0x600
   GUID guidItem;
 #endif
-#if _WIN32_WINNT >= 0x600
+
+#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
   HICON hBalloonIcon;
 #endif
 } NOTIFYICONDATAA,*PNOTIFYICONDATAA;
@@ -212,6 +230,7 @@ typedef struct _NOTIFYICONDATAW {
   UINT uFlags;
   UINT uCallbackMessage;
   HICON hIcon;
+
 #if _WIN32_IE >= 0x0500
   WCHAR szTip[128];
   DWORD dwState;
@@ -226,10 +245,12 @@ typedef struct _NOTIFYICONDATAW {
 #else
   WCHAR szTip[64];
 #endif
+
 #if _WIN32_IE >= 0x600
   GUID guidItem;
 #endif
-#if _WIN32_WINNT >= 0x600
+
+#if _WIN32_WINNT >= _WIN32_WINNT_VISTA
   HICON hBalloonIcon;
 #endif
 } NOTIFYICONDATAW,*PNOTIFYICONDATAW;
@@ -343,7 +364,7 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR, LPSHQUERYRBINFO);
 HRESULT WINAPI SHEmptyRecycleBinA(HWND,LPCSTR,DWORD);
 HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
 
-#if (_WIN32_WINNT >= 0x600)
+#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
 #define SHIL_LARGE 0x0
 #define SHIL_SMALL 0x1
 #define SHIL_EXTRALARGE 0x2
@@ -353,45 +374,26 @@ HRESULT WINAPI SHEmptyRecycleBinW(HWND,LPCWSTR,DWORD);
 HRESULT WINAPI SHGetImageList(int,REFIID,void**);
 #endif
 
-#ifdef UNICODE
-typedef NOTIFYICONDATAW NOTIFYICONDATA,*PNOTIFYICONDATA;
-typedef SHELLEXECUTEINFOW SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
-typedef SHFILEOPSTRUCTW SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
-typedef SHFILEINFOW SHFILEINFO;
-#define DragQueryFile DragQueryFileW
-#define ExtractAssociatedIcon ExtractAssociatedIconW
-#define ExtractIcon ExtractIconW
-#define ExtractIconEx ExtractIconExW
-#define FindExecutable FindExecutableW
-#define Shell_NotifyIcon Shell_NotifyIconW
-#define ShellAbout ShellAboutW
-#define ShellExecute ShellExecuteW
-#define ShellExecuteEx ShellExecuteExW
-#define SHFileOperation SHFileOperationW
-#define SHGetFileInfo SHGetFileInfoW
-#define SHQueryRecycleBin SHQueryRecycleBinW
-#define SHEmptyRecycleBin SHEmptyRecycleBinW
+typedef __AW(NOTIFYICONDATA) NOTIFYICONDATA,*PNOTIFYICONDATA;
+typedef __AW(SHELLEXECUTEINFO) SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
+typedef __AW(SHFILEOPSTRUCT) SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
+typedef __AW(SHFILEINFO) SHFILEINFO;
+#define DragQueryFile __AW(DragQueryFile)
+#define ExtractAssociatedIcon __AW(ExtractAssociatedIcon)
+#define ExtractIcon __AW(ExtractIcon)
+#define ExtractIconEx __AW(ExtractIconEx)
+#define FindExecutable __AW(FindExecutable)
+#define Shell_NotifyIcon __AW(Shell_NotifyIcon)
+#define ShellAbout __AW(ShellAbout)
+#define ShellExecute __AW(ShellExecute)
+#define ShellExecuteEx __AW(ShellExecuteEx)
+#define SHFileOperation __AW(SHFileOperation)
+#define SHGetFileInfo __AW(SHGetFileInfo)
+#define SHQueryRecycleBin __AW(SHQueryRecycleBin)
+#define SHEmptyRecycleBin __AW(SHEmptyRecycleBin)
 
-#else
-typedef NOTIFYICONDATAA NOTIFYICONDATA,*PNOTIFYICONDATA;
-typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO,*LPSHELLEXECUTEINFO;
-typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT,*LPSHFILEOPSTRUCT;
-typedef SHFILEINFOA SHFILEINFO;
-#define DragQueryFile DragQueryFileA
-#define ExtractAssociatedIcon ExtractAssociatedIconA
-#define ExtractIcon ExtractIconA
-#define ExtractIconEx ExtractIconExA
-#define FindExecutable FindExecutableA
-#define Shell_NotifyIcon Shell_NotifyIconA
-#define ShellAbout ShellAboutA
-#define ShellExecute ShellExecuteA
-#define ShellExecuteEx ShellExecuteExA
-#define SHFileOperation SHFileOperationA
-#define SHGetFileInfo SHGetFileInfoA
-#define SHQueryRecycleBin SHQueryRecycleBinA
-#define SHEmptyRecycleBin SHEmptyRecycleBinA
-#endif
 #ifdef __cplusplus
 }
 #endif
+
 #endif
index ae3d758..4b35550 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SHLDISP_H
 #define _SHLDISP_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -38,7 +39,7 @@ typedef enum tagAUTOCOMPLETEOPTIONS {
     ACO_USETAB = 0x10,
     ACO_UPDOWNKEYDROPSLIST = 0x20,
     ACO_RTLREADING = 0x40,
-#if (_WIN32_WINNT >= 0x0600)
+#if (_WIN32_WINNT >= _WIN32_WINNT_VISTA)
     ACO_WORD_FILTER = 0x80,
     ACO_NOPREFIXFILTERING = 0x100
 #endif
index ca213d7..327c9ec 100644 (file)
 #ifndef _SHLGUID_H
 #define _SHLGUID_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 #define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46)
 #define SID_SShellBrowser IID_IShellBrowser
 extern const GUID CLSID_ShellDesktop;
@@ -92,32 +94,27 @@ extern const GUID CLSID_ACLMulti;
 extern const GUID IID_IObjMgr;
 extern const GUID CLSID_ACListISF;
 extern const GUID IID_IACList;
-#if (_WIN32_IE >= 0x400 || _WIN32_WINNT >= 0x500)
+
+#define IID_IFileViewer        __AW(IID_IFileViewer)
+#define IID_IShellLink __AW(IID_IShellLink)
+#define IID_IExtractIcon       __AW(IID_IExtractIcon)
+#define IID_IShellCopyHook     __AW(IID_IShellCopyHook)
+#define IID_IShellExecuteHook  __AW(IID_IShellExecuteHook)
+#define IID_INewShortcutHook   __AW(IID_INewShortcutHook)
+
+#if (_WIN32_IE >= 0x400 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 extern const GUID IID_IPersistFolder2;
 #endif
-#if (_WIN32_WINNT >= 0x500)
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
 extern const GUID IID_IPersistFolder3;
 extern const GUID IID_IShellFolder2;
 extern const GUID IID_IFileSystemBindData;
 #endif
-#if (_WIN32_WINNT >= 0x501)
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
 extern const GUID IID_IFolderView;
 #endif
-#ifdef UNICODE
-#define IID_IFileViewer        IID_IFileViewerW
-#define IID_IShellLink IID_IShellLinkW
-#define IID_IExtractIcon       IID_IExtractIconW
-#define IID_IShellCopyHook     IID_IShellCopyHookW
-#define IID_IShellExecuteHook  IID_IShellExecuteHookW
-#define IID_INewShortcutHook   IID_INewShortcutHookW
-#else
-#define IID_IFileViewer        IID_IFileViewerA
-#define IID_IShellLink IID_IShellLinkA
-#define IID_IExtractIcon       IID_IExtractIconA
-#define IID_IShellCopyHook     IID_IShellCopyHookA
-#define IID_IShellExecuteHook  IID_IShellExecuteHookA
-#define IID_INewShortcutHook   IID_INewShortcutHookA
-#endif
 
 #ifdef __cplusplus
 }
index de33a67..c723ad4 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef _SHLOBJ_H
 #define _SHLOBJ_H
 #pragma GCC system_header
+#include <_mingw.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -59,15 +60,9 @@ extern "C" {
 #define BFFM_SETSELECTIONW (WM_USER + 103)
 #define BFFM_SETOKTEXT (WM_USER + 105)
 #define BFFM_SETEXPANDED (WM_USER + 106)
-#ifdef UNICODE
-#define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTW
-#define BFFM_SETSELECTION   BFFM_SETSELECTIONW
-#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDW
-#else
-#define BFFM_SETSTATUSTEXT  BFFM_SETSTATUSTEXTA
-#define BFFM_SETSELECTION   BFFM_SETSELECTIONA
-#define BFFM_VALIDATEFAILED BFFM_VALIDATEFAILEDA
-#endif
+#define BFFM_SETSTATUSTEXT  __AW(BFFM_SETSTATUSTEXT)
+#define BFFM_SETSELECTION   __AW(BFFM_SETSELECTION)
+#define BFFM_VALIDATEFAILED __AW(BFFM_VALIDATEFAILED)
 #define DVASPECT_SHORTNAME 2
 typedef enum tagSHARD {
     SHARD_PIDL = 0x00000001,
@@ -79,11 +74,7 @@ typedef enum tagSHARD {
     SHARD_APPIDINFOLINK = 0x00000007,
     SHARD_SHELLITEM = 0x00000008
 } SHARD;
-#ifdef UNICODE
-#define SHARD_PATH SHARD_PATHW
-#else
-#define SHARD_PATH SHARD_PATHA
-#endif
+#define SHARD_PATH __AW(SHARD_PATH)
 #define SHCNE_RENAMEITEM       1
 #define SHCNE_CREATE   2
 #define SHCNE_DELETE   4
@@ -117,13 +108,8 @@ typedef enum tagSHARD {
 #define SHCNF_TYPE     0xFF
 #define SHCNF_FLUSH    0x1000
 #define SHCNF_FLUSHNOWAIT      0x2000
-#ifdef UNICODE
-#define SHCNF_PATH      SHCNF_PATHW
-#define SHCNF_PRINTER   SHCNF_PRINTERW
-#else
-#define SHCNF_PATH      SHCNF_PATHA
-#define SHCNF_PRINTER   SHCNF_PRINTERA
-#endif
+#define SHCNF_PATH      __AW(SHCNF_PATH)
+#define SHCNF_PRINTER   __AW(SHCNF_PRINTER)
 #define SFGAO_CANCOPY  DROPEFFECT_COPY
 #define SFGAO_CANMOVE  DROPEFFECT_MOVE
 #define SFGAO_CANLINK  DROPEFFECT_LINK
@@ -175,9 +161,11 @@ typedef enum tagSHARD {
 #define SHDID_NET_SHARE        15
 #define SHDID_NET_RESTOFNET    16
 #define SHDID_NET_OTHER        17
+
 #ifndef REGSTR_PATH_EXPLORER
 #define REGSTR_PATH_EXPLORER   TEXT("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer")
 #endif
+
 #define REGSTR_PATH_SPECIAL_FOLDERS    REGSTR_PATH_EXPLORER TEXT("\\Shell Folders")
 #define CSIDL_DESKTOP  0
 #define CSIDL_INTERNET  1
@@ -251,17 +239,10 @@ typedef enum tagSHARD {
 #define CFSTR_FILENAMEMAPW     TEXT("FileNameMapW")
 #define CFSTR_FILEDESCRIPTORW  TEXT("FileGroupDescriptorW")
 #define CFSTR_INETURLW         TEXT("UniformResourceLocatorW")
-#ifdef UNICODE
-#define CFSTR_FILENAME         CFSTR_FILENAMEW
-#define CFSTR_FILENAMEMAP      CFSTR_FILENAMEMAPW
-#define CFSTR_FILEDESCRIPTOR   CFSTR_FILEDESCRIPTORW
-#define CFSTR_INETURL          CFSTR_INETURLW
-#else
-#define CFSTR_FILENAME         CFSTR_FILENAMEA
-#define CFSTR_FILENAMEMAP      CFSTR_FILENAMEMAPA
-#define CFSTR_FILEDESCRIPTOR   CFSTR_FILEDESCRIPTORA
-#define CFSTR_INETURL          CFSTR_INETURLA
-#endif
+#define CFSTR_FILENAME         __AW(CFSTR_FILENAME)
+#define CFSTR_FILENAMEMAP      __AW(CFSTR_FILENAMEMAP)
+#define CFSTR_FILEDESCRIPTOR   __AW(CFSTR_FILEDESCRIPTOR)
+#define CFSTR_INETURL          __AW(CFSTR_INETURL)
 #define CFSTR_PRINTERGROUP     TEXT("PrinterFriendlyName")
 #define CFSTR_INDRAGLOOP       TEXT("InShellDragLoop")
 #define CFSTR_PASTESUCCEEDED   TEXT("Paste Succeeded")
@@ -283,30 +264,18 @@ typedef enum tagSHARD {
 #define GCS_HELPTEXTW    5
 #define GCS_VALIDATEW    6
 #define GCS_UNICODE      4
-#ifdef UNICODE
-#define GCS_VERB        GCS_VERBW
-#define GCS_HELPTEXT    GCS_HELPTEXTW
-#define GCS_VALIDATE    GCS_VALIDATEW
-#else
-#define GCS_VERB        GCS_VERBA
-#define GCS_HELPTEXT    GCS_HELPTEXTA
-#define GCS_VALIDATE    GCS_VALIDATEA
-#endif
+#define GCS_VERB        __AW(GCS_VERB)
+#define GCS_HELPTEXT    __AW(GCS_HELPTEXT)
+#define GCS_VALIDATE    __AW(GCS_VALIDATE)
 #define CMDSTR_NEWFOLDERA      "NewFolder"
 #define CMDSTR_VIEWLISTA       "ViewList"
 #define CMDSTR_VIEWDETAILSA    "ViewDetails"
 #define CMDSTR_NEWFOLDERW      L"NewFolder"
 #define CMDSTR_VIEWLISTW       L"ViewList"
 #define CMDSTR_VIEWDETAILSW    L"ViewDetails"
-#ifdef UNICODE
-#define CMDSTR_NEWFOLDER       CMDSTR_NEWFOLDERW
-#define CMDSTR_VIEWLIST                CMDSTR_VIEWLISTW
-#define CMDSTR_VIEWDETAILS     CMDSTR_VIEWDETAILSW
-#else
-#define CMDSTR_NEWFOLDER       CMDSTR_NEWFOLDER
-#define CMDSTR_VIEWLIST                CMDSTR_VIEWLIST
-#define CMDSTR_VIEWDETAILS     CMDSTR_VIEWDETAILS
-#endif
+#define CMDSTR_NEWFOLDER       __AW(CMDSTR_NEWFOLDER)
+#define CMDSTR_VIEWLIST                __AW(CMDSTR_VIEWLIST)
+#define CMDSTR_VIEWDETAILS     __AW(CMDSTR_VIEWDETAILS)
 #define CMIC_MASK_HOTKEY       SEE_MASK_HOTKEY
 #define CMIC_MASK_ICON SEE_MASK_ICON
 #define CMIC_MASK_FLAG_NO_UI   SEE_MASK_FLAG_NO_UI
@@ -547,40 +516,7 @@ typedef enum {
        SVUIA_DEACTIVATE,SVUIA_ACTIVATE_NOFOCUS,SVUIA_ACTIVATE_FOCUS,
        SVUIA_INPLACEACTIVATE
 } SVUIA_STATUS;
-#if (_WIN32_IE >= 0x0500)
-typedef struct tagEXTRASEARCH
-{
-       GUID guidSearch;
-       WCHAR wszFriendlyName[80];
-       WCHAR wszUrl[2084];
-} EXTRASEARCH, *LPEXTRASEARCH;
-typedef DWORD SHCOLSTATEF;
-typedef struct
-{
-       GUID fmtid;
-       DWORD pid;
-} SHCOLUMNID, *LPSHCOLUMNID;
-typedef const SHCOLUMNID *LPCSHCOLUMNID;
-typedef struct _SHELLDETAILS
-{
-       int fmt; 
-       int cxChar;
-       STRRET str;
-} SHELLDETAILS, *LPSHELLDETAILS;
-typedef struct
-{
-       LPITEMIDLIST pidlTargetFolder;
-       WCHAR szTargetParsingName[MAX_PATH];
-       WCHAR szNetworkProvider[MAX_PATH];
-       DWORD dwAttributes;
-       int csidl;
-} PERSIST_FOLDER_TARGET_INFO;
 
-typedef enum {
-       SHGFP_TYPE_CURRENT = 0,
-       SHGFP_TYPE_DEFAULT = 1,
-} SHGFP_TYPE;
-#endif
 
 
 DECLARE_ENUMERATOR_(IEnumIDList,LPITEMIDLIST);
@@ -658,87 +594,6 @@ DECLARE_INTERFACE_(IContextMenu3,IContextMenu2)
 #undef INTERFACE
 typedef IContextMenu3 *LPCONTEXTMENU3;
 
-#if (_WIN32_IE >= 0x0500)
-#pragma pack(push,8)
-typedef struct {
-       ULONG dwFlags;
-       ULONG dwReserved;
-       WCHAR wszFolder[MAX_PATH];
-} SHCOLUMNINIT,*LPSHCOLUMNINIT;
-typedef const SHCOLUMNINIT* LPCSHCOLUMNINIT;
-typedef struct {
-       ULONG dwFlags;
-       DWORD dwFileAttributes;
-       ULONG dwReserved;
-       WCHAR *pwszExt;
-       WCHAR wszFile[MAX_PATH];
-} SHCOLUMNDATA,*LPSHCOLUMNDATA;
-typedef const SHCOLUMNDATA* LPCSHCOLUMNDATA;
-#pragma pack(pop)
-
-#define MAX_COLUMN_NAME_LEN 80
-#define MAX_COLUMN_DESC_LEN 128
-
-#pragma pack(push,1)
-typedef struct {
-       SHCOLUMNID scid;
-       VARTYPE vt;
-       DWORD fmt;
-       UINT cChars;
-       DWORD csFlags;
-       WCHAR wszTitle[MAX_COLUMN_NAME_LEN];
-       WCHAR wszDescription[MAX_COLUMN_DESC_LEN];
-} SHCOLUMNINFO,*LPSHCOLUMNINFO;
-typedef const SHCOLUMNINFO* LPCSHCOLUMNINFO;
-#pragma pack(pop)
-
-typedef enum {
-       SHCOLSTATE_TYPE_STR = 0x00000001,
-       SHCOLSTATE_TYPE_INT = 0x00000002,
-       SHCOLSTATE_TYPE_DATE = 0x00000003,
-       SHCOLSTATE_TYPEMASK = 0x0000000f,
-       SHCOLSTATE_ONBYDEFAULT = 0x00000010,
-       SHCOLSTATE_SLOW = 0x00000020,
-       SHCOLSTATE_EXTENDED = 0x00000040,
-       SHCOLSTATE_SECONDARYUI = 0x00000080,
-       SHCOLSTATE_HIDDEN = 0x00000100,
-       SHCOLSTATE_PREFER_VARCMP = 0x00000200
-} SHCOLSTATE;
-
-#ifdef COBJMACROS
-#define IContextMenu2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IContextMenu2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IContextMenu2_Release(T) (T)->lpVtbl->Release(T)
-#define IContextMenu2_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
-#define IContextMenu2_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
-#define IContextMenu2_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
-#define IContextMenu2_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
-#endif
-
-#ifdef COBJMACROS
-#define IContextMenu3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IContextMenu3_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IContextMenu3_Release(T) (T)->lpVtbl->Release(T)
-#define IContextMenu3_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
-#define IContextMenu3_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
-#define IContextMenu3_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
-#define IContextMenu3_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
-#define IContextMenu3_HandleMenuMsg2(T,a,b,c,d) (T)->lpVtbl->HandleMenuMsg(T,a,b,c,d)
-#endif
-
-#define INTERFACE IColumnProvider
-DECLARE_INTERFACE_(IColumnProvider,IUnknown)
-{
-       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-       STDMETHOD_(ULONG,Release)(THIS) PURE;
-       STDMETHOD(Initialize)(THIS_ LPCSHCOLUMNINIT) PURE;
-       STDMETHOD(GetColumnInfo)(THIS_ DWORD,SHCOLUMNINFO*) PURE;
-       STDMETHOD(GetItemData)(THIS_ LPCSHCOLUMNID,LPCSHCOLUMNDATA,VARIANT*) PURE;
-};
-#undef INTERFACE
-#endif  /* _WIN32_IE >= 0x0500 */
-
 #define INTERFACE IQueryInfo
 DECLARE_INTERFACE_(IQueryInfo,IUnknown)
 {
@@ -813,13 +668,8 @@ typedef IExtractIconW *LPEXTRACTICONW;
 #define IExtractIconW_Extract(T,a,b,c,d,e) (T)->lpVtbl->Extract(T,a,b,c,d,e)
 #endif
 
-#ifdef UNICODE
-#define IExtractIcon IExtractIconW
-#define LPEXTRACTICON LPEXTRACTICONW
-#else
-#define IExtractIcon IExtractIconA
-#define LPEXTRACTICON LPEXTRACTICONA
-#endif
+#define IExtractIcon __AW(IExtractIcon)
+#define LPEXTRACTICON __AW(LPEXTRACTICON)
 
 #define INTERFACE IShellLinkA
 DECLARE_INTERFACE_(IShellLinkA, IUnknown)
@@ -959,62 +809,6 @@ typedef IShellFolder *LPSHELLFOLDER;
 #define IShellFolder_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
 #endif
 
-#if (_WIN32_IE >= 0x0500)
-
-DECLARE_ENUMERATOR_(IEnumExtraSearch,LPEXTRASEARCH);
-typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
-
-#define INTERFACE IShellFolder2
-DECLARE_INTERFACE_(IShellFolder2, IShellFolder)
-{
-       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-       STDMETHOD_(ULONG,Release)(THIS) PURE;
-       STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
-       STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
-       STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
-       STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
-       STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
-       STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
-       STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
-       STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
-       STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
-       STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
-       STDMETHOD(GetDefaultSearchGUID)(THIS_ GUID*) PURE;
-       STDMETHOD(EnumSearches)(THIS_ IEnumExtraSearch**) PURE;
-       STDMETHOD(GetDefaultColumn)(THIS_ DWORD,ULONG*,ULONG*) PURE;
-       STDMETHOD(GetDefaultColumnState)(THIS_ UINT,SHCOLSTATEF*) PURE;
-       STDMETHOD(GetDetailsEx)(THIS_ LPCITEMIDLIST,const SHCOLUMNID*,VARIANT*) PURE;
-       STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST,UINT,SHELLDETAILS*) PURE;
-       STDMETHOD(MapColumnToSCID)(THIS_ UINT,SHCOLUMNID*) PURE;
-};
-#undef INTERFACE
-typedef IShellFolder2 *LPSHELLFOLDER2;
-
-#ifdef COBJMACROS
-#define IShellFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IShellFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IShellFolder2_Release(T) (T)->lpVtbl->Release(T)
-#define IShellFolder2_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
-#define IShellFolder2_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
-#define IShellFolder2_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
-#define IShellFolder2_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
-#define IShellFolder2_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
-#define IShellFolder2_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
-#define IShellFolder2_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
-#define IShellFolder2_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
-#define IShellFolder2_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
-#define IShellFolder2_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
-#define IShellFolder2_GetDefaultSearchGUID(T,a) (T)->lpVtbl->GetDefaultSearchGUID(T,a)
-#define IShellFolder2_EnumSearches(T,a) (T)->lpVtbl->EnumSearches(T,a)
-#define IShellFolder2_GetDefaultColumn(T,a,b,c) (T)->lpVtbl->GetDefaultColumn(T,a,b,c)
-#define IShellFolder2_GetDefaultColumnState(T,a,b) (T)->lpVtbl->GetDefaultColumnState(T,a,b)
-#define IShellFolder2_GetDetailsEx(T,a,b,c) (T)->lpVtbl->GetDetailsEx(T,a,b,c)
-#define IShellFolder2_GetDetailsOf(T,a,b,c) (T)->lpVtbl->GetDetailsOf(T,a,b,c)
-#define IShellFolder2_MapColumnToSCID(T,a,b) (T)->lpVtbl->MapColumnToSCID(T,a,b)
-#endif
-
-#endif /* _WIN32_IE >= 0x0500 */
 #define INTERFACE ICopyHook
 DECLARE_INTERFACE_(ICopyHook, IUnknown)
 {
@@ -1082,62 +876,6 @@ typedef IPersistFolder *LPPERSISTFOLDER;
 #define IPersistFolder_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
 #endif
 
-#if (_WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500)
-
-#define INTERFACE IPersistFolder2
-DECLARE_INTERFACE_(IPersistFolder2,IPersistFolder)
-{
-       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-       STDMETHOD_(ULONG,Release)(THIS) PURE;
-       STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
-       STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
-       STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
-};
-#undef INTERFACE
-typedef IPersistFolder2 *LPPERSISTFOLDER2;
-
-#ifdef COBJMACROS
-#define IPersistFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistFolder2_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistFolder2_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistFolder2_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
-#define IPersistFolder2_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
-#endif
-
-#endif /* _WIN32_IE >= 0x0400 || _WIN32_WINNT >= 0x0500 */
-
-#if (_WIN32_IE >= 0x0500)
-
-#define INTERFACE IPersistFolder3
-DECLARE_INTERFACE_(IPersistFolder3,IPersistFolder2)
-{
-       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-       STDMETHOD_(ULONG,Release)(THIS) PURE;
-       STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
-       STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
-       STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
-       STDMETHOD(InitializeEx)(THIS_ IBindCtx*,LPCITEMIDLIST,const PERSIST_FOLDER_TARGET_INFO*) PURE;
-       STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO*) PURE;
-};
-#undef INTERFACE
-typedef IPersistFolder3 *LPPERSISTFOLDER3;
-
-#ifdef COBJMACROS
-#define IPersistFolder3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
-#define IPersistFolder3_AddRef(T) (T)->lpVtbl->AddRef(T)
-#define IPersistFolder3_Release(T) (T)->lpVtbl->Release(T)
-#define IPersistFolder3_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
-#define IPersistFolder3_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
-#define IPersistFolder3_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
-#define IPersistFolder3_InitializeEx(T,a,b,c) (T)->lpVtbl->InitializeEx(T,a,b,c)
-#define IPersistFolder3_GetFolderTargetInfo(T,a) (T)->lpVtbl->GetFolderTargetInfo(T,a)
-#endif
-
-#endif /* _WIN32_IE >= 0x0500 */
-
 typedef _COM_interface IShellBrowser *LPSHELLBROWSER;
 typedef _COM_interface IShellView *LPSHELLVIEW;
 
@@ -1219,11 +957,13 @@ DECLARE_INTERFACE_(IShellView,IOleWindow)
 #define IShellView_GetWindow(T,a) (T)->lpVtbl->GetWindow(T,a)
 #define IShellView_ContextSensitiveHelp(T,a) (T)->lpVtbl->ContextSensitiveHelp(T,a)
 #define IShellView_TranslateAccelerator(T,a) (T)->lpVtbl->TranslateAccelerator(T,a)
+
 #ifdef _FIX_ENABLEMODELESS_CONFLICT
 #define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModelessSV(T,a)
 #else
 #define IShellView_EnableModeless(T,a) (T)->lpVtbl->EnableModeless(T,a)
 #endif
+
 #define IShellView_UIActivate(T,a) (T)->lpVtbl->UIActivate(T,a)
 #define IShellView_Refresh(T) (T)->lpVtbl->Refresh(T)
 #define IShellView_CreateViewWindow(T,a,b,c,d,e) (T)->lpVtbl->CreateViewWindow(T,a,b,c,d,e)
@@ -1277,11 +1017,13 @@ DECLARE_INTERFACE_(IShellView2,IShellView)
        STDMETHOD(GetWindow)(THIS_ HWND*) PURE;
        STDMETHOD(ContextSensitiveHelp)(THIS_ BOOL) PURE;
        STDMETHOD(TranslateAccelerator) (THIS_ LPMSG) PURE;
+
 #ifdef _FIX_ENABLEMODELESS_CONFLICT
        STDMETHOD(EnableModelessSV)(THIS_ BOOL) PURE;
 #else
        STDMETHOD(EnableModeless)(THIS_ BOOL) PURE;
 #endif
+
        STDMETHOD(UIActivate)(THIS_ UINT) PURE;
        STDMETHOD(Refresh) (THIS) PURE;
        STDMETHOD(CreateViewWindow)(THIS_ IShellView*,LPCFOLDERSETTINGS,LPSHELLBROWSER,RECT*,HWND*) PURE;
@@ -1370,69 +1112,270 @@ DECLARE_INTERFACE_(IShellIconOverlayIdentifier,IUnknown)
 };
 #undef INTERFACE
 
-#if (_WIN32_WINNT >= 0x0501) /* WXP */
-typedef _COM_interface IFolderView *LPFOLDERVIEW;
+#define ISIOI_ICONFILE 0x00000001
+#define ISIOI_ICONINDEX 0x00000002
 
-#define INTERFACE IFolderView
-DECLARE_INTERFACE_(IFolderView,IUnknown)
-{
-   STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
-   STDMETHOD_(ULONG,AddRef)(THIS) PURE;
-   STDMETHOD_(ULONG,Release)(THIS) PURE;
-   STDMETHOD(GetAutoArrange)(THIS) PURE;
-   STDMETHOD(GetCurrentViewMode)(THIS_ UINT) PURE;
-   STDMETHOD(GetDefaultSpacing)(THIS_ POINT*) PURE;
-   STDMETHOD(GetFocusedItem)(THIS_ int*) PURE;
-   STDMETHOD(GetFolder)(THIS_ REFIID,PVOID*) PURE;
-   STDMETHOD(GetItemPosition)(THIS_ LPCITEMIDLIST,POINT*) PURE;
-   STDMETHOD(GetSelectionMarkedItem)(THIS_ int*) PURE;
-   STDMETHOD(GetSpacing)(THIS_ POINT*) PURE;
-   STDMETHOD(Item)(THIS_ int,LPITEMIDLIST*) PURE;
-   STDMETHOD(ItemCount)(THIS_ UINT,int*) PURE;
-   STDMETHOD(Items)(THIS_ UINT,REFIID,PVOID*) PURE;
-   STDMETHOD(SelectAndPositionItems)(THIS_ UINT,LPCITEMIDLIST*,POINT*,DWORD) PURE;
-   STDMETHOD(SelectItem)(THIS_ int,DWORD) PURE;
-   STDMETHOD(SetCurrentViewMode)(THIS_ UINT) PURE;
+void WINAPI SHAddToRecentDocs(UINT,PCVOID);
+LPITEMIDLIST WINAPI SHBrowseForFolderA(PBROWSEINFOA);
+LPITEMIDLIST WINAPI SHBrowseForFolderW(PBROWSEINFOW);
+void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
+HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
+HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
+HRESULT WINAPI SHGetDesktopFolder(LPSHELLFOLDER*);
+HRESULT WINAPI SHGetInstanceExplorer(IUnknown **);
+HRESULT WINAPI SHGetMalloc(LPMALLOC*);
+BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
+BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
+HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
+HRESULT WINAPI SHLoadInProc(REFCLSID);
+
+/* SHGetFolderPath in shfolder.dll on W9x, NT4, also in shell32.dll on W2K */
+HRESULT WINAPI SHGetFolderPathA(HWND,int,HANDLE,DWORD,LPSTR);
+HRESULT WINAPI SHGetFolderPathW(HWND,int,HANDLE,DWORD,LPWSTR);
+
+void WINAPI SHGetSettings(LPSHELLFLAGSTATE,DWORD);
+
+typedef __AW(IShellExecuteHook) IShellExecuteHook;
+typedef __AW(IShellLink) IShellLink;
+typedef __AW(BROWSEINFO) BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
+#define SHBrowseForFolder __AW(SHBrowseForFolder)
+#define SHGetDataFromIDList __AW(SHGetDataFromIDList)
+#define SHGetPathFromIDList __AW(SHGetPathFromIDList)
+#define SHGetFolderPath __AW(SHGetFolderPathW)
+#define FILEDESCRIPTOR __AW(FILEDESCRIPTOR)
+#define LPFILEDESCRIPTOR __AW(LPFILEDESCRIPTOR)
+#define FILEGROUPDESCRIPTOR __AW(FILEGROUPDESCRIPTOR)
+#define LPFILEGROUPDESCRIPTOR __AW(LPFILEGROUPDESCRIPTOR)
+
+DWORD WINAPI SHFormatDrive(HWND,UINT,UINT,UINT);
+
+#define SHFMT_ID_DEFAULT 0xFFFF
+#define SHFMT_OPT_FULL 1
+#define SHFMT_OPT_SYSONLY 2
+#define SHFMT_ERROR 0xFFFFFFFF
+#define SHFMT_CANCEL 0xFFFFFFFE
+#define SHFMT_NOFORMAT 0xFFFFFFFD
+
+#if (_WIN32_IE >= 0x0400)
+BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
+BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
+#define SHGetSpecialFolderPath __AW(SHGetSpecialFolderPath)
+#endif /* _WIN32_IE >= 0x0400 */
+
+#if (_WIN32_IE >= 0x0400 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K)
+
+#define INTERFACE IPersistFolder2
+DECLARE_INTERFACE_(IPersistFolder2,IPersistFolder)
+{
+       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+       STDMETHOD_(ULONG,Release)(THIS) PURE;
+       STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
+       STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
+       STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
 };
 #undef INTERFACE
-#endif /* _WIN32_WINNT >= 0x0501 */
+typedef IPersistFolder2 *LPPERSISTFOLDER2;
 
-#define ISIOI_ICONFILE 0x00000001
-#define ISIOI_ICONINDEX 0x00000002
+#ifdef COBJMACROS
+#define IPersistFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IPersistFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IPersistFolder2_Release(T) (T)->lpVtbl->Release(T)
+#define IPersistFolder2_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
+#define IPersistFolder2_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
+#define IPersistFolder2_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
+#endif
 
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
-typedef struct {
-       BOOL fShowAllObjects : 1;
-       BOOL fShowExtensions : 1;
-       BOOL fNoConfirmRecycle : 1;
-       BOOL fShowSysFiles : 1;
-       BOOL fShowCompColor : 1;
-       BOOL fDoubleClickInWebView : 1;
-       BOOL fDesktopHTML : 1;
-       BOOL fWin95Classic : 1;
-       BOOL fDontPrettyPath : 1;
-       BOOL fShowAttribCol : 1;
-       BOOL fMapNetDrvBtn : 1;
-       BOOL fShowInfoTip : 1;
-       BOOL fHideIcons : 1;
-       BOOL fWebView : 1;
-       BOOL fFilter : 1;
-       BOOL fShowSuperHidden : 1;
-       BOOL fNoNetCrawling : 1;
-       DWORD dwWin95Unused;
-       UINT uWin95Unused;
-       LONG lParamSort;
-       int iSortDirection;
-       UINT version;
-       UINT uNotUsed;
-       BOOL fSepProcess : 1;
-       BOOL fStartPanelOn : 1;
-       BOOL fShowStartPage : 1;
-       UINT fSpareFlags : 13;
-} SHELLSTATE, *LPSHELLSTATE;
-#endif /* _WIN32_WINNT >= 0x0500 */
+#endif /* _WIN32_IE >= 0x0400 || _WIN32_WINNT >= _WIN32_WINNT_WIN2K */
 
 #if (_WIN32_IE >= 0x0500)
+typedef struct tagEXTRASEARCH
+{
+       GUID guidSearch;
+       WCHAR wszFriendlyName[80];
+       WCHAR wszUrl[2084];
+} EXTRASEARCH, *LPEXTRASEARCH;
+typedef DWORD SHCOLSTATEF;
+typedef struct
+{
+       GUID fmtid;
+       DWORD pid;
+} SHCOLUMNID, *LPSHCOLUMNID;
+typedef const SHCOLUMNID *LPCSHCOLUMNID;
+typedef struct _SHELLDETAILS
+{
+       int fmt; 
+       int cxChar;
+       STRRET str;
+} SHELLDETAILS, *LPSHELLDETAILS;
+typedef struct
+{
+       LPITEMIDLIST pidlTargetFolder;
+       WCHAR szTargetParsingName[MAX_PATH];
+       WCHAR szNetworkProvider[MAX_PATH];
+       DWORD dwAttributes;
+       int csidl;
+} PERSIST_FOLDER_TARGET_INFO;
+
+typedef enum {
+       SHGFP_TYPE_CURRENT = 0,
+       SHGFP_TYPE_DEFAULT = 1,
+} SHGFP_TYPE;
+#pragma pack(push,8)
+typedef struct {
+       ULONG dwFlags;
+       ULONG dwReserved;
+       WCHAR wszFolder[MAX_PATH];
+} SHCOLUMNINIT,*LPSHCOLUMNINIT;
+typedef const SHCOLUMNINIT* LPCSHCOLUMNINIT;
+typedef struct {
+       ULONG dwFlags;
+       DWORD dwFileAttributes;
+       ULONG dwReserved;
+       WCHAR *pwszExt;
+       WCHAR wszFile[MAX_PATH];
+} SHCOLUMNDATA,*LPSHCOLUMNDATA;
+typedef const SHCOLUMNDATA* LPCSHCOLUMNDATA;
+#pragma pack(pop)
+
+#define MAX_COLUMN_NAME_LEN 80
+#define MAX_COLUMN_DESC_LEN 128
+
+#pragma pack(push,1)
+typedef struct {
+       SHCOLUMNID scid;
+       VARTYPE vt;
+       DWORD fmt;
+       UINT cChars;
+       DWORD csFlags;
+       WCHAR wszTitle[MAX_COLUMN_NAME_LEN];
+       WCHAR wszDescription[MAX_COLUMN_DESC_LEN];
+} SHCOLUMNINFO,*LPSHCOLUMNINFO;
+typedef const SHCOLUMNINFO* LPCSHCOLUMNINFO;
+#pragma pack(pop)
+
+typedef enum {
+       SHCOLSTATE_TYPE_STR = 0x00000001,
+       SHCOLSTATE_TYPE_INT = 0x00000002,
+       SHCOLSTATE_TYPE_DATE = 0x00000003,
+       SHCOLSTATE_TYPEMASK = 0x0000000f,
+       SHCOLSTATE_ONBYDEFAULT = 0x00000010,
+       SHCOLSTATE_SLOW = 0x00000020,
+       SHCOLSTATE_EXTENDED = 0x00000040,
+       SHCOLSTATE_SECONDARYUI = 0x00000080,
+       SHCOLSTATE_HIDDEN = 0x00000100,
+       SHCOLSTATE_PREFER_VARCMP = 0x00000200
+} SHCOLSTATE;
+
+#ifdef COBJMACROS
+#define IContextMenu2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IContextMenu2_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IContextMenu2_Release(T) (T)->lpVtbl->Release(T)
+#define IContextMenu2_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
+#define IContextMenu2_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
+#define IContextMenu2_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
+#define IContextMenu2_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
+#define IContextMenu3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IContextMenu3_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IContextMenu3_Release(T) (T)->lpVtbl->Release(T)
+#define IContextMenu3_QueryContextMenu(T,a,b,c,d,e) (T)->lpVtbl->QueryContextMenu(T,a,b,c,d,e)
+#define IContextMenu3_InvokeCommand(T,a) (T)->lpVtbl->InvokeCommand(T,a)
+#define IContextMenu3_GetCommandString(T,a,b,c,d,e) (T)->lpVtbl->GetCommandString(T,a,b,c,d,e)
+#define IContextMenu3_HandleMenuMsg(T,a,b,c) (T)->lpVtbl->HandleMenuMsg(T,a,b,c)
+#define IContextMenu3_HandleMenuMsg2(T,a,b,c,d) (T)->lpVtbl->HandleMenuMsg(T,a,b,c,d)
+#endif
+
+#define INTERFACE IColumnProvider
+DECLARE_INTERFACE_(IColumnProvider,IUnknown)
+{
+       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+       STDMETHOD_(ULONG,Release)(THIS) PURE;
+       STDMETHOD(Initialize)(THIS_ LPCSHCOLUMNINIT) PURE;
+       STDMETHOD(GetColumnInfo)(THIS_ DWORD,SHCOLUMNINFO*) PURE;
+       STDMETHOD(GetItemData)(THIS_ LPCSHCOLUMNID,LPCSHCOLUMNDATA,VARIANT*) PURE;
+};
+#undef INTERFACE
+
+DECLARE_ENUMERATOR_(IEnumExtraSearch,LPEXTRASEARCH);
+typedef IEnumExtraSearch *LPENUMEXTRASEARCH;
+
+#define INTERFACE IShellFolder2
+DECLARE_INTERFACE_(IShellFolder2, IShellFolder)
+{
+       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+       STDMETHOD_(ULONG,Release)(THIS) PURE;
+       STDMETHOD(ParseDisplayName)(THIS_ HWND,LPBC,LPOLESTR,PULONG,LPITEMIDLIST*,PULONG) PURE;
+       STDMETHOD(EnumObjects)(THIS_ HWND,DWORD,LPENUMIDLIST*) PURE;
+       STDMETHOD(BindToObject)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
+       STDMETHOD(BindToStorage)(THIS_ LPCITEMIDLIST,LPBC,REFIID,PVOID*) PURE;
+       STDMETHOD(CompareIDs)(THIS_ LPARAM,LPCITEMIDLIST,LPCITEMIDLIST) PURE;
+       STDMETHOD(CreateViewObject)(THIS_ HWND,REFIID,PVOID*) PURE;
+       STDMETHOD(GetAttributesOf)(THIS_ UINT,LPCITEMIDLIST*,PULONG) PURE;
+       STDMETHOD(GetUIObjectOf)(THIS_ HWND,UINT,LPCITEMIDLIST*,REFIID,PUINT,PVOID*) PURE;
+       STDMETHOD(GetDisplayNameOf)(THIS_ LPCITEMIDLIST,DWORD,LPSTRRET) PURE;
+       STDMETHOD(SetNameOf)(THIS_ HWND,LPCITEMIDLIST,LPCOLESTR,DWORD,LPITEMIDLIST*) PURE;
+       STDMETHOD(GetDefaultSearchGUID)(THIS_ GUID*) PURE;
+       STDMETHOD(EnumSearches)(THIS_ IEnumExtraSearch**) PURE;
+       STDMETHOD(GetDefaultColumn)(THIS_ DWORD,ULONG*,ULONG*) PURE;
+       STDMETHOD(GetDefaultColumnState)(THIS_ UINT,SHCOLSTATEF*) PURE;
+       STDMETHOD(GetDetailsEx)(THIS_ LPCITEMIDLIST,const SHCOLUMNID*,VARIANT*) PURE;
+       STDMETHOD(GetDetailsOf)(THIS_ LPCITEMIDLIST,UINT,SHELLDETAILS*) PURE;
+       STDMETHOD(MapColumnToSCID)(THIS_ UINT,SHCOLUMNID*) PURE;
+};
+#undef INTERFACE
+typedef IShellFolder2 *LPSHELLFOLDER2;
+
+#ifdef COBJMACROS
+#define IShellFolder2_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IShellFolder2_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IShellFolder2_Release(T) (T)->lpVtbl->Release(T)
+#define IShellFolder2_ParseDisplayName(T,a,b,c,d,e,f) (T)->lpVtbl->ParseDisplayName(T,a,b,c,d,e,f)
+#define IShellFolder2_EnumObjects(T,a,b,c) (T)->lpVtbl->EnumObjects(T,a,b,c)
+#define IShellFolder2_BindToObject(T,a,b,c,d) (T)->lpVtbl->BindToObject(T,a,b,c,d)
+#define IShellFolder2_BindToStorage(T,a,b,c,d) (T)->lpVtbl->BindToStorage(T,a,b,c,d)
+#define IShellFolder2_CompareIDs(T,a,b,c) (T)->lpVtbl->CompareIDs(T,a,b,c)
+#define IShellFolder2_CreateViewObject(T,a,b) (T)->lpVtbl->CreateViewObject(T,a,b)
+#define IShellFolder2_GetAttributesOf(T,a,b,c) (T)->lpVtbl->GetAttributesOf(T,a,b,c)
+#define IShellFolder2_GetUIObjectOf(T,a,b,c,d,e,f) (T)->lpVtbl->GetUIObjectOf(T,a,b,c,d,e,f)
+#define IShellFolder2_GetDisplayNameOf(T,a,b,c) (T)->lpVtbl->GetDisplayNameOf(T,a,b,c)
+#define IShellFolder2_SetNameOf(T,a,b,c,d,e) (T)->lpVtbl->SetNameOf(T,a,b,c,d,e)
+#define IShellFolder2_GetDefaultSearchGUID(T,a) (T)->lpVtbl->GetDefaultSearchGUID(T,a)
+#define IShellFolder2_EnumSearches(T,a) (T)->lpVtbl->EnumSearches(T,a)
+#define IShellFolder2_GetDefaultColumn(T,a,b,c) (T)->lpVtbl->GetDefaultColumn(T,a,b,c)
+#define IShellFolder2_GetDefaultColumnState(T,a,b) (T)->lpVtbl->GetDefaultColumnState(T,a,b)
+#define IShellFolder2_GetDetailsEx(T,a,b,c) (T)->lpVtbl->GetDetailsEx(T,a,b,c)
+#define IShellFolder2_GetDetailsOf(T,a,b,c) (T)->lpVtbl->GetDetailsOf(T,a,b,c)
+#define IShellFolder2_MapColumnToSCID(T,a,b) (T)->lpVtbl->MapColumnToSCID(T,a,b)
+#endif
+
+#define INTERFACE IPersistFolder3
+DECLARE_INTERFACE_(IPersistFolder3,IPersistFolder2)
+{
+       STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+       STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+       STDMETHOD_(ULONG,Release)(THIS) PURE;
+       STDMETHOD(GetClassID)(THIS_ CLSID*) PURE;
+       STDMETHOD(Initialize)(THIS_ LPCITEMIDLIST) PURE;
+       STDMETHOD(GetCurFolder)(THIS_ LPITEMIDLIST*) PURE;
+       STDMETHOD(InitializeEx)(THIS_ IBindCtx*,LPCITEMIDLIST,const PERSIST_FOLDER_TARGET_INFO*) PURE;
+       STDMETHOD(GetFolderTargetInfo)(THIS_ PERSIST_FOLDER_TARGET_INFO*) PURE;
+};
+#undef INTERFACE
+typedef IPersistFolder3 *LPPERSISTFOLDER3;
+
+#ifdef COBJMACROS
+#define IPersistFolder3_QueryInterface(T,a,b) (T)->lpVtbl->QueryInterface(T,a,b)
+#define IPersistFolder3_AddRef(T) (T)->lpVtbl->AddRef(T)
+#define IPersistFolder3_Release(T) (T)->lpVtbl->Release(T)
+#define IPersistFolder3_GetClassID(T,a) (T)->lpVtbl->GetClassID(T,a)
+#define IPersistFolder3_Initialize(T,a) (T)->lpVtbl->Initialize(T,a)
+#define IPersistFolder3_GetCurFolder(T,a) (T)->lpVtbl->GetCurFolder(T,a)
+#define IPersistFolder3_InitializeEx(T,a,b,c) (T)->lpVtbl->InitializeEx(T,a,b,c)
+#define IPersistFolder3_GetFolderTargetInfo(T,a) (T)->lpVtbl->GetFolderTargetInfo(T,a)
+#endif
+
 #pragma pack(push,8)
 typedef struct
 {
@@ -1467,9 +1410,44 @@ DECLARE_INTERFACE_(IDropTargetHelper, IUnknown)
        STDMETHOD (Show)(THIS_ BOOL fShow) PURE;
 };
 #undef INTERFACE
+
 #endif /* _WIN32_IE >= 0x0500 */
 
-#if (_WIN32_WINNT >= 0x0500)
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINME)
+HRESULT WINAPI SHGetFolderLocation(HWND,int,HANDLE,DWORD,LPITEMIDLIST*);
+#endif
+
+#if (_WIN32_WINNT >= _WIN32_WINNT_WIN2K)
+typedef struct {
+       BOOL fShowAllObjects : 1;
+       BOOL fShowExtensions : 1;
+       BOOL fNoConfirmRecycle : 1;
+       BOOL fShowSysFiles : 1;
+       BOOL fShowCompColor : 1;
+       BOOL fDoubleClickInWebView : 1;
+       BOOL fDesktopHTML : 1;
+       BOOL fWin95Classic : 1;
+       BOOL fDontPrettyPath : 1;
+       BOOL fShowAttribCol : 1;
+       BOOL fMapNetDrvBtn : 1;
+       BOOL fShowInfoTip : 1;
+       BOOL fHideIcons : 1;
+       BOOL fWebView : 1;
+       BOOL fFilter : 1;
+       BOOL fShowSuperHidden : 1;
+       BOOL fNoNetCrawling : 1;
+       DWORD dwWin95Unused;
+       UINT uWin95Unused;
+       LONG lParamSort;
+       int iSortDirection;
+       UINT version;
+       UINT uNotUsed;
+       BOOL fSepProcess : 1;
+       BOOL fStartPanelOn : 1;
+       BOOL fShowStartPage : 1;
+       UINT fSpareFlags : 13;
+} SHELLSTATE, *LPSHELLSTATE;
+
 BOOL WINAPI PathResolve(LPWSTR, LPCWSTR*, UINT);
 #define PRF_VERIFYEXISTS            0x0001
 #define PRF_TRYPROGRAMEXTENSIONS    (0x0002 | PRF_VERIFYEXISTS)
@@ -1479,49 +1457,13 @@ BOOL WINAPI PathResolve(LPWSTR, LPCWSTR*, UINT);
 #define IDO_SHGIOI_LINK             0x0FFFFFFE
 #define IDO_SHGIOI_SLOWFILE         0x0FFFFFFD
 #define IDO_SHGIOI_DEFAULT          0x0FFFFFFC
-#endif
 
-void WINAPI SHAddToRecentDocs(UINT,PCVOID);
-LPITEMIDLIST WINAPI SHBrowseForFolderA(PBROWSEINFOA);
-LPITEMIDLIST WINAPI SHBrowseForFolderW(PBROWSEINFOW);
-void WINAPI SHChangeNotify(LONG,UINT,PCVOID,PCVOID);
-HRESULT WINAPI SHGetDataFromIDListA(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
-HRESULT WINAPI SHGetDataFromIDListW(LPSHELLFOLDER,LPCITEMIDLIST,int,PVOID,int);
-HRESULT WINAPI SHGetDesktopFolder(LPSHELLFOLDER*);
-HRESULT WINAPI SHGetInstanceExplorer(IUnknown **);
-HRESULT WINAPI SHGetMalloc(LPMALLOC*);
-BOOL WINAPI SHGetPathFromIDListA(LPCITEMIDLIST,LPSTR);
-BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST,LPWSTR);
-HRESULT WINAPI SHGetSpecialFolderLocation(HWND,int,LPITEMIDLIST*);
-HRESULT WINAPI SHLoadInProc(REFCLSID);
-#if (_WIN32_IE >= 0x0400)
-BOOL WINAPI SHGetSpecialFolderPathA(HWND,LPSTR,int,BOOL);
-BOOL WINAPI SHGetSpecialFolderPathW(HWND,LPWSTR,int,BOOL);
-#endif 
-/* SHGetFolderPath in shfolder.dll on W9x, NT4, also in shell32.dll on W2K */
-HRESULT WINAPI SHGetFolderPathA(HWND,int,HANDLE,DWORD,LPSTR);
-HRESULT WINAPI SHGetFolderPathW(HWND,int,HANDLE,DWORD,LPWSTR);
-#if (_WIN32_WINDOWS >= 0x0490) || (_WIN32_WINNT >= 0x0500) /* ME or W2K */
-HRESULT WINAPI SHGetFolderLocation(HWND,int,HANDLE,DWORD,LPITEMIDLIST*);
-#endif
-#if (_WIN32_WINNT >= 0x0500)
 INT WINAPI SHGetIconOverlayIndexW(LPCWSTR pszIconPath, int iIconIndex);
 INT WINAPI SHGetIconOverlayIndexA(LPCSTR pszIconPath, int iIconIndex);
 INT WINAPI SHCreateDirectoryExA(HWND,LPCSTR,LPSECURITY_ATTRIBUTES);
 INT WINAPI SHCreateDirectoryExW(HWND,LPCWSTR,LPSECURITY_ATTRIBUTES);
 HRESULT WINAPI SHBindToParent(LPCITEMIDLIST,REFIID,VOID**,LPCITEMIDLIST*);
-#endif
-#if (_WIN32_WINNT >= 0x0501) /* XP */
-HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
-HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
-HRESULT WINAPI SHParseDisplayName(LPCWSTR,IBindCtx*,LPITEMIDLIST,SFGAOF,SFGAOF*);
-#endif
-void WINAPI SHGetSettings(LPSHELLFLAGSTATE,DWORD);
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
 void WINAPI SHGetSetSettings(LPSHELLSTATE,DWORD,BOOL);
-#endif
-
-#if (_WIN32_WINNT >= 0x0500) /* W2K */
 BOOL WINAPI ILIsEqual(LPCITEMIDLIST, LPCITEMIDLIST);
 BOOL WINAPI ILIsParent(LPCITEMIDLIST, LPCITEMIDLIST, BOOL);
 BOOL WINAPI ILRemoveLastID(LPITEMIDLIST);
@@ -1536,70 +1478,49 @@ LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST);
 LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST);
 UINT WINAPI ILGetSize(LPCITEMIDLIST);
 void WINAPI ILFree(LPITEMIDLIST);
-
 HRESULT WINAPI SHCoCreateInstance(LPCWSTR,REFCLSID,IUnknown*,REFIID,void**);
-#endif
+#define SHGetIconOverlayIndex __AW(SHGetIconOverlayIndex)
+#define SHCreateDirectoryEx __AW(SHCreateDirectoryEx)
 
-#ifdef UNICODE
-typedef IShellExecuteHookW IShellExecuteHook;
-typedef IShellLinkW IShellLink;
-typedef BROWSEINFOW BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
-#define SHBrowseForFolder SHBrowseForFolderW
-#define SHGetDataFromIDList SHGetDataFromIDListW
-#define SHGetPathFromIDList SHGetPathFromIDListW
-#if (_WIN32_IE >= 0x0400)
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathW
-#endif
-#define SHGetFolderPath SHGetFolderPathW 
-#if (_WIN32_WINNT >= 0x0500)
-#define SHGetIconOverlayIndex SHGetIconOverlayIndexW
-#define SHCreateDirectoryEx SHCreateDirectoryExW
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirW
-#endif
-#define FILEDESCRIPTOR FILEDESCRIPTORW
-#define LPFILEDESCRIPTOR LPFILEDESCRIPTORW
-#define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORW
-#define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORW
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_WIN2K */
 
-#else
-typedef IShellExecuteHookA IShellExecuteHook;
-typedef IShellLinkA IShellLink;
-typedef BROWSEINFOA BROWSEINFO,*PBROWSEINFO,*LPBROWSEINFO;
-#define SHBrowseForFolder SHBrowseForFolderA
-#define SHGetDataFromIDList SHGetDataFromIDListA
-#define SHGetPathFromIDList SHGetPathFromIDListA
-#if (_WIN32_IE >= 0x0400)
-#define SHGetSpecialFolderPath SHGetSpecialFolderPathA
-#endif
-#define SHGetFolderPath SHGetFolderPathA
-#if (_WIN32_WINNT >= 0x0500)
-#define SHGetIconOverlayIndex SHGetIconOverlayIndexA
-#define SHCreateDirectoryEx SHCreateDirectoryExA
-#endif
-#if (_WIN32_WINNT >= 0x0501)
-#define SHGetFolderPathAndSubDir SHGetFolderPathAndSubDirA
-#endif
-#define FILEDESCRIPTOR FILEDESCRIPTORA
-#define LPFILEDESCRIPTOR LPFILEDESCRIPTORA
-#define FILEGROUPDESCRIPTOR FILEGROUPDESCRIPTORA
-#define LPFILEGROUPDESCRIPTOR LPFILEGROUPDESCRIPTORA
-#endif /* UNICODE */
+#if (_WIN32_WINNT >= _WIN32_WINNT_WINXP)
+typedef _COM_interface IFolderView *LPFOLDERVIEW;
 
-DWORD WINAPI SHFormatDrive(HWND,UINT,UINT,UINT);
+#define INTERFACE IFolderView
+DECLARE_INTERFACE_(IFolderView,IUnknown)
+{
+   STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
+   STDMETHOD_(ULONG,AddRef)(THIS) PURE;
+   STDMETHOD_(ULONG,Release)(THIS) PURE;
+   STDMETHOD(GetAutoArrange)(THIS) PURE;
+   STDMETHOD(GetCurrentViewMode)(THIS_ UINT) PURE;
+   STDMETHOD(GetDefaultSpacing)(THIS_ POINT*) PURE;
+   STDMETHOD(GetFocusedItem)(THIS_ int*) PURE;
+   STDMETHOD(GetFolder)(THIS_ REFIID,PVOID*) PURE;
+   STDMETHOD(GetItemPosition)(THIS_ LPCITEMIDLIST,POINT*) PURE;
+   STDMETHOD(GetSelectionMarkedItem)(THIS_ int*) PURE;
+   STDMETHOD(GetSpacing)(THIS_ POINT*) PURE;
+   STDMETHOD(Item)(THIS_ int,LPITEMIDLIST*) PURE;
+   STDMETHOD(ItemCount)(THIS_ UINT,int*) PURE;
+   STDMETHOD(Items)(THIS_ UINT,REFIID,PVOID*) PURE;
+   STDMETHOD(SelectAndPositionItems)(THIS_ UINT,LPCITEMIDLIST*,POINT*,DWORD) PURE;
+   STDMETHOD(SelectItem)(THIS_ int,DWORD) PURE;
+   STDMETHOD(SetCurrentViewMode)(THIS_ UINT) PURE;
+};
+#undef INTERFACE
 
-#define SHFMT_ID_DEFAULT 0xFFFF
-#define SHFMT_OPT_FULL 1
-#define SHFMT_OPT_SYSONLY 2
-#define SHFMT_ERROR 0xFFFFFFFF
-#define SHFMT_CANCEL 0xFFFFFFFE
-#define SHFMT_NOFORMAT 0xFFFFFFFD
+HRESULT WINAPI SHGetFolderPathAndSubDirA(HWND,int,HANDLE,DWORD,LPCSTR,LPSTR);
+HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND,int,HANDLE,DWORD,LPCWSTR,LPWSTR);
+HRESULT WINAPI SHParseDisplayName(LPCWSTR,IBindCtx*,LPITEMIDLIST,SFGAOF,SFGAOF*);
+#define SHGetFolderPathAndSubDir __AW(SHGetFolderPathAndSubDir)
+
+#endif /* _WIN32_WINNT >= _WIN32_WINNT_WINXP */
 
 #pragma pack(pop)
+
 #ifdef __cplusplus
 }
 #endif
 
-
 #endif /* _SHLOBJ_H */