* include/basetyps.h: add comment for GUID_DEFINED

* include/lm.h: add includes for lmerr.h and lmserver.h
	* include/lmcons.h: add W2K typedefs LMSTR, LMCSTR
	* include/lmerr.h:  add error codes
	* include/lmserver.h: replace LPTSTR with LPWSTR,
	LPTCSTR with LPWCSTR in structures and prototypes
	* include/lmshare.h: ditto
	* include/lmuse.h: ditto
	* include/lmstats.h: ditto
	* include/oleauto.h: add function prototype SystemTimeToVariantTime
	* include/winbase.h: change first argument of CommConfigDialog to const
	* include/windowsx.h: add macros  defining FAR versions of
	mem and string functions for porting from Win16 code
	* include/winioctl.h:  added IOCTL_STORAGE defines
	* include/winnetwk.h:  added WNNC_NET flags
	* include/winnt.h: add include of <basetsd.h>;
	add structs; add pointer typedefs  for TOKEN structs
	* include/winsock.h: add guard around BSD-ish typedefs
	* include/wtypes.h: new VARENUM enums, new WIN32/WIN64 compat. macros
	* include/basetsd.h: new file
	* include/raserror.h: ditto
	* include/rassapi.h: ditto
	* include/ras.h: ditto
	comment from Earnie: replaced original ras.h contribution with Danny's
	contribution as it is more complete.
	* include/rpcndr.h: add default definition for __RPCNDR_H_VERSION__
This commit is contained in:
Earnie Boyd 2000-11-01 00:37:23 +00:00
parent b12796a06d
commit baf428f0d5
23 changed files with 1974 additions and 366 deletions

View File

@ -1,3 +1,34 @@
2000-10-31 Earnie Boyd <earnie_boyd@yahoo.com>
* Merge in accepted changes from
2000-10-23 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
* include/basetyps.h: add comment for GUID_DEFINED
* include/lm.h: add includes for lmerr.h and lmserver.h
* include/lmcons.h: add W2K typedefs LMSTR, LMCSTR
* include/lmerr.h: add error codes
* include/lmserver.h: replace LPTSTR with LPWSTR,
LPTCSTR with LPWCSTR in structures and prototypes
* include/lmshare.h: ditto
* include/lmuse.h: ditto
* include/lmstats.h: ditto
* include/oleauto.h: add function prototype SystemTimeToVariantTime
* include/winbase.h: change first argument of CommConfigDialog to const
* include/windowsx.h: add macros defining FAR versions of
mem and string functions for porting from Win16 code
* include/winioctl.h: added IOCTL_STORAGE defines
* include/winnetwk.h: added WNNC_NET flags
* include/winnt.h: add include of <basetsd.h>;
add structs; add pointer typedefs for TOKEN structs
* include/winsock.h: add guard around BSD-ish typedefs
* include/wtypes.h: new VARENUM enums, new WIN32/WIN64 compat. macros
* include/basetsd.h: new file
* include/raserror.h: ditto
* include/rassapi.h: ditto
* include/ras.h: ditto
comment from Earnie: replaced original ras.h contribution with Danny's
contribution as it is more complete.
* include/rpcndr.h: add default definition for __RPCNDR_H_VERSION__
Mon Oct 19 13:55:00 2000 Earnie Boyd <earnie_boyd@yahoo.com> Mon Oct 19 13:55:00 2000 Earnie Boyd <earnie_boyd@yahoo.com>
* Makefile.in: increment VERSION. Change tar file name for dist and * Makefile.in: increment VERSION. Change tar file name for dist and

View File

@ -61,7 +61,7 @@ PACKAGE = w32api
VERSION = 0.3 VERSION = 0.3
DIST_FILES = Makefile.in configure.in configure config.guess config.sub \ DIST_FILES = Makefile.in configure.in configure config.guess config.sub \
install-sh README ChangeLog TODO install-sh README ChangeLog TODO CONTRIBUTIONS
all: lib all: lib

View File

@ -0,0 +1,101 @@
#ifndef _BASETSD_H
#define _BASETSD_H
#ifdef __cplusplus
extern "C" {
#endif
typedef int LONG32, *PLONG32;
typedef int INT32, *PINT32;
typedef unsigned int ULONG32, *PULONG32;
typedef unsigned int DWORD32, *PDWORD32;
typedef unsigned int UINT32, *PUINT32;
#if defined(_WIN64)
typedef __int64 INT_PTR, *PINT_PTR;
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
typedef __int64 LONG_PTR, *PLONG_PTR;
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
#define __int3264 __int64
#define ADDRESS_TAG_BIT 0x40000000000UI64
typedef unsigned __int64 HANDLE_PTR;
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
typedef int HALF_PTR, *PHALF_PTR;
#if 0 /* TODO when WIN64 is here */
inline unsigned long HandleToUlong(const void* h )
{ return((unsigned long) h ); }
inline long HandleToLong( const void* h )
{ return((long) h ); }
inline void* LongToHandle( const long h )
{ return((void*) (INT_PTR) h ); }
inline unsigned long PtrToUlong( const void* p)
{ return((unsigned long) p ); }
inline unsigned int PtrToUint( const void* p )
{ return((unsigned int) p ); }
inline unsigned short PtrToUshort( const void* p )
{ return((unsigned short) p ); }
inline long PtrToLong( const void* p )
{ return((long) p ); }
inline int PtrToInt( const void* p )
{ return((int) p ); }
inline short PtrToShort( const void* p )
{ return((short) p ); }
inline void* IntToPtr( const int i )
{ return( (void*)(INT_PTR)i ); }
inline void* UIntToPtr(const unsigned int ui)
{ return( (void*)(UINT_PTR)ui ); }
inline void* LongToPtr( const long l )
{ return( (void*)(LONG_PTR)l ); }
inline void* ULongToPtr( const unsigned long ul )
{ return( (void*)(ULONG_PTR)ul ); }
#endif /* 0_ */
#else /* !_WIN64 */
typedef int INT_PTR, *PINT_PTR;
typedef unsigned int UINT_PTR, *PUINT_PTR;
typedef long LONG_PTR, *PLONG_PTR;
typedef unsigned long ULONG_PTR, *PULONG_PTR;
#define __int3264 __int32
#define ADDRESS_TAG_BIT 0x80000000UL
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
typedef short HALF_PTR, *PHALF_PTR;
typedef unsigned long HANDLE_PTR;
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
#endif /* !_WIN64 */
#define UlongToPtr(ul) ULongToPtr(ul)
#define UintToPtr(ui) UIntToPtr(ui)
#define MAXUINT_PTR (~((UINT_PTR)0))
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
#define MININT_PTR (~MAXINT_PTR)
#define MAXULONG_PTR (~((ULONG_PTR)0))
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
#define MINLONG_PTR (~MAXLONG_PTR)
#define MAXUHALF_PTR ((UHALF_PTR)~0)
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
typedef ULONG_PTR SIZE_T, *PSIZE_T;
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
typedef __int64 LONG64, *PLONG64;
typedef __int64 INT64, *PINT64;
typedef unsigned __int64 ULONG64, *PULONG64;
typedef unsigned __int64 DWORD64, *PDWORD64;
typedef unsigned __int64 UINT64, *PUINT64;
#ifdef __cplusplus
}
#endif
#endif /* _BASETSD_H */

View File

@ -74,8 +74,8 @@ DECLARE_INTERFACE_(I,IUnknown) \
#endif /* __OBJC__ */ #endif /* __OBJC__ */
#ifndef GUID_DEFINED #ifndef _GUID_DEFINED /* also defined in winnt.h */
#define GUID_DEFINED #define _GUID_DEFINED
typedef struct _GUID typedef struct _GUID
{ {
unsigned long Data1; unsigned long Data1;
@ -83,7 +83,7 @@ typedef struct _GUID
unsigned short Data3; unsigned short Data3;
unsigned char Data4[8]; unsigned char Data4[8];
} GUID,*REFGUID,*LPGUID; } GUID,*REFGUID,*LPGUID;
#endif /* GUID_DEFINED */ #endif /* _GUID_DEFINED */
#ifndef UUID_DEFINED #ifndef UUID_DEFINED
#define UUID_DEFINED #define UUID_DEFINED
typedef GUID UUID; typedef GUID UUID;

View File

@ -8,6 +8,7 @@
#include <lmaudit.h> #include <lmaudit.h>
#include <lmchdev.h> #include <lmchdev.h>
#include <lmconfig.h> #include <lmconfig.h>
#include <lmerr.h>
#include <lmmsg.h> #include <lmmsg.h>
#include <lmshare.h> #include <lmshare.h>
#include <lmapibuf.h> #include <lmapibuf.h>
@ -17,6 +18,7 @@
#include <lmerrlog.h> #include <lmerrlog.h>
#include <lmsvc.h> #include <lmsvc.h>
#include <lmwksta.h> #include <lmwksta.h>
#include <lmserver.h>
#include <lmstats.h> #include <lmstats.h>
#endif #endif

View File

@ -57,4 +57,13 @@
#define PLATFORM_ID_NT 500 #define PLATFORM_ID_NT 500
#define PLATFORM_ID_OSF 600 #define PLATFORM_ID_OSF 600
#define PLATFORM_ID_VMS 700 #define PLATFORM_ID_VMS 700
/* new typedef in W2K */
#if defined( _WIN32_WINNT ) || defined( WINNT ) || defined( FORCE_UNICODE )
#define LMSTR LPWSTR
#define LMCSTR LPCWSTR
#else
#define LMSTR LPSTR
#define LMCSTR LPCSTR
#endif
#endif #endif

View File

@ -273,5 +273,30 @@
#define NERR_RplVendorNameUnavailable (NERR_BASE+539) #define NERR_RplVendorNameUnavailable (NERR_BASE+539)
#define NERR_RplBootNameUnavailable (NERR_BASE+540) #define NERR_RplBootNameUnavailable (NERR_BASE+540)
#define NERR_RplConfigNameUnavailable (NERR_BASE+541) #define NERR_RplConfigNameUnavailable (NERR_BASE+541)
#define NERR_DfsInternalCorruption (NERR_BASE+560)
#define NERR_DfsVolumeDataCorrupt (NERR_BASE+561)
#define NERR_DfsNoSuchVolume (NERR_BASE+562)
#define NERR_DfsVolumeAlreadyExists (NERR_BASE+563)
#define NERR_DfsAlreadyShared (NERR_BASE+564)
#define NERR_DfsNoSuchShare (NERR_BASE+565)
#define NERR_DfsNotALeafVolume (NERR_BASE+566)
#define NERR_DfsLeafVolume (NERR_BASE+567)
#define NERR_DfsVolumeHasMultipleServers (NERR_BASE+568)
#define NERR_DfsCantCreateJunctionPoint (NERR_BASE+569)
#define NERR_DfsServerNotDfsAware (NERR_BASE+570)
#define NERR_DfsBadRenamePath (NERR_BASE+571)
#define NERR_DfsVolumeIsOffline (NERR_BASE+572)
#define NERR_DfsNoSuchServer (NERR_BASE+573)
#define NERR_DfsCyclicalName (NERR_BASE+574)
#define NERR_DfsNotSupportedInServerDfs (NERR_BASE+575)
#define NERR_DfsDuplicateService (NERR_BASE+576)
#define NERR_DfsCantRemoveLastServerShare (NERR_BASE+577)
#define NERR_DfsVolumeIsInterDfs (NERR_BASE+578)
#define NERR_DfsInconsistent (NERR_BASE+579)
#define NERR_DfsServerUpgraded (NERR_BASE+580)
#define NERR_DfsDataIsIdentical (NERR_BASE+581)
#define NERR_DfsCantRemoveDfsRoot (NERR_BASE+582)
#define NERR_DfsChildOrParentInDfs (NERR_BASE+583)
#define NERR_DfsInternalError (NERR_BASE+590)
#define MAX_NERR (NERR_BASE+899) #define MAX_NERR (NERR_BASE+899)
#endif #endif

View File

