10月 242012
 
Locale ▾ Language
code
LCID
string
LCID
Decimal
LCID
Hexadecimal
Codepage
Afrikaans af af 1078 436 1252
Albanian sq sq 1052 1250
Amharic am am 1118
Arabic – Algeria ar ar-dz 5121 1401 1256
Arabic – Bahrain ar ar-bh 15361 1256
Arabic – Egypt ar ar-eg 3073 1256
Arabic – Iraq ar ar-iq 2049 801 1256
Arabic – Jordan ar ar-jo 11265 1256
Arabic – Kuwait ar ar-kw 13313 3401 1256
Arabic – Lebanon ar ar-lb 12289 3001 1256
Arabic – Libya ar ar-ly 4097 1001 1256
Arabic – Morocco ar ar-ma 6145 1801 1256
Arabic – Oman ar ar-om 8193 2001 1256
Arabic – Qatar ar ar-qa 16385 4001 1256
Arabic – Saudi Arabia ar ar-sa 1025 401 1256
Arabic – Syria ar ar-sy 10241 2801 1256
Arabic – Tunisia ar ar-tn 7169 1256
Arabic – United Arab Emirates ar ar-ae 14337 3801 1256
Arabic – Yemen ar ar-ye 9217 2401 1256
Armenian hy hy 1067
Assamese as as 1101
Azeri – Cyrillic az az-az 2092 1251
Azeri – Latin az az-az 1068 1254
Basque eu eu 1069 1252
Belarusian be be 1059 423 1251
Bengali – Bangladesh bn bn 2117 845
Bengali – India bn bn 1093 445
Bosnian bs bs 5146
Bulgarian bg bg 1026 402 1251
Burmese my my 1109 455
Catalan ca ca 1027 403 1252
Chinese – China zh zh-cn 2052 804
Chinese – Hong Kong SAR zh zh-hk 3076
Chinese – Macau SAR zh zh-mo 5124 1404
Chinese – Singapore zh zh-sg 4100 1004
Chinese – Taiwan zh zh-tw 1028 404
Croatian hr hr 1050 1250
Czech cs cs 1029 405 1250
Danish da da 1030 406 1252
Divehi; Dhivehi; Maldivian dv dv 1125 465
Dutch – Belgium nl nl-be 2067 813 1252
Dutch – Netherlands nl nl-nl 1043 413 1252
Edo 1126 466
English – Australia en en-au 3081 1252
English – Belize en en-bz 10249 2809 1252
English – Canada en en-ca 4105 1009 1252
English – Caribbean en en-cb 9225 2409 1252
English – Great Britain en en-gb 2057 809 1252
English – India en en-in 16393 4009
English – Ireland en en-ie 6153 1809 1252
English – Jamaica en en-jm 8201 2009 1252
English – New Zealand en en-nz 5129 1409 1252
English – Phillippines en en-ph 13321 3409 1252
English – Southern Africa en en-za 7177 1252
English – Trinidad en en-tt 11273 1252
English – United States en en-us 1033 409 1252
English – Zimbabwe en 12297 3009 1252
Estonian et et 1061 425 1257
FYRO Macedonia mk mk 1071 1251
Faroese fo fo 1080 438 1252
Farsi – Persian fa fa 1065 429 1256
Filipino 1124 464
Finnish fi fi 1035 1252
French – Belgium fr fr-be 2060 1252
French – Cameroon fr 11276
French – Canada fr fr-ca 3084 1252
French – Congo fr 9228
French – Cote d’Ivoire fr 12300
French – France fr fr-fr 1036 1252
French – Luxembourg fr fr-lu 5132 1252
French – Mali fr 13324
French – Monaco fr 6156 1252
French – Morocco fr 14348
French – Senegal fr 10252
French – Switzerland fr fr-ch 4108 1252
French – West Indies fr 7180
Frisian – Netherlands 1122 462
Gaelic – Ireland gd gd-ie 2108
Gaelic – Scotland gd gd 1084
Galician gl 1110 456 1252
Georgian ka 1079 437
German – Austria de de-at 3079 1252
German – Germany de de-de 1031 407 1252
German – Liechtenstein de de-li 5127 1407 1252
German – Luxembourg de de-lu 4103 1007 1252
German – Switzerland de de-ch 2055 807 1252
Greek el el 1032 408 1253
Guarani – Paraguay gn gn 1140 474
Gujarati gu gu 1095 447
HID (Human Interface Device) 1279
Hebrew he he 1037 1255
Hindi hi hi 1081 439
Hungarian hu hu 1038 1250
Icelandic is is 1039 1252
Igbo – Nigeria 1136 470
Indonesian id id 1057 421 1252
Italian – Italy it it-it 1040 410 1252
Italian – Switzerland it it-ch 2064 810 1252
Japanese ja ja 1041 411
Kannada kn kn 1099
Kashmiri ks ks 1120 460
Kazakh kk kk 1087 1251
Khmer km km 1107 453
Konkani 1111 457
Korean ko ko 1042 412
Kyrgyz – Cyrillic 1088 440 1251
Lao lo lo 1108 454
Latin la la 1142 476
Latvian lv lv 1062 426 1257
Lithuanian lt lt 1063 427 1257
Malay – Brunei ms ms-bn 2110 1252
Malay – Malaysia ms ms-my 1086 1252
Malayalam ml ml 1100
Maltese mt mt 1082
Manipuri 1112 458
Maori mi mi 1153 481
Marathi mr mr 1102
Mongolian mn mn 1104 450 1251
Mongolian mn mn 2128 850
Nepali ne ne 1121 461
Norwegian – Bokml nb no-no 1044 414 1252
Norwegian – Nynorsk nn no-no 2068 814 1252
Oriya or or 1096 448
Polish pl pl 1045 415 1250
Portuguese – Brazil pt pt-br 1046 416 1252
Portuguese – Portugal pt pt-pt 2070 816 1252
Punjabi pa pa 1094 446
Raeto-Romance rm rm 1047 417
Romanian – Moldova ro ro-mo 2072 818
Romanian – Romania ro ro 1048 418 1250
Russian ru ru 1049 419 1251
Russian – Moldova ru ru-mo 2073 819
Sami Lappish 1083
Sanskrit sa sa 1103
Serbian – Cyrillic sr sr-sp 3098 1251
Serbian – Latin sr sr-sp 2074 1250
Sesotho (Sutu) 1072 430
Setsuana tn tn 1074 432
Sindhi sd sd 1113 459
Sinhala; Sinhalese si si 1115
Slovak sk sk 1051 1250
Slovenian sl sl 1060 424 1250
Somali so so 1143 477
Sorbian sb sb 1070
Spanish – Argentina es es-ar 11274 1252
Spanish – Bolivia es es-bo 16394 1252
Spanish – Chile es es-cl 13322 1252
Spanish – Colombia es es-co 9226 1252
Spanish – Costa Rica es es-cr 5130 1252
Spanish – Dominican Republic es es-do 7178 1252
Spanish – Ecuador es es-ec 12298 1252
Spanish – El Salvador es es-sv 17418 1252
Spanish – Guatemala es es-gt 4106 1252
Spanish – Honduras es es-hn 18442 1252
Spanish – Mexico es es-mx 2058 1252
Spanish – Nicaragua es es-ni 19466 1252
Spanish – Panama es es-pa 6154 1252
Spanish – Paraguay es es-py 15370 1252
Spanish – Peru es es-pe 10250 1252
Spanish – Puerto Rico es es-pr 20490 1252
Spanish – Spain (Traditional) es es-es 1034 1252
Spanish – Uruguay es es-uy 14346 1252
Spanish – Venezuela es es-ve 8202 1252
Swahili sw sw 1089 441 1252
Swedish – Finland sv sv-fi 2077 1252
Swedish – Sweden sv sv-se 1053 1252
Syriac 1114
Tajik tg tg 1064 428
Tamil ta ta 1097 449
Tatar tt tt 1092 444 1251
Telugu te te 1098
Thai th th 1054
Tibetan bo bo 1105 451
Tsonga ts ts 1073 431
Turkish tr tr 1055 1254
Turkmen tk tk 1090 442
Ukrainian uk uk 1058 422 1251
Unicode UTF-8 0
Urdu ur ur 1056 420 1256
Uzbek – Cyrillic uz uz-uz 2115 843 1251
Uzbek – Latin uz uz-uz 1091 443 1254
Venda 1075 433
Vietnamese vi vi 1066 1258
Welsh cy cy 1106 452
Xhosa xh xh 1076 434
Yiddish yi yi 1085
Zulu zu zu 1077 435

 

