How to compile C program as dll in Mingw for use with Inno Setup & callback

前提是你 提交于 2019-12-02 12:58:33

Assuming that you are using ANSI Inno Setup, the following Inno signature:

function VolEx( filename, outputpath: String ): Integer; external 'VolExA@volex.dll stdcall';

will require the following C signature in your DLL code:

int __stdcall __declspec(dllexport) VolExA(const char *filename, const char *outputpath);

(If you're compiling the DLL as C++ rather than C then you will also need an extern "C" at the beginning.)

You will need to declare this function in your DLL and move the appropriate code from "main" above into it, then remove the main function and compile as a DLL instead of a console app.

Get this part working first before worrying about feedback via callbacks -- submit a separate question for that if you have trouble with it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!