我寫了以下的程式碼:
Private Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, lpSecurityAttributes As Any, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long
Const GENERIC_READ = &H80000000
Const CREATE_NEW = 1
Const FILE_ATTRIBUTE_NORMAL = &H80
Private Sub Form_Load()
Dim a As Long
a = CreateFile("d:\123.bmp", GENERIC_READ, 0&, 0&, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, &0)
Text1.Text = a
End Sub
結果a=-1,如無意外,這應該是取不到handle,但究竟以上的程式有甚麼錯誤的呢??
提供小吳 VBQA 包含VB6,VB 2003,VB 2005,VB 2008,VB 2010,2013,2015 ,2019,VB.NET,Visual Studio,Visual Basic,程式設計,C#,ASP.NET , Windows From , SQL Server , Crystal Report,VBA,HTML,網頁設計,微軟,98,XP, API ,KB .
Why RS.recordcount can't work if I use OLEDB(編號:2205)
Hi,there
I can't use recordcount property when I use OLEDB to connect Oracle database,but it does work use ODBC to connect Oracle,Why?
thanks for your time.
I can't use recordcount property when I use OLEDB to connect Oracle database,but it does work use ODBC to connect Oracle,Why?
thanks for your time.
如何用Inet control寫一個FTP程式?(編號:2202)
小弟想寫一個FTP程式
當我用INET Control 和一個FTP站連線後
接下來該如何作呢?(如何寫上傳和下載的指令?)
Inet1.RemoteHost = "Ftp.xxx.xxx.xx"
Inet1.RemotePort = 21
Inet1.UserName = "xxxxx"
Inet1.Password = "xxxxx
Inet1.Execute "ftp.xxx.xxx.xx"
請大家幫幫忙好嗎?
謝謝
當我用INET Control 和一個FTP站連線後
接下來該如何作呢?(如何寫上傳和下載的指令?)
Inet1.RemoteHost = "Ftp.xxx.xxx.xx"
Inet1.RemotePort = 21
Inet1.UserName = "xxxxx"
Inet1.Password = "xxxxx
Inet1.Execute "ftp.xxx.xxx.xx"
請大家幫幫忙好嗎?
謝謝
訂閱:
文章 (Atom)