10月 032012
 

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Math, StdCtrls;

type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
procedure MakePass;
public
{ Public declarations }
end;

var
Form1: TForm1;
const
StartLEn = 1;
Endlen = 3;
srcDictString = ‘abcd’;

implementation

{$R *.dfm}

{ TForm1 }

procedure TForm1.MakePass;
var
nRect: Integer;
nCount: Integer;
nTotal: Double;
I, J, K: Integer;
nIndex: array of Integer;
chPass: array of char;
strTemp: string;
begin
nCount := Length(srcDictString);
for I := StartLEn to Endlen do begin
nTotal := Power(nCount, I);
SetLength(nIndex, I);
SetLength(chPass, I);
for J := 0 to Trunc(nTotal) – 1 do begin
for K := 0 to I – 1 do begin
if (nIndex[K] = nCount) then begin
nIndex[K] := 0;
if K < I – 1 then
nIndex[K + 1] := nIndex[K + 1] + 1;
end;
end;

for K := 0 to I – 1 do begin
chPass[I – K – 1] := srcDictString[nIndex[K] + 1];
end;

nIndex[0] := nIndex[0] + 1;
strtemp := string(@chPass[0]);
Memo1.Lines.Add(strTemp);
end;
end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
MakePass;
end;

end.

10月 032012
 

 

