Code
Export 함수 이름 변경방지
codens
2012. 8. 19. 21:09
Export 함수 이름 변경방지
Prevent Dll Exported function name mangling(or aliasing)
ex) void h(int) -> ?h@@YAXH@Z
http://en.wikipedia.org/wiki/Name_mangling
방법1 : *.def파일 만든다
EXPORTS
exp_function1
exp_function2
...
방법2 : #pragma 사용
*.map파일을 생성해서 map파일 안에 있는 mangling된 함수이름을 알아낸다.
#pragma comment(linker, "/EXPORT:Test2=?Test2@@YAHH@Z")
반응형