小弟寫了一小段程式碼如下,
想直接呼叫Windows API, 但沒成功,
得到錯誤訊息為:
"Specified DLL function not found"
請問要如何才能作到呢? thanks!
ps. 環境為vb4 32bit
module1 declarations:
Declare Function GetCurrentDirectory Lib "kernel32"
(ByVal nBufferLength As Long,
ByVal lpBuffer As String) As Long
command1.click:
Private Sub Command1_Click()
Dim rc As Long
Dim str As String
Dim prt As Long
rc = GetCurrentDirectory(ByVal prt, ByVal str)
If rc = 0 Then
MsgBox "failed!"
Exit Sub
End If
Label1.Caption = str
End Sub
--
◎ [1;31m龍 [32m貓 [33m資 [34m訊 [35m天 [36m地 [0m( [1mbbs.mgt.ncu.edu.tw [0m)
◎[ [1;33;46mbryan [0m]來自: host176.21062212.gcn.net.tw
VB5有附 "API檢視員" 你可以試著用看看
--
cha...@ms1.accmail.com.tw
====================================
下棋是一種溝通的藝術
"charge" is my Name, so don't ask for money....
====================================