10月 032012
 

1、通过IP取MAC地址

uses
WinSock;

Function sendarp(ipaddr:ulong;
temp:dword;
ulmacaddr:pointer;
ulmacaddrleng:pointer) : DWord; StdCall; External ‘Iphlpapi.dll’ Name ‘SendARP’;

procedure TForm1.Button1Click(Sender: TObject);
var
myip:ulong;
mymac:array[0..5] of byte;
mymaclength:ulong;
r:integer;
begin
myip:=inet_addr(PChar(‘192.168.6.180’));
mymaclength:=length(mymac);
r:=sendarp(myip,0,@mymac,@mymaclength);
label1.caption:=’errorcode:’+inttostr(r);
label2.caption:=format(‘%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x’,[mymac[0],mymac[1],mymac[2],mymac[3],mymac[4],mymac[5]]);
end;
2、取MAC地址 (含多网卡)

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
WinSock, StdCtrls;

Const
MAX_HOSTNAME_LEN = 128; { from IPTYPES.H }
MAX_DOMAIN_NAME_LEN = 128;
MAX_SCOPE_ID_LEN = 256;
MAX_ADAPTER_NAME_LENGTH = 256;
MAX_ADAPTER_DESCRIPTION_LENGTH = 128;
MAX_ADAPTER_ADDRESS_LENGTH = 8;

Type
TIPAddressString = Array[0..4*4-1] of Char;

PIPAddrString = ^TIPAddrString;
TIPAddrString = Record
Next : PIPAddrString;
IPAddress : TIPAddressString;
IPMask : TIPAddressString;
Context : Integer;
End;

PFixedInfo = ^TFixedInfo;
TFixedInfo = Record { FIXED_INFO }
HostName : Array[0..MAX_HOSTNAME_LEN+3] of Char;
DomainName : Array[0..MAX_DOMAIN_NAME_LEN+3] of Char;
CurrentDNSServer : PIPAddrString;
DNSServerList : TIPAddrString;
NodeType : Integer;
ScopeId : Array[0..MAX_SCOPE_ID_LEN+3] of Char;
EnableRouting : Integer;
EnableProxy : Integer;
EnableDNS : Integer;
End;

