关于delphi中函数的参数问题(50分)

  • 主题发起人 zhangheaaa
  • 开始时间
Z

zhangheaaa

Unregistered / Unconfirmed
GUEST, unregistred user!
请问在delphi中的函数申明中,’far’,’stdcall’这两个参数表示什么意思?例如:

function imp(hwndime:hwnd;lpimepro:string):word;far;stdcall;
 
你为什么不查帮助文件????

The table below summarizes calling conventions.
Calling conventions
Directive Parameter order Clean-up Passes parameters in registers?
register Left-to-right Routine Yes
pascal Left-to-right Routine No
cdecl Right-to-left Caller No
stdcall Right-to-left Routine No
safecall Right-to-left Routine No

The directives near, far, and export refer to calling conventions in 16-bit Windows programming. They have no effect in 32-bit applications and are maintained for backward compatibility only.
 
本人英语不好,请用中文解释。
 
firnwolf:本人不太熟悉帮助文件的使用,请指教如何使用,比如以上这个问题
查找帮助文件的过程。
 
stdcall Right-to-left是说的函数的参数的调用方式(从左到右)
 
这都是叁数的调用约定
如调用vc编的del....
 

在UNIT中打个STDCALL,光标移到STDCALL中,打F1,得到帮助!
 
偶用帮助文件一般是打开delphi help或者windows sdk,然后在index中写入关键字。
不过不爽的是不能search,sdk的最好用msdn。
stdcall等主要是在exe和windows系统之间,exe和dll之间参数调用的协议。
在不同开发工具中有不同的说明,在vc中stdcall对应的是__stdcall.
 
偶用帮助文件一般是打开delphi help或者windows sdk,然后在index中写入关键字。
不过不爽的是不能search,sdk的最好用msdn。
stdcall等主要是在exe和windows系统之间,exe和dll之间参数调用的协议。
在不同开发工具中有不同的说明,在vc中stdcall对应的是__stdcall.
 
多人接受答案了。
 
顶部