惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

B
Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
B
Blog RSS Feed
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
Recent Announcements
Recent Announcements
A
About on SuperTechFans
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Google Online Security Blog
Google Online Security Blog
Google DeepMind News
Google DeepMind News
S
Schneier on Security
S
Secure Thoughts
T
The Exploit Database - CXSecurity.com
Martin Fowler
Martin Fowler
P
Proofpoint News Feed
Security Latest
Security Latest
Jina AI
Jina AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Recorded Future
Recorded Future
T
Tor Project blog
有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News | PayPal Newsroom
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
Forbes - Security
Forbes - Security
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
NISL@THU
NISL@THU
C
Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Google DeepMind News
Google DeepMind News
Project Zero
Project Zero
IT之家
IT之家
T
Threatpost
Cyberwarzone
Cyberwarzone
O
OpenAI News
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
J
Java Code Geeks
P
Proofpoint News Feed
The Last Watchdog
The Last Watchdog
月光博客
月光博客
Latest news
Latest news
MongoDB | Blog
MongoDB | Blog
Apple Machine Learning Research
Apple Machine Learning Research

博客园 - shelvenn's blog

Linux Samba服务器配置 MiniGUI应用程序开发 RTP QOS RTCP (转)H.264 RTP payload 格式 gcc和g++的区别(很详细的描述) RTSP简介 DirectDraw基础篇 DirectShow中常见的RGB/YUV格式(转) #Pragma应用详解 Linux下的实时流媒体编程(RTP,RTCP,RTSP) Linux多线程编程 窗口刷新时的问题(转) VC++2005快速构建安全的应用程序 strcpy ,strncpy ,strlcpy(转载) strcpy_s与strcpy安全性的比较(转载) .h和.cpp文件的区别 YUV色彩空间(转自百度百科) SkinMagic 进行皮肤设置
C++ PASCAL关键字(转)
shelvenn's blog · 2008-01-21 · via 博客园 - shelvenn's blog

VC里面:PASCAL==CALLBACK==WINAPI==__stdcall
        _stdcall是Pascal程序的缺省调用方式,通常用于Win32  Api中,函数采用从右到左的压栈方式,自己在退出时清空堆栈。VC将函数编译后会在函数名前面加上下划线前缀,在函数名后加上"@"和参数的字节数。
    _cdecl是C和C++程序的缺省调用方式。每一个调用它的函数都包含清空堆栈的代码,所以产生的可执行文件大小会比调用_stdcall函数的大。函数采用从右到左的压栈方式。VC将函数编译后会在函数名前面加上下划线前缀。是MFC缺省调用约定。 

        关于PASCAL,其实你只要弄明白一点就行了:声明为这种调用约定的函数都是由它本身来清栈,而__cdecl的函数都是由调用者来清栈。 
   
  实际用的时候,个人觉得两者最大的差别在于:__cdecl的函数参数个数可以声明为不确定,比如printf,scanf之类,而PASCAL的函数是不可以这样做的,如果这样的话它不知道实参有多少个。