Ad
Renaming DLL Functions?
Is there a way for me to name my exported dll functions? When I use a dll export viewer the function names shown are the full declarations. I would like to use the JNA (JNI) to access functions inside the DLL, and the function names need to be a function name not a full declaration. If this is a duplicate please point it out!
Ad
Answer
It can actually be done with just the __declspec(dllexport) syntax (that is, without a .def file) if you declare the function as extern "C" (or implement it in a C file instead of C++).
extern "C"
{
__declspec(dllexport) void __stdcall MyFunc(std::string &);
}
Generally much easier than exporting a mangled name with an alias (as you then need to track down the mangled name in order to assign an alias).
Ad
source: stackoverflow.com
Related Questions
- → How to update data attribute on Ajax complete
- → October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- → Octobercms Component Unique id (Twig & Javascript)
- → Passing a JS var from AJAX response to Twig
- → Laravel {!! Form::open() !!} doesn't work within AngularJS
- → DropzoneJS & Laravel - Output form validation errors
- → Import statement and Babel
- → Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- → React-router: Passing props to children
- → ListView.DataSource looping data for React Native
- → Can't test submit handler in React component
- → React + Flux - How to avoid global variable
- → Webpack, React & Babel, not rendering DOM
Ad