PIPAdapterInfo = ^TIPAdapterInfo;
TIPAdapterInfo = Record { IP_ADAPTER_INFO }
Next : PIPAdapterInfo;
ComboIndex : Integer;
AdapterName : Array[0..MAX_ADAPTER_NAME_LENGTH+3] of Char;
Description : Array[0..MAX_ADAPTER_DESCRIPTION_LENGTH+3] of Char;
AddressLength : Integer;
Address : Array[1..MAX_ADAPTER_ADDRESS_LENGTH] of Byte;
Index : Integer;
_Type : Integer;
DHCPEnabled : Integer;
CurrentIPAddress : PIPAddrString;
IPAddressList : TIPAddrString;
GatewayList : TIPAddrString;
DHCPServer : TIPAddrString;
HaveWINS : Bool;
PrimaryWINSServer : TIPAddrString;
SecondaryWINSServer : TIPAddrString;
LeaseObtained : Integer;
LeaseExpires : Integer;
End;

type
TForm1 = class(TForm)
Button1: TButton;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
procedure GetAdapterInformation;
public
{ Public declarations }
end;

var
Form1: TForm1;

Function sendarp(ipaddr:ulong;
temp:dword;
ulmacaddr:pointer;
ulmacaddrleng:pointer) : DWord; StdCall;

implementation

{$R *.dfm}

Function sendarp; External ‘Iphlpapi.dll’ Name ‘SendARP’;
Function GetAdaptersInfo(AI : PIPAdapterInfo; Var BufLen : Integer) : Integer;
StdCall; External ‘iphlpapi.dll’ Name ‘GetAdaptersInfo’;

procedure TForm1.GetAdapterInformation;
Var
AI,Work : PIPAdapterInfo;
Size : Integer;
Res : Integer;
I : Integer;

Function MACToStr(ByteArr : PByte; Len : Integer) : String;
Begin
Result := ”;
While (Len > 0) do Begin
Result := Result+IntToHex(ByteArr^,2)+’-‘;
ByteArr := Pointer(Integer(ByteArr)+SizeOf(Byte));
Dec(Len);
End;
SetLength(Result,Length(Result)-1); { remove last dash }
End;

Function GetAddrString(Addr : PIPAddrString) : String;
Begin
Result := ”;
While (Addr <> nil) do Begin
Result := Result+’A: ‘+Addr^.IPAddress+’ M: ‘+Addr^.IPMask+#13;
Addr := Addr^.Next;
End;
End;

Function TimeTToDateTimeStr(TimeT : Integer) : String;
Const UnixDateDelta = 25569; { days between 12/31/1899 and 1/1/1970 }
Var
DT : TDateTime;
TZ : TTimeZoneInformation;
Res : DWord;

Begin
If (TimeT = 0) Then Result := ”
Else Begin
{ Unix TIME_T is secs since 1/1/1970 }
DT := UnixDateDelta+(TimeT / (24*60*60)); { in UTC }
{ calculate bias }
Res := GetTimeZoneInformation(TZ);
If (Res = TIME_ZONE_ID_INVALID) Then RaiseLastWin32Error;
If (Res = TIME_ZONE_ID_STANDARD) Then Begin
DT := DT-((TZ.Bias+TZ.StandardBias) / (24*60));
Result := DateTimeToStr(DT)+’ ‘+WideCharToString(TZ.StandardName);
End
Else Begin { daylight saving time }
DT := DT-((TZ.Bias+TZ.DaylightBias) / (24*60));
Result := DateTimeToStr(DT)+’ ‘+WideCharToString(TZ.DaylightName);
End;
End;
End;

