Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the difference between invoke() and call()? #19

Open
HelloBush opened this issue Dec 29, 2021 · 1 comment
Open

What's the difference between invoke() and call()? #19

HelloBush opened this issue Dec 29, 2021 · 1 comment

Comments

@HelloBush
Copy link

HelloBush commented Dec 29, 2021

Hi , thanks for this fabulous project.
I hava a question which may be a little silly .I noticed that there are two ways using dll's function by Jacob,but what's exactly the difference between invoke() and call()?Or which way is suggested in certain situation?

@Zzirconium
Copy link

Hello @HelloBush
call(), get() and put() are more readable ways eventual underlying triggers of invoke(), as you can see for example there :

The only case when this makes a difference is when an error occurs during the invoke trigger, indeed, the last argument of invoke is an array of the same size of the Sub parameters array, and provide you error code on which parameter was bad during the call.

let's say it would be better to use it, but these errors are caught anyway and we send the user a generic error, that's the reason why most of the pople ignore them by using call, get and put (it does not mean it is a good idea :D )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants