| 0 | 成功 |
| 100 | 无法创建服务器插口 |
| 101 | 无法绑定服务器插口 |
| 1、5 | 连接错误 |
| 3、2、6、7 | 网络发送错误 |
| 32、31、8、9 | 网络接收错误 |
| 4 | 无法创建视频编解码器 |
| 28 | 拒绝连接 |
| 29 | 客户端PC上没有安装解码器 |
| 91 | 网络接收超时 |
Bitmap b = new Bitmap(640, 480); Graphics g = Graphics.FromImage(b); g.Clear(System.Drawing.Color.White); g.DrawRectangle(System.Drawing.Pens.Red, mx, my, mw, mh); IntPtr bh = b.GetHbitmap(); videoCapX.SetBitmapOverlay((int)bh,0,0,0xffffff,255); if(oldbh!=(IntPtr)0) DeleteObject(oldbh); oldbh = bh;
Example:vcx.VideoDeviceIndex = -2vcx.VideoSourceURL = "http://atlascam2.colorado.edu/axis-cgi/jpg/image.cgi"vcx.CaptureAudio = Falsevcx.Connected = Truevcx.Preview = True



【慧都十四周年庆预热开启!全场满额送七级豪礼,AppleMac笔记本电脑、iwatch、iPad等您来拿!】
活动时间:10月1日-10月30日
From: POSTMASTER@domain.com To: jdoe@domain.com Subject: Message Delivery Failure MailEnable: Message Delivery Failure. The following recipient(s) could not be reached: Recipient: [SMTP: bill@domain.com] Reason: The message could not be delivered because the domain name (domain.com) does not appear to be registered.
From: MAILER-DAEMON@domain.local To: jdoe@localhost Subject: Undeliverable mail: Failed to deliver to ''
// Create POP3 object
Pop3 pop = new Pop3();
// Enable logging to file
pop.Log.Enabled = true;
pop.Log.Filename = @"C:\log.txt";
pop.Log.Clear();
// Connect to POP3 server
pop.Connect("mail.domain.com");
pop.Login("bounce", "secret");
// Download headers and bodies of all messages.
MailMessageCollection msgs = pop.DownloadMessageHeaders(1, -1, -1);
// Loop through all messages in the mailbox
foreach (MailMessage msg in msgs)
{
string strLine = msg.BodyPlainText;
Console.WriteLine("From: " + msg.From.Email);
// Get failed email address
string str_invalid_email = GetInvalidEmailAddressME(msg);
// If str_invalid_email is non-empty then failed email
// address was found
if (str_invalid_email.Length > 0)
{
// Remove failed email from database
RemoveEmailFromDatabase(str_invalid_email);
// Display invalid adress
Console.WriteLine("Invalid email: " + str_invalid_email);
// Delete bounced email from server to avoid
// processing it next time
pop.DeleteMessage(msg.IndexOnServer);
}
}
// Disconnect from POP3 server
pop.Disconnect();
// The function checks whether the message is bounced and extracts
// failed address
// from bounced message. Valid only for MailEnable servers
static string GetInvalidEmailAddressME(MailMessage msg)
{
string str_invalid_email = msg.BodyPlainText;
// Check if this is a bounced message report
if (msg.Subject.IndexOf("Delivery Failure") == -1)
{
return "";
}
if (msg.From.ToString().IndexOf("POSTMASTER") == -1)
{
return "";
}
// Now we're sure this is a bounced message report
int i_start;
i_start = str_invalid_email.IndexOf("SMTP:");
// Check if bounced message report contains "Recipient:" field
if (i_start == -1)
{
return "";
}
// Get failed address
i_start += 5;
i_end = str_invalid_email.IndexOf("]",i_start);
str_invalid_email.Substring(i_start, i_end);
return str_invalid_email;
}
// The function checks whether the message is bounced and extracts
// failed address
// from bounced message. Valid only for Communigate Pro servers
static string GetInvalidEmailAddressCP(MailMessage msg)
{
string str_invalid_email = msg.BodyPlainText;
// Check if this is a bounced message report
if (msg.Subject.IndexOf("Undeliverable mail") == -1)
{
return "";
}
if (msg.From.ToString().IndexOf("MAILER-DAEMON") == -1)
{
return "";
}
// Now we're sure this is a bounced message report
int i_start;
i_start = str_invalid_email.IndexOf("to '<");
// Check if bounced message report contains
// "Failed to deliver to " field
if (i_start == -1)
{
return "";
}
// Get failed address
i_start += 5;
i_end = str_invalid_email.IndexOf("]",i_start);
str_invalid_email.Substring(i_start, i_end);
return str_invalid_email;
}
// This function must remove (or disable) specified
// email address from mailing list
static void RemoveEmailFromDatabase(string str_invalid_email)
{
// TODO: Add your code here
}Dim pop As New Pop3
' Enable logging to file
pop.Log.Enabled = True
pop.Log.Filename = "C:\log.txt"
pop.Log.Clear()
' Connect to POP3 server
pop.Connect("mail.domain.com")
pop.Login("jdoe", "secret")
' Download headers and bodies for all messages.
Dim msgs As MailMessageCollection = pop.DownloadMessageHeaders(1, -1, -1)
' Loop through all messages in the mailbox
Dim msg As MailMessage
For Each msg In msgs
Dim strLine As String = msg.BodyPlainText
Console.WriteLine("From: " + msg.From.Email)
' Get failed email address
Dim str_invalid_email As String = GetInvalidEmailAddressME(msg)
' If str_invalid_email is non-empty then failed email
' address was found
If str_invalid_email.Length > 0 Then
'Remove failed email from database
RemoveEmailFromDatabase(str_invalid_email)
' Display invalid address
Console.WriteLine("Invalid email: " & str_invalid_email)
' Delete bounced email from server to avoid
' processing it next time
pop.DeleteMessage(msg.IndexOnServer)
End If
Next
Console.ReadLine()
' Disconnect from POP3 server
pop.Disconnect()
' The function checks whether the message is bounced and extracts
' failed address
' from bounced message. Valid only for MailEnable servers
Function GetInvalidEmailAddressME(ByVal msg As MailMessage) As String
Dim str_invalid_email As String = msg.BodyPlainText
' Check if this is a bounced message report
If msg.Subject.IndexOf("Delivery Failure") = -1 Then
Return ""
End If
If msg.From.ToString().IndexOf("POSTMASTER") = -1 Then
Return ""
End If
' Now we're sure this is a bounced message report
Dim i_start As Integer, i_end As Integer
i_start = str_invalid_email.IndexOf("SMTP:")
' Check if bounced message report contains "Recipient:" field
If i_start = -1 Then
Return ""
End If
' Get failed address
i_start += 5
i_end = str_invalid_email.IndexOf("]", i_start)
str_invalid_email.Substring(i_start, i_end)
Return str_invalid_email
End Function
' The function checks whether the message is bounced and extracts
' failed address
' from bounced message. Valid only for Communigate Pro servers
Function GetInvalidEmailAddressCP(ByVal msg As MailMessage) As String
Dim str_invalid_email As String = msg.BodyPlainText
' Check if this is a bounced message report
If msg.Subject.IndexOf("Undeliverable mail") = -1 Then
Return ""
End If
If msg.From.ToString().IndexOf("MAILER-DAEMON") = -1 Then
Return ""
End If
' Now we're sure this is a bounced message report
Dim i_start As Integer, i_end As Integer
i_start = str_invalid_email.IndexOf("to '<")
' Check if bounced message report contains
' "Failed to deliver to " field
If i_start = -1 Then
Return ""
End If
' Get failed address
i_start += 5
i_end = str_invalid_email.IndexOf("]", i_start)
str_invalid_email.Substring(i_start, i_end)
Return str_invalid_email
End Function
' This function must remove (or disable) specified
' email address from mailing list
Sub RemoveEmailFromDatabase(ByVal str_invalid_email As String)
' TODO: Add your code here
End Sub应用于Web应用程序的TWAIN扫描识别工具 支持所有主流浏览器。 | |
更快速、更安全的远程获取 和跨平台VSS插件 兼容所有的网络技术,平台和设备 | 为桌面应用程序设计的.NET控件 适用于C#和VB.NET 能让你从任何TWAIN设备中获取图像的托管代码SDK |
![]() 一款多功能的条码读取控件 只需要几行代码就可以将条码读取功能 嵌入到Web或桌面应用程序 | 快速、轻松地为您的web应用程序 启用图像和视频捕捉 |
![]() 一个用以替代VSS的独立版本控制软件 | ![]() 一款基于SQL Server的本地/网络版本控制软件 |
2017慧都十四周年狂欢搞事情!砸金蛋100%抽现金红包、满额豪送iPhone X、iPhone 8、DevExpress汉化免费送、团队升级培训套包劲省10万元......更多惊喜等您来探索!




















