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
2 answers

Why does GCC use frame pointer when I call Win32 functions with arguments?

When I compile 32-bit C code with GCC and the -fomit-frame-pointer option, the frame pointer (ebp) is not used unless my function calls Windows API functions with stdcall and atleast one parameter. For example, if I only use GetCommandLine() from…
kktsuri
  • 333
  • 2
  • 11
0
votes
1 answer

Creating an unmanaged DLL (in C++) which communicates with Windows Service?

I had created a dll file(using C++) which captures password changes. Now I need to send it to a Windows service(created by me using C#) which uses WCF service. How to communicate with the service? (the dll is primitive,without classes,and uses…
rampireram
  • 481
  • 2
  • 7
  • 16
0
votes
1 answer

QT - 3rd Party Callback Not Calling back?

I've created a test application for a 3rd party lib I am using, it compiles fine but never seems to hit __stdCall WriteDone. from the example code it looks like this function if(cmcd->BuildISOImage(isoName, &CMCDBurner::WriteDone, NULL) ==…
rreeves
  • 2,408
  • 6
  • 39
  • 53
0
votes
0 answers

Using Delphi DLLs with VS2010. "Cannot find the entry point of function _DataReady@0 in DSOLink.dll"

I am trying to use digital scope Vellman PCSU1000 in one of my projects which I am writing in C++ in Visual Studio 2010. In order to do this I need to use two DLLs provided by the producer of the device: DSOLink.dll and PCSU1000D.dll. I do not have…
maniex
  • 1
0
votes
1 answer

c++-builder: convert into stdcall type

I'm currently trying to port an old owl-c++-builder-projekt to use XE2 and owlnext. In the old file, I could simply call a line (FARPROC)LP_I2COpen = GetProcAddress(Hi_I2C, "I2COpen"); While LP_I2Open is defined with #ifdef WIN32 #define…
Julian
  • 493
  • 4
  • 22
0
votes
1 answer

__cdecl wrapping WinSock function as callback in plain C and call it

Have prepared such function, where some WSA functions will be used as callback: int StartWinSock(int (*WSAStartup)(WORD, LPWSADATA)) { } But when in other code, I'm trying to launch it: StartWinSock(WSAStartup); I'm getting an…
Secret
  • 2,627
  • 7
  • 32
  • 46
0
votes
1 answer

Importing an Embarcadero C++ Builder XE3 DLL into Embarcadero C++ Builder XE3

I try to create a DLL in Embarcadero C++ Builder XE3, and use it in a test-project in the same environment. I take example on a tutorial which code does not give a good result for me (!) :…
Arnaud
  • 109
  • 3
  • 15
0
votes
3 answers

Assembly language - Calling convention

Can someone give me some real example to help me understand what is the callee and what is the caller in assembly language? I have been through most of the sources, but still I can't get how to distinguish between the callee and the caller. Thank…
Pierre C
  • 1
  • 3
0
votes
2 answers

C - DLL needs to be __stdcall and import __cdecl lib

I'm compiling a DLL which needs to use portaudio. It uses all sorts of windows libraries for sockets and such too, but the linker wouldn't recognize the portaudio library. Then I remembered portaudio uses __cdcel instead of __stdcall. Normally I…
Void Star
  • 2,401
  • 4
  • 32
  • 57
-1
votes
3 answers

Thought experiment with __stdcall and corrupted stack (C++)

My mind was wandering today on the topic of function pointers, and I came up with the following scenario in my head: __stdcall int function (int) { return 0; } int main() { (*(int(*)(char*,char*))function)("thought", "experiment"); …
GRB
  • 1,811
  • 3
  • 14
  • 10
-1
votes
1 answer

STDCALL vs CDECL: `ret` vs `sub esp` have anything to do with the calling convention?

In Assembly Language, Seventh Edition for x86 Processors by Kip Irvine, on page 325, it says under 8.2.4 32-Bit Calling Conventions, The C Calling Convention ... The C calling convention solves the problem of cleaning up the runtime stack in a…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
-1
votes
2 answers

A value of type cannot be used to initialize an entity of type

I have a function: long __stdcall call_DLL(long n, byte s0, byte s1, long(__stdcall *CallBack)(long m, byte s0, byte s1)){ //trying to copy the address of CallBack to another pointer long *x = &CallBack; } I am getting an error: a value of type…
Shox88
  • 67
  • 1
  • 2
  • 7
-1
votes
1 answer

How to debug "syntax error: _stdcall"?

I am trying to use this code to define the APIs that are needed to communicate with a card reader. Below is the header file (complete). [AtUsbHid.h] It is throwing several errors, but I figure if the syntax issue is solved, the rest will fall into…
Sreedevi J
  • 673
  • 1
  • 9
  • 15
-2
votes
1 answer

vc++ stdcall function assign to cdecl function pointer worked, why?

//cdecl function pointer int(__cdecl* pfn)(int, int, int, int, int, int, int, int); //stdcall function int __stdcall HHH(int i, int i1, int i2, int i3, int i4, int i5, int i6, int i7) { cout << "HHH" << (i + i1 + i2 + i3 + i4 + i5 + i6 + i7)…
-2
votes
1 answer

Learning reversing via C++, but what does this line do?

typedef int(__stdcall *__MessageBoxA)(HWND, LPCSTR, LPCSTR, UINT); As I said, im trying to learn how to reverse engineer programs using C++ / Assembly, so I'm going through some open source projects I found on the internet. But can anyone explain…
Wes
  • 11
  • 1
  • 3
1 2 3
9
10