Call function in c++ dll without header

前端 未结 6 558
借酒劲吻你
借酒劲吻你 2020-12-15 22:36

I would like to call a method from an dll, but i don\'t have the source neither the header file. I tried to use the dumpbin /exports to see the name of the method, but i can

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-15 23:25

    As you have found, the exports list in a DLL only stores names, not signatures. If your DLL exports C functions, you will probably have to disassemble and reverse engineer the functions to determine method signatures. However, C++ encodes the method signature in the export name. This process of combining the method name and signature is called "name mangling". This Stackoverflow question has a reference for determining the method signature from the mangled export name.

    Try the free "Dependency Walker" (a.k.a. "depends") utility. The "Undecorate C++ Functions" option should determine the signature of a C++ method.

提交回复
热议问题