KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to pass a lambda function pointer, which nested in a class, to the Windows API callback function. I found there is no place for me to specify the __stdcall keyword. Some people told me the compile only support __cdecl , but after I used nm command to dump the obj file, I found the compile will generate three helper function ( __stdcall , __cdecl , __fastcall ) concurrently. So my problem is, how can I specify the calling convention? Those following code are my test code. #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { auto func = [](){}; return 0; } 00000000 t ?<helper_func_cdecl>@<lambda_5738939ec88434c53e1a446c47cf2db6>@@CAXXZ 00000000 t ?<helper_func_fastcall>@<lambda_5738939ec88434c53e1a446c47cf2db6>@@CIXXZ 00000000 t ?<helper_func_stdcall>@<lambda_5738939ec88434c53e1a446c47cf2db6>@@CGXXZ 00000000 t ??B<lambda_5738939ec88434c53e1a446c47cf2db6>@@QBEP6AXXZXZ 00000000 t ??B<lambda_5738939ec88434c53e1a446c47cf2db6>@@QBEP6GXXZXZ 00000000 t ??B<lambda_5738939ec88434c53e1a446c47cf2db6>@@QBEP6IXXZXZ 00000000 t ??R<lambda_5738939ec88434c53e1a446c47cf2db6>@@QBEXXZ
Tags (comma-separated)
Save Edits
Cancel