cdecl Questions

8

Solved

Yes, I know that "cdecl" is the name of a prominent calling convention, so please don't explain calling conventions to me. What I'm asking is what the abbreviation (?) "cdecl" actually stands for. ...
Howie asked 13/2, 2011 at 21:0

2

My goal is to easily extract a prototype of an arbitrary function with both the __cdecl and __stdcall calling conventions. It works fine in 32-bit. The only thing that's changing is the calling con...
Drake asked 5/5, 2016 at 17:12

2

Solved

There are some calling conventions (e.g pascal, stdcall) but as far as I am concerned, C does use cdecl (C-declared). Each of these conventions are slightly different in the way the caller loads th...
Gamely asked 2/11, 2020 at 7:16

2

I am reading the IDA Pro Book. On page 86 while discussing calling conventions, the author shows an example of cdecl calling convention that eliminates the need for the caller to clean arguments of...
Hardback asked 27/3, 2018 at 13:6

4

Solved

I have a 3rd party C API that expects a __stdcall callback function. My code has an externally-provided __cdecl callback function. I cannot pass my function pointer to the C-API as they are consi...
Yokoyokohama asked 30/10, 2016 at 6:57

3

Solved

My company provides a third party with a DLL which provides them with API functions they can use to connect to our application. The DLL was written in VC9, and the API functions used VC's default c...
Carnet asked 13/5, 2011 at 6:30

1

Solved

In the GCC cdecl calling convention, can I rely on the arguments I pushed onto the stack to be the same after the call has returned? Even when mixing ASM and C and with optimization (-O2) enabled? ...
Ynez asked 9/8, 2016 at 6:53

3

Solved

How are structs passed as parameters in assembly? Since structs have sizes large than normal are the individual fields passed sequentially? If so are they in reverse order like normal parameters?...
Backfire asked 6/5, 2015 at 4:1

5

Solved

I know that __stdcall functions can't have ellipses, but I want to be sure there are no platforms that support the stdarg.h functions for calling conventions other than __cdecl or __stdcall.
Allier asked 25/3, 2010 at 2:22

9

There are (among others) two types of calling conventions - stdcall and cdecl. I have few questions on them: When a cdecl function is called, how does a caller know if it should free up the stack...
Martainn asked 4/8, 2010 at 9:51

11

Solved

Below method of calling D::foo function via pointer-to-member function will generate error: must use .* or ->* to call pointer-to-member function in 'f (...)' .. of course that is not how we cal...
Schenck asked 9/10, 2013 at 10:26

1

Solved

I have a C dll with exported functions I can use the command-line tool dumpbin.exe /EXPORTS to extract the list of exported functions, and then use them in my C# code to (successfully) call these ...
Wan asked 15/8, 2013 at 9:8

1

Solved

C uses the cdecl, which I've looked into and called with from assembly. It feels well enough, so why break the compatibility? Why was another convention needed?
Inflammable asked 31/3, 2013 at 22:44

2

Solved

I am working on a rather large codebase in which C++ functionality is P/Invoked from C#. There are many calls in our codebase such as... C++: extern "C" int __stdcall InvokedFunction(int); Wit...
Hitlerism asked 27/3, 2013 at 13:58

2

Solved

I have created new Win32 project in my VS and have selected Dynamic Library ( *.dll ) for this aim. I have defined some exporting function in the main file: __declspec(dllexport) int TestCall(voi...
Pregnable asked 29/12, 2012 at 19:59

2

Solved

I'd listening some people saying __fastcall is faster than __cdecl and __stdcall cause it puts two parameters in register, instead of the one of other calls; but, in other hand, this is not the sta...
Docket asked 26/10, 2012 at 15:21

1

Solved

I have a problem with detours. Detours, as you all know, can only move among 5 bytes of space (i.e a 'jmp' call and a 4 byte address). Because of this it is impossible to have the 'hook' function i...
Pantomime asked 4/5, 2012 at 15:17

10

I have heard of some methods, but none of them have stuck. Personally I try to avoid complex types in C and try to break them into component typedef. I'm now faced with maintaining some legacy cod...
Remittance asked 18/9, 2008 at 0:57

1

I've spent all day researching this, and I'm none the wiser: I have a C# DLL which PInvokes a method in a C++ DLL. I have had no problems doing this when compiling in Debug mode, but when co...
Hydr asked 9/5, 2011 at 14:37
1

© 2022 - 2024 — McMap. All rights reserved.