- If I have a DLL file...how can I see functions are built as __stdcall or __cdecl?
- I want to create a DLL to export functions as __stdcall without DEF file and decorated function names with Visual Studio like:
__declspec(dllexport) int __stdcall TestFunktion(void) { return 0; }
Is there any easy way to create the functions without decoration without DEF file in Visual Studio?

The standard approach to this problem is to define your export's undecorated name in a
.deffile - and this is the approach you should use.But if for whatever reason you don't want to use a
.deffile, you can write code like:__FUNCDNAME__will evaluate to your decorated function name, while__FUNCTION__will evaluate to your undecorated function name - this is effectively a replacement for the equivalent line in the.deffile.As for your other question:
this is not strictly possible from the DLL alone, much less if you deliberately omit hints from the export table (i.e. you might be able to see a decorated export symbol and infer that it's
__stdcall, but you're choosing to export them as undecorated symbols) - perhaps if you perform some sort of analysis on the function's disassembly and try to understand its calling convention, but this is non-hermetic and very hacky.This is why well-documented calling conventions and well-documented API signatures are important.