- Timestamp:
- Dec 30, 2006, 11:20:03 PM (18 years ago)
- Location:
- Include
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
Include/Classes/System/Threading/Thread.ab
r19 r42 56 56 Function Equals(ByRef obj_Thread As Thread) As BOOL 57 57 If m_dwThreadId=obj_Thread.m_dwThreadId Then 58 Return TRUE58 Return _System_TRUE 59 59 End If 60 Return FALSE60 Return _System_FALSE 61 61 End Function 62 62 -
Include/OAIdl.ab
r35 r42 6 6 #define _INC_OAIDL_AB 7 7 8 ' verify that the <rpcndr.h> version is high enough to compile this file*/9 '/*10 '#ifndef __REQUIRED_RPCNDR_H_VERSION__11 '#define __REQUIRED_RPCNDR_H_VERSION__ 47512 '#endif13 '14 '#include "rpc.h"15 '#include "rpcndr.h"16 '17 '#ifndef __RPCNDR_H_VERSION__18 '#error this stub requires an updated version of <rpcndr.h>19 '#endif // __RPCNDR_H_VERSION__20 '21 8 '#ifndef COM_NO_WINDOWS_H 22 '#include "windows.h" 23 '#include "ole2.h" 9 #include <windows.sbp> 10 #include <ole2.ab> 24 11 '#endif /*COM_NO_WINDOWS_H*/ 25 12 26 #include <ole2.ab> 27 '/* header files for imported files */ 28 '#include "objidl.h" 13 #include <objidl.sbp> 29 14 30 15 #ifndef __IOleAutomationTypes_INTERFACE_DEFINED__ … … 174 159 Const FADF_RESERVED = &hf008 175 160 161 Const Enum VARENUM 'WTypes.idl 162 VT_EMPTY = 0 163 VT_NULL = 1 164 VT_I2 = 2 165 VT_I4 = 3 166 VT_R4 = 4 167 VT_R8 = 5 168 VT_CY = 6 169 VT_DATE = 7 170 VT_BSTR = 8 171 VT_DISPATCH = 9 172 VT_ERROR = 10 173 VT_BOOL = 11 174 VT_VARIANT = 12 175 VT_UNKNOWN = 13 176 VT_DECIMAL = 14 177 VT_I1 = 16 178 VT_UI1 = 17 179 VT_UI2 = 18 180 VT_UI4 = 19 181 VT_I8 = 20 182 VT_UI8 = 21 183 VT_INT = 22 184 VT_UINT = 23 185 VT_VOID = 24 186 VT_HRESULT = 25 187 VT_PTR = 26 188 VT_SAFEARRAY = 27 189 VT_CARRAY = 28 190 VT_USERDEFINED = 29 191 VT_LPSTR = 30 192 VT_LPWSTR = 31 193 VT_RECORD = 36 194 VT_INT_PTR = 37 195 VT_UINT_PTR = 38 196 VT_FILETIME = 64 197 VT_BLOB = 65 198 VT_STREAM = 66 199 VT_STORAGE = 67 200 VT_STREAMED_OBJECT = 68 201 VT_STORED_OBJECT = 69 202 VT_BLOB_OBJECT = 70 203 VT_CF = 71 204 VT_CLSID = 72 205 VT_VERSIONED_STREAM = 73 206 VT_BSTR_BLOB = &hfff 207 VT_VECTOR = &h1000 208 VT_ARRAY = &h2000 209 VT_BYREF = &h4000 210 VT_RESERVED = &h8000 211 VT_ILLEGAL = &hffff 212 VT_ILLEGALMASKED = &hfff 213 VT_TYPEMASK = &hfff 214 End Enum 215 176 216 Class VARIANT 177 217 Public … … 588 628 Private 589 629 p As VoidPtr 590 ' 591 ' 592 ' 593 ' 594 ' 595 ' 630 ' /* [switch_is][switch_type] */ Union 631 ' /* [case()] */ lptdesc As *TYPEDESC 632 ' /* [case()] */ lpadesc As *ARRAYDESC 633 ' /* [case()] */ hreftype As HREFTYPE 634 ' /* [default] */ /* Empty union arm */ 635 ' End Union 596 636 Public 597 637 vt As VARTYPE … … 752 792 /* [v1_enum] */ 753 793 Const Enum INVOKEKIND 754 INVOKE_FUNC 755 INVOKE_PROPERTYGET 756 INVOKE_PROPERTYPUT 757 INVOKE_PROPERTYPUTREF 794 INVOKE_FUNC = 1 795 INVOKE_PROPERTYGET = 2 796 INVOKE_PROPERTYPUT = 4 797 INVOKE_PROPERTYPUTREF = 8 758 798 End Enum 759 799 … … 868 908 869 909 Type CUSTDATAITEM 870 871 910 guid As GUID 911 varValue As VARIANTARG 872 912 End Type 873 913 … … 883 923 #endif /* __IOleAutomationTypes_INTERFACE_DEFINED__ */ 884 924 885 #ifdef __UNDEFINED__886 887 925 #ifndef __ICreateTypeInfo_INTERFACE_DEFINED__ 888 926 #define __ICreateTypeInfo_INTERFACE_DEFINED__ … … 891 929 /* [local][unique][uuid][object] */ 892 930 893 'typedef /* [unique] */ ICreateTypeInfo *LPCREATETYPEINFO; 894 895 896 EXTERN_C const IID IID_ICreateTypeInfo; 897 898 MIDL_INTERFACE("00020405-0000-0000-C000-000000000046") 899 ICreateTypeInfo : public IUnknown 900 { 901 public: 902 Function SetGuid( 903 /* [in] */ REFGUID guid) As HRESULT 904 905 Function SetTypeFlags( 906 /* [in] */ UINT uTypeFlags) As HRESULT 907 908 Function SetDocString( 909 /* [in] */ LPOLESTR pStrDoc) As HRESULT 910 911 Function SetHelpContext( 912 /* [in] */ DWORD dwHelpContext) As HRESULT 913 914 Function SetVersion( 915 /* [in] */ WORD wMajorVerNum, 916 /* [in] */ WORD wMinorVerNum) As HRESULT 917 918 Function AddRefTypeInfo( 919 /* [in] */ ITypeInfo *pTInfo, 920 /* [in] */ HREFTYPE *phRefType) As HRESULT 921 922 Function AddFuncDesc( 923 /* [in] */ UINT index, 924 /* [in] */ FUNCDESC *pFuncDesc) As HRESULT 925 926 Function AddImplType( 927 /* [in] */ UINT index, 928 /* [in] */ HREFTYPE hRefType) As HRESULT 929 930 Function SetImplTypeFlags( 931 /* [in] */ UINT index, 932 /* [in] */ INT implTypeFlags) As HRESULT 933 934 Function SetAlignment( 935 /* [in] */ WORD cbAlignment) As HRESULT 936 937 Function SetSchema( 938 /* [in] */ LPOLESTR pStrSchema) As HRESULT 939 940 Function AddVarDesc( 941 /* [in] */ UINT index, 942 /* [in] */ VARDESC *pVarDesc) As HRESULT 943 944 Function SetFuncAndParamNames( 945 /* [in] */ UINT index, 946 /* [in][size_is][in] */ LPOLESTR *rgszNames, 947 /* [in] */ UINT cNames) As HRESULT 948 949 Function SetVarName( 950 /* [in] */ UINT index, 951 /* [in] */ LPOLESTR szName) As HRESULT 952 953 Function SetTypeDescAlias( 954 /* [in] */ TYPEDESC *pTDescAlias) As HRESULT 955 956 Function DefineFuncAsDllEntry( 957 /* [in] */ UINT index, 958 /* [in] */ LPOLESTR szDllName, 959 /* [in] */ LPOLESTR szProcName) As HRESULT 960 961 Function SetFuncDocString( 962 /* [in] */ UINT index, 963 /* [in] */ LPOLESTR szDocString) As HRESULT 964 965 Function SetVarDocString( 966 /* [in] */ UINT index, 967 /* [in] */ LPOLESTR szDocString) As HRESULT 968 969 Function SetFuncHelpContext( 970 /* [in] */ UINT index, 971 /* [in] */ DWORD dwHelpContext) As HRESULT 972 973 Function SetVarHelpContext( 974 /* [in] */ UINT index, 975 /* [in] */ DWORD dwHelpContext) As HRESULT 976 977 Function SetMops( 978 /* [in] */ UINT index, 979 /* [in] */ BSTR bstrMops) As HRESULT 980 981 Function SetTypeIdldesc( 982 /* [in] */ IDLDESC *pIdlDesc) As HRESULT 983 984 Function LayOut( void) As HRESULT 985 986 }; 931 'TypeDef /* [unique] */ ICreateTypeInfo *LPCREATETYPEINFO; 932 933 Dim IID_ICreateTypeInfo = [&h00020405, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 934 935 Interface ICreateTypeInfo 936 Inherits IUnknown 937 938 Function SetGuid( 939 /* [in] */ ByRef guid As GUID) As HRESULT 940 941 Function SetTypeFlags( 942 /* [in] */ uTypeFlags As DWord) As HRESULT 943 944 Function SetDocString( 945 /* [in] */ pStrDoc As LPOLESTR) As HRESULT 946 947 Function SetHelpContext( 948 /* [in] */ dwHelpContext As DWord) As HRESULT 949 950 Function SetVersion( 951 /* [in] */ wMajorVerNum As Word, 952 /* [in] */ wMinorVerNum As Word) As HRESULT 953 954 Function AddRefTypeInfo( 955 /* [in] */ pTInfo As VoidPtr /* *ITypeInfo */, 956 /* [in] */ByRef hRefType As HREFTYPE) As HRESULT 957 958 Function AddFuncDesc( 959 /* [in] */ index As DWord, 960 /* [in] */ ByRef FuncDesc As FUNCDESC) As HRESULT 961 962 Function AddImplType( 963 /* [in] */ index As DWord, 964 /* [in] */ hRefType As HREFTYPE) As HRESULT 965 966 Function SetImplTypeFlags( 967 /* [in] */ index As DWord, 968 /* [in] */ implTypeFlags As Long) As HRESULT 969 970 Function SetAlignment( 971 /* [in] */ cbAlignment As Long) As HRESULT 972 973 Function SetSchema( 974 /* [in] */ pStrSchema As LPOLESTR) As HRESULT 975 976 Function AddVarDesc( 977 /* [in] */ index As DWord, 978 /* [in] */ ByRef VarDesc As VARDESC) As HRESULT 979 980 Function SetFuncAndParamNames( 981 /* [in] */ index As DWord, 982 /* [in][size_is][in] */ rgszNames As *LPOLESTR, 983 /* [in] */ cNames As DWord) As HRESULT 984 985 Function SetVarName( 986 /* [in] */ index As DWord, 987 /* [in] */ szName As LPOLESTR) As HRESULT 988 989 Function SetTypeDescAlias( 990 /* [in] */ ByRef TDescAlias As TYPEDESC) As HRESULT 991 992 Function DefineFuncAsDllEntry( 993 /* [in] */ index As DWord, 994 /* [in] */ szDllName As LPOLESTR, 995 /* [in] */ zProcName As LPOLESTR) As HRESULT 996 997 Function SetFuncDocString( 998 /* [in] */ index As DWord, 999 /* [in] */ szDocString As LPOLESTR) As HRESULT 1000 1001 Function SetVarDocString( 1002 /* [in] */ index As DWord, 1003 /* [in] */ szDocString As LPOLESTR) As HRESULT 1004 1005 Function SetFuncHelpContext( 1006 /* [in] */ index As DWord, 1007 /* [in] */ dwHelpContext As DWord) As HRESULT 1008 1009 Function SetVarHelpContext( 1010 /* [in] */ index As DWord, 1011 /* [in] */ dwHelpContext As DWord) As HRESULT 1012 1013 Function SetMops( 1014 /* [in] */ index As DWord, 1015 /* [in] */ bstrMops As BSTR) As HRESULT 1016 1017 Function SetTypeIdldesc( 1018 /* [in] */ ByRef IdlDesc As IDLDESC) As HRESULT 1019 1020 Function LayOut() As HRESULT 1021 End Interface 987 1022 988 1023 #endif /* __ICreateTypeInfo_INTERFACE_DEFINED__ */ 989 990 1024 991 1025 #ifndef __ICreateTypeInfo2_INTERFACE_DEFINED__ … … 995 1029 /* [local][unique][uuid][object] */ 996 1030 997 'typedef /* [unique] */ ICreateTypeInfo2 *LPCREATETYPEINFO2; 998 999 1000 EXTERN_C const IID IID_ICreateTypeInfo2; 1001 1002 MIDL_INTERFACE("0002040E-0000-0000-C000-000000000046") 1003 ICreateTypeInfo2 : public ICreateTypeInfo 1004 { 1005 public: 1006 Function DeleteFuncDesc( 1007 /* [in] */ UINT index) As HRESULT 1008 1009 Function DeleteFuncDescByMemId( 1010 /* [in] */ MEMBERID memid, 1011 /* [in] */ INVOKEKIND invKind) As HRESULT 1012 1013 Function DeleteVarDesc( 1014 /* [in] */ UINT index) As HRESULT 1015 1016 Function DeleteVarDescByMemId( 1017 /* [in] */ MEMBERID memid) As HRESULT 1018 1019 Function DeleteImplType( 1020 /* [in] */ UINT index) As HRESULT 1021 1022 Function SetCustData( 1023 /* [in] */ REFGUID guid, 1024 /* [in] */ VARIANT *pVarVal) As HRESULT 1025 1026 Function SetFuncCustData( 1027 /* [in] */ UINT index, 1028 /* [in] */ REFGUID guid, 1029 /* [in] */ VARIANT *pVarVal) As HRESULT 1030 1031 Function SetParamCustData( 1032 /* [in] */ UINT indexFunc, 1033 /* [in] */ UINT indexParam, 1034 /* [in] */ REFGUID guid, 1035 /* [in] */ VARIANT *pVarVal) As HRESULT 1036 1037 Function SetVarCustData( 1038 /* [in] */ UINT index, 1039 /* [in] */ REFGUID guid, 1040 /* [in] */ VARIANT *pVarVal) As HRESULT 1041 1042 Function SetImplTypeCustData( 1043 /* [in] */ UINT index, 1044 /* [in] */ REFGUID guid, 1045 /* [in] */ VARIANT *pVarVal) As HRESULT 1046 1047 Function SetHelpStringContext( 1048 /* [in] */ ULONG dwHelpStringContext) As HRESULT 1049 1050 Function SetFuncHelpStringContext( 1051 /* [in] */ UINT index, 1052 /* [in] */ ULONG dwHelpStringContext) As HRESULT 1053 1054 Function SetVarHelpStringContext( 1055 /* [in] */ UINT index, 1056 /* [in] */ ULONG dwHelpStringContext) As HRESULT 1057 1058 Function Invalidate( void) As HRESULT 1059 1060 Function SetName( 1061 /* [in] */ LPOLESTR szName) As HRESULT 1062 1063 }; 1064 1065 1031 TypeDef LPCREATETYPEINFO2 = /* [unique] */ *ICreateTypeInfo2 1032 1033 Dim IID_ICreateTypeInfo2 = [&h0002040E, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1034 1035 Interface ICreateTypeInfo2 1036 Inherits ICreateTypeInfo 1037 1038 Function DeleteFuncDesc( 1039 /* [in] */ index As DWord) As HRESULT 1040 1041 Function DeleteFuncDescByMemId( 1042 /* [in] */ memid As *MEMBERID, 1043 /* [in] */ invKind As *INVOKEKIND) As HRESULT 1044 1045 Function DeleteVarDesc( 1046 /* [in] */ index As DWord) As HRESULT 1047 1048 Function DeleteVarDescByMemId( 1049 /* [in] */ memid As *MEMBERID) As HRESULT 1050 1051 Function DeleteImplType( 1052 /* [in] */ index As DWord) As HRESULT 1053 1054 Function SetCustData( 1055 /* [in] */ ByRef guid As GUID, 1056 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1057 1058 Function SetFuncCustData( 1059 /* [in] */ index As DWord, 1060 /* [in] */ ByRef guid As GUID, 1061 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1062 1063 Function SetParamCustData( 1064 /* [in] */ indexFunc As DWord, 1065 /* [in] */ indexParam As DWord, 1066 /* [in] */ ByRef guid As GUID, 1067 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1068 1069 Function SetVarCustData( 1070 /* [in] */ index As DWord, 1071 /* [in] */ ByRef guid As GUID, 1072 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1073 1074 Function SetImplTypeCustData( 1075 /* [in] */ index As DWord, 1076 /* [in] */ ByRef guid As GUID, 1077 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1078 1079 Function SetHelpStringContext( 1080 /* [in] */ dwHelpStringContext As DWord) As HRESULT 1081 1082 Function SetFuncHelpStringContext( 1083 /* [in] */ index As DWord, 1084 /* [in] */ dwHelpStringContext As DWord) As HRESULT 1085 1086 Function SetVarHelpStringContext( 1087 /* [in] */ index As DWord, 1088 /* [in] */ dwHelpStringContext As DWord) As HRESULT 1089 1090 Function Invalidate() As HRESULT 1091 1092 Function SetName( 1093 /* [in] */ szName As LPOLESTR) As HRESULT 1094 End Interface 1066 1095 1067 1096 #endif /* __ICreateTypeInfo2_INTERFACE_DEFINED__ */ … … 1074 1103 /* [local][unique][uuid][object] */ 1075 1104 1076 'typedef /* [unique] */ ICreateTypeLib *LPCREATETYPELIB; 1077 1078 1079 EXTERN_C const IID IID_ICreateTypeLib; 1080 1081 MIDL_INTERFACE("00020406-0000-0000-C000-000000000046") 1082 ICreateTypeLib : public IUnknown 1083 { 1084 public: 1085 Function CreateTypeInfo( 1086 /* [in] */ LPOLESTR szName, 1087 /* [in] */ TYPEKIND tkind, 1088 /* [out] */ ICreateTypeInfo **ppCTInfo) As HRESULT 1089 1090 Function SetName( 1091 /* [in] */ LPOLESTR szName) As HRESULT 1092 1093 Function SetVersion( 1094 /* [in] */ WORD wMajorVerNum, 1095 /* [in] */ WORD wMinorVerNum) As HRESULT 1096 1097 Function SetGuid( 1098 /* [in] */ REFGUID guid) As HRESULT 1099 1100 Function SetDocString( 1101 /* [in] */ LPOLESTR szDoc) As HRESULT 1102 1103 Function SetHelpFileName( 1104 /* [in] */ LPOLESTR szHelpFileName) As HRESULT 1105 1106 Function SetHelpContext( 1107 /* [in] */ DWORD dwHelpContext) As HRESULT 1108 1109 Function SetLcid( 1110 /* [in] */ LCID lcid) As HRESULT 1111 1112 Function SetLibFlags( 1113 /* [in] */ UINT uLibFlags) As HRESULT 1114 1115 Function SaveAllChanges( void) As HRESULT 1116 1117 }; 1105 TypeDef LPCREATETYPELIB = /* [unique] */ *ICreateTypeLib 1106 1107 1108 Dim IID_ICreateTypeLib = [&h00020406, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1109 Interface ICreateTypeLib 1110 Inherits IUnknown 1111 1112 Function CreateTypeInfo( 1113 /* [in] */ szName As LPOLESTR, 1114 /* [in] */ tkind As *TYPEKIND, 1115 /* [out] */ ByRef pCTInfo As *ICreateTypeInfo) As HRESULT 1116 1117 Function SetName( 1118 /* [in] */ szName As LPOLESTR) As HRESULT 1119 1120 Function SetVersion( 1121 /* [in] */ wMajorVerNum As Word, 1122 /* [in] */ wMinorVerNum As Word) As HRESULT 1123 1124 Function SetGuid( 1125 /* [in] */ ByRef guid As GUID) As HRESULT 1126 1127 Function SetDocString( 1128 /* [in] */ szDoc As LPOLESTR) As HRESULT 1129 1130 Function SetHelpFileName( 1131 /* [in] */ szHelpFileName As LPOLESTR) As HRESULT 1132 1133 Function SetHelpContext( 1134 /* [in] */ dwHelpContext As DWord) As HRESULT 1135 1136 Function SetLcid( 1137 /* [in] */ lcid As LCID) As HRESULT 1138 1139 Function SetLibFlags( 1140 /* [in] */ uLibFlags As DWord) As HRESULT 1141 1142 Function SaveAllChanges() As HRESULT 1143 End Interface 1118 1144 1119 1145 1120 1146 #endif /* __ICreateTypeLib_INTERFACE_DEFINED__ */ 1121 1122 1147 1123 1148 #ifndef __ICreateTypeLib2_INTERFACE_DEFINED__ … … 1127 1152 /* [local][unique][uuid][object] */ 1128 1153 1129 typedef /* [unique] */ ICreateTypeLib2 *LPCREATETYPELIB2; 1130 1131 1132 EXTERN_C const IID IID_ICreateTypeLib2; 1133 1134 MIDL_INTERFACE("0002040F-0000-0000-C000-000000000046") 1135 ICreateTypeLib2 : public ICreateTypeLib 1136 { 1137 public: 1138 Function DeleteTypeInfo( 1139 /* [in] */ LPOLESTR szName) As HRESULT 1140 1141 Function SetCustData( 1142 /* [in] */ REFGUID guid, 1143 /* [in] */ VARIANT *pVarVal) As HRESULT 1144 1145 Function SetHelpStringContext( 1146 /* [in] */ ULONG dwHelpStringContext) As HRESULT 1147 1148 Function SetHelpStringDll( 1149 /* [in] */ LPOLESTR szFileName) As HRESULT 1150 1151 }; 1154 TypeDef LPCREATETYPELIB2 = /* [unique] */ *ICreateTypeLib2 1155 1156 1157 Dim IID_ICreateTypeLib2 = [&h0002040F, &h0000, &h0000, [&hC0, &h00, &h00, &h00, &h00, &h00, &h00, &h46]] As IID 1158 1159 Interface ICreateTypeLib2 1160 Inherits ICreateTypeLib 1161 1162 Function DeleteTypeInfo( 1163 /* [in] */ szName As LPOLESTR) As HRESULT 1164 1165 Function SetCustData( 1166 /* [in] */ ByRef guid As GUID, 1167 /* [in] */ ByRef VarVal As VARIANT) As HRESULT 1168 1169 Function SetHelpStringContext( 1170 /* [in] */ dwHelpStringContext As DWord) As HRESULT 1171 1172 Function SetHelpStringDll( 1173 /* [in] */ szFileName As LPOLESTR) As HRESULT 1174 1175 End Interface 1152 1176 1153 1177 1154 1178 #endif /* __ICreateTypeLib2_INTERFACE_DEFINED__ */ 1155 1156 #endif '__UNDECLARED__1157 1179 1158 1180 #ifndef __IDispatch_INTERFACE_DEFINED__ … … 1246 1268 /* [unique][uuid][object] */ 1247 1269 1248 typedef /* [unique] */ ITypeComp *LPTYPECOMP; 1249 1250 typedef /* [v1_enum] */ 1251 enum tagDESCKIND 1252 { DESCKIND_NONE = 0, 1253 DESCKIND_FUNCDESC = DESCKIND_NONE + 1, 1254 DESCKIND_VARDESC = DESCKIND_FUNCDESC + 1, 1255 DESCKIND_TYPECOMP = DESCKIND_VARDESC + 1, 1256 DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP + 1, 1257 DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ + 1 1258 } DESCKIND; 1259 1260 typedef union tagBINDPTR 1261 { 1262 FUNCDESC *lpfuncdesc; 1263 VARDESC *lpvardesc; 1264 ITypeComp *lptcomp; 1265 } BINDPTR; 1266 1267 typedef union tagBINDPTR *LPBINDPTR; 1268 1270 TypeDef /* [unique] */ ITypeComp *LPTYPECOMP; 1271 1272 /* [v1_enum] */ 1273 Const Enum DESCKIND 1274 DESCKIND_NONE 1275 DESCKIND_FUNCDESC = DESCKIND_NONE 1276 DESCKIND_VARDESC = DESCKIND_FUNCDESC 1277 DESCKIND_TYPECOMP = DESCKIND_VARDESC 1278 DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP 1279 DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ 1280 End Enum 1281 /* 1282 Union BINDPTR 1283 lpfuncdesc As *FUNCDESC 1284 lpvardesc As *VARDESC 1285 lptcomp As *ITypeComp 1286 End Union 1287 1288 TypeDef LPBINDPTR = *BINDPTR 1289 */ 1269 1290 1270 1291 EXTERN_C const IID IID_ITypeComp; … … 1300 1321 /* [unique][uuid][object] */ 1301 1322 1302 typedef /* [unique] */ ITypeInfo *LPTYPEINFO;1323 TypeDef /* [unique] */ ITypeInfo *LPTYPEINFO; 1303 1324 1304 1325 … … 1407 1428 /* [unique][uuid][object] */ 1408 1429 1409 typedef /* [unique] */ ITypeInfo2 *LPTYPEINFO2;1430 TypeDef /* [unique] */ ITypeInfo2 *LPTYPEINFO2; 1410 1431 1411 1432 … … 1495 1516 /* [unique][uuid][object] */ 1496 1517 1497 typedef /* [v1_enum] */1518 TypeDef /* [v1_enum] */ 1498 1519 enum tagSYSKIND 1499 1520 { SYS_WIN16 = 0, … … 1503 1524 } SYSKIND; 1504 1525 1505 typedef /* [v1_enum] */1526 TypeDef /* [v1_enum] */ 1506 1527 enum tagLIBFLAGS 1507 1528 { LIBFLAG_FRESTRICTED = 0x1, … … 1511 1532 } LIBFLAGS; 1512 1533 1513 typedef /* [unique] */ ITypeLib *LPTYPELIB;1514 1515 typedef struct tagTLIBATTR1534 TypeDef /* [unique] */ ITypeLib *LPTYPELIB; 1535 1536 TypeDef struct tagTLIBATTR 1516 1537 { 1517 1538 GUID guid; … … 1523 1544 } TLIBATTR; 1524 1545 1525 typedef struct tagTLIBATTR *LPTLIBATTR;1546 TypeDef struct tagTLIBATTR *LPTLIBATTR; 1526 1547 1527 1548 … … 1585 1606 /* [unique][uuid][object] */ 1586 1607 1587 typedef /* [unique] */ ITypeLib2 *LPTYPELIB2;1608 TypeDef /* [unique] */ ITypeLib2 *LPTYPELIB2; 1588 1609 1589 1610 … … 1623 1644 /* [local][unique][uuid][object] */ 1624 1645 1625 typedef /* [unique] */ ITypeChangeEvents *LPTYPECHANGEEVENTS; 1626 1627 typedef 1628 enum tagCHANGEKIND 1629 { CHANGEKIND_ADDMEMBER = 0, 1646 TypeDef /* [unique] */ ITypeChangeEvents *LPTYPECHANGEEVENTS; 1647 1648 Enum CHANGEKIND 1649 CHANGEKIND_ADDMEMBER = 0, 1630 1650 CHANGEKIND_DELETEMEMBER = CHANGEKIND_ADDMEMBER + 1, 1631 1651 CHANGEKIND_SETNAMES = CHANGEKIND_DELETEMEMBER + 1, … … 1635 1655 CHANGEKIND_CHANGEFAILED = CHANGEKIND_INVALIDATE + 1, 1636 1656 CHANGEKIND_MAX = CHANGEKIND_CHANGEFAILED + 1 1637 } CHANGEKIND; 1657 End Enum 1638 1658 1639 1659 … … 1666 1686 /* [unique][uuid][object] */ 1667 1687 1668 typedef /* [unique] */ IErrorInfo *LPERRORINFO;1688 TypeDef /* [unique] */ IErrorInfo *LPERRORINFO; 1669 1689 1670 1690 … … 1701 1721 /* [unique][uuid][object] */ 1702 1722 1703 typedef /* [unique] */ ICreateErrorInfo *LPCREATEERRORINFO;1723 TypeDef /* [unique] */ ICreateErrorInfo *LPCREATEERRORINFO; 1704 1724 1705 1725 … … 1736 1756 /* [unique][uuid][object] */ 1737 1757 1738 typedef /* [unique] */ ISupportErrorInfo *LPSUPPORTERRORINFO;1758 TypeDef /* [unique] */ ISupportErrorInfo *LPSUPPORTERRORINFO; 1739 1759 1740 1760 … … 1824 1844 /* [uuid][object][local] */ 1825 1845 1826 typedef /* [unique] */ IRecordInfo *LPRECORDINFO;1846 TypeDef /* [unique] */ IRecordInfo *LPRECORDINFO; 1827 1847 1828 1848 … … 1898 1918 #endif /* __IRecordInfo_INTERFACE_DEFINED__ */ 1899 1919 1920 #endif ' __UNDEFINED__ 1921 1900 1922 1901 1923 #ifndef __IErrorLog_INTERFACE_DEFINED__ … … 1905 1927 /* [unique][uuid][object] */ 1906 1928 1907 typedef IErrorLog *LPERRORLOG; 1908 1909 1910 EXTERN_C const IID IID_IErrorLog; 1911 1912 MIDL_INTERFACE("3127CA40-446E-11CE-8135-00AA004BB851") 1913 IErrorLog : public IUnknown 1914 { 1915 public: 1916 Function AddError( 1917 /* [in] */ LPCOLESTR pszPropName, 1918 /* [in] */ EXCEPINFO *pExcepInfo) As HRESULT 1919 1920 }; 1929 TypeDef LPERRORLOG = *IErrorLog 1930 1931 Dim IID_IErrorLog = [&h3127CA40, &h446E, &h11CE, [&h81, &h35, &h00, &hAA, &h00, &h4B, &hB8, &h51]] As IID 1932 1933 Interface IErrorLog 1934 Inherits IUnknown 1935 1936 Function AddError( 1937 /* [in] */ pszPropName As LPCOLESTR, 1938 /* [in] */ ByRef pExcepInfo As EXCEPINFO) As HRESULT 1939 End Interface 1921 1940 1922 1941 #endif /* __IErrorLog_INTERFACE_DEFINED__ */ … … 1929 1948 /* [unique][uuid][object] */ 1930 1949 1931 typedef IPropertyBag *LPPROPERTYBAG; 1932 1933 1934 EXTERN_C const IID IID_IPropertyBag; 1935 1936 MIDL_INTERFACE("55272A00-42CB-11CE-8135-00AA004BB851") 1937 IPropertyBag : public IUnknown 1938 { 1939 public: 1940 virtual /* [local] */ HRESULT STDMETHODCALLTYPE Read( 1941 /* [in] */ LPCOLESTR pszPropName, 1942 /* [out][in] */ VARIANT *pVar, 1943 /* [in] */ IErrorLog *pErrorLog) As HRESULT 1944 1945 Function Write( 1946 /* [in] */ LPCOLESTR pszPropName, 1947 /* [in] */ VARIANT *pVar) As HRESULT 1948 1949 }; 1950 TypeDef LPPROPERTYBAG = *IPropertyBag 1951 1952 Dim IID_IPropertyBag = [&h55272A00, &h42CB, &h11CE, [&h81, &h35, &h00, &hAA, &h00, &h4B, &hB8, &h51]] As IID 1953 1954 Interface IPropertyBag 1955 Inherits IUnknown 1956 1957 /* [local] */ Function Read( 1958 /* [in] */ pszPropName As LPCOLESTR, 1959 /* [out][in] */ ByRef Var As VARIANT, 1960 /* [in] */ pErrorLog As *IErrorLog) As HRESULT 1961 1962 Function Write( 1963 /* [in] */ pszPropName As LPCOLESTR, 1964 /* [in] */ ByRef Var As VARIANT) As HRESULT 1965 End Interface 1966 1950 1967 #endif /* __IPropertyBag_INTERFACE_DEFINED__ */ 1951 1968 1952 #endif ' __UNDEFINED__1953 1954 1969 #endif '_INC_OAIDL_AB -
Include/OleAuto.ab
r35 r42 1 1 ' OleAuto.ab 2 2 3 #if def _INC_OLEAUTO_AB3 #ifndef _INC_OLEAUTO_AB 4 4 #define _INC_OLEAUTO_AB 5 5 … … 23 23 24 24 #include <oaidl.ab> 25 'Dummy 26 Interface ITypeLib 27 Inherits IUnknown 28 End Interface 29 30 Interface ITypeInfo 31 Inherits IUnknown 32 End Interface 33 34 Interface IErrorInfo 35 Inherits IUnknown 36 End Interface 37 38 Interface ICreateErrorInfo 39 Inherits IUnknown 40 End Interface 41 42 Const Enum SYSKIND 43 End Enum 25 44 26 45 ' BSTR API … … 52 71 Declare Function SafeArrayCreate Lib "oleaut32" (vt As VARTYPE, cDims As DWord, ByRef rgsabound As SAFEARRAYBOUND) As *SAFEARRAY 53 72 Declare Function SafeArrayCreateEx Lib "oleaut32" (vt As VARTYPE, cDims As DWord, ByRef rgsabound As SAFEARRAYBOUND, pvExtra As VoidPtr) As *SAFEARRAY 54 Declare Function SafeArray AllocData Lib "oleaut32" (psaSource As *SAFEARRAY, psaTarget As *SAFEARRAY) As HRESULT73 Declare Function SafeArrayCopyData Lib "oleaut32" (psaSource As *SAFEARRAY, psaTarget As *SAFEARRAY) As HRESULT 55 74 Declare Function SafeArrayDestroyDescriptor Lib "oleaut32" (psa As *SAFEARRAY) As HRESULT 56 75 Declare Function SafeArrayDestroyData Lib "oleaut32" (psa As *SAFEARRAY) As HRESULT … … 67 86 Declare Function SafeArrayGetElement Lib "oleaut32" (psa As *SAFEARRAY, rgIndices As *Long, ByRef v As Any) As HRESULT 68 87 Declare Function SafeArrayPutElement Lib "oleaut32" (psa As *SAFEARRAY, rgIndices As *Long, ByRef v As Any) As HRESULT 69 Declare Function SafeArray UnaccessDataLib "oleaut32" (psa As *SAFEARRAY, ByRef ppsaOut As *SAFEARRAY) As HRESULT88 Declare Function SafeArrayCopy Lib "oleaut32" (psa As *SAFEARRAY, ByRef ppsaOut As *SAFEARRAY) As HRESULT 70 89 Declare Function SafeArrayPtrOfIndex Lib "oleaut32" (psa As *SAFEARRAY, rgIndices As *Long, ByRef pvData As VoidPtr) As HRESULT 71 90 Declare Function SafeArraySetRecordInfo Lib "oleaut32" (psa As *SAFEARRAY, prinfo As *IRecordInfo) As HRESULT … … 252 271 Declare Function VarBstrFromDate Lib "oleaut32" (dateIn As DATE, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 253 272 Declare Function VarBstrFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 254 Declare Function VarBstrFromBool Lib "oleaut32" ( VARIANT_BOOL boolIn, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT273 Declare Function VarBstrFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 255 274 Declare Function VarBstrFromI1 Lib "oleaut32" (cIn As CHAR, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 256 Declare Function VarBstrFromUI2 Lib "oleaut32" ( Word uiIn, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT275 Declare Function VarBstrFromUI2 Lib "oleaut32" (uiIn As Word, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 257 276 Declare Function VarBstrFromUI4 Lib "oleaut32" (ulIn As DWord, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 258 277 Declare Function VarBstrFromUI8 Lib "oleaut32" (i64In As QWord, lcid As LCID, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT … … 331 350 Declare Function VarUI8FromCy Lib "oleaut32" (cyIn As CY, ByRef i64Out As QWord) As HRESULT 332 351 Declare Function VarUI8FromDate Lib "oleaut32" (dateIn As DATE, ByRef i64Out As QWord) As HRESULT 333 Declare Function VarUI8FromStr Lib "oleaut32" (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, QWord pi64Out) As HRESULT334 Declare Function VarUI8FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, QWord pi64Out) As HRESULT352 Declare Function VarUI8FromStr Lib "oleaut32" (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, ByRef i64Out As QWord) As HRESULT 353 Declare Function VarUI8FromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef i64Out As QWord) As HRESULT 335 354 Declare Function VarUI8FromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef i64Out As QWord) As HRESULT 336 355 Declare Function VarUI8FromI1 Lib "oleaut32" (cIn As CHAR, ByRef i64Out As QWord) As HRESULT … … 338 357 Declare Function VarUI8FromUI4 Lib "oleaut32" (ulIn As DWord, ByRef i64Out As QWord) As HRESULT 339 358 Declare Function VarUI8FromDec Lib "oleaut32" (ByRef decIn As DECIMAL, ByRef i64Out As QWord) As HRESULT 340 Declare Function VarUI8FromInt Lib "oleaut32" (intIn As Long, ByRef i64Out As QWord) As HRESULT341 359 342 360 Declare Function VarDecFromUI1 Lib "oleaut32" (bIn As Byte, ByRef decOut As DECIMAL) As HRESULT … … 349 367 Declare Function VarDecFromCy Lib "oleaut32" (cyIn As CY, ByRef decOut As DECIMAL) As HRESULT 350 368 Declare Function VarDecFromStr Lib "oleaut32" (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, ByRef decOut As DECIMAL) As HRESULT 351 Declare Function VarDecFromDisp Lib "oleaut32" (pdispIn As *IDispatch, ,lcid As LCID, ByRef decOut As DECIMAL) As HRESULT369 Declare Function VarDecFromDisp Lib "oleaut32" (pdispIn As *IDispatch, lcid As LCID, ByRef decOut As DECIMAL) As HRESULT 352 370 Declare Function VarDecFromBool Lib "oleaut32" (boolIn As VARIANT_BOOL, ByRef decOut As DECIMAL) As HRESULT 353 371 Declare Function VarDecFromI1 Lib "oleaut32" (cIn As CHAR, ByRef decOut As DECIMAL) As HRESULT … … 383 401 Declare Function VarUI8FromUint Lib "oleaut32" Alias "VarUI8FromUI4" (ulIn As DWord, ByRef i64Out As QWord) As HRESULT 384 402 Declare Function VarDecFromInt Lib "oleaut32" Alias "VarDecFromI4" (lIn As LONG, ByRef decOut As DECIMAL) As HRESULT 385 Declare Function VarDecFromUI8 Lib "oleaut32" (ui64In As QWord, ByRef decOut As DECIMAL) As HRESULT386 403 387 404 Declare Function VarIntFromUI1 Lib "oleaut32" Alias "VarI4FromUI1" (bIn As Byte, ByRef lOut As Long) As HRESULT … … 475 492 Const VTBIT_DECIMAL = (1 << VT_DECIMAL) 476 493 477 Declare Function VarParseNumFromStr (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, ByRef numprs As NUMPARSE, rgbDig As *Byte) As HRESULT478 Declare Function VarNumFromParseNum (ByRef numprs As NUMPARSE, rgbDig As *Byte, dwVtBits As DWord, ByRef var As VARIANT) As HRESULT494 Declare Function VarParseNumFromStr Lib "oleaut32" (strIn As *OLECHAR, lcid As LCID, dwFlags As DWord, ByRef numprs As NUMPARSE, rgbDig As *Byte) As HRESULT 495 Declare Function VarNumFromParseNum Lib "oleaut32" (ByRef numprs As NUMPARSE, rgbDig As *Byte, dwVtBits As DWord, ByRef var As VARIANT) As HRESULT 479 496 480 497 ' VARTYPE Math API … … 493 510 Declare Function VarXor Lib "oleaut32" (ByRef lhs As VARIANT, ByRef rhs As VARIANT, ByRef result As VARIANT) As HRESULT 494 511 495 Declare Function Var XorLib "oleaut32" (ByRef in As VARIANT, ByRef result As VARIANT) As HRESULT512 Declare Function VarAbs Lib "oleaut32" (ByRef in As VARIANT, ByRef result As VARIANT) As HRESULT 496 513 Declare Function VarFix Lib "oleaut32" (ByRef in As VARIANT, ByRef result As VARIANT) As HRESULT 497 514 Declare Function VarInt Lib "oleaut32" (ByRef in As VARIANT, ByRef result As VARIANT) As HRESULT … … 535 552 536 553 Declare Function VarBstrCat Lib "oleaut32" (lhs As BSTR, rhs As BSTR, ByRef result As BSTR) As HRESULT 537 Declare Function VarBstrC atLib "oleaut32" (lhs As BSTR, rhs As BSTR, lcid As LCID, dwFlags As DWord) As HRESULT554 Declare Function VarBstrCmp Lib "oleaut32" (lhs As BSTR, rhs As BSTR, lcid As LCID, dwFlags As DWord) As HRESULT 538 555 Declare Function VarR8Pow Lib "oleaut32" (lhs As Double, rhs As Double, ByRef result As Double) As HRESULT 539 556 Declare Function VarR4CmpR8 Lib "oleaut32" (lhs As Single, rhs As Double) As HRESULT … … 557 574 Declare Function VarUdateFromDate Lib "oleaut32" (dateIn As DATE, dwFlags As DWord, ByRef udateOut As UDATE) As HRESULT 558 575 559 Declare Function VarUdateFromDateLib "oleaut32" (lcid As LCID, ByRef rgp As LPOLESTR) As HRESULT576 Declare Function GetAltMonthNames Lib "oleaut32" (lcid As LCID, ByRef rgp As LPOLESTR) As HRESULT 560 577 561 578 ' Format … … 569 586 Declare Function VarMonthName Lib "oleaut32" (iMonth As Long, fAbbrev As Long, dwFlags As DWord, ByRef bstrOut As BSTR) As HRESULT 570 587 571 Declare Function VarFormatFromTokens Lib "oleaut32" (ByRef in As VARIANT, pstrFormat As LPOLESTR, pbTokCur As *B ute, dwFlags As DWord, ByRef bstrOut As BSTR, lcid As LCID) As HRESULT572 Declare Function VarTokenizeFormatString Lib "oleaut32" (pstrFormat As LPOLESTR, rgbTok As *B ute, cbTok As Long, iFirstDay As Long, iFirstWeek As Long, lcid As LCID, ByRef cbActual As Long) As HRESULT588 Declare Function VarFormatFromTokens Lib "oleaut32" (ByRef in As VARIANT, pstrFormat As LPOLESTR, pbTokCur As *Byte, dwFlags As DWord, ByRef bstrOut As BSTR, lcid As LCID) As HRESULT 589 Declare Function VarTokenizeFormatString Lib "oleaut32" (pstrFormat As LPOLESTR, rgbTok As *Byte, cbTok As Long, iFirstDay As Long, iFirstWeek As Long, lcid As LCID, ByRef cbActual As Long) As HRESULT 573 590 574 591 ' ITypeLib … … 669 686 670 687 Declare Function RegisterActiveObject Lib "oleaut32" (punk As *IUnknown, ByRef rclsid As CLSID, dwFlags As DWord, ByRef dwRegister As DWord) As HRESULT 671 Declare Function Re gisterActiveObject Lib "oleaut32" (dwRegister As DWord, pvReserved As VoidPtr) As HRESULT688 Declare Function RevokeActiveObject Lib "oleaut32" (dwRegister As DWord, pvReserved As VoidPtr) As HRESULT 672 689 Declare Function GetActiveObject Lib "oleaut32" (ByRef rclsid As CLSID, pvReserved As VoidPtr, ByRef punk As *IUnknown) As HRESULT 673 690 … … 683 700 ' MISC API 684 701 Declare Function OaBuildVersion Lib "oleaut32" () As DWord 685 Declare Sub OaBuildVersionLib "oleaut32" (ByRef CustData As CUSTDATA)702 Declare Sub ClearCustData Lib "oleaut32" (ByRef CustData As CUSTDATA) 686 703 687 704 #endif '_INC_OLEAUTO_AB -
Include/api_system.sbp
r35 r42 21 21 Const STANDARD_RIGHTS_REQUIRED = &H000F0000 22 22 23 Const MAXIMUM_WAIT_OBJECTS = 64 23 24 24 25 '----------------- -
Include/api_winerror.sbp
r35 r42 1608 1608 Const DNS_ERROR_DP_NOT_AVAILABLE = 9905 1609 1609 Const DNS_ERROR_DP_FSMO_ERROR = 9906 1610 '#ifndef WSABASEERR 1611 'Const WSABASEERR = 10000 1610 #ifndef WSABASEERR 1611 #define WSABASEERR 1612 Const WSABASEERR = 10000 1612 1613 Const WSAEINTR = 10004 1613 1614 Const WSAEBADF = 10009 … … 1699 1700 Const WSA_QOS_ESHAPERATEOBJ = 11030 1700 1701 Const WSA_QOS_RESERVED_PETYPE = 11031 1701 '#endif1702 #endif 1702 1703 Const ERROR_SXS_SECTION_NOT_FOUND = 14000 1703 1704 Const ERROR_SXS_CANT_GEN_ACTCTX = 14001 -
Include/api_winsock2.sbp
r24 r42 1 ' api_winsock2.sbp 2 'Windows Sockets Ver2.0 3 4 5 #ifndef _INC_WINSOCK2 6 #define _INC_WINSOCK2 1 #ifndef _WINSOCK2API_ 2 #define _WINSOCK2API_ 3 #define _WINSOCKAPI_ 4 /* 5 #ifndef INCL_WINSOCK_API_PROTOTYPES 6 #define INCL_WINSOCK_API_PROTOTYPES 1 7 #endif 8 9 #ifndef INCL_WINSOCK_API_TYPEDEFS 10 #define INCL_WINSOCK_API_TYPEDEFS 0 11 #endif 12 */ 13 14 Const WINSOCK_VERSION = MAKEWORD(2, 2) 7 15 8 16 TypeDef SOCKET = ULONG_PTR 9 17 10 Const SOCKET_ERROR = -1 11 Const INVALID_SOCKET = -1 12 13 14 'Port/socket numbers - network standard functions 15 Const IPPORT_ECHO = 7 16 Const IPPORT_DISCARD = 9 17 Const IPPORT_SYSTAT = 11 18 Const IPPORT_DAYTIME = 13 19 Const IPPORT_NETSTAT = 15 20 Const IPPORT_FTP = 21 21 Const IPPORT_TELNET = 23 22 Const IPPORT_SMTP = 25 23 Const IPPORT_TIMESERVER = 37 24 Const IPPORT_NAMESERVER = 42 25 Const IPPORT_WHOIS = 43 26 Const IPPORT_MTP = 57 27 28 29 'Address families 30 Const AF_UNSPEC = 0 31 Const AF_UNIX = 1 32 Const AF_INET = 2 33 Const AF_IMPLINK = 3 34 Const AF_PUP = 4 35 Const AF_CHAOS = 5 36 Const AF_NS = 6 37 Const AF_IPX = AF_NS 38 Const AF_ISO = 7 39 Const AF_OSI = AF_ISO 40 Const AF_ECMA = 8 41 Const AF_DATAKIT = 9 42 Const AF_CCITT = 10 43 Const AF_SNA = 11 44 Const AF_DECnet = 12 45 Const AF_DLI = 13 46 Const AF_LAT = 14 47 Const AF_HYLINK = 15 48 Const AF_APPLETALK = 16 49 Const AF_NETBIOS = 17 50 Const AF_VOICEVIEW = 18 51 Const AF_FIREFOX = 19 52 Const AF_UNKNOWN1 = 20 53 Const AF_BAN = 21 54 Const AF_ATM = 22 55 Const AF_INET6 = 23 56 Const AF_CLUSTER = 24 57 Const AF_12844 = 25 58 Const AF_MAX = 26 59 60 61 'Protocol families 62 Const PF_UNSPEC = AF_UNSPEC 63 Const PF_UNIX = AF_UNIX 64 Const PF_INET = AF_INET 65 Const PF_IMPLINK = AF_IMPLINK 66 Const PF_PUP = AF_PUP 67 Const PF_CHAOS = AF_CHAOS 68 Const PF_NS = AF_NS 69 Const PF_IPX = AF_IPX 70 Const PF_ISO = AF_ISO 71 Const PF_OSI = AF_OSI 72 Const PF_ECMA = AF_ECMA 73 Const PF_DATAKIT = AF_DATAKIT 74 Const PF_CCITT = AF_CCITT 75 Const PF_SNA = AF_SNA 76 Const PF_DECnet = AF_DECnet 77 Const PF_DLI = AF_DLI 78 Const PF_LAT = AF_LAT 79 Const PF_HYLINK = AF_HYLINK 80 Const PF_APPLETALK = AF_APPLETALK 81 Const PF_VOICEVIEW = AF_VOICEVIEW 82 Const PF_FIREFOX = AF_FIREFOX 83 Const PF_UNKNOWN1 = AF_UNKNOWN1 84 Const PF_BAN = AF_BAN 85 Const PF_ATM = AF_ATM 86 Const PF_INET6 = AF_INET6 87 Const PF_MAX = AF_MAX 88 89 90 Const MSG_OOB = 1 'process out-of-band data 91 Const MSG_PEEK = 2 'peek at incoming message 92 Const MSG_DONTROUTE = 4 'send without using routing tables 93 94 95 'Error code 96 Const WSABASEERR = 10000 97 Const WSAEINTR = WSABASEERR+4 98 Const WSAEBADF = WSABASEERR+9 99 Const WSAEACCES = WSABASEERR+13 100 Const WSAEFAULT = WSABASEERR+14 101 Const WSAEINVAL = WSABASEERR+22 102 Const WSAEMFILE = WSABASEERR+24 103 Const WSAEWOULDBLOCK = WSABASEERR+35 104 Const WSAEINPROGRESS = WSABASEERR+36 105 Const WSAEALREADY = WSABASEERR+37 106 Const WSAENOTSOCK = WSABASEERR+38 107 Const WSAEDESTADDRREQ = WSABASEERR+39 108 Const WSAEMSGSIZE = WSABASEERR+40 109 Const WSAEPROTOTYPE = WSABASEERR+41 110 Const WSAENOPROTOOPT = WSABASEERR+42 111 Const WSAEPROTONOSUPPORT = WSABASEERR+43 112 Const WSAESOCKTNOSUPPORT = WSABASEERR+44 113 Const WSAEOPNOTSUPP = WSABASEERR+45 114 Const WSAEPFNOSUPPORT = WSABASEERR+46 115 Const WSAEAFNOSUPPORT = WSABASEERR+47 116 Const WSAEADDRINUSE = WSABASEERR+48 117 Const WSAEADDRNOTAVAIL = WSABASEERR+49 118 Const WSAENETDOWN = WSABASEERR+50 119 Const WSAENETUNREACH = WSABASEERR+51 120 Const WSAENETRESET = WSABASEERR+52 121 Const WSAECONNABORTED = WSABASEERR+53 122 Const WSAECONNRESET = WSABASEERR+54 123 Const WSAENOBUFS = WSABASEERR+55 124 Const WSAEISCONN = WSABASEERR+56 125 Const WSAENOTCONN = WSABASEERR+57 126 Const WSAESHUTDOWN = WSABASEERR+58 127 Const WSAETOOMANYREFS = WSABASEERR+59 128 Const WSAETIMEDOUT = WSABASEERR+60 129 Const WSAECONNREFUSED = WSABASEERR+61 130 Const WSAELOOP = WSABASEERR+62 131 Const WSAENAMETOOLONG = WSABASEERR+63 132 Const WSAEHOSTDOWN = WSABASEERR+64 133 Const WSAEHOSTUNREACH = WSABASEERR+65 134 Const WSAENOTEMPTY = WSABASEERR+66 135 Const WSAEPROCLIM = WSABASEERR+67 136 Const WSAEUSERS = WSABASEERR+68 137 Const WSAEDQUOT = WSABASEERR+69 138 Const WSAESTALE = WSABASEERR+70 139 Const WSAEREMOTE = WSABASEERR+71 140 Const WSASYSNOTREADY = WSABASEERR+91 141 Const WSAVERNOTSUPPORTED = WSABASEERR+92 142 Const WSANOTINITIALISED = WSABASEERR+93 143 Const WSAEDISCON = WSABASEERR+101 144 Const WSAENOMORE = WSABASEERR+102 145 Const WSAECANCELLED = WSABASEERR+103 146 Const WSAEINVALIDPROCTABLE = WSABASEERR+104 147 Const WSAEINVALIDPROVIDER = WSABASEERR+105 148 Const WSAEPROVIDERFAILEDINIT =WSABASEERR+106 149 Const WSASYSCALLFAILURE = WSABASEERR+107 150 Const WSASERVICE_NOT_FOUND = WSABASEERR+108 151 Const WSATYPE_NOT_FOUND = WSABASEERR+109 152 Const WSA_E_NO_MORE = WSABASEERR+110 153 Const WSA_E_CANCELLED = WSABASEERR+111 154 Const WSAEREFUSED = WSABASEERR+112 155 156 157 158 '--------------- 159 ' WinSock Types 160 '--------------- 161 162 Type HOSTENT 163 h_name As BytePtr 164 h_aliases As DWordPtr 18 Const FD_SETSIZE = 64 19 20 Type fd_set 21 fd_count As DWord 22 fd_array[ELM(FD_SETSIZE)] As SOCKET 23 End Type 24 25 Declare Function __WSAFDIsSet Lib "ws2_32" (fd As SOCKET, ByRef set As fd_set) As Long 26 27 Sub FD_CLR(fd As SOCKET, ByRef set As fd_set) 28 Dim i As DWord 29 With set 30 For i = 0 To .fd_count 31 If .fd_array[i] = fd Then 32 While i < .fd_count - 1 33 .fd_array[i] = .fd_array[i + 1] 34 WEnd 35 .fd_count-- 36 Exit For 37 End If 38 Next 39 End With 40 End Sub 41 42 Sub FD_SET(fd As SOCKET, ByRef set As fd_set) 43 Dim i As DWord 44 With set 45 For i = 0 To ELM(.fd_count) 46 If .fd_array[i] = fd Then 47 Exit Sub 48 End If 49 Next 50 If i = .fd_count Then 51 If .fd_count < FD_SET_SIZE Then 52 .fd_array[i] = fd 53 .fd_count++ 54 End If 55 End If 56 End With 57 End Sub 58 59 Sub FD_ZERO(ByRef set As fd_set) 60 set.fd_count = 0 61 End Sub 62 63 Const FD_ISSET(fd, set) = __WSAFDIsSet(fd, set) 64 65 Type timeval 66 tv_sec As Long 67 tv_usec As Long 68 End Type 69 70 ' Operations on timevals. 71 Function timerisset(ByRef tvp As timeval) As BOOL 72 Return tvp.tv_sec Or tvp.tv_usec 73 End Function 74 75 /* 76 #define timercmp(tvp, uvp, cmp) \ 77 ((tvp)->tv_sec cmp (uvp)->tv_sec || \ 78 (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) 79 */ 80 81 Sub timerclear(ByRef tvp As timeval) 82 tvp.tv_sec = 0 83 tvp.tv_usec = 0 84 End Sub 85 86 ' Commands for ioctlsocket(), taken from the BSD file fcntl.h. 87 Const IOCPARM_MASK = &h7f 88 Const IOC_VOID = &h20000000 89 Const IOC_OUT = &h40000000 90 Const IOC_IN = &h80000000 91 Const IOC_INOUT= (IOC_IN Or IOC_OUT) 92 93 Const _IO(x ,y) = (IOC_VOID Or (x << 8) Or y) 94 95 Const _IOR(x, y, size) = (IOC_OUT Or ((size And IOCPARM_MASK) << 16) Or ((x) << 8) Or (y)) 96 97 Const _IOW(x, y, size) = (IOC_IN Or ((size And IOCPARM_MASK) << 16) Or ((x) << 8) Or (y)) 98 99 Const FIONREAD = _IOR(&h66,127, SizeOf (DWord)) '&h66は'f' 100 Const FIONBIO = _IOW(&h66,126, SizeOf (DWord)) 101 Const FIOASYNC = _IOW(&h66,125, SizeOf (DWord)) 102 103 ' Socket I/O Controls 104 Const SIOCSHIWAT = _IOW(&h73, 0, SizeOf (DWord)) '&h73は's' 105 Const SIOCGHIWAT = _IOR(&h73, 1, SizeOf (DWord)) 106 Const SIOCSLOWAT = _IOW(&h73, 2, SizeOf (DWord)) 107 Const SIOCGLOWAT = _IOR(&h73, 3, SizeOf (DWord)) 108 Const SIOCATMARK = _IOR(&h73, 7, SizeOf (DWord)) 109 110 111 Class hostent 112 Public 113 h_name As *Byte 114 h_aliases As **Byte 165 115 h_addrtype As Integer 166 h_length As Integer 167 h_addr_list As DWordPtr 168 End Type 169 170 Type SERVENT 171 s_name As BytePtr 172 s_aliases As DWordPtr 116 h_lengt As Integer 117 h_addr_list As **Byte 118 119 Function h_addr() As *Byte 120 Return h_addr_list[0] 121 End Function 122 123 Sub h_addr(l As *Byte) 124 h_addr_list[0] = i 125 End Sub 126 End Class 127 128 Type netent 129 FAR * n_name As *Byte 130 FAR * FAR * n_aliases As **Byte 131 n_addrtyp As Integer 132 n_net As DWord 133 End Type 134 135 Type servent 136 s_name As *Byte 137 s_aliases As **Byte 138 #ifdef _WIN64 139 s_proto As *Byte 173 140 s_port As Integer 174 s_proto As BytePtr 175 End Type 176 177 Type SOCKADDR 178 sa_family As Word 179 sa_data[13] As Byte 180 End Type 181 Type SOCKADDR_IN 182 sin_family As Word 141 #else 142 s_port As Integer 143 s_proto As *Byte 144 #endif 145 End Type 146 147 Type protoent 148 p_name As *Byte 149 p_aliases As **Byte 150 p_proto As Integer 151 End Type 152 153 ' Protocols 154 Const IPPROTO_IP = 0 155 Const IPPROTO_HOPOPTS = 0 156 Const IPPROTO_ICMP = 1 157 Const IPPROTO_IGMP = 2 158 Const IPPROTO_GGP = 3 159 Const IPPROTO_IPV4 = 4 160 Const IPPROTO_TCP = 6 161 Const IPPROTO_PUP = 12 162 Const IPPROTO_UDP = 17 163 Const IPPROTO_IDP = 22 164 Const IPPROTO_IPV6 = 41 165 Const IPPROTO_ROUTING = 43 166 Const IPPROTO_FRAGMENT = 44 167 Const IPPROTO_ESP = 50 168 Const IPPROTO_AH = 51 169 Const IPPROTO_ICMPV6 = 58 170 Const IPPROTO_NONE = 59 171 Const IPPROTO_DSTOPTS = 60 172 Const IPPROTO_ND = 77 173 Const IPPROTO_ICLFXBM = 78 174 175 Const IPPROTO_RAW = 255 176 Const IPPROTO_MAX = 256 177 178 ' Port/socket numbers: network standard functions 179 Const IPPORT_ECHO = 7 180 Const IPPORT_DISCARD = 9 181 Const IPPORT_SYSTAT = 11 182 Const IPPORT_DAYTIME = 13 183 Const IPPORT_NETSTAT = 15 184 Const IPPORT_FTP = 21 185 Const IPPORT_TELNET = 23 186 Const IPPORT_SMTP = 25 187 Const IPPORT_TIMESERVER = 37 188 Const IPPORT_NAMESERVER = 42 189 Const IPPORT_WHOIS = 43 190 Const IPPORT_MTP = 57 191 192 ' Port/socket numbers: host specific functions 193 Const IPPORT_TFTP = 69 194 Const IPPORT_RJE = 77 195 Const IPPORT_FINGER = 79 196 Const IPPORT_TTYLINK = 87 197 Const IPPORT_SUPDUP = 95 198 199 ' UNIX TCP sockets 200 Const IPPORT_EXECSERVER = 512 201 Const IPPORT_LOGINSERVER = 513 202 Const IPPORT_CMDSERVER = 514 203 Const IPPORT_EFSSERVER = 520 204 205 ' UNIX UDP sockets 206 Const IPPORT_BIFFUDP = 512 207 Const IPPORT_WHOSERVER = 513 208 Const IPPORT_ROUTESERVER = 520 209 ' 520+1 also used 210 211 ' Ports < IPPORT_RESERVED are reserved for privileged processes (e.g. root). 212 Const IPPORT_RESERVED = 1024 213 214 ' Link numbers 215 Const IMPLINK_IP = 155 216 Const IMPLINK_LOWEXPER = 156 217 Const IMPLINK_HIGHEXPER = 158 218 219 #ifndef s_addr 220 #define s_addr 221 ' Internet address (old style... should be updated) 222 Class in_addr 223 Public 224 /* 225 Union S_un 226 S_un_b As Type 227 s_b1 As Byte 228 s_b2 As Byte 229 s_b3 As Byte 230 s_b4 As Byte 231 End Type 232 S_un_w As Type 233 s_w1 As Word 234 s_w2 As Word 235 End Type 236 S_addr As DWord 237 End Union 238 */ 239 s_addr As DWord 240 241 Function s_host() As Byte 242 Return GetByte(VarPtr(s_addr) + 1) 243 End Function 244 245 Sub s_host(h As Byte) 246 Return SetByte(VarPtr(s_addr) + 2, h) 247 End Sub 248 249 Function s_net() As Byte 250 Return GetByte(VarPtr(s_addr) + 0) 251 End Function 252 253 Sub s_net(n As Byte) 254 Return SetByte(VarPtr(s_addr) + 0, n) 255 End Sub 256 257 Function s_imp() As Word 258 Return GetWord(VarPtr(s_addr) + 1) 259 End Function 260 261 Sub s_imp(i As Word) 262 Return SetWord(VarPtr(s_addr) + 1, i) 263 End Sub 264 265 Function s_impno() As Byte 266 Return GetByte(VarPtr(s_addr) + 3) 267 End Function 268 269 Sub s_impno(i As Byte) 270 Return SetByte(VarPtr(s_addr) + 3, i) 271 End Sub 272 273 Function s_lh() As Byte 274 Return GetByte(VarPtr(s_addr) + 2) 275 End Function 276 277 Sub s_lh(l As Byte) 278 Return SetByte(VarPtr(s_addr) + 2, l) 279 End Sub 280 End Class 281 #endif 282 283 Const IN_CLASSA(i) = (((i) As DWord And &h80000000) = 0) 284 Const IN_CLASSA_NET = &hff000000 285 Const IN_CLASSA_NSHIFT = 24 286 Const IN_CLASSA_HOST = &h00ffffff 287 Const IN_CLASSA_MAX = 128 288 289 Const IN_CLASSB(i) = (((i) As DWord & &hc0000000) = &h80000000) 290 Const IN_CLASSB_NET= &hffff0000 291 Const IN_CLASSB_NSHIFT = 16 292 Const IN_CLASSB_HOST = &h0000ffff 293 Const IN_CLASSB_MAX = 65536 294 295 Const IN_CLASSC(i) = (((i) As DWord And &he0000000) = &hc0000000) 296 Const IN_CLASSC_NET = &hffffff00 297 Const IN_CLASSC_NSHIFT = 8 298 Const IN_CLASSC_HOST = &h000000ff 299 300 Const IN_CLASSD(i) = (((i) As DWord And &hf0000000) = &he0000000) 301 Const IN_CLASSD_NET = &hf0000000 302 Const IN_CLASSD_NSHIFT = 28 303 Const IN_CLASSD_HOST = &h0fffffff 304 Const IN_MULTICAST(i) = IN_CLASSD(i) 305 306 Const INADDR_ANY = &h00000000 As DWord 307 Const INADDR_LOOPBACK = &h7f000001 308 Const INADDR_BROADCAST = &hffffffff As DWord 309 Const INADDR_NONE = &hffffffff 310 311 Const ADDR_ANY = INADDR_ANY 312 313 ' Socket address, internet style. 314 Type sockaddr_in 315 sin_family As Integer 183 316 sin_port As Word 184 sin_addr As DWord 185 sin_zero[7] As Byte 186 End Type 187 188 189 '------------- 190 ' WinSock API 191 '------------- 192 193 Declare Function closesocket Lib "ws2_32.dll" (s As SOCKET) As Long 194 Declare Function connect Lib "ws2_32.dll" (s As SOCKET, ByRef name As Any, namelen As Long) As Long 195 Declare Function gethostbyname Lib "ws2_32.dll" (name As BytePtr) As *HOSTENT 196 Declare Function getservbyname Lib "ws2_32.dll" (name As BytePtr, proto As BytePtr) As *SERVENT 197 Declare Function htonl Lib "ws2_32.dll" (hostlong As DWord) As DWord 198 Declare Function htons Lib "ws2_32.dll" (hostshort As Word) As Word 199 Declare Function recv Lib "ws2_32.dll" (s As SOCKET, buf As BytePtr, length As Long, flags As Long) As Long 200 Declare Function send Lib "ws2_32.dll" (s As SOCKET, buf As BytePtr, length As Long, flags As Long) As Long 201 202 Const SD_RECEIVE = 0 203 Const SD_SEND = 1 204 Const SD_BOTH = 2 205 Declare Function shutdown Lib "ws2_32.dll" (s As SOCKET, how As Long) As Long 206 207 Const SOCK_STREAM = 1 208 Const SOCK_DGRAM = 2 209 Const SOCK_RAW = 3 210 Const SOCK_RDM = 4 211 Const SOCK_SEQPACKET = 5 212 Declare Function socket Lib "ws2_32.dll" (af As Long, sokettype As Long, protocol As Long) As SOCKET 213 214 Declare Function WSACleanup Lib "ws2_32.dll" () As Integer 317 sin_addr As in_addr 318 sin_zero[ELM(8)] As Byte 319 End Type 215 320 216 321 Const WSADESCRIPTION_LEN = 256 217 Const WSASYS_STATUS_LEN = 128 322 Const WSASYS_STATUS_LEN = 128 323 218 324 Type WSADATA 219 325 wVersion As Word 220 326 wHighVersion As Word 327 #ifdef _WIN64 328 iMaxSockets As Word 329 iMaxUdpDg As Word 330 lpVendorInfo As *Byte 331 szDescription[WSADESCRIPTION_LEN] As Byte 332 szSystemStatus[WSASYS_STATUS_LEN] As Byte 333 #else 221 334 szDescription[WSADESCRIPTION_LEN] As Byte 222 335 szSystemStatus[WSASYS_STATUS_LEN] As Byte 223 336 iMaxSockets As Word 224 337 iMaxUdpDg As Word 225 lpVendorInfo As BytePtr 226 End Type 227 Declare Function WSAStartup Lib "ws2_32.dll" (wVersionRequested As Word, ByRef lpWSAData As WSADATA) As Long 228 229 230 Declare Function accept Lib "ws2_32.dll" (s As SOCKET, ByRef addr As SOCKADDR_IN, ByVal addrlen As Long) As SOCKET 231 Declare Function bind Lib "ws2_32.dll" (s As SOCKET, ByRef sName As SOCKADDR_IN, ByVal namelen As Long) As Long 232 Declare Function ioctlsocket Lib "ws2_32.dll" (s As SOCKET, ByVal cmd As Long, argp As DWord) As Long 233 Declare Function listen Lib "ws2_32.dll" (s As SOCKET, ByVal backlog As Long) As Long 234 235 Declare Function recvfrom Lib "ws2_32.dll" (s As SOCKET, buf As BytePtr, length As Long, flags As Long, ByRef from As SOCKADDR_IN, fromlen As Long) As Long 236 Declare Function sendto Lib "ws2_32.dll" (s As SOCKET, buf As BytePtr, length As Long, flags As Long, ByRef sTo As SOCKADDR_IN, tolen As Long) As Long 237 238 Const INADDR_ANY = &h0 239 240 Declare Function htons Lib "ws2_32.dll" (netshort As Word) As Word 241 Declare Function htonl Lib "ws2_32.dll" (netshort As DWord) As DWord 242 Declare Function ntohs Lib "ws2_32.dll" (netshort As Word) As Word 243 Declare Function ntohl Lib "ws2_32.dll" (netshort As DWord) As DWord 244 245 #endif '_INC_WINSOCK2 338 lpVendorInfo As *Byte 339 #endif 340 End Type 341 342 TypeDef LPWSADATA = *WSADATA 343 344 ' Definitions related to sockets: types, address families, options, taken from the BSD file sys/socket.h. 345 346 Const INVALID_SOCKET = (Not 0) As ULONG_PTR 347 Const SOCKET_ERROR = (-1) 348 349 Const FROM_PROTOCOL_INFO = (-1) 350 351 ' Types 352 Const SOCK_STREAM = 1 353 Const SOCK_DGRAM = 2 354 Const SOCK_RAW = 3 355 Const SOCK_RDM = 4 356 Const SOCK_SEQPACKET = 5 357 358 ' Option flags per-socket. 359 Const SO_DEBUG = &h0001 360 Const SO_ACCEPTCONN = &h0002 361 Const SO_REUSEADDR = &h0004 362 Const SO_KEEPALIVE = &h0008 363 Const SO_DONTROUTE = &h0010 364 Const SO_BROADCAST = &h0020 365 Const SO_USELOOPBACK = &h0040 366 Const SO_LINGER = &h0080 367 Const SO_OOBINLINE = &h0100 368 369 Const SO_DONTLINGER = ((Not SO_LINGER) As Long) 370 Const SO_EXCLUSIVEADDRUSE = ((Not SO_REUSEADDR) As Long) 371 372 ' Additional options. 373 Const SO_SNDBUF = &h1001 374 Const SO_RCVBUF = &h1002 375 Const SO_SNDLOWAT = &h1003 376 Const SO_RCVLOWAT = &h1004 377 Const SO_SNDTIMEO = &h1005 378 Const SO_RCVTIMEO = &h1006 379 Const SO_ERROR = &h1007 380 Const SO_TYPE = &h1008 381 382 ' WinSock 2 extension -- new options 383 Const SO_GROUP_ID = &h2001 384 Const SO_GROUP_PRIORITY = &h2002 385 Const SO_MAX_MSG_SIZE = &h2003 386 Const SO_PROTOCOL_INFOA = &h2004 387 Const SO_PROTOCOL_INFOW = &h2005 388 #ifdef UNICODE 389 Const SO_PROTOCOL_INFO = SO_PROTOCOL_INFOW 390 #else 391 Const SO_PROTOCOL_INFO = SO_PROTOCOL_INFOA 392 #endif /* UNICODE */ 393 Const PVD_CONFIG = &h3001 394 Const SO_CONDITIONAL_ACCEPT = &h3002 395 396 ' TCP options. 397 Const TCP_NODELAY = &h0001 398 399 ' Address families. 400 Const AF_UNSPEC = 0 401 Const AF_UNIX = 1 402 Const AF_INET = 2 403 Const AF_IMPLINK = 3 404 Const AF_PUP = 4 405 Const AF_CHAOS = 5 406 Const AF_NS = 6 407 Const AF_IPX = AF_NS 408 Const AF_ISO = 7 409 Const AF_OSI = AF_ISO 410 Const AF_ECMA = 8 411 Const AF_DATAKIT = 9 412 Const AF_CCITT = 10 413 Const AF_SNA = 11 414 Const AF_DECnet = 12 415 Const AF_DLI = 13 416 Const AF_LAT = 14 417 Const AF_HYLINK = 15 418 Const AF_APPLETALK = 16 419 Const AF_NETBIOS = 17 420 Const AF_VOICEVIEW = 18 421 Const AF_FIREFOX = 19 422 Const AF_UNKNOWN1 = 20 423 Const AF_BAN = 21 424 Const AF_ATM = 22 425 Const AF_INET6 = 23 426 Const AF_CLUSTER = 24 427 Const AF_12844 = 25 428 Const AF_IRDA = 26 429 Const AF_NETDES = 28 430 431 Const AF_TCNPROCESS = 29 432 Const AF_TCNMESSAGE = 30 433 Const AF_ICLFXBM = 31 434 435 Const AF_MAX = 32 436 437 ' Structure used by kernel to store most addresses. 438 Type sockaddr 439 sa_family As Word 440 sa_data[ELM(14)] As Byte 441 End Type 442 443 ' Portable socket structure (RFC 2553). 444 445 ' Desired design of maximum size and alignment. 446 ' These are implementation specific. 447 Const _SS_MAXSIZE = 128 ' Maximum size. 448 Const _SS_ALIGNSIZE = (SizeOf (Int64)) 'Desired alignment. 449 450 ' Definitions used for sockaddr_storage structure paddings design. 451 Const _SS_PAD1SIZE = (_SS_ALIGNSIZE - SizeOf (Integer)) 452 Const _SS_PAD2SIZE = (_SS_MAXSIZE - (SizeOf (Integer) + _SS_PAD1SIZE + _SS_ALIGNSIZE)) 453 454 Type sockaddr_storage 455 ss_family As Integer 456 __ss_pad1[ELM(_SS_PAD1SIZE)] As Byte 457 __ss_align As Int64 458 __ss_pad2[ELM(_SS_PAD2SIZE)] As Byte 459 End Type 460 461 Type sockproto 462 sp_family As Word 463 sp_protocol As Word 464 End Type 465 466 ' Protocol families, same as address families for now. 467 Const PF_UNSPEC = AF_UNSPEC 468 Const PF_UNIX = AF_UNIX 469 Const PF_INET = AF_INET 470 Const PF_IMPLINK = AF_IMPLINK 471 Const PF_PUP = AF_PUP 472 Const PF_CHAOS = AF_CHAOS 473 Const PF_NS = AF_NS 474 Const PF_IPX = AF_IPX 475 Const PF_ISO = AF_ISO 476 Const PF_OSI = AF_OSI 477 Const PF_ECMA = AF_ECMA 478 Const PF_DATAKIT = AF_DATAKIT 479 Const PF_CCITT = AF_CCITT 480 Const PF_SNA = AF_SNA 481 Const PF_DECnet = AF_DECnet 482 Const PF_DLI = AF_DLI 483 Const PF_LAT = AF_LAT 484 Const PF_HYLINK = AF_HYLINK 485 Const PF_APPLETALK = AF_APPLETALK 486 Const PF_VOICEVIEW = AF_VOICEVIEW 487 Const PF_FIREFOX = AF_FIREFOX 488 Const PF_UNKNOWN1 = AF_UNKNOWN1 489 Const PF_BAN = AF_BAN 490 Const PF_ATM = AF_ATM 491 Const PF_INET6 = AF_INET6 492 493 Const PF_MAX = AF_MAX 494 495 ' Structure used for manipulating linger option. 496 Type linger 497 l_onoff As Word 498 l_linger As Word 499 End Type 500 501 ' Level number for (get/set)sockopt() to apply to socket itself. 502 Const SOL_SOCKET = &hffff 503 504 ' Maximum queue length specifiable by listen. 505 Const SOMAXCONN = &h7fffffff 506 507 Const MSG_OOB = &h1 508 Const MSG_PEEK = &h2 509 Const MSG_DONTROUTE = &h4 510 Const MSG_WAITALL = &h8 511 512 Const MSG_PARTIAL = &h8000 513 514 ' WinSock 2 extension -- new flags for WSASend(), WSASendTo(), WSARecv() and 515 ' WSARecvFrom() 516 Const MSG_INTERRUPT = &h10 517 518 Const MSG_MAXIOVLEN = 16 519 520 ' Define constant based on rfc883, used by gethostbyxxxx() calls. 521 Const MAXGETHOSTSTRUCT = 1024 522 523 ' WinSock 2 extension -- bit values and indices for FD_XXX network events 524 Const FD_READ_BIT = 0 525 Const FD_READ = (1 << FD_READ_BIT) 526 527 Const FD_WRITE_BIT = 1 528 Const FD_WRITE = (1 << FD_WRITE_BIT) 529 530 Const FD_OOB_BIT = 2 531 Const FD_OOB = (1 << FD_OOB_BIT) 532 533 Const FD_ACCEPT_BIT = 3 534 Const FD_ACCEPT = (1 << FD_ACCEPT_BIT) 535 536 Const FD_CONNECT_BIT = 4 537 Const FD_CONNECT = (1 << FD_CONNECT_BIT) 538 539 Const FD_CLOSE_BIT = 5 540 Const FD_CLOSE = (1 << FD_CLOSE_BIT) 541 542 Const FD_QOS_BIT = 6 543 Const FD_QOS = (1 << FD_QOS_BIT) 544 545 Const FD_GROUP_QOS_BIT = 7 546 Const FD_GROUP_QOS = (1 << FD_GROUP_QOS_BIT) 547 548 Const FD_ROUTING_INTERFACE_CHANGE_BIT = 8 549 Const FD_ROUTING_INTERFACE_CHANGE = (1 << FD_ROUTING_INTERFACE_CHANGE_BIT) 550 551 Const FD_ADDRESS_LIST_CHANGE_BIT = 9 552 Const FD_ADDRESS_LIST_CHANGE = (1 << FD_ADDRESS_LIST_CHANGE_BIT) 553 554 Const FD_MAX_EVENTS = 10 555 Const FD_ALL_EVENTS = ((1 << FD_MAX_EVENTS) - 1) 556 557 #include <api_winerror.sbp> 558 559 ' Compatibility macros. 560 561 'Const h_errno = WSAGetLastError() 562 Const HOST_NOT_FOUND = WSAHOST_NOT_FOUND 563 Const TRY_AGAIN = WSATRY_AGAIN 564 Const NO_RECOVERY = WSANO_RECOVERY 565 Const NO_DATA = WSANO_DATA 566 Const WSANO_ADDRESS = WSANO_DATA 567 Const NO_ADDRESS = WSANO_ADDRESS 568 569 ' WinSock 2 extension -- new error codes and type definition 570 571 '#ifdef _WIN32 572 573 TypeDef WSAEVENT = HANDLE 574 TypeDef LPWSAEVENT = *HANDLE 575 TypeDef WSAOVERLAPPED = OVERLAPPED 576 TypeDef LPWSAOVERLAPPED = *OVERLAPPED 577 578 Const WSA_IO_PENDING = (ERROR_IO_PENDING) 579 Const WSA_IO_INCOMPLETE = (ERROR_IO_INCOMPLETE) 580 Const WSA_INVALID_HANDLE = (ERROR_INVALID_HANDLE) 581 Const WSA_INVALID_PARAMETER = (ERROR_INVALID_PARAMETER) 582 Const WSA_NOT_ENOUGH_MEMORY = (ERROR_NOT_ENOUGH_MEMORY) 583 Const WSA_OPERATION_ABORTED = (ERROR_OPERATION_ABORTED) 584 585 Const WSA_INVALID_EVENT = (0 As WSAEVENT) 586 Const WSA_MAXIMUM_WAIT_EVENTS = (MAXIMUM_WAIT_OBJECTS) 587 Const WSA_WAIT_FAILED = (WAIT_FAILED) 588 Const WSA_WAIT_EVENT_0 = (WAIT_OBJECT_0) 589 Const WSA_WAIT_IO_COMPLETION = (WAIT_IO_COMPLETION) 590 Const WSA_WAIT_TIMEOUT = (WAIT_TIMEOUT) 591 Const WSA_INFINITE = (INFINITE) 592 593 '#elif defined _WIN16 594 '#endif 595 596 Type WSABUF 597 len As DWord 598 buf As *Byte 599 End Type 600 TypeDef LPWSABUF = *WSABUF 601 602 #include <qos.ab> 603 604 Type QOS 'struct _QualityOfService 605 SendingFlowspec As FLOWSPEC 606 ReceivingFlowspec As FLOWSPEC 607 ProviderSpecific As WSABUF 608 End Type 609 TypeDef LPQOS = *QOS 610 611 ' WinSock 2 extension -- manifest constants for return values of the condition function 612 Const CF_ACCEPT = &h0000 613 Const CF_REJECT = &h0001 614 Const CF_DEFER = &h0002 615 616 ' WinSock 2 extension -- manifest constants for shutdown() 617 Const SD_RECEIVE = &h00 618 Const SD_SEND = &h01 619 Const SD_BOTH = &h02 620 621 ' WinSock 2 extension -- data type and manifest constants for socket groups 622 TypeDef GROUP = DWord 623 624 Const SG_UNCONSTRAINED_GROUP = &h01 625 Const SG_CONSTRAINED_GROUP = &h02 626 627 ' WinSock 2 extension -- data type for WSAEnumNetworkEvents() 628 Type WSANETWORKEVENTS 629 lNetworkEvents As Long 630 iErrorCode[ELM(FD_MAX_EVENTS)] As Long 631 End Type 632 TypeDef LPWSANETWORKEVENTS = *WSANETWORKEVENTS 633 634 ' WinSock 2 extension -- WSAPROTOCOL_INFO structure and associated 635 ' manifest constants 636 637 Const MAX_PROTOCOL_CHAIN = 7 638 639 Const BASE_PROTOCOL = 1 640 Const LAYERED_PROTOCOL = 0 641 642 Type WSAPROTOCOLCHAIN 643 ChainLen As Long 644 ChainEntries[ELM(MAX_PROTOCOL_CHAIN)] As DWord 645 End Type 646 TypeDef LPWSAPROTOCOLCHAIN = *WSAPROTOCOLCHAIN 647 648 Const WSAPROTOCOL_LEN = 255 649 650 Type WSAPROTOCOL_INFOA 651 dwServiceFlags1 As DWord 652 dwServiceFlags2 As DWord 653 dwServiceFlags3 As DWord 654 dwServiceFlags4 As DWord 655 dwProviderFlags As DWord 656 ProviderId As GUID 657 dwCatalogEntryId As DWord 658 ProtocolChain As WSAPROTOCOLCHAIN 659 iVersion As Long 660 iAddressFamily As Long 661 iMaxSockAddr As Long 662 iMinSockAddr As Long 663 iSocketType As Long 664 iProtocol As Long 665 iProtocolMaxOffset As Long 666 iNetworkByteOrder As Long 667 iSecurityScheme As Long 668 dwMessageSize As DWord 669 dwProviderReserved As DWord 670 szProtocol[WSAPROTOCOL_LEN] As Byte 671 End Type 672 TypeDef LPWSAPROTOCOL_INFOA = *WSAPROTOCOL_INFOA 673 674 Type WSAPROTOCOL_INFOW 675 dwServiceFlags1 As DWord 676 dwServiceFlags2 As DWord 677 dwServiceFlags3 As DWord 678 dwServiceFlags4 As DWord 679 dwProviderFlags As DWord 680 ProviderId As GUID 681 dwCatalogEntryId As DWord 682 ProtocolChain As WSAPROTOCOLCHAIN 683 iVersion As Long 684 iAddressFamily As Long 685 iMaxSockAddr As Long 686 iMinSockAddr As Long 687 iSocketType As Long 688 iProtocol As Long 689 iProtocolMaxOffset As Long 690 iNetworkByteOrder As Long 691 iSecurityScheme As Long 692 dwMessageSize As DWord 693 dwProviderReserved As DWord 694 szProtocol[WSAPROTOCOL_LEN] As WCHAR 695 End Type 696 TypeDef LPWSAPROTOCOL_INFOW = *WSAPROTOCOL_INFOW 697 698 #ifdef UNICODE 699 TypeDef WSAPROTOCOL_INFO = WSAPROTOCOL_INFOW 700 TypeDef LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOW 701 #else 702 TypeDef WSAPROTOCOL_INFO = WSAPROTOCOL_INFOA 703 TypeDef LPWSAPROTOCOL_INFO = LPWSAPROTOCOL_INFOA 704 #endif 705 706 ' Flag bit definitions for dwProviderFlags 707 Const PFL_MULTIPLE_PROTO_ENTRIES = &h00000001 708 Const PFL_RECOMMENDED_PROTO_ENTRY = &h00000002 709 Const PFL_HIDDEN = &h00000004 710 Const PFL_MATCHES_PROTOCOL_ZERO = &h00000008 711 712 ' Flag bit definitions for dwServiceFlags1 713 Const XP1_CONNECTIONLESS = &h00000001 714 Const XP1_GUARANTEED_DELIVERY = &h00000002 715 Const XP1_GUARANTEED_ORDER = &h00000004 716 Const XP1_MESSAGE_ORIENTED = &h00000008 717 Const XP1_PSEUDO_STREAM = &h00000010 718 Const XP1_GRACEFUL_CLOSE = &h00000020 719 Const XP1_EXPEDITED_DATA = &h00000040 720 Const XP1_CONNECT_DATA = &h00000080 721 Const XP1_DISCONNECT_DATA = &h00000100 722 Const XP1_SUPPORT_BROADCAST = &h00000200 723 Const XP1_SUPPORT_MULTIPOINT = &h00000400 724 Const XP1_MULTIPOINT_CONTROL_PLANE = &h00000800 725 Const XP1_MULTIPOINT_DATA_PLANE = &h00001000 726 Const XP1_QOS_SUPPORTED = &h00002000 727 Const XP1_INTERRUPT = &h00004000 728 Const XP1_UNI_SEND = &h00008000 729 Const XP1_UNI_RECV = &h00010000 730 Const XP1_IFS_HANDLES = &h00020000 731 Const XP1_PARTIAL_MESSAGE = &h00040000 732 733 Const BIGENDIAN = &h0000 734 Const LITTLEENDIAN = &h0001 735 736 Const SECURITY_PROTOCOL_NONE = &h0000 737 738 ' WinSock 2 extension -- manifest constants for WSAJoinLeaf() 739 Const JL_SENDER_ONLY = &h01 740 Const JL_RECEIVER_ONLY = &h02 741 Const JL_BOTH = &h04 742 743 ' WinSock 2 extension -- manifest constants for WSASocket() 744 Const WSA_FLAG_OVERLAPPED = &h01 745 Const WSA_FLAG_MULTIPOINT_C_ROOT = &h02 746 Const WSA_FLAG_MULTIPOINT_C_LEAF = &h04 747 Const WSA_FLAG_MULTIPOINT_D_ROOT = &h08 748 Const WSA_FLAG_MULTIPOINT_D_LEAF = &h10 749 750 ' WinSock 2 extension -- manifest constants for WSAIoctl() 751 Const IOC_UNIX = &h00000000 752 Const IOC_WS2 = &h08000000 753 Const IOC_PROTOCOL = &h10000000 754 Const IOC_VENDOR = &h18000000 755 756 Const _WSAIO(x, y) = (IOC_VOID Or (x) Or (y)) 757 Const _WSAIOR(x, y) = (IOC_OUT Or (x) Or (y)) 758 Const _WSAIOW(x, y) = (IOC_IN Or (x) Or (y)) 759 Const _WSAIORW(x, y) = (IOC_INOUT Or (x) Or (y)) 760 761 Const SIO_ASSOCIATE_HANDLE = _WSAIOW(IOC_WS2, 1) 762 Const SIO_ENABLE_CIRCULAR_QUEUEING = _WSAIO(IOC_WS2, 2) 763 Const SIO_FIND_ROUTE = _WSAIOR(IOC_WS2, 3) 764 Const SIO_FLUSH = _WSAIO(IOC_WS2, 4) 765 Const SIO_GET_BROADCAST_ADDRESS = _WSAIOR(IOC_WS2, 5) 766 Const SIO_GET_EXTENSION_FUNCTION_POINTER = _WSAIORW(IOC_WS2, 6) 767 Const SIO_GET_QOS = _WSAIORW(IOC_WS2, 7) 768 Const SIO_GET_GROUP_QOS = _WSAIORW(IOC_WS2, 8) 769 Const SIO_MULTIPOINT_LOOPBACK = _WSAIOW(IOC_WS2, 9) 770 Const SIO_MULTICAST_SCOPE = _WSAIOW(IOC_WS2, 10) 771 Const SIO_SET_QOS = _WSAIOW(IOC_WS2, 11) 772 Const SIO_SET_GROUP_QOS = _WSAIOW(IOC_WS2, 12) 773 Const SIO_TRANSLATE_HANDLE = _WSAIORW(IOC_WS2, 13) 774 Const SIO_ROUTING_INTERFACE_QUERY = _WSAIORW(IOC_WS2, 20) 775 Const SIO_ROUTING_INTERFACE_CHANGE = _WSAIOW(IOC_WS2, 21) 776 Const SIO_ADDRESS_LIST_QUERY = _WSAIOR(IOC_WS2, 22) 777 Const SIO_ADDRESS_LIST_CHANGE = _WSAIO(IOC_WS2, 23) 778 Const SIO_QUERY_TARGET_PNP_HANDLE = _WSAIOR(IOC_WS2, 24) 779 Const SIO_ADDRESS_LIST_SORT = _WSAIORW(IOC_WS2, 25) 780 781 ' WinSock 2 extensions -- data types for the condition function in 782 ' WSAAccept() and overlapped I/O completion routine. 783 784 TypeDef LPCONDITIONPROC = *Function( 785 ByRef CallerId As WSABUF, 786 ByRef CallerData As WSABUF, 787 ByRef lpSQOS As QOS, 788 ByRef lpGQOS As QOS, 789 ByRef lpCalleeId As WSABUF, 790 ByRef lpCalleeData As WSABUF, 791 ByRef g As GROUP, 792 dwCallbackData As ULONG_PTR 793 ) As Long 794 795 TypeDef LPWSAOVERLAPPED_COMPLETION_ROUTINE = *Sub( 796 dwError As DWord, 797 cbTransferred As DWord, 798 ByRef Overlapped As WSAOVERLAPPED, 799 dwFlags As DWord) 800 801 ' WinSock 2 extension -- manifest constants and associated structures 802 ' for WSANSPIoctl() 803 Const SIO_NSP_NOTIFY_CHANGE = _WSAIOW(IOC_WS2, 25) 804 805 Const Enum WSACOMPLETIONTYPE 806 NSP_NOTIFY_IMMEDIATELY = 0 807 NSP_NOTIFY_HWND 808 NSP_NOTIFY_EVENT 809 NSP_NOTIFY_PORT 810 NSP_NOTIFY_APC 811 End Enum 812 813 TypeDef PWSACOMPLETIONTYPE = *WSACOMPLETIONTYPE 814 TypeDef LPWSACOMPLETIONTYPE = *WSACOMPLETIONTYPE 815 816 Type _System_WinSock_WSACOMPLETION_WINDOWMESSAGE 817 hWnd As HWND 818 uMsg As DWord 819 context As WPARAM 820 End Type 821 822 Type _System_WinSock_WSACOMPLETION_EVENT 823 lpOverlapped As LPWSAOVERLAPPED 824 End Type 825 826 Type _System_WinSock_WSACOMPLETION_APC 827 lpOverlapped As LPWSAOVERLAPPED 828 lpfnCompletionProc As LPWSAOVERLAPPED_COMPLETION_ROUTINE 829 End Type 830 831 Type _System_WinSock_WSACOMPLETION_PORT 832 lpOverlapped As LPWSAOVERLAPPED 833 hPort As HANDLE 834 Key As ULONG_PTR 835 End Type 836 837 Class WSACOMPLETION 838 Public 839 Type_ As WSACOMPLETIONTYPE 840 /* 841 Parameters As Union 842 WindowMessage As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE 843 Event As _System_WinSock_WSACOMPLETION_EVENT 844 Apc As _System_WinSock_WSACOMPLETION_APC 845 Port As _System_WinSock_WSACOMPLETION_PORT 846 End Union 847 */ 848 Port As _System_WinSock_WSACOMPLETION_PORT 849 850 Function WindowMessage() As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE 851 Dim p As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE 852 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE 853 Return p[0] 854 End Function 855 856 Sub WindowMessage(w As _System_WinSock_WSACOMPLETION_WINDOWMESSAGE) 857 Dim p As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE 858 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_WINDOWMESSAGE 859 p[0] = w 860 End Sub 861 862 Function Event() As _System_WinSock_WSACOMPLETION_EVENT 863 Dim p As *_System_WinSock_WSACOMPLETION_EVENT 864 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_EVENT 865 Return p[0] 866 End Function 867 868 Sub Event(e As _System_WinSock_WSACOMPLETION_EVENT) 869 Dim p As *_System_WinSock_WSACOMPLETION_EVENT 870 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_EVENT 871 p[0] = e 872 End Sub 873 874 Function Apc() As _System_WinSock_WSACOMPLETION_APC 875 Dim p As *_System_WinSock_WSACOMPLETION_APC 876 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_APC 877 Return p[0] 878 End Function 879 880 Sub Apc(a As _System_WinSock_WSACOMPLETION_APC) 881 Dim p As *_System_WinSock_WSACOMPLETION_APC 882 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_APC 883 p[0] = a 884 End Sub 885 /* 886 Function Port() As _System_WinSock_WSACOMPLETION_PORT 887 Dim p As *_System_WinSock_WSACOMPLETION_PORT 888 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_PORT 889 Return p[0] 890 End Function 891 892 Sub Port(p As _System_WinSock_WSACOMPLETION_PORT) 893 Dim p As *_System_WinSock_WSACOMPLETION_PORT 894 p = VarPtr(Port) As *_System_WinSock_WSACOMPLETION_PORT 895 p[0] = p 896 End Sub 897 */ 898 End Class 899 900 TypeDef PWSACOMPLETION = *WSACOMPLETION 901 TypeDef LPWSACOMPLETION = *WSACOMPLETION 902 903 ' WinSock 2 extension -- manifest constants for SIO_TRANSLATE_HANDLE ioctl 904 Const TH_NETDEV = &h00000001 905 Const TH_TAPI = &h00000002 906 907 TypeDef SOCKADDR = sockaddr 908 TypeDef PSOCKADDR = *sockaddr 909 TypeDef LPSOCKADDR = *sockaddr 910 911 TypeDef SOCKADDR_STORAGE = sockaddr_storage 912 TypeDef PSOCKADDR_STORAGE = *sockaddr_storage 913 TypeDef LPSOCKADDR_STORAGE = *sockaddr_storage 914 915 ' Manifest constants and type definitions related to name resolution and 916 ' registration (RNR) API 917 918 #ifndef _tagBLOB_DEFINED 919 #define _tagBLOB_DEFINED 920 #define _BLOB_DEFINED 921 #define _LPBLOB_DEFINED 922 Type BLOB 923 cbSize As DWord 924 #ifdef MIDL_PASS 925 [size_is(cbSize)] pBlobData As *Byte 926 #else 927 pBlobData As *Byte 928 #endif 929 End Type 930 TypeDef LPBLOB = *BLOB 931 #endif 932 933 ' Service Install Flags 934 Const SERVICE_MULTIPLE = (&h00000001) 935 936 ' Name Spaces 937 938 Const NS_ALL = (0) 939 940 Const NS_SAP = (1) 941 Const NS_NDS = (2) 942 Const NS_PEER_BROWSE = (3) 943 Const NS_SLP = (5) 944 Const NS_DHCP = (6) 945 946 Const NS_TCPIP_LOCAL = (10) 947 Const NS_TCPIP_HOSTS = (11) 948 Const NS_DNS = (12) 949 Const NS_NETBT = (13) 950 Const NS_WINS = (14) 951 Const NS_NLA = (15) 952 953 Const NS_NBP = (20) 954 955 Const NS_MS = (30) 956 Const NS_STDA = (31) 957 Const NS_NTDS = (32) 958 959 Const NS_X500 = (40) 960 Const NS_NIS = (41) 961 Const NS_NISPLUS = (42) 962 963 Const NS_WRQ = (50) 964 965 Const NS_NETDES = (60) 966 967 ' Resolution flags for WSAGetAddressByName(). 968 Const RES_UNUSED_1 = (&h00000001) 969 Const RES_FLUSH_CACHE = (&h00000002) 970 #ifndef RES_SERVICE 971 #define RES_SERVICE 972 Const RES_SERVICE = (&h00000004) 973 #endif /* RES_SERVICE */ 974 975 ' Well known value names for Service Types 976 977 Const SERVICE_TYPE_VALUE_IPXPORTA = "IpxSocket" 978 'Const SERVICE_TYPE_VALUE_IPXPORTW = L"IpxSocket" 979 Const SERVICE_TYPE_VALUE_SAPIDA = "SapId" 980 'Const SERVICE_TYPE_VALUE_SAPIDW = L"SapId" 981 982 Const SERVICE_TYPE_VALUE_TCPPORTA = "TcpPort" 983 'Const SERVICE_TYPE_VALUE_TCPPORTW = L"TcpPort" 984 985 Const SERVICE_TYPE_VALUE_UDPPORTA = "UdpPort" 986 'Const SERVICE_TYPE_VALUE_UDPPORTW = L"UdpPort" 987 988 Const SERVICE_TYPE_VALUE_OBJECTIDA = "ObjectId" 989 'Const SERVICE_TYPE_VALUE_OBJECTIDW = L"ObjectId" 990 991 #ifdef UNICODE 992 /* 993 Const SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDW 994 Const SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTW 995 Const SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTW 996 Const SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDW 997 */ 998 #else 999 1000 Const SERVICE_TYPE_VALUE_SAPID = SERVICE_TYPE_VALUE_SAPIDA 1001 Const SERVICE_TYPE_VALUE_TCPPORT = SERVICE_TYPE_VALUE_TCPPORTA 1002 Const SERVICE_TYPE_VALUE_UDPPORT = SERVICE_TYPE_VALUE_UDPPORTA 1003 Const SERVICE_TYPE_VALUE_OBJECTID = SERVICE_TYPE_VALUE_OBJECTIDA 1004 1005 #endif 1006 1007 #ifndef __CSADDR_DEFINED__ 1008 #define __CSADDR_DEFINED__ 1009 1010 ' SockAddr Information 1011 Type SOCKET_ADDRESS 1012 lpSockaddr As LPSOCKADDR 1013 iSockaddrLength As Long 1014 End Type 1015 TypeDef PSOCKET_ADDRESS = *SOCKET_ADDRESS 1016 TypeDef LPSOCKET_ADDRESS = *SOCKET_ADDRESS 1017 1018 ' CSAddr Information 1019 Type CSADDR_INFO 1020 LocalAddr As SOCKET_ADDRESS 1021 RemoteAddr As SOCKET_ADDRESS 1022 iSocketType As Long 1023 iProtocol As Long 1024 End Type 1025 TypeDef PCSADDR_INFO = *CSADDR_INFO 1026 TypeDef LPCSADDR_INFO = *CSADDR_INFO 1027 #endif 1028 1029 ' Address list returned via SIO_ADDRESS_LIST_QUERY 1030 Type SOCKET_ADDRESS_LIST 1031 iAddressCount As Long 1032 Address[ELM(1)] As SOCKET_ADDRESS 1033 End Type 1034 TypeDef LPSOCKET_ADDRESS_LIST = *SOCKET_ADDRESS_LIST 1035 1036 ' Address Family/Protocol Tuples 1037 Type AFPROTOCOLS 1038 iAddressFamily As Long 1039 iProtocol As Long 1040 End Type 1041 TypeDef PAFPROTOCOLS = *AFPROTOCOLS 1042 TypeDef LPAFPROTOCOLS = *AFPROTOCOLS 1043 1044 ' Client Query API Typedefs 1045 1046 ' The comparators 1047 Const Enum WSAECOMPARATOR 1048 COMP_EQUAL = 0 1049 COMP_NOTLESS 1050 End Enum 1051 TypeDef PWSAECOMPARATOR = *WSAECOMPARATOR 1052 TypeDef LPWSAECOMPARATOR = *WSAECOMPARATOR 1053 1054 Type WSAVERSION 1055 dwVersion As DWord 1056 ecHow As WSAECOMPARATOR 1057 End Type 1058 TypeDef PWSAVERSION = *WSAVERSION 1059 TypeDef LPWSAVERSION = *WSAVERSION 1060 1061 Type WSAQUERYSETA 1062 dwSize As DWord 1063 lpszServiceInstanceName As LPSTR 1064 lpServiceClassId As *GUID 1065 lpVersion As LPWSAVERSION 1066 lpszComment As LPSTR 1067 dwNameSpace As DWord 1068 lpNSProviderId As *GUID 1069 lpszContext As LPSTR 1070 dwNumberOfProtocols As DWord 1071 lpafpProtocols As LPAFPROTOCOLS 1072 lpszQueryString As LPSTR 1073 dwNumberOfCsAddrs As DWord 1074 lpcsaBuffer As LPCSADDR_INFO 1075 dwOutputFlags As DWord 1076 lpBlob As LPBLOB 1077 End Type 1078 TypeDef PWSAQUERYSETA = *WSAQUERYSETA 1079 TypeDef LPWSAQUERYSETA = *WSAQUERYSETA 1080 1081 Type WSAQUERYSETW 1082 dwSize As DWord 1083 lpszServiceInstanceName As LPWSTR 1084 lpServiceClassId As *GUID 1085 lpVersion As LPWSAVERSION 1086 lpszComment As LPWSTR 1087 dwNameSpace As DWord 1088 lpNSProviderId As *GUID 1089 lpszContext As LPWSTR 1090 dwNumberOfProtocols As DWord 1091 lpafpProtocols As LPAFPROTOCOLS 1092 lpszQueryString As LPWSTR 1093 dwNumberOfCsAddrs As DWord 1094 lpcsaBuffer As LPCSADDR_INFO 1095 dwOutputFlags As DWord 1096 lpBlob As LPBLOB 1097 End Type 1098 TypeDef PWSAQUERYSETW = *WSAQUERYSETW 1099 TypeDef LPWSAQUERYSETW = *WSAQUERYSETW 1100 1101 #ifdef UNICODE 1102 TypeDef WSAQUERYSET = WSAQUERYSETW 1103 TypeDef PWSAQUERYSET = PWSAQUERYSETW 1104 TypeDef LPWSAQUERYSET = LPWSAQUERYSETW 1105 #else 1106 TypeDef WSAQUERYSET = WSAQUERYSETA 1107 TypeDef PWSAQUERYSET = PWSAQUERYSETA 1108 TypeDef LPWSAQUERYSET = LPWSAQUERYSETA 1109 #endif 1110 1111 Const LUP_DEEP = &h0001 1112 Const LUP_CONTAINERS = &h0002 1113 Const LUP_NOCONTAINERS = &h0004 1114 Const LUP_NEAREST = &h0008 1115 Const LUP_RETURN_NAME = &h0010 1116 Const LUP_RETURN_TYPE = &h0020 1117 Const LUP_RETURN_VERSION = &h0040 1118 Const LUP_RETURN_COMMENT = &h0080 1119 Const LUP_RETURN_ADDR = &h0100 1120 Const LUP_RETURN_BLOB = &h0200 1121 Const LUP_RETURN_ALIASES = &h0400 1122 Const LUP_RETURN_QUERY_STRING = &h0800 1123 Const LUP_RETURN_ALL = &h0FF0 1124 Const LUP_RES_SERVICE = &h8000 1125 1126 Const LUP_FLUSHCACHE = &h1000 1127 Const LUP_FLUSHPREVIOUS = &h2000 1128 1129 ' Return flags 1130 Const RESULT_IS_ALIAS = &h0001 1131 Const RESULT_IS_ADDED = &h0010 1132 Const RESULT_IS_CHANGED = &h0020 1133 Const RESULT_IS_DELETED = &h0040 1134 1135 ' Service Address Registration and Deregistration Data Types. 1136 1137 Const Enum WSAESETSERVICEOP 1138 RNRSERVICE_REGISTER = 0 1139 RNRSERVICE_DEREGISTER 1140 RNRSERVICE_DELETE 1141 End Enum 1142 TypeDef PWSAESETSERVICEOP = *WSAESETSERVICEOP 1143 TypeDef LPWSAESETSERVICEOP = *WSAESETSERVICEOP 1144 1145 ' Service Installation/Removal Data Types. 1146 1147 Type WSANSCLASSINFOA 1148 lpszName As LPSTR 1149 dwNameSpace As DWord 1150 dwValueType As DWord 1151 dwValueSize As DWord 1152 lpValue As VoidPtr 1153 End Type 1154 TypeDef PWSANSCLASSINFOA = *WSANSCLASSINFOA 1155 TypeDef LPWSANSCLASSINFOA = *WSANSCLASSINFOA 1156 1157 Type WSANSCLASSINFOW 1158 lpszName As LPWSTR 1159 dwNameSpace As DWord 1160 dwValueType As DWord 1161 dwValueSize As DWord 1162 lpValue As VoidPtr 1163 End Type 1164 TypeDef PWSANSCLASSINFOW = *WSANSCLASSINFOW 1165 TypeDef LPWSANSCLASSINFOW = *WSANSCLASSINFOW 1166 1167 #ifdef UNICODE 1168 TypeDef WSANSCLASSINFO = WSANSCLASSINFOW 1169 TypeDef PWSANSCLASSINFO = PWSANSCLASSINFOW 1170 TypeDef LPWSANSCLASSINFO = LPWSANSCLASSINFOW 1171 #else 1172 TypeDef WSANSCLASSINFO = WSANSCLASSINFOA 1173 TypeDef PWSANSCLASSINFO = PWSANSCLASSINFOA 1174 TypeDef LPWSANSCLASSINFO = LPWSANSCLASSINFOA 1175 #endif 1176 1177 Type WSASERVICECLASSINFOA 1178 lpServiceClassId As *GUID 1179 lpszServiceClassName As LPSTR 1180 dwCount As DWord 1181 lpClassInfos As LPWSANSCLASSINFOA 1182 End Type 1183 TypeDef PWSASERVICECLASSINFOA = *WSASERVICECLASSINFOA 1184 TypeDef LPWSASERVICECLASSINFOA = *WSASERVICECLASSINFOA 1185 1186 Type WSASERVICECLASSINFOW 1187 lpServiceClassId As *GUID 1188 lpszServiceClassName As LPWSTR 1189 dwCount As DWord 1190 lpClassInfos As LPWSANSCLASSINFOA 1191 End Type 1192 TypeDef PWSASERVICECLASSINFOW = *WSASERVICECLASSINFOW 1193 TypeDef LPWSASERVICECLASSINFOW = *WSASERVICECLASSINFOW 1194 1195 #ifdef UNICODE 1196 TypeDef WSASERVICECLASSINFO = WSASERVICECLASSINFOW 1197 TypeDef PWSASERVICECLASSINFO = PWSASERVICECLASSINFOW 1198 TypeDef LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOW 1199 #else 1200 TypeDef WSASERVICECLASSINFO = WSASERVICECLASSINFOA 1201 TypeDef PWSASERVICECLASSINFO = PWSASERVICECLASSINFOA 1202 TypeDef LPWSASERVICECLASSINFO = LPWSASERVICECLASSINFOA 1203 #endif 1204 1205 Type WSANAMESPACE_INFOA 1206 NSProviderId As GUID 1207 dwNameSpace As DWord 1208 fActive As BOOL 1209 dwVersion As DWord 1210 lpszIdentifier As LPSTR 1211 End Type 1212 TypeDef PWSANAMESPACE_INFOA = *WSANAMESPACE_INFOA 1213 TypeDef LPWSANAMESPACE_INFOA = *WSANAMESPACE_INFOA 1214 1215 Type WSANAMESPACE_INFOW 1216 NSProviderId As GUID 1217 dwNameSpace As DWord 1218 fActive As BOOL 1219 dwVersion As DWord 1220 lpszIdentifier As LPWSTR 1221 End Type 1222 TypeDef PWSANAMESPACE_INFOW = *WSANAMESPACE_INFOW 1223 TypeDef LPWSANAMESPACE_INFOW = *WSANAMESPACE_INFOW 1224 1225 #ifdef UNICODE 1226 TypeDef WSANAMESPACE_INFO = WSANAMESPACE_INFOW 1227 TypeDef PWSANAMESPACE_INFO = PWSANAMESPACE_INFOW 1228 TypeDef LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOW 1229 #else 1230 TypeDef WSANAMESPACE_INFO = WSANAMESPACE_INFOA 1231 TypeDef PWSANAMESPACE_INFO = PWSANAMESPACE_INFOA 1232 TypeDef LPWSANAMESPACE_INFO = LPWSANAMESPACE_INFOA 1233 #endif 1234 1235 ' Socket function prototypes 1236 1237 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1238 Declare Function accept Lib "ws2_32" (s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long) As SOCKET 1239 #endif 1240 1241 #ifdef INCL_WINSOCK_API_TYPEDEFS 1242 TypeDef LPFN_ACCEPT = *Function(s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long) As SOCKET 1243 #endif 1244 1245 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1246 Declare Function bind Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, addrlen As Long) As Long 1247 #endif 1248 1249 #ifdef INCL_WINSOCK_API_TYPEDEFS 1250 TypeDef LPFN_BIND = *Function(s As SOCKET, ByRef name As sockaddr, addrlen As Long) As Long 1251 #endif 1252 1253 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1254 Declare Function closesocket Lib "ws2_32" (s As SOCKET) As Long 1255 #endif 1256 1257 #ifdef INCL_WINSOCK_API_TYPEDEFS 1258 TypeDef LPFN_CLOSESOCKET = *Function(s As SOCKET) As Long 1259 #endif 1260 1261 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1262 Declare Function connect Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long) As Long 1263 #endif 1264 1265 #ifdef INCL_WINSOCK_API_TYPEDEFS 1266 TypeDef LPFN_CONNECT = *Function(s As SOCKET, ByRef name As sockaddr, namelen As Long) As Long 1267 #endif 1268 1269 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1270 Declare Function ioctlsocket Lib "ws2_32" (s As SOCKET, cmd As Long, ByRef argp As DWord) As Long 1271 #endif 1272 1273 #ifdef INCL_WINSOCK_API_TYPEDEFS 1274 TypeDef LPFN_IOCTLSOCKET = *Function(s As SOCKET, cmd As Long, ByRef argp As DWord) As Long 1275 #endif 1276 1277 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1278 Declare Function getpeername Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long 1279 #endif 1280 1281 #ifdef INCL_WINSOCK_API_TYPEDEFS 1282 TypeDef LPFN_GETPEERNAME = *Function(s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long 1283 #endif 1284 1285 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1286 Declare Function getsockname Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long 1287 #endif 1288 1289 #ifdef INCL_WINSOCK_API_TYPEDEFS 1290 TypeDef LPFN_GETSOCKNAME = *Function(s As SOCKET, ByRef name As sockaddr, ByRef namelen As Long) As Long 1291 #endif 1292 1293 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1294 Declare Function getsockopt Lib "ws2_32" (s As SOCKET, level As Long, optname As Long, optval As *Byte, ByRef optlen As Long) As Long 1295 #endif 1296 1297 #ifdef INCL_WINSOCK_API_TYPEDEFS 1298 TypeDef LPFN_GETSOCKOPT = *Function(s As SOCKET, level As Long, optname As Long, optval As *Byte, ByRef optlen As Long) As Long 1299 #endif 1300 1301 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1302 Declare Function htonl Lib "ws2_32" (hostlong As DWord) As DWord 1303 #endif 1304 1305 #ifdef INCL_WINSOCK_API_TYPEDEFS 1306 TypeDef LPFN_HTONL = *Function(hostlong As DWord) As DWord 1307 #endif 1308 1309 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1310 Declare Function htons Lib "ws2_32" (hostshort As Word) As Word 1311 #endif 1312 1313 #ifdef INCL_WINSOCK_API_TYPEDEFS 1314 TypeDef LPFN_HTONS = *Function(hostshort As Word) As Word 1315 #endif 1316 1317 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1318 Declare Function inet_addr Lib "ws2_32" (cp As *Byte) As DWord 1319 #endif 1320 1321 #ifdef INCL_WINSOCK_API_TYPEDEFS 1322 TypeDef LPFN_INET_ADDR = *Function(cp As *Byte) As DWord 1323 #endif 1324 1325 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1326 Declare Function inet_ntoa Lib "ws2_32" (in As in_addr) As *Byte 1327 #endif 1328 1329 #ifdef INCL_WINSOCK_API_TYPEDEFS 1330 TypeDef LPFN_INET_NTOA = *Function(in As in_addr) As *Byte 1331 #endif 1332 1333 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1334 Declare Function listen Lib "ws2_32" (s As SOCKET, backlog As Long) As Long 1335 #endif 1336 1337 #ifdef INCL_WINSOCK_API_TYPEDEFS 1338 TypeDef LPFN_LISTEN = *Function(s As SOCKET, backlog As Long) As Long 1339 #endif 1340 1341 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1342 Declare Function ntohl Lib "ws2_32" (netlong As DWord) As DWord 1343 #endif 1344 1345 #ifdef INCL_WINSOCK_API_TYPEDEFS 1346 TypeDef LPFN_NTOHL = *Function(netlong As DWord) As DWord 1347 #endif 1348 1349 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1350 Declare Function ntohs Lib "ws2_32" (netshort As Word) As Word 1351 #endif 1352 1353 #ifdef INCL_WINSOCK_API_TYPEDEFS 1354 TypeDef LPFN_NTOHS = *Function(netshort As Word) As Word 1355 #endif 1356 1357 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1358 Declare Function recv Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long 1359 #endif 1360 1361 #ifdef INCL_WINSOCK_API_TYPEDEFS 1362 TypeDef LPFN_RECV = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long 1363 #endif 1364 1365 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1366 Declare Function recvfrom Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef from As sockaddr, ByRef fromlen As Long) As Long 1367 #endif 1368 1369 #ifdef INCL_WINSOCK_API_TYPEDEFS 1370 TypeDef LPFN_RECVFROM = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef from As sockaddr, ByRef fromlen As Long) As Long 1371 #endif 1372 1373 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1374 Declare Function select Lib "ws2_32" (nfds As Long, ByRef readfds As fd_set, ByRef writefds As fd_set, ByRef exceptfds As fd_set, ByRef timeout As timeval) As Long 1375 #endif 1376 1377 #ifdef INCL_WINSOCK_API_TYPEDEFS 1378 TypeDef LPFN_SELECT = *Function(nfds As Long, ByRef readfds As fd_set, ByRef writefds As fd_set, ByRef exceptfds As fd_set, ByRef timeout As timeval) As Long 1379 #endif 1380 1381 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1382 Declare Function send Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long 1383 #endif 1384 1385 #ifdef INCL_WINSOCK_API_TYPEDEFS 1386 TypeDef LPFN_SEND = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long) As Long 1387 #endif 1388 1389 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1390 Declare Function sendto Lib "ws2_32" (s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef to_ As sockaddr, tolen As Long) As Long 1391 #endif 1392 1393 #ifdef INCL_WINSOCK_API_TYPEDEFS 1394 TypeDef LPFN_SENDTO = *Function(s As SOCKET, buf As *Byte, len As Long, flags As Long, ByRef to_ As sockaddr, tolen As Long) As Long 1395 #endif 1396 1397 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1398 Declare Function setsockopt Lib "ws2_32" (s As SOCKET, level As Long, optname As Long, optval As *Byte, optlen As Long) As Long 1399 #endif 1400 1401 #ifdef INCL_WINSOCK_API_TYPEDEFS 1402 TypeDef LPFN_SETSOCKOPT = *Function(s As SOCKET, level As Long, optname As Long, optval As *Byte, optlen As Long) As Long 1403 #endif 1404 1405 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1406 Declare Function shutdown Lib "ws2_32" (s As SOCKET, how As Long) As Long 1407 #endif 1408 1409 #ifdef INCL_WINSOCK_API_TYPEDEFS 1410 TypeDef LPFN_SHUTDOWN = *Function(s As SOCKET, how As Long) As Long 1411 #endif 1412 1413 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1414 Declare Function socket Lib "ws2_32" (af As Long, type_ As Long, protocol As Long) As SOCKET 1415 #endif 1416 1417 #ifdef INCL_WINSOCK_API_TYPEDEFS 1418 TypeDef LPFN_SOCKET = *Function(af As Long, type_ As Long, protocol As Long) As SOCKET 1419 #endif 1420 1421 ' Database function prototypes 1422 1423 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1424 Declare Function gethostbyaddr Lib "ws2_32" (addr As PCSTR, len As Long, type_ As Long) As *hostent 1425 #endif 1426 1427 #ifdef INCL_WINSOCK_API_TYPEDEFS 1428 TypeDef LPFN_GETHOSTBYADDR = *Function(addr As PCSTR, len As Long, type_ As Long) As *hostent 1429 #endif 1430 1431 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1432 Declare Function gethostbyname Lib "ws2_32" (name As PCSTR) As *hostent 1433 #endif 1434 1435 #ifdef INCL_WINSOCK_API_TYPEDEFS 1436 TypeDef LPFN_GETHOSTBYNAME = *Function(name As PCSTR) As *hostent 1437 #endif 1438 1439 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1440 Declare Function gethostname Lib "ws2_32" (name As PCSTR, namelen As Long) As Long 1441 #endif 1442 1443 #ifdef INCL_WINSOCK_API_TYPEDEFS 1444 TypeDef LPFN_GETHOSTNAME = *Function(name As PCSTR, namelen As Long) As Long 1445 #endif 1446 1447 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1448 Declare Function getservbyport Lib "ws2_32" (port As Long, proto As PCSTR) As *servent 1449 #endif 1450 1451 #ifdef INCL_WINSOCK_API_TYPEDEFS 1452 TypeDef LPFN_GETSERVBYPORT = *Function(port As Long, proto As PCSTR) As *servent 1453 #endif 1454 1455 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1456 Declare Function getservbyname Lib "ws2_32" (name As PCSTR, proto As PCSTR) As *servent 1457 #endif 1458 1459 #ifdef INCL_WINSOCK_API_TYPEDEFS 1460 TypeDef LPFN_GETSERVBYNAME = *Function(name As PCSTR, proto As PCSTR) As *servent 1461 #endif 1462 1463 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1464 Declare Function getprotobynumber Lib "ws2_32" (number As Long) As *protoent 1465 #endif 1466 1467 #ifdef INCL_WINSOCK_API_TYPEDEFS 1468 TypeDef LPFN_GETPROTOBYNUMBER = *Function(number As Long) As *protoent 1469 #endif 1470 1471 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1472 Declare Function getprotobyname Lib "ws2_32" (name As PCSTR) As *protoent 1473 #endif 1474 1475 #ifdef INCL_WINSOCK_API_TYPEDEFS 1476 TypeDef LPFN_GETPROTOBYNAME = (name As PCSTR) As *protoent 1477 #endif 1478 1479 ' Microsoft Windows Extension function prototypes 1480 1481 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1482 Declare Function WSAStartup Lib "ws2_32" (wVersionRequested As Word, ByRef WSAData As WSADATA) As Long 1483 #endif 1484 1485 #ifdef INCL_WINSOCK_API_TYPEDEFS 1486 TypeDef LPFN_WSASTARTUP = *Function(wVersionRequested As Word, ByRef WSAData As WSADATA) As Long 1487 #endif 1488 1489 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1490 Declare Function WSACleanup Lib "ws2_32" () As Long 1491 #endif 1492 1493 #ifdef INCL_WINSOCK_API_TYPEDEFS 1494 TypeDef LPFN_WSACLEANUP = *Function() As Long 1495 #endif 1496 1497 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1498 Declare Sub WSASetLastError Lib "ws2_32" (iError As Long) 1499 #endif 1500 1501 #ifdef INCL_WINSOCK_API_TYPEDEFS 1502 TypeDef LPFN_WSASETLASTERROR = *Sub(iError As Long) 1503 #endif 1504 1505 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1506 Declare Function WSAGetLastError Lib "ws2_32" () As Long 1507 #endif 1508 1509 #ifdef INCL_WINSOCK_API_TYPEDEFS 1510 TypeDef LPFN_WSAGETLASTERROR = *Function() As Long 1511 #endif 1512 1513 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1514 Declare Function WSAIsBlocking Lib "ws2_32" () As BOOL 1515 #endif 1516 1517 #ifdef INCL_WINSOCK_API_TYPEDEFS 1518 TypeDef LPFN_WSAISBLOCKING = *Function() As BOOL 1519 #endif 1520 1521 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1522 Declare Function WSAUnhookBlockingHook Lib "ws2_32" () As Long 1523 #endif 1524 1525 #ifdef INCL_WINSOCK_API_TYPEDEFS 1526 TypeDef LPFN_WSAUNHOOKBLOCKINGHOOK = *Function() As Long 1527 #endif 1528 1529 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1530 Declare Function WSASetBlockingHook Lib "ws2_32" (lpBlockFunc As FARPROC) As FARPROC 1531 1532 #endif 1533 1534 #ifdef INCL_WINSOCK_API_TYPEDEFS 1535 TypeDef LPFN_WSASETBLOCKINGHOOK = *Function(lpBlockFunc As FARPROC) As FARPROC 1536 #endif 1537 1538 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1539 Declare Function WSACancelBlockingCall Lib "ws2_32" () As Long 1540 #endif 1541 1542 #ifdef INCL_WINSOCK_API_TYPEDEFS 1543 TypeDef LPFN_WSACANCELBLOCKINGCALL = *Function() As Long 1544 #endif 1545 1546 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1547 Declare Function WSAAsyncGetServByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1548 #endif 1549 1550 #ifdef INCL_WINSOCK_API_TYPEDEFS 1551 TypeDef LPFN_WSAASYNCGETSERVBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1552 #endif 1553 1554 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1555 Declare Function WSAAsyncGetServByPort Lib "ws2_32" (hwnd As HWND, msg As DWord, port As Long, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1556 #endif 1557 1558 #ifdef INCL_WINSOCK_API_TYPEDEFS 1559 TypeDef LPFN_WSAASYNCGETSERVBYPORT = *Function(hwnd As HWND, msg As DWord, port As Long, proto As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1560 #endif 1561 1562 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1563 Declare Function WSAAsyncGetProtoByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1564 #endif 1565 1566 #ifdef INCL_WINSOCK_API_TYPEDEFS 1567 TypeDef LPFN_WSAASYNCGETPROTOBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1568 #endif 1569 1570 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1571 Declare Function WSAAsyncGetProtoByNumber Lib "ws2_32" (hwnd As HWND, msg As DWord, number As Long, buf As *Byte, buflen As Long) As HANDLE 1572 #endif 1573 1574 #ifdef INCL_WINSOCK_API_TYPEDEFS 1575 TypeDef LPFN_WSAASYNCGETPROTOBYNUMBER = *Function(hwnd As HWND, msg As DWord, number As Long, buf As *Byte, buflen As Long) As HANDLE 1576 #endif 1577 1578 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1579 Declare Function WSAAsyncGetHostByName Lib "ws2_32" (hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1580 #endif 1581 1582 #ifdef INCL_WINSOCK_API_TYPEDEFS 1583 TypeDef LPFN_WSAASYNCGETHOSTBYNAME = *Function(hwnd As HWND, msg As DWord, name As PCSTR, buf As *Byte, buflen As Long) As HANDLE 1584 #endif 1585 1586 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1587 Declare Function WSAAsyncGetHostByAddr Lib "ws2_32" (hwnd As HWND, msg As DWord, addr As PCSTR, len As Long, type_ As Long, buf As *Byte, buflen As Long) As HANDLE 1588 #endif 1589 1590 #ifdef INCL_WINSOCK_API_TYPEDEFS 1591 TypeDef LPFN_WSAASYNCGETHOSTBYADDR = *Function(hwnd As HWND, msg As DWord, addr As PCSTR, len As Long, type_ As Long, buf As *Byte, buflen As Long) As HANDLE 1592 #endif 1593 1594 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1595 Declare Function WSACancelAsyncRequest Lib "ws2_32" (hAsyncTaskHandle As HANDLE) As Long 1596 #endif 1597 1598 #ifdef INCL_WINSOCK_API_TYPEDEFS 1599 TypeDef LPFN_WSACANCELASYNCREQUEST = *Function(hAsyncTaskHandle As HANDLE) As Long 1600 #endif 1601 1602 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1603 Declare Function WSAAsyncSelect Lib "ws2_32" (s As SOCKET, hwnd As HWND, msg As DWord, Event As Long) As Long 1604 #endif 1605 1606 #ifdef INCL_WINSOCK_API_TYPEDEFS 1607 TypeDef LPFN_WSAASYNCSELECT = *Function(s As SOCKET, hwnd As HWND, msg As DWord, Event As Long) As Long 1608 #endif 1609 1610 /* WinSock 2 API new function prototypes */ 1611 1612 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1613 Declare Function WSAAccept Lib "ws2_32" (s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long, lpfnCondition As LPCONDITIONPROC, CallbackData As ULONG_PTR) As SOCKET 1614 #endif 1615 1616 #ifdef INCL_WINSOCK_API_TYPEDEFS 1617 TypeDef LPFN_WSAACCEPT = *Function(s As SOCKET, ByRef addr As sockaddr, ByRef addrlen As Long, lpfnCondition As LPCONDITIONPROC, CallbackData As ULONG_PTR) As SOCKET 1618 #endif 1619 1620 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1621 Declare Function WSACloseEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL 1622 #endif 1623 1624 #ifdef INCL_WINSOCK_API_TYPEDEFS 1625 TypeDef LPFN_WSACLOSEEVENT = *Function(hEvent As WSAEVENT) As BOOL 1626 #endif 1627 1628 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1629 Declare Function WSAConnect Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, ByRef SQOS As QOS, ByRef GQOS As QOS) As Long 1630 #endif 1631 1632 #ifdef INCL_WINSOCK_API_TYPEDEFS 1633 TypeDef LPFN_WSACONNECT = *Functions As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, ByRef SQOS As QOS, ByRef GQOS As QOS) As Long 1634 #endif 1635 1636 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1637 Declare Function WSACreateEvent Lib "ws2_32" () As WSAEVENT 1638 #endif 1639 1640 #ifdef INCL_WINSOCK_API_TYPEDEFS 1641 TypeDef LPFN_WSACREATEEVENT = *Function() As WSAEVENT 1642 #endif 1643 1644 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1645 Declare Function WSADuplicateSocketA Lib "ws2_32" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA) As Long 1646 Declare Function WSADuplicateSocketW Lib "ws2_32" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOW) As Long 1647 #ifdef UNICODE 1648 Declare Function WSADuplicateSocket Lib "ws2_32" Alias "WSADuplicateSocketW" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFO) As Long 1649 #else 1650 Declare Function WSADuplicateSocket Lib "ws2_32" Alias "WSADuplicateSocketA" (s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFO) As Long 1651 #endif 1652 #endif 1653 1654 #ifdef INCL_WINSOCK_API_TYPEDEFS 1655 TypeDef LPFN_WSADUPLICATESOCKETA = *Function(s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA) As Long 1656 TypeDef LPFN_WSADUPLICATESOCKETW = *Function(s As SOCKET, ProcessId As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOW) As Long 1657 #ifdef UNICODE 1658 TypeDef LPFN_WSADUPLICATESOCKET = LPFN_WSADUPLICATESOCKETW 1659 #else 1660 TypeDef LPFN_WSADUPLICATESOCKET = LPFN_WSADUPLICATESOCKETA 1661 #endif 1662 #endif 1663 1664 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1665 Declare Function WSAEnumNetworkEvents Lib "ws2_32" (s As SOCKET, hEventObject As WSAEVENT, ByRef NetworkEvents As WSANETWORKEVENTS) As Long 1666 #endif 1667 1668 #ifdef INCL_WINSOCK_API_TYPEDEFS 1669 TypeDef LPFN_WSAENUMNETWORKEVENTS = *Function(s As SOCKET, hEventObject As WSAEVENT, ByRef NetworkEvents As WSANETWORKEVENTS) As Long 1670 #endif 1671 1672 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1673 Declare Function WSAEnumProtocolsA Lib "ws2_32" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOA, ByRef BufferLength As DWord) As Long 1674 Declare Function WSAEnumProtocolsW Lib "ws2_32" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOW, ByRef BufferLength As DWord) As Long 1675 #ifdef UNICODE 1676 Declare Function WSAEnumProtocols Lib "ws2_32" Alias "WSAEnumProtocolsW" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFO, ByRef BufferLength As DWord) As Long 1677 #else 1678 Declare Function WSAEnumProtocols Lib "ws2_32" Alias "WSAEnumProtocolsA" (Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFO, ByRef BufferLength As DWord) As Long 1679 #endif 1680 #endif 1681 1682 #ifdef INCL_WINSOCK_API_TYPEDEFS 1683 TypeDef LPFN_WSAENUMPROTOCOLSA = *Function(Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOA, ByRef BufferLength As DWord) As Long 1684 TypeDef LPFN_WSAENUMPROTOCOLSW = *Function(Protocols As *Long, ByRef ProtocolBuffer As WSAPROTOCOL_INFOW, ByRef BufferLength As DWord) As Long 1685 #ifdef UNICODE 1686 TypeDef LPFN_WSAENUMPROTOCOLS = LPFN_WSAENUMPROTOCOLSW 1687 #else 1688 TypeDef LPFN_WSAENUMPROTOCOLS = LPFN_WSAENUMPROTOCOLSA 1689 #endif 1690 #endif 1691 1692 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1693 Declare Function WSAEventSelect Lib "ws2_32" (s As SOCKET, hEventObject As WSAEVENT, NetworkEvents As Long) As Long 1694 #endif 1695 1696 #ifdef INCL_WINSOCK_API_TYPEDEFS 1697 TypeDef LPFN_WSAEVENTSELECT = *Function(s As SOCKET, hEventObject As WSAEVENT, NetworkEvents As Long) As Long 1698 #endif 1699 1700 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1701 Declare Function WSAGetOverlappedResult Lib "ws2_32" (s As SOCKET, ByRef Overlapped As WSAOVERLAPPED, ByRef cbTransfer As DWord, Wait As BOOL, ByRef Flags As DWord) As BOOL 1702 #endif 1703 1704 #ifdef INCL_WINSOCK_API_TYPEDEFS 1705 TypeDef LPFN_WSAGETOVERLAPPEDRESULT = *Function(s As SOCKET, ByRef Overlapped As WSAOVERLAPPED, ByRef cbTransfer As DWord, Wait As BOOL, ByRef Flags As DWord) As BOOL 1706 #endif 1707 1708 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1709 Declare Function WSAGetQOSByName Lib "ws2_32" (s As SOCKET, ByRef QOSName As WSABUF, ByRef qos As QOS) As BOOL 1710 #endif 1711 1712 #ifdef INCL_WINSOCK_API_TYPEDEFS 1713 TypeDef LPFN_WSAGETQOSBYNAME = *Function(s As SOCKET, ByRef QOSName As WSABUF, ByRef qos As QOS) As BOOL 1714 #endif 1715 1716 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1717 Declare Function WSAHtonl Lib "ws2_32" (s As SOCKET, hostlong As DWord, ByRef netlong As DWord) As Long 1718 #endif 1719 1720 #ifdef INCL_WINSOCK_API_TYPEDEFS 1721 TypeDef LPFN_WSAHTONL = *Function(s As SOCKET, hostlong As DWord, ByRef netlong As DWord) As Long 1722 #endif 1723 1724 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1725 Declare Function WSAHtons Lib "ws2_32" (s As SOCKET, hostshort As Word, ByRef netshort As Word) As Long 1726 #endif 1727 1728 #ifdef INCL_WINSOCK_API_TYPEDEFS 1729 TypeDef LPFN_WSAHTONS = *Function(s As SOCKET, hostshort As Word, ByRef netshort As Word) As Long 1730 #endif 1731 1732 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1733 Declare Function WSAIoctl Lib "ws2_32" (s As SOCKET, IoControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, pvOutBuffer As VoidPtr, cbOutBuffer As DWord, 1734 ByRef cbBytesReturned As DWord, ByRef Overlapped As WSAOVERLAPPED, pCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1735 #endif 1736 1737 #ifdef INCL_WINSOCK_API_TYPEDEFS 1738 TypeDef LPFN_WSAIOCTL = *Function(s As SOCKET, IoControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, pvOutBuffer As VoidPtr, cbOutBuffer As DWord, 1739 ByRef cbBytesReturned As DWord, ByRef Overlapped As WSAOVERLAPPED, pCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1740 #endif 1741 1742 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1743 Declare Function WSAJoinLeaf Lib "ws2_32" (s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, 1744 ByRef SQOS As QOS, ByRef GQOS AS QOS, Flags As DWord) As SOCKET 1745 #endif 1746 1747 #ifdef INCL_WINSOCK_API_TYPEDEFS 1748 TypeDef LPFN_WSAJOINLEAF = *Function(s As SOCKET, ByRef name As sockaddr, namelen As Long, ByRef CallerData As WSABUF, ByRef CalleeData As WSABUF, 1749 ByRef SQOS As QOS, ByRef GQOS AS QOS, Flags As DWord) As SOCKET 1750 #endif 1751 1752 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1753 Declare Function WSANtohl Lib "ws2_32" (s As SOCKET, netlong As DWord, ByRef hostlong As DWord) As Long 1754 #endif 1755 1756 #ifdef INCL_WINSOCK_API_TYPEDEFS 1757 TypeDef LPFN_WSANTOHL = *Function(s As SOCKET, netlong As DWord, ByRef hostlong As DWord) As Long 1758 #endif 1759 1760 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1761 Declare Function WSANtohs Lib "ws2_32" (s As SOCKET, netshort As Word, ByRef hostshort As Word) As Long 1762 #endif 1763 1764 #ifdef INCL_WINSOCK_API_TYPEDEFS 1765 TypeDef LPFN_WSANTOHS = *Function(s As SOCKET, netshort As Word, ByRef hostshort As Word) As Long 1766 #endif 1767 1768 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1769 Declare Function WSARecv Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord, 1770 ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1771 #endif 1772 1773 #ifdef INCL_WINSOCK_API_TYPEDEFS 1774 TypeDef LPFN_WSARECV = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord, 1775 ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1776 #endif 1777 1778 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1779 Declare Function WSARecvDisconnect Lib "ws2_32" (s As SOCKET, ByRef InboundDisconnectData As WSABUF) As Long 1780 #endif 1781 1782 #ifdef INCL_WINSOCK_API_TYPEDEFS 1783 TypeDef LPFN_WSARECVDISCONNECT = *Function(s As SOCKET, ByRef InboundDisconnectData As WSABUF) As Long 1784 #endif 1785 1786 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1787 Declare Function WSARecvFrom Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord, 1788 ByRef From As sockaddr, ByRef Fromlen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1789 #endif 1790 1791 #ifdef INCL_WINSOCK_API_TYPEDEFS 1792 TypeDef LPFN_WSARECVFROM = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesRecvd As DWord, ByRef Flags As DWord, 1793 ByRef From As sockaddr, ByRef Fromlen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1794 #endif 1795 1796 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1797 Declare Function WSAResetEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL 1798 #endif 1799 1800 #ifdef INCL_WINSOCK_API_TYPEDEFS 1801 TypeDef LPFN_WSARESETEVENT = *Function(hEvent As WSAEVENT) As BOOL 1802 #endif 1803 1804 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1805 Declare Function WSASend Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord, 1806 ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1807 #endif 1808 1809 #ifdef INCL_WINSOCK_API_TYPEDEFS 1810 TypeDef LPFN_WSASEND = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord, 1811 ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1812 #endif 1813 1814 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1815 Declare Function WSASendDisconnect Lib "ws2_32" (s As SOCKET, ByRef OutboundDisconnectData As WSABUF) As Long 1816 #endif 1817 1818 #ifdef INCL_WINSOCK_API_TYPEDEFS 1819 TypeDef LPFN_WSASENDDISCONNECT = *Function(s As SOCKET, ByRef OutboundDisconnectData As WSABUF) As Long 1820 #endif 1821 1822 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1823 Declare Function WSASendTo Lib "ws2_32" (s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord, 1824 ByRef To_ As sockaddr, ToLen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1825 #endif 1826 1827 #ifdef INCL_WINSOCK_API_TYPEDEFS 1828 TypeDef LPFN_WSASENDTO = *Function(s As SOCKET, ByRef Buffers As WSABUF, BufferCount As DWord, ByRef NumberOfBytesSent As DWord, ByRef Flags As DWord, 1829 ByRef To_ As sockaddr, ToLen As Long, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 1830 #endif 1831 1832 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1833 Declare Function WSASetEvent Lib "ws2_32" (hEvent As WSAEVENT) As BOOL 1834 #endif 1835 1836 #ifdef INCL_WINSOCK_API_TYPEDEFS 1837 TypeDef LPFN_WSASETEVENT = *Function(hEvent As WSAEVENT) As BOOL 1838 #endif 1839 1840 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1841 Declare Function WSASocketA Lib "ws2_32" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, g As GROUP, Flags As DWord) As SOCKET 1842 Declare Function WSASocketW Lib "ws2_32" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, g As GROUP, Flags As DWord) As SOCKET 1843 #ifdef UNICODE 1844 Declare Function WSASocket Lib "ws2_32" Alias "WSASocketW" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFO, g As GROUP, Flags As DWord) As SOCKET 1845 #else 1846 Declare Function WSASocket Lib "ws2_32" Alias "WSASocketA" (af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFO, g As GROUP, Flags As DWord) As SOCKET 1847 #endif 1848 #endif 1849 1850 #ifdef INCL_WINSOCK_API_TYPEDEFS 1851 TypeDef LPFN_WSASOCKETA = *Function(af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, g As GROUP, Flags As DWord) As SOCKET 1852 TypeDef LPFN_WSASOCKETW = *Function(af As Long, type_ As Long, protocol As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, g As GROUP, Flags As DWord) As SOCKET 1853 #ifdef UNICODE 1854 TypeDef LPFN_WSASOCKET = LPFN_WSASOCKETW 1855 #else 1856 TypeDef LPFN_WSASOCKET = LPFN_WSASOCKETA 1857 #endif 1858 #endif 1859 1860 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1861 Declare Function WSAWaitForMultipleEvents Lib "ws2_32" (cEvents As DWord, phEvents As *WSAEVENT, WaitAll As BOOL, Timeout As DWord, Alertable As BOOL) As DWord 1862 #endif 1863 1864 #ifdef INCL_WINSOCK_API_TYPEDEFS 1865 TypeDef LPFN_WSAWAITFORMULTIPLEEVENTS = *Function(cEvents As DWord, phEvents As *WSAEVENT, WaitAll As BOOL, Timeout As DWord, Alertable As BOOL) As DWord 1866 #endif 1867 1868 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1869 Declare Function WSAAddressToStringA Lib "ws2_32" (ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1870 AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long 1871 Declare Function WSAAddressToStringW Lib "ws2_32" (ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1872 AddressString As PWSTR, ByRef dwAddressStringLength As DWord) As Long 1873 #ifdef UNICODE 1874 Declare Function WSAAddressToString Lib "ws2_32" Alias "WSAAddressToStringW" (ByRef saAddress As SOCKADDR, AddressLength As DWord, 1875 ByRef ProtocolInfo As WSAPROTOCOL_INFO, AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long 1876 #else 1877 Declare Function WSAAddressToString Lib "ws2_32" Alias "WSAAddressToStringA" (ByRef saAddress As SOCKADDR, AddressLength As DWord, 1878 ByRef ProtocolInfo As WSAPROTOCOL_INFO, AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long 1879 #endif 1880 #endif 1881 1882 #ifdef INCL_WINSOCK_API_TYPEDEFS 1883 TypeDef LPFN_WSAADDRESSTOSTRINGA = *Function(ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1884 AddressString As PSTR, ByRef dwAddressStringLength As DWord) As Long 1885 TypeDef LPFN_WSAADDRESSTOSTRINGW = *Function(ByRef saAddress As SOCKADDR, AddressLength As DWord, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1886 AddressString As PWSTR, ByRef dwAddressStringLength As DWord) As Long 1887 #ifdef UNICODE 1888 TypeDef LPFN_WSAADDRESSTOSTRING = LPFN_WSAADDRESSTOSTRINGW 1889 #else 1890 TypeDef LPFN_WSAADDRESSTOSTRING = LPFN_WSAADDRESSTOSTRINGA 1891 #endif 1892 #endif 1893 1894 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1895 Declare Function WSAStringToAddressA Lib "ws2_32" (AddressString As PSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1896 ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1897 Declare Function WSAStringToAddressW Lib "ws2_32" (AddressString As PWSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, 1898 ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1899 #ifdef UNICODE 1900 Declare Function WSAStringToAddress Lib "ws2_32" Alias "WSAStringToAddressW" (AddressString As PSTR, AddressFamily As Long, 1901 ByRef ProtocolInfo As WSAPROTOCOL_INFO, ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1902 #else 1903 Declare Function WSAStringToAddress Lib "ws2_32" Alias "WSAStringToAddressA" (AddressString As PSTR, AddressFamily As Long, 1904 ByRef ProtocolInfo As WSAPROTOCOL_INFO, ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1905 #endif 1906 #endif 1907 1908 #ifdef INCL_WINSOCK_API_TYPEDEFS 1909 TypeDef LPFN_WSASTRINGTOADDRESSA = *Function(AddressString As PSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOA, 1910 ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1911 TypeDef LPFN_WSASTRINGTOADDRESSW = *Function(AddressString As PWSTR, AddressFamily As Long, ByRef ProtocolInfo As WSAPROTOCOL_INFOW, 1912 ByRef Address As SOCKADDR, ByRef AddressLength As Long) As Long 1913 #ifdef UNICODE 1914 TypeDef LPFN_WSASTRINGTOADDRESS = LPFN_WSASTRINGTOADDRESSW 1915 #else 1916 TypeDef LPFN_WSASTRINGTOADDRESS = LPFN_WSASTRINGTOADDRESSA 1917 #endif 1918 #endif 1919 1920 ' Registration and Name Resolution API functions 1921 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1922 Declare Function WSALookupServiceBeginA Lib "ws2_32" (ByRef qsRestrictions As WSAQUERYSETA, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1923 Declare Function WSALookupServiceBeginW Lib "ws2_32" (ByRef qsRestrictions As WSAQUERYSETW, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1924 #ifdef UNICODE 1925 Declare Function WSALookupServiceBegin Lib "ws2_32" Alias "WSALookupServiceBeginW" (ByRef qsRestrictions As WSAQUERYSET, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1926 #else 1927 Declare Function WSALookupServiceBegin Lib "ws2_32" Alias "WSALookupServiceBeginA" (ByRef qsRestrictions As WSAQUERYSET, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1928 #endif 1929 #endif 1930 1931 #ifdef INCL_WINSOCK_API_TYPEDEFS 1932 TypeDef LPFN_WSALOOKUPSERVICEBEGINA = *Function(ByRef qsRestrictions As WSAQUERYSETA, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1933 TypeDef LPFN_WSALOOKUPSERVICEBEGINW = *Function(ByRef qsRestrictions As WSAQUERYSETW, ControlFlags As DWord, ByRef hLookup As HANDLE) As Long 1934 #ifdef UNICODE 1935 TypeDef LPFN_WSALOOKUPSERVICEBEGIN = LPFN_WSALOOKUPSERVICEBEGINW 1936 #else 1937 TypeDef LPFN_WSALOOKUPSERVICEBEGIN = LPFN_WSALOOKUPSERVICEBEGINA 1938 #endif 1939 #endif 1940 1941 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1942 Declare Function WSALookupServiceNextA Lib "ws2_32" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETA) As Long 1943 Declare Function WSALookupServiceNextW Lib "ws2_32" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETW) As Long 1944 #ifdef UNICODE 1945 Declare Function WSALookupServiceNext Lib "ws2_32" Alias "WSALookupServiceNextW" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSET) As Long 1946 #else 1947 Declare Function WSALookupServiceNext Lib "ws2_32" Alias "WSALookupServiceNextA" (hLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSET) As Long 1948 #endif 1949 #endif 1950 1951 #ifdef INCL_WINSOCK_API_TYPEDEFS 1952 TypeDef LPFN_WSALOOKUPSERVICENEXTA = *FunctionhLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETA) As Long 1953 TypeDef LPFN_WSALOOKUPSERVICENEXTW = *FunctionhLookup As HANDLE, ControlFlags As DWord, ByRef BufferLength As DWord, ByRef qsResults As WSAQUERYSETW) As Long 1954 #ifdef UNICODE 1955 TypeDef LPFN_WSALOOKUPSERVICENEXT = LPFN_WSALOOKUPSERVICENEXTW 1956 #else 1957 TypeDef LPFN_WSALOOKUPSERVICENEXT = LPFN_WSALOOKUPSERVICENEXTA 1958 #endif 1959 #endif 1960 1961 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1962 Declare Function WSANSPIoctl Lib "ws2_32" (hLookup As HANDLE, ControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, 1963 pvOutBuffer As VoidPtr, cbOutBuffer As DWord, ByRef cbBytesReturned As DWord, ByRef Completion As WSACOMPLETION) As Long 1964 #endif 1965 1966 #ifdef INCL_WINSOCK_API_TYPEDEFS 1967 TypeDef LPFN_WSANSPIOCTL = *Function(hLookup As HANDLE, ControlCode As DWord, pvInBuffer As VoidPtr, cbInBuffer As DWord, 1968 pvOutBuffer As VoidPtr, cbOutBuffer As DWord, ByRef cbBytesReturned As DWord, ByRef Completion As WSACOMPLETION) As Long 1969 #endif 1970 1971 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1972 Declare Function WSALookupServiceEnd Lib "ws2_32" (hLookup As HANDLE) As Long 1973 #endif 1974 1975 #ifdef INCL_WINSOCK_API_TYPEDEFS 1976 TypeDef LPFN_WSALOOKUPSERVICEEND = *Function(hLookup As HANDLE) As Long 1977 #endif 1978 1979 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 1980 Declare Function WSAInstallServiceClassA Lib "ws2_32" (ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long 1981 Declare Function WSAInstallServiceClassW Lib "ws2_32" (ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long 1982 #ifdef UNICODE 1983 Declare Function WSAInstallServiceClass Lib "ws2_32" Alias "WSAInstallServiceClassW" (ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long 1984 #else 1985 Declare Function WSAInstallServiceClass Lib "ws2_32" Alias "WSAInstallServiceClassA" (ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long 1986 #endif 1987 #endif 1988 1989 #ifdef INCL_WINSOCK_API_TYPEDEFS 1990 TypeDef LPFN_WSAINSTALLSERVICECLASSA = *Function(ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long 1991 TypeDef LPFN_WSAINSTALLSERVICECLASSW = *Function(ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long 1992 #ifdef UNICODE 1993 TypeDef LPFN_WSAINSTALLSERVICECLASS = LPFN_WSAINSTALLSERVICECLASSW 1994 #else 1995 TypeDef LPFN_WSAINSTALLSERVICECLASS = LPFN_WSAINSTALLSERVICECLASSA 1996 #endif 1997 #endif 1998 1999 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2000 Declare Function WSARemoveServiceClass Lib "ws2_32" (ByRef ServiceClassId As GUID) As Long 2001 #endif 2002 2003 #ifdef INCL_WINSOCK_API_TYPEDEFS 2004 TypeDef LPFN_WSAREMOVESERVICECLASS = *Function(ByRef ServiceClassId As GUID) As Long 2005 #endif 2006 2007 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2008 Declare Function WSAGetServiceClassInfoA Lib "ws2_32" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long 2009 Declare Function WSAGetServiceClassInfoW Lib "ws2_32" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long 2010 #ifdef UNICODE 2011 Declare Function WSAGetServiceClassInfo Lib "ws2_32" Alias "WSAGetServiceClassInfoW" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long 2012 #else 2013 Declare Function WSAGetServiceClassInfo Lib "ws2_32" Alias "WSAGetServiceClassInfoA" (ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFO) As Long 2014 #endif 2015 #endif 2016 2017 #ifdef INCL_WINSOCK_API_TYPEDEFS 2018 TypeDef LPFN_WSAGETSERVICECLASSINFOA = *Function(ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOA) As Long 2019 TypeDef LPFN_WSAGETSERVICECLASSINFOW = *Function(ByRef ProviderId As GUID, ByRef ServiceClassId As GUID, ByRef BufSize As DWord, ByRef ServiceClassInfo As WSASERVICECLASSINFOW) As Long 2020 #ifdef UNICODE 2021 TypeDef LPFN_WSAGETSERVICECLASSINFO = LPFN_WSAGETSERVICECLASSINFOW 2022 #else 2023 TypeDef LPFN_WSAGETSERVICECLASSINFO = LPFN_WSAGETSERVICECLASSINFOA 2024 #endif 2025 #endif 2026 2027 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2028 Declare Function WSAEnumNameSpaceProvidersA Lib "ws2_32" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOA) As Long 2029 Declare Function WSAEnumNameSpaceProvidersW Lib "ws2_32" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOW) As Long 2030 #ifdef UNICODE 2031 Declare Function WSAEnumNameSpaceProviders Lib "ws2_32" Alias "WSAEnumNameSpaceProvidersW" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFO) As Long 2032 #else 2033 Declare Function WSAEnumNameSpaceProviders Lib "ws2_32" Alias "WSAEnumNameSpaceProvidersA" (ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFO) As Long 2034 #endif 2035 #endif 2036 2037 #ifdef INCL_WINSOCK_API_TYPEDEFS 2038 TypeDef LPFN_WSAENUMNAMESPACEPROVIDERSA = *Function(ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOA) As Long 2039 TypeDef LPFN_WSAENUMNAMESPACEPROVIDERSW = *Function(ByRef BufferLength As DWord, ByRef nspBuffer As WSANAMESPACE_INFOW) As Long 2040 #ifdef UNICODE 2041 TypeDef LPFN_WSAENUMNAMESPACEPROVIDERS = LPFN_WSAENUMNAMESPACEPROVIDERSW 2042 #else 2043 TypeDef LPFN_WSAENUMNAMESPACEPROVIDERS = LPFN_WSAENUMNAMESPACEPROVIDERSA 2044 #endif 2045 #endif 2046 2047 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2048 Declare Function WSAGetServiceClassNameByClassIdA Lib "ws2_32" (ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long 2049 Declare Function WSAGetServiceClassNameByClassIdW Lib "ws2_32" (ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long 2050 #ifdef UNICODE 2051 Declare Function WSAGetServiceClassNameByClassId Lib "ws2_32" Alias "WSAGetServiceClassNameByClassIdW" (ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long 2052 #else 2053 Declare Function WSAGetServiceClassNameByClassId Lib "ws2_32" Alias "WSAGetServiceClassNameByClassIdA" (ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long 2054 #endif 2055 #endif 2056 2057 #ifdef INCL_WINSOCK_API_TYPEDEFS 2058 TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA = *Function(ByRef ServiceClassId As GUID, ServiceClassName As PSTR, ByRef BufferLength As DWord) As Long 2059 TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW = *Function(ByRef ServiceClassId As GUID, ServiceClassName As PWSTR, ByRef BufferLength As DWord) As Long 2060 #ifdef UNICODE 2061 TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSID = LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDW 2062 #else 2063 TypeDef LPFN_WSAGETSERVICECLASSNAMEBYCLASSID = LPFN_WSAGETSERVICECLASSNAMEBYCLASSIDA 2064 #endif 2065 #endif 2066 2067 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2068 Declare Function WSASetServiceA Lib "ws2_32" (ByRef qsRegInfo As WSAQUERYSETA, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2069 Declare Function WSASetServiceW Lib "ws2_32" (ByRef qsRegInfo As WSAQUERYSETW, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2070 #ifdef UNICODE 2071 Declare Function WSASetService Lib "ws2_32" Alias "WSASetServiceW" (ByRef qsRegInfo As WSAQUERYSET, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2072 #else 2073 Declare Function WSASetService Lib "ws2_32" Alias "WSASetServiceA" (ByRef qsRegInfo As WSAQUERYSET, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2074 #endif 2075 #endif 2076 2077 #ifdef INCL_WINSOCK_API_TYPEDEFS 2078 TypeDef LPFN_WSASETSERVICEA = *Function(ByRef qsRegInfo As WSAQUERYSETA, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2079 TypeDef LPFN_WSASETSERVICEW = *Function(ByRef qsRegInfo As WSAQUERYSETW, essoperation As WSAESETSERVICEOP, ControlFlags As DWord) As Long 2080 #ifdef UNICODE 2081 TypeDef LPFN_WSASETSERVICE = LPFN_WSASETSERVICEW 2082 #else 2083 TypeDef LPFN_WSASETSERVICE = LPFN_WSASETSERVICEA 2084 #endif 2085 #endif 2086 2087 #ifndef NO_INCL_WINSOCK_API_PROTOTYPES 2088 Declare Function WSAProviderConfigChange Lib "ws2_32" (ByRef NotificationHandle As HANDLE, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 2089 #endif 2090 2091 #ifdef INCL_WINSOCK_API_TYPEDEFS 2092 TypeDef LPFN_WSAPROVIDERCONFIGCHANGE = *Function(ByRef NotificationHandle As HANDLE, ByRef Overlapped As WSAOVERLAPPED, lpCompletionRoutine As LPWSAOVERLAPPED_COMPLETION_ROUTINE) As Long 2093 #endif 2094 2095 ' Microsoft Windows Extended data types 2096 TypeDef SOCKADDR_IN = sockaddr_in 2097 TypeDef PSOCKADDR_IN = *sockaddr_in 2098 TypeDef LPSOCKADDR_IN = *sockaddr_in 2099 2100 TypeDef LINGER = linger 2101 TypeDef PLINGER = *linger 2102 TypeDef LPLINGER = *linger 2103 2104 TypeDef IN_ADDR = in_addr 2105 TypeDef PIN_ADDR = *in_addr 2106 TypeDef LPIN_ADDR = *in_addr 2107 2108 TypeDef FD_SET = fd_set 2109 TypeDef PFD_SET = *fd_set 2110 TypeDef LPFD_SET = *fd_set 2111 2112 TypeDef HOSTENT = hostent 2113 TypeDef PHOSTENT = *hostent 2114 TypeDef LPHOSTENT = *hostent 2115 2116 TypeDef SERVENT = servent 2117 TypeDef PSERVENT = *servent 2118 TypeDef LPSERVENT = *servent 2119 2120 TypeDef PROTOENT = protoent 2121 TypeDef PPROTOENT = *protoent 2122 TypeDef LPPROTOENT = *protoent 2123 2124 TypeDef TIMEVAL = timeval 2125 TypeDef PTIMEVAL = *timeval 2126 TypeDef LPTIMEVAL = *timeval 2127 2128 ' Windows message parameter composition and decomposition macros. 2129 Const WSAMAKEASYNCREPLY(buflen, error) = MAKELONG(buflen, error) 2130 Const WSAMAKESELECTREPLY(event, error) = MAKELONG(event, error) 2131 Const WSAGETASYNCBUFLEN(lParam) = LOWORD(lParam) 2132 Const WSAGETASYNCERROR(lParam) = HIWORD(lParam) 2133 Const WSAGETSELECTEVENT(lParam) = LOWORD(lParam) 2134 Const WSAGETSELECTERROR(lParam) = HIWORD(lParam) 2135 2136 #ifdef IPV6STRICT 2137 '#include <wsipv6ok.ab> 2138 #endif 2139 2140 #endif -
Include/ole2.ab
r1 r42 69 69 70 70 #include <objbase.sbp> 71 '#include <oleauto.h>71 #include <oleauto.ab> 72 72 73 73 ' View OBJECT Error Codes -
Include/windows/WindowHandle.sbp
r1 r42 16 16 hwnd = wnd.hwnd 17 17 End Sub 18 /* 18 19 19 Sub Operator =(hwndNew As HWND) 20 20 hwnd = hwndNew 21 21 End Sub 22 */ 22 23 23 Function HWnd() As HWND 24 24 Return hwnd 25 25 End Function 26 26 27 27 Function Operator() As HWND 28 28 Return hwnd … … 60 60 Return DrawMenuBar(hwnd) 61 61 End Function 62 62 63 63 Function EnableScrollBar(SBFlags As DWord, arrows As DWord) As BOOL 64 64 Return EnableScrollBar(hwnd, SBFlags, arrows) … … 212 212 Return InvalidateRect(hwnd, ByVal 0, erace) 213 213 End Function 214 214 215 215 Function Invalidate() As BOOL 216 216 Return InvalidateRect(hwnd, ByVal 0, TRUE) … … 360 360 Return SetDlgItemText(hwnd, idDlgItem, psz) 361 361 End Function 362 362 363 363 Function SetCapture() As HWND 364 364 Return SetCapture(hwnd) As HWND
Note:
See TracChangeset
for help on using the changeset viewer.