 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
rcj811
註冊時間: 2003-08-12 文章: 35
第 1 樓
|
發表於: 星期五 十一月 09, 2007 10:09 am 文章主題: 請各位大大幫幫忙一下 |
|
|
我在調用 dll 時候都會出現 "Cannot find entry point Posturl in the Dll" 錯誤
這是在 VB 宣告,可以使用
Declare Function Posturl Lib "socket_http.dll" Alias "posturl" (ByVal variable As String, ByVal variable As String) As Long
Declare Function GeturlPowerStatus Lib "socket_http.dll" Alias "geturlpowerstatus" (ByVal variable As String, ByVal variable As String) As Long
這是我在 VFP 宣告,完後調用 Posturl 都會出現 上述錯誤
DECLARE Integer Posturl IN WIN32API As 'posturl' ;
String variable , ;
String variable
DECLARE Integer GeturlPowerStatus IN socket_http.dll As GeturlPowerStatus ;
String variable , ;
String variable
Posturl("http://192.168.1.179/Set.cmd?CMD=GetPower","12345678")
GeturlPowerStatus("http://192.168.1.179/Set.cmd?CMD=GetPower","12345678")
不知是哪裡需要改正的,希望大大能指導一下!謝謝!
以上附dll供大大測試 |
|
回頂端 |
|
 |
wuno2001
註冊時間: 2007-02-09 文章: 56
第 2 樓
|
|
回頂端 |
|
 |
sheuok
註冊時間: 2004-11-20 文章: 63 來自: Taiwan
第 3 樓
|
發表於: 星期五 十一月 09, 2007 2:25 pm 文章主題: |
|
|
請試一下! 經VB轉VFP的語法應如下:
DECLARE Integer Posturl IN socket_http.dll As posturl ;
String variable , ;
String variable
DECLARE Integer GeturlPowerStatus IN socket_http.dll As geturlpowerstatus ;
String variable , ;
String variable |
|
回頂端 |
|
 |
rcj811
註冊時間: 2003-08-12 文章: 35
第 4 樓
|
發表於: 星期一 十一月 12, 2007 2:43 pm 文章主題: |
|
|
感謝大大不吝嗇的指教,目前自己已經測試出來問題在哪!
原因是vfp對dll切入點要注意大小寫,但vb好像不用
以下將 "Posturl","GeturlPowerStatus" 改為小寫就可以解決了!
DECLARE Integer posturl IN WIN32API As posturl ;
String variable , ;
String variable
DECLARE Integer geturlpowerstatus IN socket_http.dll As GeturlPowerStatus ;
String variable , ;
String variable
感謝大大幫忙測試! |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|