惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - 空中的风月

EJB 简介 MyBatis 简介 Hibernate 简介 Struts2 简介 Spring MVC简介 WebLogic中的一些基本概念 浅谈WebLogic和Tomcat Tomcat安装配置 由少林寺比武想到软件行业分工 觀察者模式 SQLServer硬件性能监控列表 数据库方面面试问题 JAVA程序员面试32问 C#常看面试问题以及解答 在做物流的库存管理系统里,需要注意。。。。。 项目管理中可能有的问题,以及如何去面对! 数据库设计中的五个范式 关于软件自动升级程序的设计方法 打印联纸报表时,出现每页都向下跳一点的问题?
在写自动更新程序中出现的问题
空中的风月 · 2005-05-18 · via 博客园 - 空中的风月

在设计本程序时,出现了两个问题:

第一:下载时,在本机可以实现,但是下载别的FTP时,就会出现产生不了文件的问题。

     解决方法: 原先使用的方法是:先打开一个文件,当接到数据后,把数据写到这个文件里,再接到再写的过程。等数据完成后,再把文件关闭,这时才产生文件。
     现在的方法更改为:先打开一个文件,当接到数据后,把数据写到文件里,并且关闭文件,这时就会产生文件。而等到再接到数据时,再打开这个文件,再写入,再关闭。
     当更改为后一种后,就不再出现这个问题了。 

第二:程序完成后,在本机可以运行,但是在别的机器上时,出现Run Time Error '429'错误。即ActiveX部件不能创建对象。
     
     这个问题是由于Winsock.Ocx控件本身的问题产生的,原因是目标计算机失去了注册信息。

The error occurs because the target computer is missing the license information for the control objects that are used in the application. You might attempt to set the project reference to point to MSWINSCK.ocx, and then generate a deployment package through the use of the Package and Deployment Wizard. This would generate a setup package that contains the correct version of the Winsock control. However, the license key for the control will not be compiled into the application unless an instance of the control is placed on a form. When you try to instantiate the objects at run time, the application has no way to provide the license key, and the code will fail. For example, the following code will run properly at design time, but will fail at run time on computers that do not have Visual Basic installed:

Dim myWinSock As MSWinsockLib.Winsock

Sub Main()
    ' Early binding does not work
    Set myWinSock = New MSWinsockLib.Winsock

    myWinSock.LocalPort = 5432

    myWinSock.Listen

    MsgBox ("Listening!")

    myWinSock.Close
End Sub

通过,下面这种方法,就可以解决这个问题。
Therefore, you must provide an instance of the Winsock control on a form so that Visual Basic can compile the license information into the application. You can make the form hidden if necessary. To do this, set the form's Visible property to "False." You can then prepare for deployment. The following code snippet demonstrates the method:

Dim myWinsock As MSWinsockLib.Winsock

Sub Main()
    ' Form1 is hidden
    Set myWinsock = Form1.myWinsock

    myWinsock.LocalPort = 5432

    myWinsock.Listen

    MsgBox ("Listening!")

    myWinsock.Close
End Sub