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

Can I avoid g++ surround _stdcall with __attribute__ string

I use MinGW's g++ to preprocess my file which has the following function: [call_as(ReadAt)] HRESULT _stdcall RemoteReadAt( [in] ULARGE_INTEGER ulOffset, [out, size_is(cb), length_is(*pcbRead)] byte *pv, [in] ULONG…
Harry
  • 89
  • 1
  • 1
  • 6
0
votes
0 answers

Assemly stdcall parameters after @

For what in assembly's procedure stdcall we need to write number of parameters(in bytes) after @? I mean... Anyway we will write "ret numberOfParameters" to clean stack. So for what?
Hungry
  • 13
  • 5
0
votes
2 answers

Calling functions meant for threads normally

I have a function with the prototype DWORD WINAPI blah(LPVOID arg); Which was meant to be used with CreateThread for a threaded app. I call it with CreateThread with no problem. But then somewhere else in the code, I call it normally, just by…
tfkl
  • 71
  • 1
  • 2
0
votes
1 answer

How to make a callback global so I can use it to other functions?

I declared a function like this: int __stdcall DoSomething(int &inputSize, int &outputSize, void(* __stdcall progress)(int) ) { } How can I make progress() callback a global variable to use it in other functions in the same DLL? I am a newbie to…
Tom
  • 2,962
  • 3
  • 39
  • 69
0
votes
0 answers

Dynamic call any function in kernel32, user32, etc

IDE: Code::Blocks Compiler: g++ 4.5.4 (from Mingw32_i686) Type application: console type Ok // sourcefile: winfunctions.h #ifndef __WINFUNCTIONS_H__ #define __WINFUNCTIONS_H__ #include #include
0
votes
0 answers

confused with __STDCALL

i am trying to communicate with a dll from an exe and when i add WINAPI in the dll i get a NULL value during the call GetProcAddress(). Sample Code is: EXE: typedef int __declspec(dllexport) (WINAPI *fun)(int, int); int main() { HINSTANCE…
0
votes
0 answers

TJSONObject ToString method access violation

I call a dll function which returns a TJSONObject. The problem is when I try to add this value to a TStringList an access violation exception is raised. Here is my code: function GetSentMessages(AIdSender: Integer; APageNumber: Integer;…
bob_saginowski
  • 1,429
  • 2
  • 20
  • 35
0
votes
0 answers

Inconsistent results calling DLL from JNA/C versus Pascal

I have a c++ dll library with header files provided, without implementation. And I implement JNA call for this library functions. And I have the problem with only 1 function (other, even similar works fine). This is declaration from .h file: int…
0
votes
0 answers

cdecl and std call - how to make my code conventional

__asm { // push eax // push ecx // movsx ecx, temp_char // lea eax, EKey // call encryptX // encrypt the…
0
votes
1 answer

Didn't work on Windows 7, but it works on Windows 8 dll

I have two DLL files, A and B. A needs B for setWindowsHookEx(). I use: LoadLibrary(L"C:\\Sources\\TestDLL.dll") and GetProcAddress(hDll, "GetMsgProc") When I try to run my program on Windows 7, GetProcAddress(hDll, "GetMsgProc") returns an…
gun95
  • 24
  • 5
0
votes
1 answer

Adding an stdcall on a callback function gives an argument mismatch [GNU]

I'm trying to add an stdcall calling convention to my GNU compiled DLL. Here is my code: typedef void (__stdcall * CTMCashAcceptCallback) ( const struct CTMEventInfo, const struct CTMAcceptEvent ); It's been called by this…
0
votes
2 answers

The procedure entry point axiom_attribute_create could not be located in the dynamic link library

I have a project in c and I want to compile it in CodeBlocks with MinGW. I tried to link its needed libraries but I got undefined reference error so I searched and found out that the libraries that I was using was compiled with MVC++ and cannot…
Sarah Aziziyan
  • 498
  • 9
  • 22
0
votes
1 answer

in winapi __stdcall on x86, what register is 2nd paramter in?

in winapi __stdcall on x86, what register is the 2nd parameter stored in? (ECX?) - also, any idea where i can find some documentation on this?
hanshenrik
  • 19,904
  • 4
  • 43
  • 89
0
votes
3 answers

How do I compile boost using __cdecl calling convention?

I have a project compiled using __cdecl calling convention (msvc2010) and I compiled boost using the same compiler using the default settings. The project linked with boost but I at runtime I got an assert message like this: File:…
sorin
  • 161,544
  • 178
  • 535
  • 806
0
votes
2 answers

Passing a VB6 boolean variable to an stdcall function in C++ DLL

I am looking for the most fool-safe way to pass a VB6 boolean variable to a function (written in C++, stdcall). The C++ function will set the "bool" variable of a struct using this VB6 variable. I have tried declaring it like this in C++: extern…
tmighty
  • 10,734
  • 21
  • 104
  • 218
1 2 3
9
10