flat assembler
Message board for the users of flat assembler.

Index > Windows > How do I create CDECL proc?

Author
Thread Post new topic Reply to topic
Ben321



Joined: 07 Dec 2017
Posts: 70
Ben321 05 Apr 2018, 08:54
Using "proc" and "endp" macros, I can create an STDCALL function. What if I want to create a CDECL function instead? I tried "cproc" and "procc" as the start of the function, but those don't work. I assume those aren't the correct name of the macro. Any help would be greatly appreciated.
Post 05 Apr 2018, 08:54
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8367
Location: Kraków, Poland
Tomasz Grysztar 05 Apr 2018, 09:29
See Windows Programming Headers documentation, section 1.3.
Quote:
The name of procedure can be also followed by either the stdcall or c keyword to define the calling convention it uses.
Post 05 Apr 2018, 09:29
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20513
Location: In your JS exploiting you and your system
revolution 05 Apr 2018, 10:52
Code:
proc my_c_function c arg0,arg1
;...
endp

proc my_stdcall_function stdcall arg0,arg1
;...
endp    
Post 05 Apr 2018, 10:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.