LeeVenty Posted April 7, 2011 Posted April 7, 2011 Now , I write a framework to test some DLL . When I use DllCall like below Local $ParaTypeArray[$paraNum+1] ;The array of parameters' types ,like ['wstr' , 'dword' , 'ptr'] and so on Local $ParaValueArray[$paraNum+1] ;The array of parameters' values,like ['d:\ttt' , 15 , 0] and so on Local $functionNameArray[$funtionArray] ;The Array of function name DllCall($DllName , $ParaTypeArray[0] , $functionNameArray[0] , $ParaTypeArray[1] , $ParaValueArray[1] , ... , ... ) The problem is : when the function is different , the number of parameters is also different . I don't know how to send parameters which I don't know the number of them
jvanegmond Posted April 7, 2011 Posted April 7, 2011 Took me a fair bit o' googlin' to get this old thread, but here you go: First solution uses Execute, second solution (mine coincidentally) just uses a big switch statement to determine number of parameters. If I were you, I would go with Execute solution. github.com/jvanegmond
LeeVenty Posted April 7, 2011 Author Posted April 7, 2011 Took me a fair bit o' googlin' to get this old thread, but here you go: First solution uses Execute, second solution (mine coincidentally) just uses a big switch statement to determine number of parameters. If I were you, I would go with Execute solution.Thanks a lot. I would use Execute , It's a great API that I don't know before!
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