begin
Memo1.Lines.Clear;
Size := 5120;
GetMem(AI,Size);
Res := GetAdaptersInfo(AI,Size);
If (Res <> ERROR_SUCCESS) Then Begin
SetLastError(Res);
RaiseLastWin32Error;
End;
With Memo1,Lines do Begin
Work := AI;
I := 1;
Repeat
Add(”);
Add(‘Adapter ‘ + IntToStr(I));
Add(‘ ComboIndex: ‘+IntToStr(Work^.ComboIndex));
Add(‘ Adapter name: ‘+Work^.AdapterName);
Add(‘ Description: ‘+Work^.Description);
Add(‘ Adapter address: ‘+MACToStr(@Work^.Address,Work^.AddressLength));
Add(‘ Index: ‘+IntToStr(Work^.Index));
Add(‘ Type: ‘+IntToStr(Work^._Type));
Add(‘ DHCP: ‘+IntToStr(Work^.DHCPEnabled));
Add(‘ Current IP: ‘+GetAddrString(Work^.CurrentIPAddress));
Add(‘ IP addresses: ‘+GetAddrString(@Work^.IPAddressList));
Add(‘ Gateways: ‘+GetAddrString(@Work^.GatewayList));
Add(‘ DHCP servers: ‘+GetAddrString(@Work^.DHCPServer));
Add(‘ Has WINS: ‘+IntToStr(Integer(Work^.HaveWINS)));
Add(‘ Primary WINS: ‘+GetAddrString(@Work^.PrimaryWINSServer));
Add(‘ Secondary WINS: ‘+GetAddrString(@Work^.SecondaryWINSServer));
Add(‘ Lease obtained: ‘+TimeTToDateTimeStr(Work^.LeaseObtained));
Add(‘ Lease expires: ‘+TimeTToDateTimeStr(Work^.LeaseExpires));
Inc(I);
Work := Work^.Next;
Until (Work = nil);
End;
FreeMem(AI);
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
GetAdapterInformation;
end;

end.
方法2

uses nb30;

function NBGetAdapterAddress(a: Integer): string;
var
NCB: TNCB; // Netbios control block //NetBios控制块
ADAPTER: TADAPTERSTATUS; // Netbios adapter status//取网卡状态
LANAENUM: TLANAENUM; // Netbios lana
intIdx: Integer; // Temporary work value//临时变量
cRC: Char; // Netbios return code//NetBios返回值
strTemp: string; // Temporary string//临时变量
begin
Result := ”;

try
ZeroMemory(@NCB, SizeOf(NCB)); // Zero control blocl

NCB.ncb_command := Chr(NCBENUM); // Issue enum command
cRC := NetBios(@NCB);

NCB.ncb_buffer := @LANAENUM; // Reissue enum command
NCB.ncb_length := SizeOf(LANAENUM);
cRC := NetBios(@NCB);
if Ord(cRC) <> 0 then
exit;

ZeroMemory(@NCB, SizeOf(NCB)); // Reset adapter
NCB.ncb_command := Chr(NCBRESET);
NCB.ncb_lana_num := LANAENUM.lana[a];
cRC := NetBios(@NCB);
if Ord(cRC) <> 0 then
exit;
ZeroMemory(@NCB, SizeOf(NCB)); // Get adapter address
NCB.ncb_command := Chr(NCBASTAT);
NCB.ncb_lana_num := LANAENUM.lana[a];
StrPCopy(NCB.ncb_callname, ‘*’);
NCB.ncb_buffer := @ADAPTER;
NCB.ncb_length := SizeOf(ADAPTER);
cRC := NetBios(@NCB);

strTemp := ”; // Convert it to string
for intIdx := 0 to 5 do
strTemp := strTemp + InttoHex(Integer(ADAPTER.adapter_address[intIdx]), 2);
Result := strTemp;
finally
end;
end;

9月 252012
 

Delphi code to get statusbar text from other process

9月 182012
 

