stdcall Questions

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

This is a curiosity question for anybody who has worked for, known somebody who's worked for, or otherwise had any sort of affiliation with the Microsoft team responsible for defining these macros....
Overijssel asked 22/6, 2014 at 3:2

3

Solved

I'm trying to port a Windows app to Linux. This appplication marks some functions with the __stdcall attribute. However, I was told by a friend that stdcall is used only on Windows and has no meani...
Euxenite asked 16/6, 2010 at 14:34

1

Solved

I'm trying to develop understanding of Assembly language. I understand that when function creates stack frame, it pushes current EBP, than copies stack pointer value to the EBP. First (and only) fu...
Faunia asked 13/3, 2017 at 19:7

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

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

7

Solved

I'm learning about Win32 programming, and the WinMain prototype looks like: int WINAPI WinMain ( HINSTANCE instance, HINSTANCE prev_instance, PSTR cmd_line, int cmd_show ) I was confused as to w...
Frederickson asked 18/11, 2008 at 2:15

1

Solved

The general way to deal with creating LIB from DLL is described in How to make a .lib file when have a .dll file and a header file - still, to create an import library for DLL with undecorated stdc...
Shanelleshaner asked 17/3, 2016 at 19:2

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

1

Solved

I created some plugin files in C++ for my Unity3d app. So far the app was just a simple protype, so I tested only on my desktop with libraries compiled as DLL for Windows. Today I recompiled those ...
Matildematin asked 22/9, 2015 at 14:7

4

Solved

I'm a new person to C++ dll import topic and may be my question is very easy but I can not find it on google. I have a very simple C++ win32 dll: #include <iostream> using namespace std; ...
Hydrophobia asked 13/6, 2011 at 18:3

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

1

Solved

I've come across calling conventions whilst studying states for game making with C++. In a previous question someone stated that MSDN doesn't explain _stdcall very well - I agree. What are the pr...
Razzledazzle asked 1/12, 2012 at 23:1

1

Solved

I'm working on my own kernel using GCC, and when calling C functions from asm code, I have to do add esp,xx myself. After some searching I found that stdcall is a Microsoft invention and can't use ...
Ahern asked 26/10, 2012 at 23:54

1

Solved

I'm working on a DLL which will be used from another language (so no import libs and including the dll's headers) using the _stdcall calling convetion. The problem is that VC++ seems to always do s...
Ancilin asked 11/7, 2011 at 11:42

3

Solved

typedef bool (*my_function_f)(int, double); typedef bool (__stdcall *my_function_f2)(int, double); // ^^^^^^^^^ template<class F> class TFunction; template<class R, class T0, class T1&gt...
Keratogenous asked 13/5, 2011 at 12:0

2

Solved

I was trying to export a simple test function for a dll to work with an application (fyi: mIRC) that specifies the calling convention as: int __stdcall test_func(HWND mWnd, HWND aWnd, char *data, ...
Pelham asked 28/12, 2010 at 23:15

1

Solved

This code compiles (as I would expect): typedef void __stdcall (*Func)(); struct A { static void __stdcall f() { } }; int main() { Func p = A::f; } But this one: struct A { typedef void __...
Haire asked 26/12, 2010 at 18:18

2

Solved

Is there a good reason? Are their internal functions (not exported) also stdcall convention?
Declarer asked 24/8, 2010 at 10:56

1

Solved

I have a dll that exports extern "C" __declspec(dllexport) int __stdcall Foo( void ); A dump of the dll shows ****************************************************************************** Sect...
Malcolmmalcom asked 6/3, 2010 at 16:29

1

Solved

I'm writing some plugin code in a dll that is called by a host over which I have no control. The host assumes that the plugins are exported as __stdcall functions. The host is told the name of the...
Caracaraballo asked 20/5, 2009 at 8:35

9

I have a program that I need to create a DLL for, hopefully in C#. The program is written in Delphi and I have an interface file to code to. The interface uses the stdcall calling convention. Is i...
Valparaiso asked 30/6, 2009 at 11:24
1

© 2022 - 2024 — McMap. All rights reserved.