r/cpp • • 9m ago

Does anyone know how to get the header file from a .dll

Hi I'm kinda new to this subreddit, but I just have this burning question for a while, but here's why I asked this question: So one I decided to try and make an editor using the "Vocaloid4API" but here's the thing, the "Vocaloid4API" were a bunch of .dll and I didn't have the header file's for them, so that's why I'm asking this question

0 Upvotes

3 comments sorted by

•

u/rlebeau47 6m ago

The only way to extract a header file from a DLL directly is to reverse engineer it manually. You need to contact the DLL author to ask for the official header file.

•

u/Inevitable_Hat2449 2m ago

I can't do that because the .dll where from yamaha and I bet the header's you would need to pay for them :(

•

u/saxbophone mutable volatile void 4m ago

In general you can't turn a DLL back into a header without reverse-engineering techniques, none of which are guaranteed to give you the correct result.

In general, for a given DLL you will need to be provided the corresponding header file(s) for it also. If it's a freely available or open-source library, or a popular library, you can probably find header files available for it online, but really you should only be using headers and DLLs that are distributed together (otherwise you might mix up different versions).