2D-Position 允许通过拖曳移动绝对定位的对象。
AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。
BackColor 设置或获取当前选中区的背景颜色。
BlockDirLTR 目前尚未支持。
BlockDirRTL 目前尚未支持。
Bold 切换当前选中区的粗体显示与否。
BrowseMode 目前尚未支持。
Copy 将当前选中区复制到剪贴板。
CreateBookmark 创建一个书签锚或获取当前选中区或插入点的书签锚的名称。
CreateLink 在当前选中区上插入超级链接,或显示一个对话框允许用户指定要为当前选中区插入的超级链接的 URL。
Cut 将当前选中区复制到剪贴板并删除之。
Delete 删除当前选中区。
DirLTR 目前尚未支持。
DirRTL 目前尚未支持。
EditMode 目前尚未支持。
FontName 设置或获取当前选中区的字体。
FontSize 设置或获取当前选中区的字体大小。
ForeColor 设置或获取当前选中区的前景(文本)颜色。
FormatBlock 设置当前块格式化标签。
Indent 增加选中文本的缩进。
InlineDirLTR 目前尚未支持。
InlineDirRTL 目前尚未支持。
InsertButton 用按钮控件覆盖当前选中区。
InsertFieldset 用方框覆盖当前选中区。
InsertHorizontalRule 用水平线覆盖当前选中区。
InsertIFrame 用内嵌框架覆盖当前选中区。
InsertImage 用图像覆盖当前选中区。
InsertInputButton 用按钮控件覆盖当前选中区。
InsertInputCheckbox 用复选框控件覆盖当前选中区。
InsertInputFileUpload 用文件上载控件覆盖当前选中区。
InsertInputHidden 插入隐藏控件覆盖当前选中区。
InsertInputImage 用图像控件覆盖当前选中区。
InsertInputPassword 用密码控件覆盖当前选中区。
InsertInputRadio 用单选钮控件覆盖当前选中区。
InsertInputReset 用重置控件覆盖当前选中区。
InsertInputSubmit 用提交控件覆盖当前选中区。
InsertInputText 用文本控件覆盖当前选中区。
InsertMarquee 用空字幕覆盖当前选中区。
InsertOrderedList 切换当前选中区是编号列表还是常规格式化块。
InsertParagraph 用换行覆盖当前选中区。
InsertSelectDropdown 用下拉框控件覆盖当前选中区。
InsertSelectListbox 用列表框控件覆盖当前选中区。
InsertTextArea 用多行文本输入控件覆盖当前选中区。
InsertUnorderedList 切换当前选中区是项目符号列表还是常规格式化块。
Italic 切换当前选中区斜体显示与否。
JustifyCenter 将当前选中区在所在格式化块置中。
JustifyFull 目前尚未支持。
JustifyLeft 将当前选中区所在格式化块左对齐。
JustifyNone 目前尚未支持。
JustifyRight 将当前选中区所在格式化块右对齐。
LiveResize 迫使 MSHTML 编辑器在缩放或移动过程中持续更新元素外观,而不是只在移动或缩放完成后更新。
MultipleSelection 允许当用户按住 Shift 或 Ctrl 键时一次选中多于一个站点可选元素。
Open 打开。
Outdent 减少选中区所在格式化块的缩进。
OverWrite 切换文本状态的插入和覆盖。
Paste 用剪贴板内容覆盖当前选中区。
PlayImage 目前尚未支持。
Print 打开打印对话框以便用户可以打印当前页。
Redo 重做。
Refresh 刷新当前文档。
RemoveFormat 从当前选中区中删除格式化标签。
RemoveParaFormat 目前尚未支持。
SaveAs 将当前 Web 页面保存为文件。
SelectAll 选中整个文档。
SizeToControl 目前尚未支持。
SizeToControlHeight 目前尚未支持。
SizeToControlWidth 目前尚未支持。
Stop 停止。
StopImage 目前尚未支持。
StrikeThrough 目前尚未支持。
Subscript 目前尚未支持。
Superscript 目前尚未支持。
UnBookmark 从当前选中区中删除全部书签。
Underline 切换当前选中区的下划线显示与否。
Undo 撤消。
Unlink 从当前选中区中删除全部超级链接。

Unselect 清除当前选中区的选中状态

9月 112012
 

Delphi code to get program version

 

 

 

9月 112012
 

