PeterW Posted January 21, 2010 Share Posted January 21, 2010 a windows error window prompt when call "DllCall" to my own dll writen in cpp. some js error in my explorer, i can not insert it in code style, sorry. the cpp dll function is simple: void CheckExistedNBs(char *expectedVal, int expectedValLen, char *obtainedVal, int obtainedValLen) //int CheckExistedNBs(int i) { int existedNB = expectedValLen; //return existedNB; } the dumpbin output is: 00000000 characteristics 4B583632 time date stamp Thu Jan 21 19:10:42 2010 0.00 version 1 ordinal base 1 number of functions 1 number of names ordinal hint RVA name 1 0 00001000 CheckExistedNBs = _CheckExistedNBs the script is : $expectedval = "1009FF" $obtanedval="1009FF1009FF1009FF1009FF" MsgBox(1,"","Debug?") $result = DllCall("..\Debug\T101CheckFrame.dll","none","CheckExistedNBs","str",$expectedval,"int",StringLen ($expectedval),"str",$obtanedval,"int",StringLen($obtanedval)) my os is windowsXP , the autoit is v3 Link to comment Share on other sites More sharing options...
PeterW Posted January 21, 2010 Author Share Posted January 21, 2010 I used VS2008 , and debug the autoit3.exe. I found that the function in dll is excuted correctly, all parameters` values are right. But a exception happens after calling the function. Is there any tips to creat user dll? Link to comment Share on other sites More sharing options...
jchd Posted January 21, 2010 Share Posted January 21, 2010 I used VS2008 , and debug the autoit3.exe. I found that the function in dll is excuted correctly, all parameters` values are right. But a exception happens after calling the function.Read again the DllCall help: you probably need to specify "none:cdecl" as the return type of your function. This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
PeterW Posted January 21, 2010 Author Share Posted January 21, 2010 Read again the DllCall help: you probably need to specify "none:cdecl" as the return type of your function.Thanks very much.I have debugged 2hour for this. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now