Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

½ÐÀ°¦£¬Ý¤@¤UVB³o¼Ë©I¥swin32API¹ï¶Ü?

0 views
Skip to first unread message

cck

unread,
Jun 26, 1998, 3:00:00 AM6/26/98
to

小弟寫了一小段程式碼如下,

想直接呼叫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

-2

unread,
Jun 27, 1998, 3:00:00 AM6/27/98
to

Declare Function GetCurrentDirectory Lib "kernel32" Alias
"GetCurrentDirectory" (ByVal nBufferLength As Long, ByVal lpBuffer As
String) As Long

VB5有附 "API檢視員" 你可以試著用看看

--
cha...@ms1.accmail.com.tw
====================================
下棋是一種溝通的藝術
"charge" is my Name, so don't ask for money....
====================================

0 new messages