@ -4,43 +4,43 @@
extern "C" { extern "C" {
#endif #endif
#include <winsvc.h> #include <winsvc.h>
#include <lmcons.h>
typedef struct _SERVER_INFO_100 { typedef struct _SERVER_INFO_100 {
DWORD sv100_platform_id; DWORD sv100_platform_id;
LPTSTR sv100_name; LPWSTR sv100_name;
} SERVER_INFO_100,*PSERVER_INFO_100,*LPSERVER_INFO_100; } SERVER_INFO_100,*PSERVER_INFO_100,*LPSERVER_INFO_100;
typedef struct _SERVER_INFO_101 { typedef struct _SERVER_INFO_101 {
DWORD sv101_platform_id; DWORD sv101_platform_id;
LPTSTR sv101_name; LPWSTR sv101_name;
DWORD sv101_version_major; DWORD sv101_version_major;
DWORD sv101_version_minor; DWORD sv101_version_minor;
DWORD sv101_type; DWORD sv101_type;
LPTSTR sv101_comment; LPWSTR sv101_comment;
} SERVER_INFO_101,*PSERVER_INFO_101,*LPSERVER_INFO_101; } SERVER_INFO_101,*PSERVER_INFO_101,*LPSERVER_INFO_101;
typedef struct _SERVER_INFO_102 { typedef struct _SERVER_INFO_102 {
DWORD sv102_platform_id; DWORD sv102_platform_id;
LPTSTR sv102_name; LPWSTR sv102_name;
DWORD sv102_version_major; DWORD sv102_version_major;
DWORD sv102_version_minor; DWORD sv102_version_minor;
DWORD sv102_type; DWORD sv102_type;
LPTSTR sv102_comment; LPWSTR sv102_comment;
DWORD sv102_users; DWORD sv102_users;
LONG sv102_disc; LONG sv102_disc;
BOOL sv102_hidden; BOOL sv102_hidden;
DWORD sv102_announce; DWORD sv102_announce;
DWORD sv102_anndelta; DWORD sv102_anndelta;
DWORD sv102_licenses; DWORD sv102_licenses;
LPTSTR sv102_userpath; LPWSTR sv102_userpath;
} SERVER_INFO_102,*PSERVER_INFO_102,*LPSERVER_INFO_102; } SERVER_INFO_102,*PSERVER_INFO_102,*LPSERVER_INFO_102;
typedef struct _SERVER_INFO_402 { typedef struct _SERVER_INFO_402 {
DWORD sv402_ulist_mtime; DWORD sv402_ulist_mtime;
DWORD sv402_glist_mtime; DWORD sv402_glist_mtime;
DWORD sv402_alist_mtime; DWORD sv402_alist_mtime;
LPTSTR sv402_alerts; LPWSTR sv402_alerts;
DWORD sv402_security; DWORD sv402_security;
DWORD sv402_numadmin; DWORD sv402_numadmin;
DWORD sv402_lanmask; DWORD sv402_lanmask;
LPTSTR sv402_guestacct; LPWSTR sv402_guestacct;
DWORD sv402_chdevs; DWORD sv402_chdevs;
DWORD sv402_chdevq; DWORD sv402_chdevq;
DWORD sv402_chdevjobs; DWORD sv402_chdevjobs;
@ -63,17 +63,17 @@ DWORD sv402_accessalert;
DWORD sv402_diskalert; DWORD sv402_diskalert;
DWORD sv402_netioalert; DWORD sv402_netioalert;
DWORD sv402_maxauditsz; DWORD sv402_maxauditsz;
LPTSTR sv402_srvheuristics; LPWSTR sv402_srvheuristics;
} SERVER_INFO_402,*PSERVER_INFO_402,*LPSERVER_INFO_402; } SERVER_INFO_402,*PSERVER_INFO_402,*LPSERVER_INFO_402;
typedef struct _SERVER_INFO_403 { typedef struct _SERVER_INFO_403 {
DWORD sv403_ulist_mtime; DWORD sv403_ulist_mtime;
DWORD sv403_glist_mtime; DWORD sv403_glist_mtime;
DWORD sv403_alist_mtime; DWORD sv403_alist_mtime;
LPTSTR sv403_alerts; LPWSTR sv403_alerts;
DWORD sv403_security; DWORD sv403_security;
DWORD sv403_numadmin; DWORD sv403_numadmin;
DWORD sv403_lanmask; DWORD sv403_lanmask;
LPTSTR sv403_guestacct; LPWSTR sv403_guestacct;
DWORD sv403_chdevs; DWORD sv403_chdevs;
DWORD sv403_chdevq; DWORD sv403_chdevq;
DWORD sv403_chdevjobs; DWORD sv403_chdevjobs;
@ -96,10 +96,10 @@ DWORD sv403_accessalert;
DWORD sv403_diskalert; DWORD sv403_diskalert;
DWORD sv403_netioalert; DWORD sv403_netioalert;
DWORD sv403_maxauditsz; DWORD sv403_maxauditsz;
LPTSTR sv403_srvheuristics; LPWSTR sv403_srvheuristics;
DWORD sv403_auditedevents; DWORD sv403_auditedevents;
DWORD sv403_autoprofile; DWORD sv403_autoprofile;
LPTSTR sv403_autopath; LPWSTR sv403_autopath;
} SERVER_INFO_403,*PSERVER_INFO_403,*LPSERVER_INFO_403; } SERVER_INFO_403,*PSERVER_INFO_403,*LPSERVER_INFO_403;
typedef struct _SERVER_INFO_502 { typedef struct _SERVER_INFO_502 {
DWORD sv502_sessopens; DWORD sv502_sessopens;
@ -140,7 +140,7 @@ BOOL sv503_enableforcedlogoff;
BOOL sv503_timesource; BOOL sv503_timesource;
BOOL sv503_acceptdownlevelapis; BOOL sv503_acceptdownlevelapis;
BOOL sv503_lmannounce; BOOL sv503_lmannounce;
LPTSTR sv503_domain; LPWSTR sv503_domain;
DWORD sv503_maxcopyreadlen; DWORD sv503_maxcopyreadlen;
DWORD sv503_maxcopywritelen; DWORD sv503_maxcopywritelen;
DWORD sv503_minkeepsearch; DWORD sv503_minkeepsearch;
@ -184,7 +184,7 @@ BOOL sv599_enableforcedlogoff;
BOOL sv599_timesource; BOOL sv599_timesource;
BOOL sv599_acceptdownlevelapis; BOOL sv599_acceptdownlevelapis;
BOOL sv599_lmannounce; BOOL sv599_lmannounce;
LPTSTR sv599_domain; LPWSTR sv599_domain;
DWORD sv599_maxcopyreadlen; DWORD sv599_maxcopyreadlen;
DWORD sv599_maxcopywritelen; DWORD sv599_maxcopywritelen;
DWORD sv599_minkeepsearch; DWORD sv599_minkeepsearch;
@ -251,7 +251,7 @@ DWORD sv598_minpagedpoolchunksize;
DWORD sv598_maxpagedpoolchunksize; DWORD sv598_maxpagedpoolchunksize;
BOOL sv598_sendsfrompreferredprocessor; BOOL sv598_sendsfrompreferredprocessor;
} SERVER_INFO_598,*PSERVER_INFO_598,*LPSERVER_INFO_598; } SERVER_INFO_598,*PSERVER_INFO_598,*LPSERVER_INFO_598;
typedef struct _SERVER_INFO_1005 {LPTSTR sv1005_comment; } SERVER_INFO_1005,*PSERVER_INFO_1005,*LPSERVER_INFO_1005; typedef struct _SERVER_INFO_1005 {LPWSTR sv1005_comment; } SERVER_INFO_1005,*PSERVER_INFO_1005,*LPSERVER_INFO_1005;
typedef struct _SERVER_INFO_1107 { DWORD sv1107_users; } SERVER_INFO_1107,*PSERVER_INFO_1107,*LPSERVER_INFO_1107; typedef struct _SERVER_INFO_1107 { DWORD sv1107_users; } SERVER_INFO_1107,*PSERVER_INFO_1107,*LPSERVER_INFO_1107;
typedef struct _SERVER_INFO_1010 { LONG sv1010_disc; } SERVER_INFO_1010,*PSERVER_INFO_1010,*LPSERVER_INFO_1010; typedef struct _SERVER_INFO_1010 { LONG sv1010_disc; } SERVER_INFO_1010,*PSERVER_INFO_1010,*LPSERVER_INFO_1010;
typedef struct _SERVER_INFO_1016 { BOOL sv1016_hidden; } SERVER_INFO_1016,*PSERVER_INFO_1016,*LPSERVER_INFO_1016; typedef struct _SERVER_INFO_1016 { BOOL sv1016_hidden; } SERVER_INFO_1016,*PSERVER_INFO_1016,*LPSERVER_INFO_1016;
@ -332,24 +332,24 @@ typedef struct _SERVER_INFO_1585 { BOOL sv1585_sendsfrompreferredprocessor; } SE
typedef struct _SERVER_INFO_1586 { BOOL sv1586_maxthreadsperqueue; } SERVER_INFO_1586,*PSERVER_INFO_1586,*LPSERVER_INFO_1586; typedef struct _SERVER_INFO_1586 { BOOL sv1586_maxthreadsperqueue; } SERVER_INFO_1586,*PSERVER_INFO_1586,*LPSERVER_INFO_1586;
typedef struct _SERVER_TRANSPORT_INFO_0 { typedef struct _SERVER_TRANSPORT_INFO_0 {
DWORD svti0_numberofvcs; DWORD svti0_numberofvcs;
LPTSTR svti0_transportname; LPWSTR svti0_transportname;
PBYTE svti0_transportaddress; PBYTE svti0_transportaddress;
DWORD svti0_transportaddresslength; DWORD svti0_transportaddresslength;
LPTSTR svti0_networkaddress; LPWSTR svti0_networkaddress;
} SERVER_TRANSPORT_INFO_0,*PSERVER_TRANSPORT_INFO_0,*LPSERVER_TRANSPORT_INFO_0; } SERVER_TRANSPORT_INFO_0,*PSERVER_TRANSPORT_INFO_0,*LPSERVER_TRANSPORT_INFO_0;
NET_API_STATUS WINAPI NetServerEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,PDWORD); NET_API_STATUS WINAPI NetServerEnum(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,PDWORD);
NET_API_STATUS WINAPI NetServerEnumEx(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR); NET_API_STATUS WINAPI NetServerEnumEx(LPCWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,DWORD,LPCWSTR,LPCWSTR);
NET_API_STATUS WINAPI NetServerGetInfo(LPTSTR,DWORD,PBYTE*); NET_API_STATUS WINAPI NetServerGetInfo(LPWSTR,DWORD,PBYTE*);
NET_API_STATUS WINAPI NetServerSetInfo(LPTSTR,DWORD,PBYTE,PDWORD); NET_API_STATUS WINAPI NetServerSetInfo(LPWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS NetServerSetInfoCommandLine(WORD,LPTSTR*); NET_API_STATUS NetServerSetInfoCommandLine(WORD,LPWSTR*);
NET_API_STATUS WINAPI NetServerDiskEnum(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetServerDiskEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetServerComputerNameAdd(LPWSTR,LPWSTR,LPWSTR); NET_API_STATUS WINAPI NetServerComputerNameAdd(LPWSTR,LPWSTR,LPWSTR);
NET_API_STATUS WINAPI NetServerComputerNameDel(LPWSTR,LPWSTR); NET_API_STATUS WINAPI NetServerComputerNameDel(LPWSTR,LPWSTR);
NET_API_STATUS WINAPI NetServerTransportAdd(LPTSTR,DWORD,PBYTE); NET_API_STATUS WINAPI NetServerTransportAdd(LPWSTR,DWORD,PBYTE);
NET_API_STATUS WINAPI NetServerTransportAddEx(LPTSTR,DWORD,PBYTE); NET_API_STATUS WINAPI NetServerTransportAddEx(LPWSTR,DWORD,PBYTE);
NET_API_STATUS WINAPI NetServerTransportDel(LPTSTR,DWORD,PBYTE); NET_API_STATUS WINAPI NetServerTransportDel(LPWSTR,DWORD,PBYTE);
NET_API_STATUS WINAPI NetServerTransportEnum(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetServerTransportEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
BOOL SetServiceBits(SERVICE_STATUS_HANDLE,DWORD,BOOL,BOOL); BOOL SetServiceBits(SERVICE_STATUS_HANDLE,DWORD,BOOL,BOOL);
#define SVI1_NUM_ELEMENTS 5 #define SVI1_NUM_ELEMENTS 5

View File

@ -3,6 +3,7 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <lmcons.h>
#define SHARE_NETNAME_PARMNUM 1 #define SHARE_NETNAME_PARMNUM 1
#define SHARE_TYPE_PARMNUM 3 #define SHARE_TYPE_PARMNUM 3
#define SHARE_REMARK_PARMNUM 4 #define SHARE_REMARK_PARMNUM 4
@ -77,7 +78,7 @@ typedef struct _SHARE_INFO_1501 {
DWORD shi1501_reserved; DWORD shi1501_reserved;
PSECURITY_DESCRIPTOR shi1501_security_descriptor; PSECURITY_DESCRIPTOR shi1501_security_descriptor;
} SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501; } SHARE_INFO_1501,*PSHARE_INFO_1501,*LPSHARE_INFO_1501;
typedef struct _SESSION_INFO_0 { LPTSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0; typedef struct _SESSION_INFO_0 { LPWSTR sesi0_cname; } SESSION_INFO_0,*PSESSION_INFO_0,*LPSESSION_INFO_0;
typedef struct _SESSION_INFO_1 { typedef struct _SESSION_INFO_1 {
LPTSTR sesi1_cname; LPTSTR sesi1_cname;
LPTSTR sesi1_username; LPTSTR sesi1_username;
@ -93,23 +94,23 @@ typedef struct _SESSION_INFO_2 {
DWORD sesi2_time; DWORD sesi2_time;
DWORD sesi2_idle_time; DWORD sesi2_idle_time;
DWORD sesi2_user_flags; DWORD sesi2_user_flags;
LPTSTR sesi2_cltype_name; LPWSTR sesi2_cltype_name;
} SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2; } SESSION_INFO_2,*PSESSION_INFO_2,*LPSESSION_INFO_2;
typedef struct _SESSION_INFO_10 { typedef struct _SESSION_INFO_10 {
LPTSTR sesi10_cname; LPWSTR sesi10_cname;
LPTSTR sesi10_username; LPWSTR sesi10_username;
DWORD sesi10_time; DWORD sesi10_time;
DWORD sesi10_idle_time; DWORD sesi10_idle_time;
} SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10; } SESSION_INFO_10,*PSESSION_INFO_10,*LPSESSION_INFO_10;
typedef struct _SESSION_INFO_502 { typedef struct _SESSION_INFO_502 {
LPTSTR sesi502_cname; LPWSTR sesi502_cname;
LPTSTR sesi502_username; LPWSTR sesi502_username;
DWORD sesi502_num_opens; DWORD sesi502_num_opens;
DWORD sesi502_time; DWORD sesi502_time;
DWORD sesi502_idle_time; DWORD sesi502_idle_time;
DWORD sesi502_user_flags; DWORD sesi502_user_flags;
LPTSTR sesi502_cltype_name; LPWSTR sesi502_cltype_name;
LPTSTR sesi502_transport; LPWSTR sesi502_transport;
} SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502; } SESSION_INFO_502,*PSESSION_INFO_502,*LPSESSION_INFO_502;
typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0; typedef struct _CONNECTION_INFO_0 { DWORD coni0_id; } CONNECTION_INFO_0,*PCONNECTION_INFO_0,*LPCONNECTION_INFO_0;
typedef struct _CONNECTION_INFO_1 { typedef struct _CONNECTION_INFO_1 {
@ -118,24 +119,24 @@ typedef struct _CONNECTION_INFO_1 {
DWORD coni1_num_opens; DWORD coni1_num_opens;
DWORD coni1_num_users; DWORD coni1_num_users;
DWORD coni1_time; DWORD coni1_time;
LPTSTR coni1_username; LPWSTR coni1_username;
LPTSTR coni1_netname; LPWSTR coni1_netname;
} CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1; } CONNECTION_INFO_1,*PCONNECTION_INFO_1,*LPCONNECTION_INFO_1;
NET_API_STATUS WINAPI NetShareAdd(LPTSTR,DWORD,PBYTE,PDWORD); NET_API_STATUS WINAPI NetShareAdd(LPWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS WINAPI NetShareEnum(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetShareEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetShareEnumSticky(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle); NET_API_STATUS WINAPI NetShareEnumSticky(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD resume_handle);
NET_API_STATUS WINAPI NetShareGetInfo(LPTSTR,LPTSTR,DWORD,PBYTE*); NET_API_STATUS WINAPI NetShareGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
NET_API_STATUS WINAPI NetShareSetInfo(LPTSTR,LPTSTR,DWORD,PBYTE,PDWORD); NET_API_STATUS WINAPI NetShareSetInfo(LPWSTR,LPWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS WINAPI NetShareDel(LPTSTR,LPTSTR,DWORD); NET_API_STATUS WINAPI NetShareDel(LPWSTR,LPWSTR,DWORD);
NET_API_STATUS WINAPI NetShareDelSticky(LPTSTR,LPTSTR,DWORD); NET_API_STATUS WINAPI NetShareDelSticky(LPWSTR,LPWSTR,DWORD);
NET_API_STATUS WINAPI NetShareCheck(LPTSTR,LPTSTR,PDWORD); NET_API_STATUS WINAPI NetShareCheck(LPWSTR,LPWSTR,PDWORD);
NET_API_STATUS WINAPI NetSessionEnum(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetSessionEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetSessionDel(LPTSTR,LPTSTR,LPTSTR); NET_API_STATUS WINAPI NetSessionDel(LPWSTR,LPWSTR,LPWSTR);
NET_API_STATUS WINAPI NetSessionGetInfo(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*); NET_API_STATUS WINAPI NetSessionGetInfo(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*);
NET_API_STATUS WINAPI NetConnectionEnum(LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetConnectionEnum(LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetFileClose(LPTSTR,DWORD); NET_API_STATUS WINAPI NetFileClose(LPWSTR,DWORD);
NET_API_STATUS WINAPI NetFileEnum(LPTSTR,LPTSTR,LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetFileEnum(LPWSTR,LPWSTR,LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetFileGetInfo(LPTSTR,DWORD,DWORD,PBYTE*); NET_API_STATUS WINAPI NetFileGetInfo(LPWSTR,DWORD,DWORD,PBYTE*);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -103,7 +103,7 @@ typedef struct _STAT_WORKSTATION_0 {
} STAT_WORKSTATION_0,*PSTAT_WORKSTATION_0,*LPSTAT_WORKSTATION_0; } STAT_WORKSTATION_0,*PSTAT_WORKSTATION_0,*LPSTAT_WORKSTATION_0;
#endif #endif
NET_API_STATUS WINAPI NetStatisticsGet(LPTSTR,LPTSTR,DWORD,DWORD,PBYTE*); NET_API_STATUS WINAPI NetStatisticsGet(LPWSTR,LPWSTR,DWORD,DWORD,PBYTE*);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -23,33 +23,33 @@ extern "C" {
#define USE_CHARDEV 2 #define USE_CHARDEV 2
#define USE_IPC 3 #define USE_IPC 3
typedef struct _USE_INFO_0 { typedef struct _USE_INFO_0 {
LPTSTR ui0_local; LPWSTR ui0_local;
LPTSTR ui0_remote; LPWSTR ui0_remote;
}USE_INFO_0,*PUSE_INFO_0,*LPUSE_INFO_0; }USE_INFO_0,*PUSE_INFO_0,*LPUSE_INFO_0;
typedef struct _USE_INFO_1 { typedef struct _USE_INFO_1 {
LPTSTR ui1_local; LPWSTR ui1_local;
LPTSTR ui1_remote; LPWSTR ui1_remote;
LPTSTR ui1_password; LPWSTR ui1_password;
DWORD ui1_status; DWORD ui1_status;
DWORD ui1_asg_type; DWORD ui1_asg_type;
DWORD ui1_refcount; DWORD ui1_refcount;
DWORD ui1_usecount; DWORD ui1_usecount;
}USE_INFO_1,*PUSE_INFO_1,*LPUSE_INFO_1; }USE_INFO_1,*PUSE_INFO_1,*LPUSE_INFO_1;
typedef struct _USE_INFO_2 { typedef struct _USE_INFO_2 {
LPTSTR ui2_local; LPWSTR ui2_local;
LPTSTR ui2_remote; LPWSTR ui2_remote;
LPTSTR ui2_password; LPWSTR ui2_password;
DWORD ui2_status; DWORD ui2_status;
DWORD ui2_asg_type; DWORD ui2_asg_type;
DWORD ui2_refcount; DWORD ui2_refcount;
DWORD ui2_usecount; DWORD ui2_usecount;
LPTSTR ui2_username; LPWSTR ui2_username;
LPTSTR ui2_domainname; LPWSTR ui2_domainname;
}USE_INFO_2,*PUSE_INFO_2,*LPUSE_INFO_2; }USE_INFO_2,*PUSE_INFO_2,*LPUSE_INFO_2;
NET_API_STATUS WINAPI NetUseAdd(LPTSTR,DWORD,PBYTE,PDWORD); NET_API_STATUS WINAPI NetUseAdd(LPWSTR,DWORD,PBYTE,PDWORD);
NET_API_STATUS WINAPI NetUseDel(LPTSTR,LPTSTR,DWORD); NET_API_STATUS WINAPI NetUseDel(LPWSTR,LPWSTR,DWORD);
NET_API_STATUS WINAPI NetUseEnum(LPTSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD); NET_API_STATUS WINAPI NetUseEnum(LPWSTR,DWORD,PBYTE*,DWORD,PDWORD,PDWORD,PDWORD);
NET_API_STATUS WINAPI NetUseGetInfo(LPTSTR,LPTSTR,DWORD,PBYTE*); NET_API_STATUS WINAPI NetUseGetInfo(LPWSTR,LPWSTR,DWORD,PBYTE*);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -113,6 +113,7 @@ WINOLEAUTAPI_(BSTR) SysAllocStringByteLen(const char*,unsigned int);
WINOLEAUTAPI_(int) DosDateTimeToVariantTime(unsigned short,unsigned short,double*); WINOLEAUTAPI_(int) DosDateTimeToVariantTime(unsigned short,unsigned short,double*);
WINOLEAUTAPI_(int) VariantTimeToDosDateTime(double,unsigned short*,unsigned short*); WINOLEAUTAPI_(int) VariantTimeToDosDateTime(double,unsigned short*,unsigned short*);
WINOLEAUTAPI_(int) VariantTimeToSystemTime(double,LPSYSTEMTIME); WINOLEAUTAPI_(int) VariantTimeToSystemTime(double,LPSYSTEMTIME);
WINOLEAUTAPI_(int) SystemTimeToVariantTime(LPSYSTEMTIME, double*);
WINOLEAUTAPI SafeArrayAllocDescriptor(unsigned int,SAFEARRAY**); WINOLEAUTAPI SafeArrayAllocDescriptor(unsigned int,SAFEARRAY**);
WINOLEAUTAPI SafeArrayAllocData(SAFEARRAY*); WINOLEAUTAPI SafeArrayAllocData(SAFEARRAY*);
WINOLEAUTAPI_(SAFEARRAY*) SafeArrayCreate(VARTYPE,unsigned int,SAFEARRAYBOUND*); WINOLEAUTAPI_(SAFEARRAY*) SafeArrayCreate(VARTYPE,unsigned int,SAFEARRAYBOUND*);

View File

@ -1,50 +1,949 @@
#ifndef _RAS_H_ #ifndef _RAS_H
#define _RAS_H_ #define _RAS_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C"
{
#endif #endif
#define RAS_MaxDeviceType 16 #ifndef _LMCONS_H
#define RAS_MaxDeviceName 128 #include <lmcons.h>
#endif
#define RASDT_Modem TEXT("modem") /* TODO
#define RASDT_Isdn TEXT("isdn") include <basetsd.h> from winnt.h so that this typedef is not necessary
#define RASDT_X25 TEXT("x25") */
#define RASDT_Vpn TEXT("vpn") #ifndef _BASETSD_H
#define RASDT_Pad TEXT("pad") typedef unsigned long ULONG_PTR, *PULONG_PTR;
#endif
typedef struct tagRASDEVINFOA { #include <pshpack4.h>
DWORD dwSize;
CHAR szDeviceType[RAS_MaxDeviceType+1]; #define RAS_MaxDeviceType 16
CHAR szDeviceName[RAS_MaxDeviceName+1]; #define RAS_MaxPhoneNumber 128
}; #define RAS_MaxIpAddress 15
#define RASDEVINFOA struct tagRASDEVINFOA #define RAS_MaxIpxAddress 21
#define LPRASDEVINFOA RASDEVINFOA* #define RAS_MaxEntryName 256
#define RAS_MaxDeviceName 128
#define RAS_MaxCallbackNumber RAS_MaxPhoneNumber
#define RAS_MaxAreaCode 10
#define RAS_MaxPadType 32
#define RAS_MaxX25Address 200
#define RAS_MaxFacilities 200
#define RAS_MaxUserData 200
#define RAS_MaxReplyMessage 1024
#define RDEOPT_UsePrefixSuffix 0x00000001
#define RDEOPT_PausedStates 0x00000002
#define RDEOPT_IgnoreModemSpeaker 0x00000004
#define RDEOPT_SetModemSpeaker 0x00000008
#define RDEOPT_IgnoreSoftwareCompression 0x00000010
#define RDEOPT_SetSoftwareCompression 0x00000020
#define RDEOPT_DisableConnectedUI 0x00000040
#define RDEOPT_DisableReconnectUI 0x00000080
#define RDEOPT_DisableReconnect 0x00000100
#define RDEOPT_NoUser 0x00000200
#define RDEOPT_PauseOnScript 0x00000400
#define RDEOPT_Router 0x00000800
#define REN_User 0x00000000
#define REN_AllUsers 0x00000001
#define VS_Default 0
#define VS_PptpOnly 1
#define VS_PptpFirst 2
#define VS_L2tpOnly 3
#define VS_L2tpFirst 4
#define RASDIALEVENT "RasDialEvent"
#define WM_RASDIALEVENT 0xCCCD
#define RASEO_UseCountryAndAreaCodes 0x00000001
#define RASEO_SpecificIpAddr 0x00000002
#define RASEO_SpecificNameServers 0x00000004
#define RASEO_IpHeaderCompression 0x00000008
#define RASEO_RemoteDefaultGateway 0x00000010
#define RASEO_DisableLcpExtensions 0x00000020
#define RASEO_TerminalBeforeDial 0x00000040
#define RASEO_TerminalAfterDial 0x00000080
#define RASEO_ModemLights 0x00000100
#define RASEO_SwCompression 0x00000200
#define RASEO_RequireEncryptedPw 0x00000400
#define RASEO_RequireMsEncryptedPw 0x00000800
#define RASEO_RequireDataEncryption 0x00001000
#define RASEO_NetworkLogon 0x00002000
#define RASEO_UseLogonCredentials 0x00004000
#define RASEO_PromoteAlternates 0x00008000
#define RASNP_NetBEUI 0x00000001
#define RASNP_Ipx 0x00000002
#define RASNP_Ip 0x00000004
#define RASFP_Ppp 0x00000001
#define RASFP_Slip 0x00000002
#define RASFP_Ras 0x00000004
#define RASDT_Modem TEXT("modem")
#define RASDT_Isdn TEXT("isdn")
#define RASDT_X25 TEXT("x25")
#define RASDT_Vpn TEXT("vpn")
#define RASDT_Pad TEXT("pad")
#define RASDT_Generic TEXT("GENERIC")
#define RASDT_Serial TEXT("SERIAL")
#define RASDT_FrameRelay TEXT("FRAMERELAY")
#define RASDT_Atm TEXT("ATM")
#define RASDT_Sonet TEXT("SONET")
#define RASDT_SW56 TEXT("SW56")
#define RASDT_Irda TEXT("IRDA")
#define RASDT_Parallel TEXT("PARALLEL")
#define RASET_Phone 1
#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
typedef enum tagRASCONNSTATE {
RASCS_OpenPort = 0,
RASCS_PortOpened,
RASCS_ConnectDevice,
RASCS_DeviceConnected,
RASCS_AllDevicesConnected,
RASCS_Authenticate,
RASCS_AuthNotify,
RASCS_AuthRetry,
RASCS_AuthCallback,
RASCS_AuthChangePassword,
RASCS_AuthProject,
RASCS_AuthLinkSpeed,
RASCS_AuthAck,
RASCS_ReAuthenticate,
RASCS_Authenticated,
RASCS_PrepareForCallback,
RASCS_WaitForModemReset,
RASCS_WaitForCallback,
RASCS_Projected,
RASCS_StartAuthentication,
RASCS_CallbackComplete,
RASCS_LogonNetwork,
RASCS_SubEntryConnected,
RASCS_SubEntryDisconnected,
RASCS_Interactive = RASCS_PAUSED,
RASCS_RetryAuthentication,
RASCS_CallbackSetByCaller,
RASCS_PasswordExpired,
#if (WINVER >= 0x500)
RASCS_InvokeEapUI,
#endif
RASCS_Connected = RASCS_DONE,
RASCS_Disconnected
} RASCONNSTATE, *LPRASCONNSTATE;
typedef enum tagRASPROJECTION {
RASP_Amb = 0x10000,
RASP_PppNbf = 0x803F,
RASP_PppIpx = 0x802B,
RASP_PppIp = 0x8021,
#if (WINVER >= 0x500)
RASP_PppCcp = 0x80FD,
#endif
RASP_PppLcp = 0xC021,
RASP_Slip = 0x20000
} RASPROJECTION, *LPRASPROJECTION;
DECLARE_HANDLE (HRASCONN);
typedef HRASCONN* LPHRASCONN;
typedef struct tagRASCONNW {
DWORD dwSize;
HRASCONN hrasconn;
WCHAR szEntryName[RAS_MaxEntryName + 1];
WCHAR szDeviceType[RAS_MaxDeviceType + 1];
WCHAR szDeviceName[RAS_MaxDeviceName + 1];
#if (WINVER >= 0x401)
WCHAR szPhonebook[MAX_PATH];
DWORD dwSubEntry;
#endif
#if (WINVER >= 0x500)
GUID guidEntry;
#endif
} RASCONNW, *LPRASCONNW;
typedef struct tagRASCONNA {
DWORD dwSize;
HRASCONN hrasconn;
CHAR szEntryName[RAS_MaxEntryName + 1];
CHAR szDeviceType[RAS_MaxDeviceType + 1];
CHAR szDeviceName[RAS_MaxDeviceName + 1];
#if (WINVER >= 0x401)
CHAR szPhonebook[MAX_PATH];
DWORD dwSubEntry;
#endif
#if (WINVER >= 0x500)
GUID guidEntry;
#endif
} RASCONNA, *LPRASCONNA;
typedef struct tagRASCONNSTATUSW {
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
WCHAR szDeviceType[RAS_MaxDeviceType + 1];
WCHAR szDeviceName[RAS_MaxDeviceName + 1];
#if (WINVER >= 0x401)
WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
#endif
} RASCONNSTATUSW, *LPRASCONNSTATUSW;
typedef struct tagRASCONNSTATUSA {
DWORD dwSize;
RASCONNSTATE rasconnstate;
DWORD dwError;
CHAR szDeviceType[RAS_MaxDeviceType + 1];
CHAR szDeviceName[RAS_MaxDeviceName + 1];
#if (WINVER >= 0x401)
CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
#endif
} RASCONNSTATUSA, *LPRASCONNSTATUSA;
typedef struct tagRASDIALPARAMSW {
DWORD dwSize;
WCHAR szEntryName[RAS_MaxEntryName + 1];
WCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
WCHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
WCHAR szUserName[UNLEN + 1];
WCHAR szPassword[PWLEN + 1];
WCHAR szDomain[DNLEN + 1];
#if (WINVER >= 0x401)
DWORD dwSubEntry;
ULONG_PTR dwCallbackId;
#endif
} RASDIALPARAMSW, *LPRASDIALPARAMSW;
typedef struct tagRASDIALPARAMSA {
DWORD dwSize;
CHAR szEntryName[RAS_MaxEntryName + 1];
CHAR szPhoneNumber[RAS_MaxPhoneNumber + 1];
CHAR szCallbackNumber[RAS_MaxCallbackNumber + 1];
CHAR szUserName[UNLEN + 1];
CHAR szPassword[PWLEN + 1];
CHAR szDomain[DNLEN + 1];
#if (WINVER >= 0x401)
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)
ULONG_PTR reserved1;
RASEAPINFO RasEapInfo;
#endif
} RASDIALEXTENSIONS, *LPRASDIALEXTENSIONS;
typedef struct tagRASENTRYNAMEW {
DWORD dwSize;
WCHAR szEntryName[RAS_MaxEntryName + 1];
#if (WINVER >= 0x500)
DWORD dwFlags;
WCHAR szPhonebookPath[MAX_PATH + 1];
#endif
} RASENTRYNAMEW, *LPRASENTRYNAMEW;
typedef struct tagRASENTRYNAMEA {
DWORD dwSize;
CHAR szEntryName[RAS_MaxEntryName + 1];
#if (WINVER >= 0x500)
DWORD dwFlags;
CHAR szPhonebookPath[MAX_PATH + 1];
#endif
} RASENTRYNAMEA, *LPRASENTRYNAMEA;
typedef struct tagRASAMBW {
DWORD dwSize;
DWORD dwError;
WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
BYTE bLana;
} RASAMBW, *LPRASAMBW;
typedef struct tagRASAMBA {
DWORD dwSize;
DWORD dwError;
CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
BYTE bLana;
} RASAMBA, *LPRASAMBA;
typedef struct tagRASPPPNBFW {
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
WCHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
WCHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
BYTE bLana;
} RASPPPNBFW, *LPRASPPPNBFW;
typedef struct tagRASPPPNBFA {
DWORD dwSize;
DWORD dwError;
DWORD dwNetBiosError;
CHAR szNetBiosError[NETBIOS_NAME_LEN + 1];
CHAR szWorkstationName[NETBIOS_NAME_LEN + 1];
BYTE bLana;
} RASPPPNBFA, *LPRASPPPNBFA;
typedef struct tagRASIPXW {
DWORD dwSize;
DWORD dwError;
WCHAR szIpxAddress[RAS_MaxIpxAddress + 1];
} RASPPPIPXW, *LPRASPPPIPXW;
typedef struct tagRASIPXA {
DWORD dwSize;
DWORD dwError;
CHAR szIpxAddress[RAS_MaxIpxAddress + 1];
} RASPPPIPXA, *LPRASPPPIPXA;
typedef struct tagRASPPPIPW {
DWORD dwSize;
DWORD dwError;
WCHAR szIpAddress[RAS_MaxIpAddress + 1];
#ifndef WINNT35COMPATIBLE
WCHAR szServerIpAddress[RAS_MaxIpAddress + 1];
#endif
#if (WINVER >= 0x500)
DWORD dwOptions;
DWORD dwServerOptions;
#endif
} RASPPPIPW, *LPRASPPPIPW;
typedef struct tagRASPPPIPA {
DWORD dwSize;
DWORD dwError;
CHAR szIpAddress[RAS_MaxIpAddress + 1];
#ifndef WINNT35COMPATIBLE
CHAR szServerIpAddress[RAS_MaxIpAddress + 1];
#endif
#if (WINVER >= 0x500)
DWORD dwOptions;
DWORD dwServerOptions;
#endif
} RASPPPIPA, *LPRASPPPIPA;
typedef struct tagRASPPPLCPW {
DWORD dwSize;
BOOL fBundled;
#if (WINVER >= 0x500)
DWORD dwError;
DWORD dwAuthenticationProtocol;
DWORD dwAuthenticationData;
DWORD dwEapTypeId;
DWORD dwServerAuthenticationProtocol;
DWORD dwServerAuthenticationData;
DWORD dwServerEapTypeId;
BOOL fMultilink;
DWORD dwTerminateReason;
DWORD dwServerTerminateReason;
WCHAR szReplyMessage[RAS_MaxReplyMessage];
DWORD dwOptions;
DWORD dwServerOptions;
#endif
} RASPPPLCPW, *LPRASPPPLCPW;
typedef struct tagRASPPPLCPA {
DWORD dwSize;
BOOL fBundled;
#if (WINVER >= 0x500)
DWORD dwError;
DWORD dwAuthenticationProtocol;
DWORD dwAuthenticationData;
DWORD dwEapTypeId;
DWORD dwServerAuthenticationProtocol;
DWORD dwServerAuthenticationData;
DWORD dwServerEapTypeId;
BOOL fMultilink;
DWORD dwTerminateReason;
DWORD dwServerTerminateReason;
CHAR szReplyMessage[RAS_MaxReplyMessage];
DWORD dwOptions;
DWORD dwServerOptions;
#endif
} RASPPPLCPA, *LPRASPPPLCPA;
typedef struct tagRASSLIPW {
DWORD dwSize;
DWORD dwError;
WCHAR szIpAddress[RAS_MaxIpAddress + 1];
} RASSLIPW, *LPRASSLIPW;
typedef struct tagRASSLIPA {
DWORD dwSize;
DWORD dwError;
CHAR szIpAddress[RAS_MaxIpAddress + 1];
} RASSLIPA, *LPRASSLIPA;
typedef struct tagRASDEVINFOW { typedef struct tagRASDEVINFOW {
DWORD dwSize; DWORD dwSize;
WCHAR szDeviceType[RAS_MaxDeviceType+1]; WCHAR szDeviceType[RAS_MaxDeviceType + 1];
WCHAR szDeviceName[RAS_MaxDeviceName+1]; WCHAR szDeviceName[RAS_MaxDeviceName + 1];
}; } RASDEVINFOW, *LPRASDEVINFOW;
#define RASDEVINFOW struct tagRASDEVINFOW
#define LPRASDEVINFOW RASDEVINFOW*
DWORD WINAPI RasEnumDevicesA(LPRASDEVINFOA,LPDWORD,LPDWORD); typedef struct tagRASDEVINFOA {
DWORD WINAPI RasEnumDevicesW(LPRASDEVINFOW,LPDWORD,LPDWORD); DWORD dwSize;
CHAR szDeviceType[RAS_MaxDeviceType + 1];
CHAR szDeviceName[RAS_MaxDeviceName + 1];
} RASDEVINFOA, *LPRASDEVINFOA;
typedef struct tagRASCTRYINFO {
DWORD dwSize;
DWORD dwCountryID;
DWORD dwNextCountryID;
DWORD dwCountryCode;
DWORD dwCountryNameOffset;
} RASCTRYINFO, *LPRASCTRYINFO;
typedef RASCTRYINFO RASCTRYINFOW, *LPRASCTRYINFOW;
typedef RASCTRYINFO RASCTRYINFOA, *LPRASCTRYINFOA;
typedef struct tagRASIPADDR {
BYTE a;
BYTE b;
BYTE c;
BYTE d;
} RASIPADDR;
typedef struct tagRASENTRYW {
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
WCHAR szAreaCode[RAS_MaxAreaCode + 1];
WCHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
WCHAR szScript[MAX_PATH];
WCHAR szAutodialDll[MAX_PATH];
WCHAR szAutodialFunc[MAX_PATH];
WCHAR szDeviceType[RAS_MaxDeviceType + 1];
WCHAR szDeviceName[RAS_MaxDeviceName + 1];
WCHAR szX25PadType[RAS_MaxPadType + 1];
WCHAR szX25Address[RAS_MaxX25Address + 1];
WCHAR szX25Facilities[RAS_MaxFacilities + 1];
WCHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
WCHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
#endif
} RASENTRYW, *LPRASENTRYW;
typedef struct tagRASENTRYA {
DWORD dwSize;
DWORD dwfOptions;
DWORD dwCountryID;
DWORD dwCountryCode;
CHAR szAreaCode[RAS_MaxAreaCode + 1];
CHAR szLocalPhoneNumber[RAS_MaxPhoneNumber + 1];
DWORD dwAlternateOffset;
RASIPADDR ipaddr;
RASIPADDR ipaddrDns;
RASIPADDR ipaddrDnsAlt;
RASIPADDR ipaddrWins;
RASIPADDR ipaddrWinsAlt;
DWORD dwFrameSize;
DWORD dwfNetProtocols;
DWORD dwFramingProtocol;
CHAR szScript[MAX_PATH];
CHAR szAutodialDll[MAX_PATH];
CHAR szAutodialFunc[MAX_PATH];
CHAR szDeviceType[RAS_MaxDeviceType + 1];
CHAR szDeviceName[RAS_MaxDeviceName + 1];
CHAR szX25PadType[RAS_MaxPadType + 1];
CHAR szX25Address[RAS_MaxX25Address + 1];
CHAR szX25Facilities[RAS_MaxFacilities + 1];
CHAR szX25UserData[RAS_MaxUserData + 1];
DWORD dwChannels;
DWORD dwReserved1;
DWORD dwReserved2;
#if (WINVER >= 0x401)
DWORD dwSubEntries;
DWORD dwDialMode;
DWORD dwDialExtraPercent;
DWORD dwDialExtraSampleSeconds;
DWORD dwHangUpExtraPercent;
DWORD dwHangUpExtraSampleSeconds;
DWORD dwIdleDisconnectSeconds;
#endif
#if (WINVER >= 0x500)
DWORD dwType;
DWORD dwEncryptionType;
DWORD dwCustomAuthKey;
GUID guidId;
CHAR szCustomDialDll[MAX_PATH];
DWORD dwVpnStrategy;
#endif
} 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 #ifdef UNICODE
#define RASDEVINFO RASDEVINFOW typedef RASCONNW RASCONN, *LPRASCONN;
#define RasEnumDevices RasEnumDevicesW typedef RASENTRYW RASENTRY, *LPRASENTRY;
#else typedef RASCONNSTATUSW RASCONNSTATUS, *LPRASCONNSTATUS;
#define RASDEVINFO RASDEVINFOA typedef RASDIALPARAMSW RASDIALPARAMS, *LPRASDIALPARAMS;
#define RasEnumDevices RasEnumDevicesA 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 */
/* Callback prototypes */
typedef BOOL (WINAPI * ORASADFUNC) (HWND, LPSTR, DWORD, LPDWORD); /* deprecated */
typedef VOID (WINAPI * RASDIALFUNC) (UINT, RASCONNSTATE, DWORD);
typedef VOID (WINAPI * RASDIALFUNC1) (HRASCONN, UINT, RASCONNSTATE, DWORD,
DWORD);
typedef DWORD (WINAPI * RASDIALFUNC2) (ULONG_PTR, DWORD, HRASCONN, UINT,
RASCONNSTATE, DWORD, DWORD);
/* External functions */
DWORD APIENTRY RasDialA (LPRASDIALEXTENSIONS, LPCSTR, LPRASDIALPARAMSA,
DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasDialW (LPRASDIALEXTENSIONS, LPCWSTR, LPRASDIALPARAMSW,
DWORD, LPVOID, LPHRASCONN);
DWORD APIENTRY RasEnumConnectionsA (LPRASCONNA, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumConnectionsW (LPRASCONNW, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumEntriesA (LPCSTR, LPCSTR, LPRASENTRYNAMEA, LPDWORD,
LPDWORD);
DWORD APIENTRY RasEnumEntriesW (LPCWSTR, LPCWSTR, LPRASENTRYNAMEW, LPDWORD,
LPDWORD);
DWORD APIENTRY RasGetConnectStatusA (HRASCONN, LPRASCONNSTATUSA);
DWORD APIENTRY RasGetConnectStatusW (HRASCONN, LPRASCONNSTATUSW);
DWORD APIENTRY RasGetErrorStringA (UINT, LPSTR, DWORD);
DWORD APIENTRY RasGetErrorStringW (UINT, LPWSTR, DWORD);
DWORD APIENTRY RasHangUpA (HRASCONN);
DWORD APIENTRY RasHangUpW (HRASCONN);
DWORD APIENTRY RasGetProjectionInfoA (HRASCONN, RASPROJECTION, LPVOID,
LPDWORD);
DWORD APIENTRY RasGetProjectionInfoW (HRASCONN, RASPROJECTION, LPVOID,
LPDWORD);
DWORD APIENTRY RasCreatePhonebookEntryA (HWND, LPCSTR);
DWORD APIENTRY RasCreatePhonebookEntryW (HWND, LPCWSTR);
DWORD APIENTRY RasEditPhonebookEntryA (HWND, LPCSTR, LPCSTR);
DWORD APIENTRY RasEditPhonebookEntryW (HWND, LPCWSTR, LPCWSTR);
DWORD APIENTRY RasSetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, BOOL);
DWORD APIENTRY RasSetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, BOOL);
DWORD APIENTRY RasGetEntryDialParamsA (LPCSTR, LPRASDIALPARAMSA, LPBOOL);
DWORD APIENTRY RasGetEntryDialParamsW (LPCWSTR, LPRASDIALPARAMSW, LPBOOL);
DWORD APIENTRY RasEnumDevicesA (LPRASDEVINFOA, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumDevicesW (LPRASDEVINFOW, LPDWORD, LPDWORD);
DWORD APIENTRY RasGetCountryInfoA (LPRASCTRYINFOA, LPDWORD);
DWORD APIENTRY RasGetCountryInfoW (LPRASCTRYINFOW, LPDWORD);
DWORD APIENTRY RasGetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, LPDWORD,
LPBYTE, LPDWORD);
DWORD APIENTRY RasGetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW,
LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasSetEntryPropertiesA (LPCSTR, LPCSTR, LPRASENTRYA, DWORD,
LPBYTE, DWORD);
DWORD APIENTRY RasSetEntryPropertiesW (LPCWSTR, LPCWSTR, LPRASENTRYW, DWORD,
LPBYTE, DWORD);
DWORD APIENTRY RasRenameEntryA (LPCSTR, LPCSTR, LPCSTR);
DWORD APIENTRY RasRenameEntryW (LPCWSTR, LPCWSTR, LPCWSTR);
DWORD APIENTRY RasDeleteEntryA (LPCSTR, LPCSTR);
DWORD APIENTRY RasDeleteEntryW (LPCWSTR, LPCWSTR);
DWORD APIENTRY RasValidateEntryNameA (LPCSTR, LPCSTR);
DWORD APIENTRY RasValidateEntryNameW (LPCWSTR, LPCWSTR);
#if (WINVER >= 0x401)
typedef BOOL (WINAPI * RASADFUNCA) (LPSTR, LPSTR, LPRASADPARAMS, LPDWORD);
typedef BOOL (WINAPI * RASADFUNCW) (LPWSTR, LPWSTR, LPRASADPARAMS, LPDWORD);
DWORD APIENTRY RasGetSubEntryHandleA (HRASCONN, DWORD, LPHRASCONN);
DWORD APIENTRY RasGetSubEntryHandleW (HRASCONN, DWORD, LPHRASCONN);
DWORD APIENTRY RasGetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA);
DWORD APIENTRY RasGetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW);
DWORD APIENTRY RasSetCredentialsA (LPCSTR, LPCSTR, LPRASCREDENTIALSA, BOOL);
DWORD APIENTRY RasSetCredentialsW (LPCWSTR, LPCWSTR, LPRASCREDENTIALSW, BOOL);
DWORD APIENTRY RasConnectionNotificationA (HRASCONN, HANDLE, DWORD);
DWORD APIENTRY RasConnectionNotificationW (HRASCONN, HANDLE, DWORD);
DWORD APIENTRY RasGetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
LPRASSUBENTRYA, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasGetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
LPRASSUBENTRYW, LPDWORD, LPBYTE, LPDWORD);
DWORD APIENTRY RasSetSubEntryPropertiesA (LPCSTR, LPCSTR, DWORD,
LPRASSUBENTRYA, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasSetSubEntryPropertiesW (LPCWSTR, LPCWSTR, DWORD,
LPRASSUBENTRYW, DWORD, LPBYTE, DWORD);
DWORD APIENTRY RasGetAutodialAddressA (LPCSTR, LPDWORD, LPRASAUTODIALENTRYA,
LPDWORD, LPDWORD);
DWORD APIENTRY RasGetAutodialAddressW (LPCWSTR, LPDWORD,
LPRASAUTODIALENTRYW, LPDWORD, LPDWORD);
DWORD APIENTRY RasSetAutodialAddressA (LPCSTR, DWORD, LPRASAUTODIALENTRYA,
DWORD, DWORD);
DWORD APIENTRY RasSetAutodialAddressW (LPCWSTR, DWORD, LPRASAUTODIALENTRYW,
DWORD, DWORD);
DWORD APIENTRY RasEnumAutodialAddressesA (LPSTR *, LPDWORD, LPDWORD);
DWORD APIENTRY RasEnumAutodialAddressesW (LPWSTR *, LPDWORD, LPDWORD);
DWORD APIENTRY RasGetAutodialEnableA (DWORD, LPBOOL);
DWORD APIENTRY RasGetAutodialEnableW (DWORD, LPBOOL);
DWORD APIENTRY RasSetAutodialEnableA (DWORD, BOOL);
DWORD APIENTRY RasSetAutodialEnableW (DWORD, BOOL);
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 #endif
#define LPRASDEVINFO RASDEVINFO* #if (WINVER >= 0x500)
typedef DWORD (WINAPI * RasCustomHangUpFn) (HRASCONN);
typedef DWORD (WINAPI * RasCustomDeleteEntryNotifyFn) (LPCTSTR, LPCTSTR, DWORD);
typedef DWORD (WINAPI * RasCustomDialFn) (HINSTANCE, LPRASDIALEXTENSIONS,
LPCTSTR, LPRASDIALPARAMS, DWORD, LPVOID, LPHRASCONN, DWORD);
DWORD APIENTRY RasInvokeEapUI (HRASCONN, DWORD, LPRASDIALEXTENSIONS, HWND);
DWORD APIENTRY RasGetLinkStatistics (HRASCONN, DWORD, RAS_STATS*);
DWORD APIENTRY RasGetConnectionStatistics (HRASCONN, RAS_STATS*);
DWORD APIENTRY RasClearLinkStatistics (HRASCONN, DWORD);
DWORD APIENTRY RasClearConnectionStatistics (HRASCONN);
DWORD APIENTRY RasGetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD*);
DWORD APIENTRY RasGetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD*);
DWORD APIENTRY RasSetEapUserDataA (HANDLE, LPCSTR, LPCSTR, BYTE*, DWORD);
DWORD APIENTRY RasSetEapUserDataW (HANDLE, LPCWSTR, LPCWSTR, BYTE*, DWORD);
DWORD APIENTRY RasGetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD*);
DWORD APIENTRY RasGetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD*);
DWORD APIENTRY RasSetCustomAuthDataA (LPCSTR, LPCSTR, BYTE*, DWORD);
DWORD APIENTRY RasSetCustomAuthDataW (LPCWSTR, LPCWSTR, BYTE*, DWORD);
DWORD APIENTRY RasGetEapUserIdentityW (LPCWSTR, LPCWSTR, DWORD, HWND, LPRASEAPUSERIDENTITYW*);
DWORD APIENTRY RasGetEapUserIdentityA (LPCSTR, LPCSTR, DWORD, HWND, LPRASEAPUSERIDENTITYA*);
VOID APIENTRY RasFreeEapUserIdentityW (LPRASEAPUSERIDENTITYW);
VOID APIENTRY RasFreeEapUserIdentityA (LPRASEAPUSERIDENTITYA);
#endif /* (WINVER >= 0x500) */
/* 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 */
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#include <poppack.h>
#endif /* _RAS_H_ */ #endif /* _RAS_H */

View File

@ -0,0 +1,206 @@
#ifndef _RASERROR_H
#define _RASERROR_H
#define RASBASE 600
#define SUCCESS 0
#define PENDING (RASBASE+0)
#define ERROR_INVALID_PORT_HANDLE (RASBASE+1)
#define ERROR_PORT_ALREADY_OPEN (RASBASE+2)
#define ERROR_BUFFER_TOO_SMALL (RASBASE+3)
#define ERROR_WRONG_INFO_SPECIFIED (RASBASE+4)
#define ERROR_CANNOT_SET_PORT_INFO (RASBASE+5)
#define ERROR_PORT_NOT_CONNECTED (RASBASE+6)
#define ERROR_EVENT_INVALID (RASBASE+7)
#define ERROR_DEVICE_DOES_NOT_EXIST (RASBASE+8)
#define ERROR_DEVICETYPE_DOES_NOT_EXIST (RASBASE+9)
#define ERROR_BUFFER_INVALID (RASBASE+10)
#define ERROR_ROUTE_NOT_AVAILABLE (RASBASE+11)
#define ERROR_ROUTE_NOT_ALLOCATED (RASBASE+12)
#define ERROR_INVALID_COMPRESSION_SPECIFIED (RASBASE+13)
#define ERROR_OUT_OF_BUFFERS (RASBASE+14)
#define ERROR_PORT_NOT_FOUND (RASBASE+15)
#define ERROR_ASYNC_REQUEST_PENDING (RASBASE+16)
#define ERROR_ALREADY_DISCONNECTING (RASBASE+17)
#define ERROR_PORT_NOT_OPEN (RASBASE+18)
#define ERROR_PORT_DISCONNECTED (RASBASE+19)
#define ERROR_NO_ENDPOINTS (RASBASE+20)
#define ERROR_CANNOT_OPEN_PHONEBOOK (RASBASE+21)
#define ERROR_CANNOT_LOAD_PHONEBOOK (RASBASE+22)
#define ERROR_CANNOT_FIND_PHONEBOOK_ENTRY (RASBASE+23)
#define ERROR_CANNOT_WRITE_PHONEBOOK (RASBASE+24)
#define ERROR_CORRUPT_PHONEBOOK (RASBASE+25)
#define ERROR_CANNOT_LOAD_STRING (RASBASE+26)
#define ERROR_KEY_NOT_FOUND (RASBASE+27)
#define ERROR_DISCONNECTION (RASBASE+28)
#define ERROR_REMOTE_DISCONNECTION (RASBASE+29)
#define ERROR_HARDWARE_FAILURE (RASBASE+30)
#define ERROR_USER_DISCONNECTION (RASBASE+31)
#define ERROR_INVALID_SIZE (RASBASE+32)
#define ERROR_PORT_NOT_AVAILABLE (RASBASE+33)
#define ERROR_CANNOT_PROJECT_CLIENT (RASBASE+34)
#define ERROR_UNKNOWN (RASBASE+35)
#define ERROR_WRONG_DEVICE_ATTACHED (RASBASE+36)
#define ERROR_BAD_STRING (RASBASE+37)
#define ERROR_REQUEST_TIMEOUT (RASBASE+38)
#define ERROR_CANNOT_GET_LANA (RASBASE+39)
#define ERROR_NETBIOS_ERROR (RASBASE+40)
#define ERROR_SERVER_OUT_OF_RESOURCES (RASBASE+41)
#define ERROR_NAME_EXISTS_ON_NET (RASBASE+42)
#define ERROR_SERVER_GENERAL_NET_FAILURE (RASBASE+43)
#define WARNING_MSG_ALIAS_NOT_ADDED (RASBASE+44)
#define ERROR_AUTH_INTERNAL (RASBASE+45)
#define ERROR_RESTRICTED_LOGON_HOURS (RASBASE+46)
#define ERROR_ACCT_DISABLED (RASBASE+47)
#define ERROR_PASSWD_EXPIRED (RASBASE+48)
#define ERROR_NO_DIALIN_PERMISSION (RASBASE+49)
#define ERROR_SERVER_NOT_RESPONDING (RASBASE+50)
#define ERROR_FROM_DEVICE (RASBASE+51)
#define ERROR_UNRECOGNIZED_RESPONSE (RASBASE+52)
#define ERROR_MACRO_NOT_FOUND (RASBASE+53)
#define ERROR_MACRO_NOT_DEFINED (RASBASE+54)
#define ERROR_MESSAGE_MACRO_NOT_FOUND (RASBASE+55)
#define ERROR_DEFAULTOFF_MACRO_NOT_FOUND (RASBASE+56)
#define ERROR_FILE_COULD_NOT_BE_OPENED (RASBASE+57)
#define ERROR_DEVICENAME_TOO_LONG (RASBASE+58)
#define ERROR_DEVICENAME_NOT_FOUND (RASBASE+59)
#define ERROR_NO_RESPONSES (RASBASE+60)
#define ERROR_NO_COMMAND_FOUND (RASBASE+61)
#define ERROR_WRONG_KEY_SPECIFIED (RASBASE+62)
#define ERROR_UNKNOWN_DEVICE_TYPE (RASBASE+63)
#define ERROR_ALLOCATING_MEMORY (RASBASE+64)
#define ERROR_PORT_NOT_CONFIGURED (RASBASE+65)
#define ERROR_DEVICE_NOT_READY (RASBASE+66)
#define ERROR_READING_INI_FILE (RASBASE+67)
#define ERROR_NO_CONNECTION (RASBASE+68)
#define ERROR_BAD_USAGE_IN_INI_FILE (RASBASE+69)
#define ERROR_READING_SECTIONNAME (RASBASE+70)
#define ERROR_READING_DEVICETYPE (RASBASE+71)
#define ERROR_READING_DEVICENAME (RASBASE+72)
#define ERROR_READING_USAGE (RASBASE+73)
#define ERROR_READING_MAXCONNECTBPS (RASBASE+74)
#define ERROR_READING_MAXCARRIERBPS (RASBASE+75)
#define ERROR_LINE_BUSY (RASBASE+76)
#define ERROR_VOICE_ANSWER (RASBASE+77)
#define ERROR_NO_ANSWER (RASBASE+78)
#define ERROR_NO_CARRIER (RASBASE+79)
#define ERROR_NO_DIALTONE (RASBASE+80)
#define ERROR_IN_COMMAND (RASBASE+81)
#define ERROR_WRITING_SECTIONNAME (RASBASE+82)
#define ERROR_WRITING_DEVICETYPE (RASBASE+83)
#define ERROR_WRITING_DEVICENAME (RASBASE+84)
#define ERROR_WRITING_MAXCONNECTBPS (RASBASE+85)
#define ERROR_WRITING_MAXCARRIERBPS (RASBASE+86)
#define ERROR_WRITING_USAGE (RASBASE+87)
#define ERROR_WRITING_DEFAULTOFF (RASBASE+88)
#define ERROR_READING_DEFAULTOFF (RASBASE+89)
#define ERROR_EMPTY_INI_FILE (RASBASE+90)
#define ERROR_AUTHENTICATION_FAILURE (RASBASE+91)
#define ERROR_PORT_OR_DEVICE (RASBASE+92)
#define ERROR_NOT_BINARY_MACRO (RASBASE+93)
#define ERROR_DCB_NOT_FOUND (RASBASE+94)
#define ERROR_STATE_MACHINES_NOT_STARTED (RASBASE+95)
#define ERROR_STATE_MACHINES_ALREADY_STARTED (RASBASE+96)
#define ERROR_PARTIAL_RESPONSE_LOOPING (RASBASE+97)
#define ERROR_UNKNOWN_RESPONSE_KEY (RASBASE+98)
#define ERROR_RECV_BUF_FULL (RASBASE+99)
#define ERROR_CMD_TOO_LONG (RASBASE+100)
#define ERROR_UNSUPPORTED_BPS (RASBASE+101)
#define ERROR_UNEXPECTED_RESPONSE (RASBASE+102)
#define ERROR_INTERACTIVE_MODE (RASBASE+103)
#define ERROR_BAD_CALLBACK_NUMBER (RASBASE+104)
#define ERROR_INVALID_AUTH_STATE (RASBASE+105)
#define ERROR_WRITING_INITBPS (RASBASE+106)
#define ERROR_X25_DIAGNOSTIC (RASBASE+107)
#define ERROR_ACCT_EXPIRED (RASBASE+108)
#define ERROR_CHANGING_PASSWORD (RASBASE+109)
#define ERROR_OVERRUN (RASBASE+110)
#define ERROR_RASMAN_CANNOT_INITIALIZE (RASBASE+111)
#define ERROR_BIPLEX_PORT_NOT_AVAILABLE (RASBASE+112)
#define ERROR_NO_ACTIVE_ISDN_LINES (RASBASE+113)
#define ERROR_NO_ISDN_CHANNELS_AVAILABLE (RASBASE+114)
#define ERROR_TOO_MANY_LINE_ERRORS (RASBASE+115)
#define ERROR_IP_CONFIGURATION (RASBASE+116)
#define ERROR_NO_IP_ADDRESSES (RASBASE+117)
#define ERROR_PPP_TIMEOUT (RASBASE+118)
#define ERROR_PPP_REMOTE_TERMINATED (RASBASE+119)
#define ERROR_PPP_NO_PROTOCOLS_CONFIGURED (RASBASE+120)
#define ERROR_PPP_NO_RESPONSE (RASBASE+121)
#define ERROR_PPP_INVALID_PACKET (RASBASE+122)
#define ERROR_PHONE_NUMBER_TOO_LONG (RASBASE+123)
#define ERROR_IPXCP_NO_DIALOUT_CONFIGURED (RASBASE+124)
#define ERROR_IPXCP_NO_DIALIN_CONFIGURED (RASBASE+125)
#define ERROR_IPXCP_DIALOUT_ALREADY_ACTIVE (RASBASE+126)
#define ERROR_ACCESSING_TCPCFGDLL (RASBASE+127)
#define ERROR_NO_IP_RAS_ADAPTER (RASBASE+128)
#define ERROR_SLIP_REQUIRES_IP (RASBASE+129)
#define ERROR_PROJECTION_NOT_COMPLETE (RASBASE+130)
#define ERROR_PROTOCOL_NOT_CONFIGURED (RASBASE+131)
#define ERROR_PPP_NOT_CONVERGING (RASBASE+132)
#define ERROR_PPP_CP_REJECTED (RASBASE+133)
#define ERROR_PPP_LCP_TERMINATED (RASBASE+134)
#define ERROR_PPP_REQUIRED_ADDRESS_REJECTED (RASBASE+135)
#define ERROR_PPP_NCP_TERMINATED (RASBASE+136)
#define ERROR_PPP_LOOPBACK_DETECTED (RASBASE+137)
#define ERROR_PPP_NO_ADDRESS_ASSIGNED (RASBASE+138)
#define ERROR_CANNOT_USE_LOGON_CREDENTIALS (RASBASE+139)
#define ERROR_TAPI_CONFIGURATION (RASBASE+140)
#define ERROR_NO_LOCAL_ENCRYPTION (RASBASE+141)
#define ERROR_NO_REMOTE_ENCRYPTION (RASBASE+142)
#define ERROR_REMOTE_REQUIRES_ENCRYPTION (RASBASE+143)
#define ERROR_IPXCP_NET_NUMBER_CONFLICT (RASBASE+144)
#define ERROR_INVALID_SMM (RASBASE+145)
#define ERROR_SMM_UNINITIALIZED (RASBASE+146)
#define ERROR_NO_MAC_FOR_PORT (RASBASE+147)
#define ERROR_SMM_TIMEOUT (RASBASE+148)
#define ERROR_BAD_PHONE_NUMBER (RASBASE+149)
#define ERROR_WRONG_MODULE (RASBASE+150)
#define ERROR_INVALID_CALLBACK_NUMBER (RASBASE+151)
#define ERROR_SCRIPT_SYNTAX (RASBASE+152)
#define ERROR_HANGUP_FAILED (RASBASE+153)
#define ERROR_BUNDLE_NOT_FOUND (RASBASE+154)
#define ERROR_CANNOT_DO_CUSTOMDIAL (RASBASE+155)
#define ERROR_DIAL_ALREADY_IN_PROGRESS (RASBASE+156)
#define ERROR_RASAUTO_CANNOT_INITIALIZE (RASBASE+157)
#define ERROR_CONNECTION_ALREADY_SHARED (RASBASE+158)
#define ERROR_SHARING_CHANGE_FAILED (RASBASE+159)
#define ERROR_SHARING_ROUTER_INSTALL (RASBASE+160)
#define ERROR_SHARE_CONNECTION_FAILED (RASBASE+161)
#define ERROR_SHARING_PRIVATE_INSTALL (RASBASE+162)
#define ERROR_CANNOT_SHARE_CONNECTION (RASBASE+163)
#define ERROR_NO_SMART_CARD_READER (RASBASE+164)
#define ERROR_SHARING_ADDRESS_EXISTS (RASBASE+165)
#define ERROR_NO_CERTIFICATE (RASBASE+166)
#define ERROR_SHARING_MULTIPLE_ADDRESSES (RASBASE+167)
#define ERROR_FAILED_TO_ENCRYPT (RASBASE+168)
#define ERROR_BAD_ADDRESS_SPECIFIED (RASBASE+169)
#define ERROR_CONNECTION_REJECT (RASBASE+170)
#define ERROR_CONGESTION (RASBASE+171)
#define ERROR_INCOMPATIBLE (RASBASE+172)
#define ERROR_NUMBERCHANGED (RASBASE+173)
#define ERROR_TEMPFAILURE (RASBASE+174)
#define ERROR_BLOCKED (RASBASE+175)
#define ERROR_DONOTDISTURB (RASBASE+176)
#define ERROR_OUTOFORDER (RASBASE+177)
#define ERROR_UNABLE_TO_AUTHENTICATE_SERVER (RASBASE+178)
#define ERROR_SMART_CARD_REQUIRED (RASBASE+179)
#define ERROR_INVALID_FUNCTION_FOR_ENTRY (RASBASE+180)
#define ERROR_CERT_FOR_ENCRYPTION_NOT_FOUND (RASBASE+181)
#define ERROR_SHARING_RRAS_CONFLICT (RASBASE+182)
#define ERROR_SHARING_NO_PRIVATE_LAN (RASBASE+183)
#define ERROR_NO_DIFF_USER_AT_LOGON (RASBASE+184)
#define ERROR_NO_REG_CERT_AT_LOGON (RASBASE+185)
#define ERROR_OAKLEY_NO_CERT (RASBASE+186)
#define ERROR_OAKLEY_AUTH_FAIL (RASBASE+187)
#define ERROR_OAKLEY_ATTRIB_FAIL (RASBASE+188)
#define ERROR_OAKLEY_GENERAL_PROCESSING (RASBASE+189)
#define ERROR_OAKLEY_NO_PEER_CERT (RASBASE+190)
#define ERROR_OAKLEY_NO_POLICY (RASBASE+191)
#define ERROR_OAKLEY_TIMED_OUT (RASBASE+192)
#define ERROR_OAKLEY_ERROR (RASBASE+193)
#define ERROR_UNKNOWN_FRAMED_PROTOCOL (RASBASE+194)
#define ERROR_WRONG_TUNNEL_TYPE (RASBASE+195)
#define ERROR_UNKNOWN_SERVICE_TYPE (RASBASE+196)
#define ERROR_CONNECTING_DEVICE_NOT_FOUND (RASBASE+197)
#define ERROR_NO_EAPTLS_CERTIFICATE (RASBASE+198)
#define RASBASEEND (RASBASE+198)
#endif /* _RASERROR_H */

View File

@ -0,0 +1,178 @@
#ifndef _RASSAPI_H
#define _RASSAPI_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
#define RASSAPI_MAX_DEVICE_NAME 128
#define RASSAPI_MAX_DEVICETYPE_NAME 16
#define RASSAPI_MAX_PARAM_KEY_SIZE 32
#define RASPRIV_NoCallback 0x01
#define RASPRIV_AdminSetCallback 0x02
#define RASPRIV_CallerSetCallback 0x04
#define RASPRIV_DialinPrivilege 0x08
#define RASPRIV_CallbackType (RASPRIV_AdminSetCallback \
| RASPRIV_CallerSetCallback \
| RASPRIV_NoCallback)
#define RAS_MODEM_OPERATIONAL 1
#define RAS_MODEM_NOT_RESPONDING 2
#define RAS_MODEM_HARDWARE_FAILURE 3
#define RAS_MODEM_INCORRECT_RESPONSE 4
#define RAS_MODEM_UNKNOWN 5
#define RAS_PORT_NON_OPERATIONAL 1
#define RAS_PORT_DISCONNECTED 2
#define RAS_PORT_CALLING_BACK 3
#define RAS_PORT_LISTENING 4
#define RAS_PORT_AUTHENTICATING 5
#define RAS_PORT_AUTHENTICATED 6
#define RAS_PORT_INITIALIZING 7
#define MEDIA_UNKNOWN 0
#define MEDIA_SERIAL 1
#define MEDIA_RAS10_SERIAL 2
#define MEDIA_X25 3
#define MEDIA_ISDN 4
#define USER_AUTHENTICATED 0x0001
#define MESSENGER_PRESENT 0x0002
#define PPP_CLIENT 0x0004
#define GATEWAY_ACTIVE 0x0008
#define REMOTE_LISTEN 0x0010
#define PORT_MULTILINKED 0x0020
#define RAS_IPADDRESSLEN 15
#define RAS_IPXADDRESSLEN 22
#define RAS_ATADDRESSLEN 32
#define RASDOWNLEVEL 10
#define RASADMIN_35 35
#define RASADMIN_CURRENT 40
typedef ULONG IPADDR;
typedef enum _RAS_PARAMS_FORMAT {
ParamNumber = 0,
ParamString = 1
} RAS_PARAMS_FORMAT;
typedef union RAS_PARAMS_VALUE {
DWORD Number;
struct {
DWORD Length;
PCHAR Data;
} String;
} RAS_PARAMS_VALUE;
typedef struct RAS_PARAMETERS {
CHAR P_Key [RASSAPI_MAX_PARAM_KEY_SIZE];
RAS_PARAMS_FORMAT P_Type;
BYTE P_Attributes;
RAS_PARAMS_VALUE P_Value;
} RAS_PARAMETERS;
typedef struct _RAS_USER_0 {
BYTE bfPrivilege;
WCHAR szPhoneNumber[RASSAPI_MAX_PHONENUMBER_SIZE + 1];
} RAS_USER_0, *PRAS_USER_0;
typedef struct _RAS_PORT_0 {
WCHAR wszPortName[RASSAPI_MAX_PORT_NAME];
WCHAR wszDeviceType[RASSAPI_MAX_DEVICETYPE_NAME];
WCHAR wszDeviceName[RASSAPI_MAX_DEVICE_NAME];
WCHAR wszMediaName[RASSAPI_MAX_MEDIA_NAME];
DWORD reserved;
DWORD Flags;
WCHAR wszUserName[UNLEN + 1];
WCHAR wszComputer[NETBIOS_NAME_LEN];
DWORD dwStartSessionTime; /* seconds from 1/1/1970 */
WCHAR wszLogonDomain[DNLEN + 1];
BOOL fAdvancedServer;
} RAS_PORT_0, *PRAS_PORT_0;
typedef struct _RAS_PPP_NBFCP_RESULT {
DWORD dwError;
DWORD dwNetBiosError;
CHAR szName[ NETBIOS_NAME_LEN + 1 ];
WCHAR wszWksta[ NETBIOS_NAME_LEN + 1 ];
} RAS_PPP_NBFCP_RESULT;
typedef struct _RAS_PPP_IPCP_RESULT{
DWORD dwError;
WCHAR wszAddress[ RAS_IPADDRESSLEN + 1 ];
} RAS_PPP_IPCP_RESULT;
typedef struct _RAS_PPP_IPXCP_RESULT {
DWORD dwError;
WCHAR wszAddress[ RAS_IPXADDRESSLEN + 1 ];
} RAS_PPP_IPXCP_RESULT;
typedef struct _RAS_PPP_ATCP_RESULT {
DWORD dwError;
WCHAR wszAddress[ RAS_ATADDRESSLEN + 1 ];
} RAS_PPP_ATCP_RESULT;
typedef struct _RAS_PPP_PROJECTION_RESULT {
RAS_PPP_NBFCP_RESULT nbf;
RAS_PPP_IPCP_RESULT ip;
RAS_PPP_IPXCP_RESULT ipx;
RAS_PPP_ATCP_RESULT at;
} RAS_PPP_PROJECTION_RESULT;
typedef struct _RAS_PORT_1{
RAS_PORT_0 rasport0;
DWORD LineCondition;
DWORD HardwareCondition;
DWORD LineSpeed;
WORD NumStatistics;
WORD NumMediaParms;
DWORD SizeMediaParms;
RAS_PPP_PROJECTION_RESULT ProjResult;
} RAS_PORT_1, *PRAS_PORT_1;
typedef struct _RAS_PORT_STATISTICS {
DWORD dwBytesXmited;
DWORD dwBytesRcved;
DWORD dwFramesXmited;
DWORD dwFramesRcved;
DWORD dwCrcErr;
DWORD dwTimeoutErr;
DWORD dwAlignmentErr;
DWORD dwHardwareOverrunErr;
DWORD dwFramingErr;
DWORD dwBufferOverrunErr;
DWORD dwBytesXmitedUncompressed;
DWORD dwBytesRcvedUncompressed;
DWORD dwBytesXmitedCompressed;
DWORD dwBytesRcvedCompressed;
DWORD dwPortBytesXmited;
DWORD dwPortBytesRcved;
DWORD dwPortFramesXmited;
DWORD dwPortFramesRcved;
DWORD dwPortCrcErr;
DWORD dwPortTimeoutErr;
DWORD dwPortAlignmentErr;
DWORD dwPortHardwareOverrunErr;
DWORD dwPortFramingErr;
DWORD dwPortBufferOverrunErr;
DWORD dwPortBytesXmitedUncompressed;
DWORD dwPortBytesRcvedUncompressed;
DWORD dwPortBytesXmitedCompressed;
DWORD dwPortBytesRcvedCompressed;
} RAS_PORT_STATISTICS, *PRAS_PORT_STATISTICS;
typedef struct _RAS_SERVER_0 {
WORD TotalPorts;
WORD PortsInUse;
DWORD RasVersion;
} RAS_SERVER_0, *PRAS_SERVER_0;
DWORD APIENTRY RasAdminServerGetInfo( const WCHAR*, PRAS_SERVER_0 );
DWORD APIENTRY RasAdminGetUserAccountServer( const WCHAR*, const WCHAR*, LPWSTR );
DWORD APIENTRY RasAdminUserGetInfo( const WCHAR*, const WCHAR*, PRAS_USER_0 );
DWORD APIENTRY RasAdminUserSetInfo( const WCHAR*, const WCHAR*, const PRAS_USER_0 );
DWORD APIENTRY RasAdminPortEnum( const WCHAR*, PRAS_PORT_0*, WORD*);
DWORD APIENTRY RasAdminPortGetInfo( const WCHAR*, const WCHAR*, RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS** );
DWORD APIENTRY RasAdminPortClearStatistics( const WCHAR*, const WCHAR* );
DWORD APIENTRY RasAdminPortDisconnect( const WCHAR*, const WCHAR* );
DWORD APIENTRY RasAdminFreeBuffer(PVOID);
DWORD APIENTRY RasAdminGetErrorString( UINT, WCHAR*, DWORD );
BOOL APIENTRY RasAdminAcceptNewConnection( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
VOID APIENTRY RasAdminConnectionHangupNotification ( RAS_PORT_1*, RAS_PORT_STATISTICS*, RAS_PARAMETERS* );
DWORD APIENTRY RasAdminGetIpAddressForUser ( WCHAR*, WCHAR*, IPADDR*, BOOL*);
VOID APIENTRY RasAdminReleaseIpAddress ( WCHAR*, WCHAR*,IPADDR* );
DWORD APIENTRY RasAdminGetUserParms( WCHAR*, PRAS_USER_0 );
DWORD APIENTRY RasAdminSetUserParms( WCHAR*, DWORD, PRAS_USER_0 );
#ifdef __cplusplus
}
#endif
#endif /* _RASSAPI_H */

View File

@ -1,5 +1,8 @@
#ifndef __RPCNDR_H__ #ifndef __RPCNDR_H__
#define __RPCNDR_H__ #define __RPCNDR_H__
#ifndef __RPCNDR_H_VERSION__
#define __RPCNDR_H_VERSION__ ( 450 )
#endif /* __RPCNDR_H_VERSION__ */
#include <rpcnsip.h> #include <rpcnsip.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {

View File

@ -989,8 +989,8 @@ BOOL WINAPI ClearEventLogA(HANDLE,LPCSTR);
BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR); BOOL WINAPI ClearEventLogW(HANDLE,LPCWSTR);
BOOL WINAPI CloseEventLog(HANDLE); BOOL WINAPI CloseEventLog(HANDLE);
BOOL WINAPI CloseHandle(HANDLE); BOOL WINAPI CloseHandle(HANDLE);
BOOL WINAPI CommConfigDialogA(LPSTR,HWND,LPCOMMCONFIG); BOOL WINAPI CommConfigDialogA(LPCSTR,HWND,LPCOMMCONFIG);
BOOL WINAPI CommConfigDialogW(LPWSTR,HWND,LPCOMMCONFIG); BOOL WINAPI CommConfigDialogW(LPCWSTR,HWND,LPCOMMCONFIG);
LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*); LONG WINAPI CompareFileTime(CONST FILETIME*,CONST FILETIME*);
BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED); BOOL WINAPI ConnectNamedPipe(HANDLE,LPOVERLAPPED);
BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD); BOOL WINAPI ContinueDebugEvent(DWORD,DWORD,DWORD);

View File

@ -497,9 +497,44 @@
#define SubtractRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_DIFF) #define SubtractRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_DIFF)
#define UnionRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_OR) #define UnionRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_OR)
#define XorRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_XOR) #define XorRgn(hrgnResult,hrgnA,hrgnB) CombineRgn(hrgnResult,hrgnA,hrgnB,RGN_XOR)
#define _fmemcpy memcpy
#define _fmemmove memmove /* FAR versions of mem and string functions for porting from old code*/
#define _fmemset memset #define _ffree free
#define _fmemcmp memcmp #define _fmalloc malloc
#define _frealloc realloc
#define _fmsize _msize
#define _fmemcpy memcpy
#define _fmemmove memmove
#define _fmemset memset
#define _fmemcmp memcmp
#define _fmemchr memchr
#define _fmemccpy _memccpy
#define _fmemicmp _memicmp
#define _fstrcat strcat
#define _fstrchr strchr
#define _fstrcmp strcmp
#define _fstrcpy strcpy
#define _fstrcspn strcspn
#define _fstrdup _strdup
#define _fstricmp _stricmp
#define _fstrlen strlen
#define _fstrlwr _strlwr
#define _fstrncat strncat
#define _fstrncmp strncmp
#define _fstrncpy strncpy
#define _fstrnicmp _strnicmp
#define _fstrnset _strnset
#define _fstrpbrk strpbrk
#define _fstrrchr strrchr
#define _fstrrev _strrev
#define _fstrset _strset
#define _fstrspn strspn
#define _fstrstr strstr
#define _fstrtok strtok
#define _fstrupr _strupr
#define hmemcpy MoveMemory #define hmemcpy MoveMemory
#endif #endif

View File

@ -7,6 +7,24 @@ extern "C" {
#define HISTOGRAM_BUCKET_SIZE sizeof(HISTOGRAM_BUCKET) #define HISTOGRAM_BUCKET_SIZE sizeof(HISTOGRAM_BUCKET)
#define DISK_HISTOGRAM_SIZE sizeof(DISK_HISTOGRAM) #define DISK_HISTOGRAM_SIZE sizeof(DISK_HISTOGRAM)
#define CTL_CODE(t,f,m,a) (((t)<<16)|((a)<<14)|((f)<<2)|(m)) #define CTL_CODE(t,f,m,a) (((t)<<16)|((a)<<14)|((f)<<2)|(m))
#define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
#define IOCTL_STORAGE_CHECK_VERIFY CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_CHECK_VERIFY2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_MEDIA_REMOVAL CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_EJECT_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_LOAD_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_LOAD_MEDIA2 CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_RESERVE CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_RELEASE CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_FIND_NEW_DEVICES CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_EJECTION_CONTROL CTL_CODE(IOCTL_STORAGE_BASE, 0x0250, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_MCN_CONTROL CTL_CODE(IOCTL_STORAGE_BASE, 0x0251, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_GET_MEDIA_TYPES CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_GET_MEDIA_TYPES_EX CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_RESET_BUS CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_RESET_DEVICE CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
#define IOCTL_STORAGE_GET_DEVICE_NUMBER CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_STORAGE_PREDICT_FAILURE CTL_CODE(IOCTL_STORAGE_BASE, 0x0440, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_BASE FILE_DEVICE_DISK #define IOCTL_DISK_BASE FILE_DEVICE_DISK
#define IOCTL_DISK_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_DISK_BASE,0,METHOD_BUFFERED, FILE_ANY_ACCESS) #define IOCTL_DISK_GET_DRIVE_GEOMETRY CTL_CODE(IOCTL_DISK_BASE,0,METHOD_BUFFERED, FILE_ANY_ACCESS)
#define IOCTL_DISK_GET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE,1,METHOD_BUFFERED,FILE_READ_ACCESS) #define IOCTL_DISK_GET_PARTITION_INFO CTL_CODE(IOCTL_DISK_BASE,1,METHOD_BUFFERED,FILE_READ_ACCESS)
@ -34,6 +52,18 @@ extern "C" {
#define IOCTL_DISK_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE,0x206,METHOD_BUFFERED,FILE_READ_ACCESS) #define IOCTL_DISK_FIND_NEW_DEVICES CTL_CODE(IOCTL_DISK_BASE,0x206,METHOD_BUFFERED,FILE_READ_ACCESS)
#define IOCTL_DISK_REMOVE_DEVICE CTL_CODE(IOCTL_DISK_BASE,0x207,METHOD_BUFFERED,FILE_READ_ACCESS) #define IOCTL_DISK_REMOVE_DEVICE CTL_CODE(IOCTL_DISK_BASE,0x207,METHOD_BUFFERED,FILE_READ_ACCESS)
#define IOCTL_DISK_GET_MEDIA_TYPES CTL_CODE(IOCTL_DISK_BASE,0x300,METHOD_BUFFERED,FILE_ANY_ACCESS) #define IOCTL_DISK_GET_MEDIA_TYPES CTL_CODE(IOCTL_DISK_BASE,0x300,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define IOCTL_SERIAL_LSRMST_INSERT CTL_CODE(FILE_DEVICE_SERIAL_PORT,31,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,6,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,7,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,8,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_MOUNT_DBLS_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,13,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,15,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,16,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA)
#define FSCTL_READ_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,17,METHOD_NEITHER,FILE_READ_DATA)
#define FSCTL_WRITE_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,18,METHOD_NEITHER,FILE_WRITE_DATA)
#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA)
#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
#define DEVICE_TYPE DWORD #define DEVICE_TYPE DWORD
#define FILE_DEVICE_BEEP 1 #define FILE_DEVICE_BEEP 1
#define FILE_DEVICE_CD_ROM 2 #define FILE_DEVICE_CD_ROM 2
@ -76,7 +106,22 @@ extern "C" {
#define FILE_DEVICE_8042_PORT 39 #define FILE_DEVICE_8042_PORT 39
#define FILE_DEVICE_NETWORK_REDIRECTOR 40 #define FILE_DEVICE_NETWORK_REDIRECTOR 40
#define FILE_DEVICE_BATTERY 41 #define FILE_DEVICE_BATTERY 41
#define FILE_DEVICE_BUS_EXTENDER 41 #define FILE_DEVICE_BUS_EXTENDER 42
#define FILE_DEVICE_MODEM 43
#define FILE_DEVICE_VDM 44
#define FILE_DEVICE_MASS_STORAGE 45
#define FILE_DEVICE_SMB 46
#define FILE_DEVICE_KS 47
#define FILE_DEVICE_CHANGER 48
#define FILE_DEVICE_SMARTCARD 49
#define FILE_DEVICE_ACPI 50
#define FILE_DEVICE_DVD 51
#define FILE_DEVICE_FULLSCREEN_VIDEO 52
#define FILE_DEVICE_DFS_FILE_SYSTEM 53
#define FILE_DEVICE_DFS_VOLUME 54
#define FILE_DEVICE_SERENUM 55
#define FILE_DEVICE_TERMSRV 56
#define FILE_DEVICE_KSEC 57
#define PARTITION_ENTRY_UNUSED 0 #define PARTITION_ENTRY_UNUSED 0
#define PARTITION_FAT_12 1 #define PARTITION_FAT_12 1
#define PARTITION_XENIX_1 2 #define PARTITION_XENIX_1 2
@ -92,30 +137,18 @@ extern "C" {
#define METHOD_BUFFERED 0 #define METHOD_BUFFERED 0
#define METHOD_IN_DIRECT 1 #define METHOD_IN_DIRECT 1
#define METHOD_OUT_DIRECT 2 #define METHOD_OUT_DIRECT 2
#define METHOD_NEITHER 3 #define METHOD_NEITHER 3
#define IOCTL_SERIAL_LSRMST_INSERT CTL_CODE(FILE_DEVICE_SERIAL_PORT,31,METHOD_BUFFERED,FILE_ANY_ACCESS) #define SERIAL_LSRMST_ESCAPE 0
#define SERIAL_LSRMST_ESCAPE 0 #define SERIAL_LSRMST_LSR_DATA 1
#define SERIAL_LSRMST_LSR_DATA 1
#define SERIAL_LSRMST_LSR_NODATA 2 #define SERIAL_LSRMST_LSR_NODATA 2
#define SERIAL_LSRMST_MST 3 #define SERIAL_LSRMST_MST 3
#define FILE_ANY_ACCESS 0 #define FILE_ANY_ACCESS 0
#define FILE_READ_ACCESS 1 #define FILE_READ_ACCESS 1
#define FILE_WRITE_ACCESS 2 #define FILE_WRITE_ACCESS 2
#define DISK_LOGGING_START 0 #define DISK_LOGGING_START 0
#define DISK_LOGGING_STOP 1 #define DISK_LOGGING_STOP 1
#define DISK_LOGGING_DUMP 2 #define DISK_LOGGING_DUMP 2
#define DISK_BINNING 3 #define DISK_BINNING 3
#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,6,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,7,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,8,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_MOUNT_DBLS_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM,13,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_GET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,15,METHOD_BUFFERED,FILE_ANY_ACCESS)
#define FSCTL_SET_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,16,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA)
#define FSCTL_READ_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,17,METHOD_NEITHER,FILE_READ_DATA)
#define FSCTL_WRITE_COMPRESSION CTL_CODE(FILE_DEVICE_FILE_SYSTEM,18,METHOD_NEITHER,FILE_WRITE_DATA)
#define FSCTL_GET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define FSCTL_SET_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 41, METHOD_BUFFERED, FILE_WRITE_DATA)
#define FSCTL_DELETE_REPARSE_POINT CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 43, METHOD_BUFFERED, FILE_WRITE_DATA)
typedef WORD BAD_TRACK_NUMBER,*PBAD_TRACK_NUMBER; typedef WORD BAD_TRACK_NUMBER,*PBAD_TRACK_NUMBER;
typedef enum _BIN_TYPES {RequestSize,RequestLocation} BIN_TYPES; typedef enum _BIN_TYPES {RequestSize,RequestLocation} BIN_TYPES;
typedef struct _BIN_RANGE { typedef struct _BIN_RANGE {
@ -153,13 +186,13 @@ typedef struct _DISK_GEOMETRY {
DWORD BytesPerSector; DWORD BytesPerSector;
} DISK_GEOMETRY; } DISK_GEOMETRY;
typedef struct _DISK_PERFORMANCE { typedef struct _DISK_PERFORMANCE {
LARGE_INTEGER BytesRead; LARGE_INTEGER BytesRead;
LARGE_INTEGER BytesWritten; LARGE_INTEGER BytesWritten;
LARGE_INTEGER ReadTime; LARGE_INTEGER ReadTime;
LARGE_INTEGER WriteTime; LARGE_INTEGER WriteTime;
DWORD ReadCount; DWORD ReadCount;
DWORD WriteCount; DWORD WriteCount;
DWORD QueueDepth; DWORD QueueDepth;
} DISK_PERFORMANCE; } DISK_PERFORMANCE;
typedef struct _DISK_RECORD { typedef struct _DISK_RECORD {
LARGE_INTEGER ByteOffset; LARGE_INTEGER ByteOffset;

View File

@ -3,26 +3,51 @@
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#define WNNC_NET_MSNET 0x10000 #define WNNC_NET_MSNET 0x00010000
#define WNNC_NET_LANMAN 0x20000 #define WNNC_NET_LANMAN 0x00020000
#define WNNC_NET_NETWARE 0x30000 #define WNNC_NET_NETWARE 0x00030000
#define WNNC_NET_VINES 0x40000 #define WNNC_NET_VINES 0x00040000
#define WNNC_NET_10NET 0x50000 #define WNNC_NET_10NET 0x00050000
#define WNNC_NET_LOCUS 0x60000 #define WNNC_NET_LOCUS 0x00060000
#define WNNC_NET_SUN_PC_NFS 0x70000 #define WNNC_NET_SUN_PC_NFS 0x00070000
#define WNNC_NET_LANSTEP 0x80000 #define WNNC_NET_LANSTEP 0x00080000
#define WNNC_NET_9TILES 0x90000 #define WNNC_NET_9TILES 0x00090000
#define WNNC_NET_LANTASTIC 0xA0000 #define WNNC_NET_LANTASTIC 0x000A0000
#define WNNC_NET_AS400 0xB0000 #define WNNC_NET_AS400 0x000B0000
#define WNNC_NET_FTP_NFS 0xC0000 #define WNNC_NET_FTP_NFS 0x000C0000
#define WNNC_NET_PATHWORKS 0xD0000 #define WNNC_NET_PATHWORKS 0x000D0000
#define WNNC_NET_LIFENET 0xE0000 #define WNNC_NET_LIFENET 0x000E0000
#define WNNC_NET_POWERLAN 0xF0000 #define WNNC_NET_POWERLAN 0x000F0000
#define WNNC_NET_BWNFS 0x100000 #define WNNC_NET_BWNFS 0x00100000
#define WNNC_NET_COGENT 0x110000 #define WNNC_NET_COGENT 0x00110000
#define WNNC_NET_FARALLON 0x120000 #define WNNC_NET_FARALLON 0x00120000
#define WNNC_NET_APPLETALK 0x130000 #define WNNC_NET_APPLETALK 0x00130000
#define WNNC_NET_INTERGRAPH 0x140000 #define WNNC_NET_INTERGRAPH 0x00140000
#define WNNC_NET_SYMFONET 0x00150000
#define WNNC_NET_CLEARCASE 0x00160000
#define WNNC_NET_FRONTIER 0x00170000
#define WNNC_NET_BMC 0x00180000
#define WNNC_NET_DCE 0x00190000
#define WNNC_NET_AVID 0x001A0000
#define WNNC_NET_DOCUSPACE 0x001B0000
#define WNNC_NET_MANGOSOFT 0x001C0000
#define WNNC_NET_SERNET 0x001D0000
#define WNNC_NET_DECORB 0x00200000
#define WNNC_NET_PROTSTOR 0x00210000
#define WNNC_NET_FJ_REDIR 0x00220000
#define WNNC_NET_DISTINCT 0x00230000
#define WNNC_NET_TWINS 0x00240000
#define WNNC_NET_RDR2SAMPLE 0x00250000
#define WNNC_NET_CSC 0x00260000
#define WNNC_NET_3IN1 0x00270000
#define WNNC_NET_EXTENDNET 0x00290000
#define WNNC_NET_OBJECT_DIRE 0x00300000
#define WNNC_NET_MASFAX 0x00310000
#define WNNC_NET_HOB_NFS 0x00320000
#define WNNC_NET_SHIVA 0x00330000
#define WNNC_NET_IBMAL 0x00340000
#define WNNC_CRED_MANAGER 0xFFFF0000
#define RESOURCE_CONNECTED 1 #define RESOURCE_CONNECTED 1
#define RESOURCE_GLOBALNET 2 #define RESOURCE_GLOBALNET 2
#define RESOURCE_REMEMBERED 3 #define RESOURCE_REMEMBERED 3
@ -32,13 +57,14 @@ extern "C" {
#define RESOURCETYPE_DISK 1 #define RESOURCETYPE_DISK 1
#define RESOURCETYPE_PRINT 2 #define RESOURCETYPE_PRINT 2
#define RESOURCETYPE_RESERVED 8 #define RESOURCETYPE_RESERVED 8
#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF #define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
#define RESOURCEUSAGE_CONNECTABLE 1 #define RESOURCEUSAGE_CONNECTABLE 0x00000001
#define RESOURCEUSAGE_CONTAINER 2 #define RESOURCEUSAGE_CONTAINER 0x00000002
#define RESOURCEUSAGE_NOLOCALDEVICE 4 #define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
#define RESOURCEUSAGE_SIBLING 8 #define RESOURCEUSAGE_SIBLING 0x00000008
#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE|RESOURCEUSAGE_CONTAINER) #define RESOURCEUSAGE_ATTACHED 0x00000010
#define RESOURCEUSAGE_RESERVED 0x80000000 #define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
#define RESOURCEUSAGE_RESERVED 0x80000000
#define RESOURCEDISPLAYTYPE_GENERIC 0 #define RESOURCEDISPLAYTYPE_GENERIC 0
#define RESOURCEDISPLAYTYPE_DOMAIN 1 #define RESOURCEDISPLAYTYPE_DOMAIN 1
#define RESOURCEDISPLAYTYPE_SERVER 2 #define RESOURCEDISPLAYTYPE_SERVER 2

View File

@ -125,18 +125,9 @@ typedef LONGLONG USN;
#define UNICODE_NULL L'\0' #define UNICODE_NULL L'\0'
typedef BYTE BOOLEAN,*PBOOLEAN; typedef BYTE BOOLEAN,*PBOOLEAN;
#endif #endif
#ifndef GUID_DEFINED
#define GUID_DEFINED
typedef struct _GUID
{
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID,*REFGUID,*LPGUID;
#endif /* GUID_DEFINED */
#define NTAPI __stdcall #define NTAPI __stdcall
#include <basetsd.h>
#define APPLICATION_ERROR_MASK 0x20000000 #define APPLICATION_ERROR_MASK 0x20000000
#define ERROR_SEVERITY_SUCCESS 0x00000000 #define ERROR_SEVERITY_SUCCESS 0x00000000
#define ERROR_SEVERITY_INFORMATIONAL 0x40000000 #define ERROR_SEVERITY_INFORMATIONAL 0x40000000
@ -1053,6 +1044,15 @@ typedef struct _GUID
#define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
#ifndef RC_INVOKED #ifndef RC_INVOKED
typedef DWORD ACCESS_MASK; typedef DWORD ACCESS_MASK;
#ifndef _GUID_DEFINED /* also defined in basetyps.h */
#define _GUID_DEFINED
typedef struct _GUID {
unsigned long Data1;
unsigned short Data2;
unsigned short Data3;
unsigned char Data4[8];
} GUID, *REFGUID, *LPGUID;
#endif /* _GUID_DEFINED */
typedef struct _GENERIC_MAPPING { typedef struct _GENERIC_MAPPING {
ACCESS_MASK GenericRead; ACCESS_MASK GenericRead;
ACCESS_MASK GenericWrite; ACCESS_MASK GenericWrite;
@ -1074,6 +1074,49 @@ typedef struct _ACCESS_DENIED_ACE {
ACCESS_MASK Mask; ACCESS_MASK Mask;
DWORD SidStart; DWORD SidStart;
} ACCESS_DENIED_ACE; } ACCESS_DENIED_ACE;
typedef struct _SYSTEM_AUDIT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_AUDIT_ACE;
typedef SYSTEM_AUDIT_ACE *PSYSTEM_AUDIT_ACE;
typedef struct _SYSTEM_ALARM_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD SidStart;
} SYSTEM_ALARM_ACE,*PSYSTEM_ALARM_ACE;
typedef struct _ACCESS_ALLOWED_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_ALLOWED_OBJECT_ACE,*PACCESS_ALLOWED_OBJECT_ACE;
typedef struct _ACCESS_DENIED_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} ACCESS_DENIED_OBJECT_ACE,*PACCESS_DENIED_OBJECT_ACE;
typedef struct _SYSTEM_AUDIT_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_AUDIT_OBJECT_ACE,*PSYSTEM_AUDIT_OBJECT_ACE;
typedef struct _SYSTEM_ALARM_OBJECT_ACE {
ACE_HEADER Header;
ACCESS_MASK Mask;
DWORD Flags;
GUID ObjectType;
GUID InheritedObjectType;
DWORD SidStart;
} SYSTEM_ALARM_OBJECT_ACE,*PSYSTEM_ALARM_OBJECT_ACE;
typedef struct _ACL { typedef struct _ACL {
BYTE AclRevision; BYTE AclRevision;
BYTE Sbz1; BYTE Sbz1;
@ -1085,9 +1128,9 @@ typedef struct _ACL_REVISION_INFORMATION {
DWORD AclRevision; DWORD AclRevision;
} ACL_REVISION_INFORMATION; } ACL_REVISION_INFORMATION;
typedef struct _ACL_SIZE_INFORMATION { typedef struct _ACL_SIZE_INFORMATION {
DWORD AceCount; DWORD AceCount;
DWORD AclBytesInUse; DWORD AclBytesInUse;
DWORD AclBytesFree; DWORD AclBytesFree;
} ACL_SIZE_INFORMATION; } ACL_SIZE_INFORMATION;
/* FIXME: add more machines */ /* FIXME: add more machines */
@ -1309,18 +1352,18 @@ typedef struct _CONTEXT {
/* These are the debug or break registers on the SH3 */ /* These are the debug or break registers on the SH3 */
typedef struct _DEBUG_REGISTERS { typedef struct _DEBUG_REGISTERS {
ULONG BarA; ULONG BarA;
UCHAR BasrA; UCHAR BasrA;
UCHAR BamrA; UCHAR BamrA;
USHORT BbrA; USHORT BbrA;
ULONG BarB; ULONG BarB;
UCHAR BasrB; UCHAR BasrB;
UCHAR BamrB; UCHAR BamrB;
USHORT BbrB; USHORT BbrB;
ULONG BdrB; ULONG BdrB;
ULONG BdmrB; ULONG BdmrB;
USHORT Brcr; USHORT Brcr;
USHORT Align; USHORT Align;
} DEBUG_REGISTERS, *PDEBUG_REGISTERS; } DEBUG_REGISTERS, *PDEBUG_REGISTERS;
/* The following flags control the contents of the CONTEXT structure. */ /* The following flags control the contents of the CONTEXT structure. */
@ -1347,31 +1390,31 @@ typedef struct _DEBUG_REGISTERS {
/* Thread structure for CPUs which have no floating point support. */ /* Thread structure for CPUs which have no floating point support. */
typedef struct _CONTEXT { typedef struct _CONTEXT {
/* The flags values within this flag control the contents of */ /* The flags values within this flag control the contents of */
/* a CONTEXT record. */ /* a CONTEXT record. */
/* If the context record is used as an input parameter, then */ /* If the context record is used as an input parameter, then */
/* for each portion of the context record controlled by a flag */ /* for each portion of the context record controlled by a flag */
/* whose value is set, it is assumed that that portion of the */ /* whose value is set, it is assumed that that portion of the */
/* context record contains valid context. If the context record */ /* context record contains valid context. If the context record */
/* is being used to modify a thread's context, then only that */ /* is being used to modify a thread's context, then only that */
/* portion of the threads context will be modified. */ /* portion of the threads context will be modified. */
/* If the context record is used as an IN OUT parameter to capture */ /* If the context record is used as an IN OUT parameter to capture */
/* the context of a thread, then only those portions of the thread's */ /* the context of a thread, then only those portions of the thread's */
/* context corresponding to set flags will be returned. */ /* context corresponding to set flags will be returned. */
/* The context record is never used as an OUT only parameter. */ /* The context record is never used as an OUT only parameter. */
ULONG ContextFlags; ULONG ContextFlags;
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_INTEGER. */ /* the flag CONTEXT_INTEGER. */
/* N.B. The registers RA and R15 are defined in this section, but are */ /* N.B. The registers RA and R15 are defined in this section, but are */
/* considered part of the control context rather than part of the integer */ /* considered part of the control context rather than part of the integer */
/* context. */ /* context. */
ULONG PR; ULONG PR;
ULONG MACH; ULONG MACH;
@ -1394,19 +1437,19 @@ typedef struct _CONTEXT {
ULONG R14; ULONG R14;
ULONG R15; ULONG R15;
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_CONTROL. */ /* the flag CONTEXT_CONTROL. */
/* N.B. The registers r15 and ra are defined in the integer section, */ /* N.B. The registers r15 and ra are defined in the integer section, */
/* but are considered part of the control context rather than part of */ /* but are considered part of the control context rather than part of */
/* the integer context. */ /* the integer context. */
ULONG Fir; ULONG Fir;
ULONG Psr; ULONG Psr;
#if !defined(SH3e) && !defined(SH4) #if !defined(SH3e) && !defined(SH4)
ULONG OldStuff[2]; ULONG OldStuff[2];
DEBUG_REGISTERS DebugRegisters; DEBUG_REGISTERS DebugRegisters;
#else #else
ULONG Fpscr; ULONG Fpscr;
ULONG Fpul; ULONG Fpul;
@ -1444,125 +1487,125 @@ typedef struct _CONTEXT {
typedef struct _CONTEXT { typedef struct _CONTEXT {
/* This section is always present and is used as an argument build */ /* This section is always present and is used as an argument build */
/* area. */ /* area. */
DWORD Argument[4]; DWORD Argument[4];
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_FLOATING_POINT. */ /* the flag CONTEXT_FLOATING_POINT. */
DWORD FltF0; DWORD FltF0;
DWORD FltF1; DWORD FltF1;
DWORD FltF2; DWORD FltF2;
DWORD FltF3; DWORD FltF3;
DWORD FltF4; DWORD FltF4;
DWORD FltF5; DWORD FltF5;
DWORD FltF6; DWORD FltF6;
DWORD FltF7; DWORD FltF7;
DWORD FltF8; DWORD FltF8;
DWORD FltF9; DWORD FltF9;
DWORD FltF10; DWORD FltF10;
DWORD FltF11; DWORD FltF11;
DWORD FltF12; DWORD FltF12;
DWORD FltF13; DWORD FltF13;
DWORD FltF14; DWORD FltF14;
DWORD FltF15; DWORD FltF15;
DWORD FltF16; DWORD FltF16;
DWORD FltF17; DWORD FltF17;
DWORD FltF18; DWORD FltF18;
DWORD FltF19; DWORD FltF19;
DWORD FltF20; DWORD FltF20;
DWORD FltF21; DWORD FltF21;
DWORD FltF22; DWORD FltF22;
DWORD FltF23; DWORD FltF23;
DWORD FltF24; DWORD FltF24;
DWORD FltF25; DWORD FltF25;
DWORD FltF26; DWORD FltF26;
DWORD FltF27; DWORD FltF27;
DWORD FltF28; DWORD FltF28;
DWORD FltF29; DWORD FltF29;
DWORD FltF30; DWORD FltF30;
DWORD FltF31; DWORD FltF31;
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_INTEGER. */ /* the flag CONTEXT_INTEGER. */
/* N.B. The registers gp, sp, and ra are defined in this section, but are */ /* N.B. The registers gp, sp, and ra are defined in this section, but are */
/* considered part of the control context rather than part of the integer */ /* considered part of the control context rather than part of the integer */
/* context. */ /* context. */
/* N.B. Register zero is not stored in the frame. */ /* N.B. Register zero is not stored in the frame. */
DWORD IntZero; DWORD IntZero;
DWORD IntAt; DWORD IntAt;
DWORD IntV0; DWORD IntV0;
DWORD IntV1; DWORD IntV1;
DWORD IntA0; DWORD IntA0;
DWORD IntA1; DWORD IntA1;
DWORD IntA2; DWORD IntA2;
DWORD IntA3; DWORD IntA3;
DWORD IntT0; DWORD IntT0;
DWORD IntT1; DWORD IntT1;
DWORD IntT2; DWORD IntT2;
DWORD IntT3; DWORD IntT3;
DWORD IntT4; DWORD IntT4;
DWORD IntT5; DWORD IntT5;
DWORD IntT6; DWORD IntT6;
DWORD IntT7; DWORD IntT7;
DWORD IntS0; DWORD IntS0;
DWORD IntS1; DWORD IntS1;
DWORD IntS2; DWORD IntS2;
DWORD IntS3; DWORD IntS3;
DWORD IntS4; DWORD IntS4;
DWORD IntS5; DWORD IntS5;
DWORD IntS6; DWORD IntS6;
DWORD IntS7; DWORD IntS7;
DWORD IntT8; DWORD IntT8;
DWORD IntT9; DWORD IntT9;
DWORD IntK0; DWORD IntK0;
DWORD IntK1; DWORD IntK1;
DWORD IntGp; DWORD IntGp;
DWORD IntSp; DWORD IntSp;
DWORD IntS8; DWORD IntS8;
DWORD IntRa; DWORD IntRa;
DWORD IntLo; DWORD IntLo;
DWORD IntHi; DWORD IntHi;
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_FLOATING_POINT. */ /* the flag CONTEXT_FLOATING_POINT. */
DWORD Fsr; DWORD Fsr;
/* This section is specified/returned if the ContextFlags word contains */ /* This section is specified/returned if the ContextFlags word contains */
/* the flag CONTEXT_CONTROL. */ /* the flag CONTEXT_CONTROL. */
/* N.B. The registers gp, sp, and ra are defined in the integer section, */ /* N.B. The registers gp, sp, and ra are defined in the integer section, */
/* but are considered part of the control context rather than part of */ /* but are considered part of the control context rather than part of */
/* the integer context. */ /* the integer context. */
DWORD Fir; DWORD Fir;
DWORD Psr; DWORD Psr;
/* The flags values within this flag control the contents of */ /* The flags values within this flag control the contents of */
/* a CONTEXT record. */ /* a CONTEXT record. */
/* If the context record is used as an input parameter, then */ /* If the context record is used as an input parameter, then */
/* for each portion of the context record controlled by a flag */ /* for each portion of the context record controlled by a flag */
/* whose value is set, it is assumed that that portion of the */ /* whose value is set, it is assumed that that portion of the */
/* context record contains valid context. If the context record */ /* context record contains valid context. If the context record */
/* is being used to modify a thread's context, then only that */ /* is being used to modify a thread's context, then only that */
/* portion of the threads context will be modified. */ /* portion of the threads context will be modified. */
/* If the context record is used as an IN OUT parameter to capture */ /* If the context record is used as an IN OUT parameter to capture */
/* the context of a thread, then only those portions of the thread's */ /* the context of a thread, then only those portions of the thread's */
/* context corresponding to set flags will be returned. */ /* context corresponding to set flags will be returned. */
/* The context record is never used as an OUT only parameter. */ /* The context record is never used as an OUT only parameter. */
DWORD ContextFlags; DWORD ContextFlags;
DWORD Fill[2]; DWORD Fill[2];
} CONTEXT; } CONTEXT;
#elif defined(ARM) #elif defined(ARM)
@ -1577,44 +1620,44 @@ typedef struct _CONTEXT {
#define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER) #define CONTEXT_FULL (CONTEXT_CONTROL | CONTEXT_INTEGER)
typedef struct _CONTEXT { typedef struct _CONTEXT {
/* The flags values within this flag control the contents of /* The flags values within this flag control the contents of
a CONTEXT record. a CONTEXT record.
If the context record is used as an input parameter, then If the context record is used as an input parameter, then
for each portion of the context record controlled by a flag for each portion of the context record controlled by a flag
whose value is set, it is assumed that that portion of the whose value is set, it is assumed that that portion of the
context record contains valid context. If the context record context record contains valid context. If the context record
is being used to modify a thread's context, then only that is being used to modify a thread's context, then only that
portion of the threads context will be modified. portion of the threads context will be modified.
If the context record is used as an IN OUT parameter to capture If the context record is used as an IN OUT parameter to capture
the context of a thread, then only those portions of the thread's the context of a thread, then only those portions of the thread's
context corresponding to set flags will be returned. context corresponding to set flags will be returned.
The context record is never used as an OUT only parameter. */ The context record is never used as an OUT only parameter. */
ULONG ContextFlags; ULONG ContextFlags;
/* This section is specified/returned if the ContextFlags word contains /* This section is specified/returned if the ContextFlags word contains
the flag CONTEXT_INTEGER. */ the flag CONTEXT_INTEGER. */
ULONG R0; ULONG R0;
ULONG R1; ULONG R1;
ULONG R2; ULONG R2;
ULONG R3; ULONG R3;
ULONG R4; ULONG R4;
ULONG R5; ULONG R5;
ULONG R6; ULONG R6;
ULONG R7; ULONG R7;
ULONG R8; ULONG R8;
ULONG R9; ULONG R9;
ULONG R10; ULONG R10;
ULONG R11; ULONG R11;
ULONG R12; ULONG R12;
ULONG Sp; ULONG Sp;
ULONG Lr; ULONG Lr;
ULONG Pc; ULONG Pc;
ULONG Psr; ULONG Psr;
} CONTEXT; } CONTEXT;
#else #else
@ -1692,7 +1735,6 @@ typedef struct _SE_IMPERSONATION_STATE {
typedef struct _SID_IDENTIFIER_AUTHORITY { typedef struct _SID_IDENTIFIER_AUTHORITY {
BYTE Value[6]; BYTE Value[6];
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY; } SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
typedef PVOID PSID; typedef PVOID PSID;
typedef struct _SID { typedef struct _SID {
BYTE Revision; BYTE Revision;
@ -1700,7 +1742,6 @@ typedef struct _SID {
SID_IDENTIFIER_AUTHORITY IdentifierAuthority; SID_IDENTIFIER_AUTHORITY IdentifierAuthority;
DWORD SubAuthority[ANYSIZE_ARRAY]; DWORD SubAuthority[ANYSIZE_ARRAY];
} SID, *PISID; } SID, *PISID;
typedef struct _SID_AND_ATTRIBUTES { typedef struct _SID_AND_ATTRIBUTES {
PSID Sid; PSID Sid;
DWORD Attributes; DWORD Attributes;
@ -1708,15 +1749,15 @@ typedef struct _SID_AND_ATTRIBUTES {
typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY]; typedef SID_AND_ATTRIBUTES SID_AND_ATTRIBUTES_ARRAY[ANYSIZE_ARRAY];
typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY; typedef SID_AND_ATTRIBUTES_ARRAY *PSID_AND_ATTRIBUTES_ARRAY;
typedef struct _TOKEN_SOURCE { typedef struct _TOKEN_SOURCE {
CHAR SourceName[8]; CHAR SourceName[TOKEN_SOURCE_LENGTH];
LUID SourceIdentifier; LUID SourceIdentifier;
} TOKEN_SOURCE,*PTOKEN_SOURCE,*LPTOKEN_SOURCE; } TOKEN_SOURCE,*PTOKEN_SOURCE;
typedef struct _TOKEN_CONTROL { typedef struct _TOKEN_CONTROL {
LUID TokenId; LUID TokenId;
LUID AuthenticationId; LUID AuthenticationId;
LUID ModifiedId; LUID ModifiedId;
TOKEN_SOURCE TokenSource; TOKEN_SOURCE TokenSource;
} TOKEN_CONTROL; } TOKEN_CONTROL,*PTOKEN_CONTROL;
typedef struct _TOKEN_DEFAULT_DACL { typedef struct _TOKEN_DEFAULT_DACL {
PACL DefaultDacl; PACL DefaultDacl;
} TOKEN_DEFAULT_DACL; } TOKEN_DEFAULT_DACL;
@ -1765,21 +1806,28 @@ typedef enum _TOKEN_INFORMATION_CLASS {
TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner, TokenUser=1,TokenGroups,TokenPrivileges,TokenOwner,
TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType, TokenPrimaryGroup,TokenDefaultDacl,TokenSource,TokenType,
TokenImpersonationLevel,TokenStatistics,TokenRestrictedSids, TokenImpersonationLevel,TokenStatistics,TokenRestrictedSids,
TokenSessionId TokenSessionId
} TOKEN_INFORMATION_CLASS; } TOKEN_INFORMATION_CLASS;
typedef enum _SID_NAME_USE { typedef enum _SID_NAME_USE {
SidTypeUser=1,SidTypeGroup,SidTypeDomain,SidTypeAlias,SidTypeWellKnownGroup, SidTypeUser=1,SidTypeGroup,SidTypeDomain,SidTypeAlias,SidTypeWellKnownGroup,
SidTypeDeletedAccount,SidTypeInvalid,SidTypeUnknown SidTypeDeletedAccount,SidTypeInvalid,SidTypeUnknown
} SID_NAME_USE,*PSID_NAME_USE; } SID_NAME_USE,*PSID_NAME_USE;
typedef struct _QUOTA_LIMITS { typedef struct _QUOTA_LIMITS {
size_t PagedPoolLimit; SIZE_T PagedPoolLimit;
size_t NonPagedPoolLimit; SIZE_T NonPagedPoolLimit;
DWORD MinimumWorkingSetSize; SIZE_T MinimumWorkingSetSize;
DWORD MaximumWorkingSetSize; SIZE_T MaximumWorkingSetSize;
size_t PagefileLimit; SIZE_T PagefileLimit;
LARGE_INTEGER TimeLimit; LARGE_INTEGER TimeLimit;
} QUOTA_LIMITS; } QUOTA_LIMITS,*PQUOTA_LIMITS;
typedef QUOTA_LIMITS *PQUOTA_LIMITS; typedef struct _IO_COUNTERS {
ULONGLONG ReadOperationCount;
ULONGLONG WriteOperationCount;
ULONGLONG OtherOperationCount;
ULONGLONG ReadTransferCount;
ULONGLONG WriteTransferCount;
ULONGLONG OtherTransferCount;
} IO_COUNTERS, *PIO_COUNTERS;
typedef struct _FILE_NOTIFY_INFORMATION { typedef struct _FILE_NOTIFY_INFORMATION {
DWORD NextEntryOffset; DWORD NextEntryOffset;
DWORD Action; DWORD Action;

View File

@ -17,12 +17,14 @@
extern "C" { extern "C" {
#endif #endif
#ifndef _SYS_TYPES_H #if !defined ( _BSDTYPES_DEFINED ) && !defined ( _SYS_TYPES_H )
/* also defined in gmon.h and in cygwin's sys/types */
typedef unsigned char u_char; typedef unsigned char u_char;
typedef unsigned short u_short; typedef unsigned short u_short;
typedef unsigned int u_int; typedef unsigned int u_int;
typedef unsigned long u_long; typedef unsigned long u_long;
#endif /* ndef _SYS_TYPES_H */ #define _BSDTYPES_DEFINED
#endif /* ndef _BSDTYPES_ _SYS_TYPES_H */
typedef u_int SOCKET; typedef u_int SOCKET;
#ifndef FD_SETSIZE #ifndef FD_SETSIZE
#define FD_SETSIZE 64 #define FD_SETSIZE 64

View File

@ -106,11 +106,19 @@ enum VARENUM {
VT_EMPTY,VT_NULL,VT_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR,VT_DISPATCH, VT_EMPTY,VT_NULL,VT_I2,VT_I4,VT_R4,VT_R8,VT_CY,VT_DATE,VT_BSTR,VT_DISPATCH,
VT_ERROR,VT_BOOL,VT_VARIANT,VT_UNKNOWN,VT_DECIMAL,VT_I1=16,VT_UI1,VT_UI2,VT_UI4,VT_I8, VT_ERROR,VT_BOOL,VT_VARIANT,VT_UNKNOWN,VT_DECIMAL,VT_I1=16,VT_UI1,VT_UI2,VT_UI4,VT_I8,
VT_UI8,VT_INT,VT_UINT,VT_VOID,VT_HRESULT,VT_PTR,VT_SAFEARRAY,VT_CARRAY,VT_USERDEFINED, VT_UI8,VT_INT,VT_UINT,VT_VOID,VT_HRESULT,VT_PTR,VT_SAFEARRAY,VT_CARRAY,VT_USERDEFINED,
VT_LPSTR,VT_LPWSTR,VT_FILETIME=64,VT_BLOB,VT_STREAM,VT_STORAGE,VT_STREAMED_OBJECT, VT_LPSTR,VT_LPWSTR,VT_RECORD=36,VT_FILETIME=64,VT_BLOB,VT_STREAM,VT_STORAGE,VT_STREAMED_OBJECT,
VT_STORED_OBJECT,VT_BLOB_OBJECT,VT_CF,VT_CLSID,VT_BSTR_BLOB=0xfff,VT_VECTOR=0x1000, VT_STORED_OBJECT,VT_BLOB_OBJECT,VT_CF,VT_CLSID,VT_BSTR_BLOB=0xfff,VT_VECTOR=0x1000,
VT_ARRAY=0x2000,VT_BYREF=0x4000,VT_RESERVED=0x8000,VT_ILLEGAL= 0xffff,VT_ILLEGALMASKED=0xfff, VT_ARRAY=0x2000,VT_BYREF=0x4000,VT_RESERVED=0x8000,VT_ILLEGAL= 0xffff,VT_ILLEGALMASKED=0xfff,
VT_TYPEMASK=0xfff VT_TYPEMASK=0xfff
}; };
#ifdef _WIN64
#define VT_INT_PTR VT_I8
#define VT_UINT_PTR VT_UI8
#else
#define VT_INT_PTR VT_I4
#define VT_UINT_PTR VT_UI4
#endif
typedef struct _BYTE_SIZEDARR { typedef struct _BYTE_SIZEDARR {
unsigned long clSize; unsigned long clSize;
byte *pData; byte *pData;