JavaScript
getTime(new Date.getTime 方法)
返回指定的 Date 对象自 1970 年 1 月 1 日午夜(通用时间)以来的毫秒数。当比较两个或更多个 Date 对象时,使用此方法表示某一特定时刻。
返回值类型:Number — 一个整数。
Delphi
MilliSecondsBetween(StrToDateTime(‘1970-01-01 08:00:00’), Now);
注意是8点,北京时间

8月 232012
 

8月 232012
 

下面是Socket Error的错误码和描述:

Socket error 0 – Directly send error

Socket error 10004 – Interrupted function call

Socket error 10013 – Permission denied

Socket error 10014 – Bad address

Socket error 10022 – Invalid argument

Socket error 10024 – Too many open files

Socket error 10035 – Resource temporarily unavailable

Socket error 10036 – Operation now in progress

Socket error 10037 – Operation already in progress

Socket error 10038 – Socket operation on non-socket

Socket error 10039 – Destination address required

Socket error 10040 – Message too long

Socket error 10041 – Protocol wrong type for socket

Socket error 10042 – Bad protocol option

Socket error 10043 – Protocol not supported

Socket error 10044 – Socket type not supported

Socket error 10045 – Operation not supported

Socket error 10046 – Protocol family not supported

Socket error 10047 – Address family not supported by protocol family

Socket error 10048 – Address already in use

Socket error 10049 – Cannot assign requested address

Socket error 10050 – Network is down

Socket error 10051 – Network is unreachable

Socket error 10052 – Network dropped connection on reset

Socket error 10053 – Software caused connection abort

Socket error 10054 – Connection reset by peer

Socket error 10055 – No buffer space available

Socket error 10056 – Socket is already connected

Socket error 10057 – Socket is not connected

Socket error 10058 – Cannot send after socket shutdown

Socket error 10060 – Connection timed out

Socket error 10061 – Connection refused

Socket error 10064 – Host is down

Socket error 10065 – No route to host

Socket error 10067 – Too many processes

Socket error 10091 – Network subsystem is unavailable

Socket error 10092 – WINSOCK.DLL version out of range

Socket error 10093 – Successful WSAStartup not yet performed

Socket error 10094 – Graceful shutdown in progress

Socket error 11001 – Host not found

Socket error 11002 – Non-authoritative host not found

Socket error 11003 – This is a non-recoverable error

Socket error 11004 – Valid name, no data record of requested type

 

WSAEADDRINUSE (10048) Address already in use

WSAECONNABORTED (10053) Software caused connection abort

WSAECONNREFUSED (10061) Connection refused

WSAECONNRESET (10054) Connection reset by peer

WSAEDESTADDRREQ (10039) Destination address required

WSAEHOSTUNREACH (10065) No route to host

WSAEMFILE (10024) Too many open files

WSAENETDOWN (10050) Network is down

WSAENETRESET (10052) Network dropped connection

WSAENOBUFS (10055) No buffer space available

WSAENETUNREACH (10051) Network is unreachable

WSAETIMEDOUT (10060) Connection timed out

WSAHOST_NOT_FOUND (11001) Host not found

WSASYSNOTREADY (10091) Network sub-system is unavailable

WSANOTINITIALISED (10093) WSAStartup() not performed

WSANO_DATA (11004) Valid name, no data of that type

WSANO_RECOVERY (11003) Non-recoverable query error

WSATRY_AGAIN (11002) Non-authoritative host found

WSAVERNOTSUPPORTED (10092) Wrong WinSock DLL version

==================================================================

10035
1、对已使用非阻塞的套接字,又进行阻塞方式的接收式出现此错误

10038
1、对无效的套接(invalid_socket)字进行读取出报此错误

10048
1、端口、IP地址已被占用时报此错误

10014
1、Server端TCP,使用WSAAsyncSelect来接收FD_ACCEPT等消息,当窗口为最小化或者不是活动窗口里,处理FD_ACCEPT消息时,使用如下代码:accept(FSrvSock, @cAddrIn, @addrLen); addrLen未初始化,导致返回该错误代码,添加 addrLen := SizeOf(cAddrIn);初始化后问题解决。

10040
1、接收时接收的buffer为integer,发送端发送的为两个Integer,所以接收时出现此错误。