Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
How to change calling convention in C?
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Shubhangi24
New Member
Join Date:
Oct 2012
Posts:
20
#1
How to change calling convention in C?
Nov 20 '12, 10:54 AM
As C supports _cdecl calling convention if I want to change it to _stdcall then what should I have to do?
donbock
Recognized Expert
Top Contributor
Join Date:
Mar 2008
Posts:
2427
#2
Nov 20 '12, 01:52 PM
This is outside the C Standard, making it an implementation-defined feature. What is your compiler and target environment?
Comment
Post
Cancel
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#3
Nov 20 '12, 03:13 PM
Just place the calling convention between the function name and the return type:
Code:
void _stdcall Myfunction( etc...);
BTW: _stdcall is also known as WINAPI.
Comment
Post
Cancel
Shubhangi24
New Member
Join Date:
Oct 2012
Posts:
20
#4
Nov 21 '12, 08:16 AM
Thank you weaknessforcats .....
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment