C# calls C++'s dll EntryPointNotFoundException

Problem description: Functions without parameters can be called through C#, and functions with parameters report an error: EntryPointNotFoundException; in addition, all exported functions can be viewed by using depends.

Solution to this problem: Step 1: Add a module definition file (.def) in C++, and write the function to be exported in it.

LIBRARY

EXPROTS

    function name 1 @ 1

    function name 2 @ 2

j

This file will be added to the project->linker->input->module definition file by default; after that, recompile

problem solved

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324981305&siteId=291194637