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
0
votes
1 answer

Clarion 6.3 DLL, *CSTRING parameter exporte function - adds an invisible parameter?

I need to negotiate a function call, from my Delphi app, into provided DLL made in Clarion 6.3. I need to pass one or two string parameters (either one functon wit htwo params or two single-params functions). We quickly settled on using 1-byte…
Arioch 'The
  • 15,799
  • 35
  • 62
0
votes
0 answers

AccessViolationException while trying to P/Invoke a simple C++ function

I am trying to call the a function in a C++ exe from my C# program. This is dllmain.cpp: #include #define EXPORT(type) extern "C" __declspec(dllexport) type __stdcall EXPORT(void) SetupEngine(HWND handle) { printf("asd\n"); } And this…
Lázár Zsolt
  • 685
  • 8
  • 29
0
votes
0 answers

Problems linking against a DLL

I'm trying to use a third party DLL (I'm compiling using MinGW) but I'm facing some troubles. First of all, the DLL exports undecorated names, but the declaration of the functions seen in the header files contain "__stdcall". Appart of that, I'm…
Pablo
  • 1
  • 2
0
votes
0 answers

MinGW custom export function name with stdcall

I need to export function extern "C" __declspec(dllexport) int __stdcall MyFunc(int a,int b) { return a*2+b*b; } Strictly with "MyFunc" export name, not MyFunc@8 MSVC allows do this via .def files, but how to do this in MinGW? I really need to…
0
votes
0 answers

c++ dll function export naming conventions (mangling)

I am totally new in C++ and starting with creating a simple dll and console app that tests the dll. The dll plugin afterwards should work on x86 machines (diag tools, ECU or PLC). The samples given to me that I fallow the same structure exports dll…
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
0
votes
1 answer

Unexpected calling convention for PInvoke

I have a library in dll and its header file, I don't have source for it. I need to use pinvoke to call this unmanaged code from C#, but have problem in setting calling convention. The header file look like: #ifdef EVOLIB_EXPORTS #define EVOLIB_API…
0
votes
1 answer

How to declare a function with variable arguments to be stdcall?

Now I am designing a function f(index,...) which will call #index entry in a function array passing the rest of parameters. If you see the function array as a service list, f acts like a service distributer. f is written in assembly. It pops the…
Dappur
  • 59
  • 5
0
votes
1 answer

How to specify stdcall calling convention with gcc?

Using gcc version 4.1.2, targeting Linux, could not figure out how to specify stdcall. Found lots of seemingly related answers that all say to use the following: typedef void (__stdcall *int)(int); This is not working though.
KaPtain
  • 21
  • 1
  • 2
0
votes
1 answer

Windows Service is Assembly - StartServiceCtrlDispatcher error 3221225477

I am writing a service in assembly. When I call StartServiceCtrlDispatcher I get error code: 3221225477 (C0000005h) which I believe is an access violation exception. No errors with an empty table and all table pointers are tested. So I am thinking,…
0
votes
0 answers

Marshal.GetDelegateForFunctionPointer on Android using embedded Mono

I'm embedding Mono in a C++ app, and then calling a C function from a C# routine via function pointer. I'm using Marshal.GetDelegateForFunctionPointer for the C native function. I have this working in Windows, but on Android, the C call stack…
mbelew
  • 1
  • 2
0
votes
0 answers

MinGW DLL __stdcall calling convention linker error

I created a DLL using MinGW 32 bit compiler using the __stdcall calling convention. Because DLL is used by a external tool requiring this calling convention without the @ notation I used the -Wl,--kill-at notation. The external tool operates…
Jonny Schubert
  • 1,393
  • 2
  • 18
  • 39
0
votes
1 answer

Assembly: ecx not decreasing

I am using MASM and currently implementing a loop displaying Capital alphabets, small alphabets and ASCII in between .386 .model flat, stdcall option casemap :none include c:\masm32\include\windows.inc include…
Mian Bilawal
  • 61
  • 10
0
votes
2 answers

Linker Error LNK2019 traced back to an __stdcall I think I got the right lib - what can I do to resolve this?

I tried to port a LabCVI Project to MSVS 2010 C++ Express. There is a line of code which reads like this: if (InitCVIRTE == 0) return 0; A Linker Error occurs: LNK2019 "_InitCVIRTEEx@12" - all relevant header already feature the cpp…
Johannes
  • 6,490
  • 10
  • 59
  • 108
0
votes
1 answer

TypeDef with Function Pointer: Function does not Exist

The problem is running code on an older machine where a requested function does not exist. To check for it one uses LoadLibrary and GetProcAddress as demonstrated here, but GetProcAddress requires the address of the functions in a TypeDef prior to…
Laurie Stearn
  • 959
  • 1
  • 13
  • 34
0
votes
2 answers

DLL calling conventions & access violation

after reading and learning for years on this great platform its my first post now. My Problem: In C++ I am trying to create a dynamic linked library (32 bit) that will serve as a AQMP Communication Client (based on SimpleAmqpClient). The dll file…
wolfspex
  • 11
  • 3