Sign in to follow this  
Followers 0
LeeVenty

About DllCall's parameter

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0