![]() |
|
|
|
#1
|
|||
|
|||
|
@0xalloc: I don't understand what problem this solves in the first place? In which cases do you call an API while at the same time not knowing its function signature? I mean, you cannot even correctly call any API without knowing its signature, i.e., how many bytes to push/pop off the stack?
|
| The Following User Says Thank You to mcp For This Useful Post: | ||
Indigo (07-19-2019) | ||
|
#2
|
|||
|
|||
|
Quote:
|
| The Following User Says Thank You to 0xall0c For This Useful Post: | ||
Indigo (07-19-2019) | ||
|
#3
|
|||
|
|||
|
Right, but you cannot invoke an API without knowing its prototype! So that means you know the prototype already when using the "DynCall" mechanism. So the only thing it saves you is a one-line typedef? But you loose type correctness for all API arguments...that seems like a very bad trade-off.
Last edited by mcp; 04-05-2018 at 16:40. |
| The Following User Says Thank You to mcp For This Useful Post: | ||
Indigo (07-19-2019) | ||
|
#4
|
|||
|
|||
|
Quote:
|
| The Following User Says Thank You to 0xall0c For This Useful Post: | ||
Indigo (07-19-2019) | ||
|
#5
|
|||
|
|||
|
Well, it's pretty uncontroversial that losing type correctness for your API calls *is* bad for overall correctness of your program. The amount of work you're saving is marginal, and at the same time you have to deal with the dangers of type system violations. How is that not a bad trade-off? And we haven't even talked about the loss of readability of DynCall vs regular API calls...
|
| The Following User Says Thank You to mcp For This Useful Post: | ||
Indigo (07-19-2019) | ||
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Calling any function dynamically without typedef | Succubus | Source Code | 0 | 10-21-2021 16:34 |
| WinAPI: No WM_COMMAND Message? | aldente | General Discussion | 2 | 07-05-2006 07:17 |