Questions tagged [stdcall]

Anything related to the `stdcall` calling convention, i.e. one of the common subroutine calling conventions used on systems with x86 architecture.

Anything related to the stdcall calling convention, i.e. one of the common subroutine calling conventions used on systems with x86 architecture.

See Wikipedia on:

150 questions
1
vote
2 answers

What is better to declare for calling convention of Windows program?

I have read an article about Calling convention (__stdcall, __fastcall, pascal, cdecl etc...) And I wonder: Why is often __stdcall (WinAPI) declared for WinMain() function? As I read, __stdcall operates with the stack, __fastcall operates on…
user2402179
1
vote
0 answers

C# String to pointer in unmanaged class library

An existing application is going to import my class library. I am trying to do this in C# since I have a lot more experience in C# than C++. The existing application uses __stdcall which is originally not possible with C# since the code is managed.…
Chris
  • 1,068
  • 2
  • 14
  • 30
0
votes
1 answer

Can I use __stdcall convention while using Xerces-C 3.0? I get linker errors

In my project it is crucial I use __stdcall. However, I get this: 1>ExchangeParser.obj : error LNK2001: unresolved external symbol "public: static void __cdecl xercesc_3_0::XMLString::release(unsigned short * *,class xercesc_3_0::MemoryManager *…
puzdrow
  • 1
  • 1
  • 1
  • 2
0
votes
1 answer

Problems manipulating strings through a stdcall to a dll

I need to create a C++ dll that will be called from another program through stdcall. What is needed : the caller program will pass an array of string to the dll and the dll should change the string values in the array. The caller program will then…
Bruno
  • 4,685
  • 7
  • 54
  • 105
0
votes
2 answers

compile errors log4cxx with __stdcall and Boost 1.47.0

I'll be very pleased if you help. My IDE is VS2010. I'm using boost 1.47.0, especially boost::asio. After some days of developing I decided to add log4cxx. log4cxx needs to change calling convention to __stdcall I surprisingly got lots of compiling…
nix
  • 464
  • 1
  • 5
  • 13
0
votes
0 answers

Calling mangled non-managed C++ DLL function in C#

For some reasons, I have to create a C++ DLL file containing functions with __stdcall calling convention. namespace NS { __declspec(dllexport) std::string __stdcall Function(int Num); } To be able to use it in C#, I did this…
0
votes
1 answer

Do I need `__stdcall` in `std::unique_ptr` deleter?

I want to manage a WinAPI function pair via std::unique_ptr: #include int* __stdcall construct(){ return new int{5}; } void __stdcall destruct(int* v){ delete v; } int main() { using Ptr = std::unique_ptr; Ptr…
Benjamin Buch
  • 4,752
  • 7
  • 28
  • 51
0
votes
0 answers

Intel MKL: link to PARDISO

setup: Visual Studio 2017 Intel Parallel Studio 2018 Intel Fortran Compiler Classic VS solution: Project A, contains a subroutine "1" which calls MKL Pardiso Project B, a unit test project that calls subroutine "1" Solution builds fine in…
CTZStef
  • 1,675
  • 2
  • 18
  • 47
0
votes
2 answers

__stdcall in function paramater

does anybody know if is possible to add __stdcall (CALLBACK) in function parameter like this?: void Function(LRESULT CALLBACK (*f)(HWND, UINT, WPARAM, LPARAM)); It gives me following error: a calling convention may not be followed by a nested…
0
votes
1 answer

Correct calling convention for exporting windows DLL functions for Excel VBA without mangled names

I am writing a DLL to export functions to be used in Excel VBA - I have found a way to be able to pass parameters in but with mangled names. If I set up without name mangling then I can not pass parameters and get a calling convention error I use…
JohnnieL
  • 1,192
  • 1
  • 9
  • 15
0
votes
1 answer

Missing leading underscore in exported stdcall functions with minGW

I am maintaining some DLL for Windows that is delivered in 32 and 64 bit versions. It has been build with Visual Studio 2010, but for some reasons I recently changed to MinGW (7.3, also tried 9.2). For the 64 bit version everything seems to be ok,…
Martian
  • 3
  • 3
0
votes
1 answer

Does stdcall use SSE registers? And does he restore them?

I am interested in whether stdcall uses SSE registers on x86, and if so, will it restore them, like ESI, EDI, EBP, EBX?
10minutes
  • 3
  • 1
0
votes
1 answer

Call a StdCall Subroutine in Fortran

I have two subroutines in a DLL. To call them in C#, they are changed to STDCALL like this: SUBROUTINE MoveToZero(X, N) !DEC$ ATTRIBUTES DLLEXPORT::MoveToZero !DEC$ ATTRIBUTES STDCALL,ALIAS:'RemoveBias'::MoveToZero USE MKL_DFTI …
Chen
  • 33
  • 1
  • 5
0
votes
0 answers

how to pass void function pointer as parameter

I need to use the function SetEventCallback in 3rd party dll. void __stdcall SetEventCallback(void __stdcall callbackFunc(int val)) This function registers callbackFunc as callback function of some registered events. If an event occurs,…
HJ Kim
  • 1
0
votes
1 answer

Passing C++ class member function as a paremeter to C function

I am using a c dll in a c++ class. One of the member functions should call the following function that generates an interrupt and calls a service routine: signed short __stdcall SetIrqConditions ( signed short DevNum, unsigned short…
neko
  • 13
  • 4