{$EXTERNALSYM GetMessage}
function GetMessage(var lpMsg: TMsg; hWnd: HWND;
  wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
{$EXTERNALSYM GetMessageA}
function GetMessageA(var lpMsg: TMsg; hWnd: HWND;
  wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
{$EXTERNALSYM GetMessageW}
function GetMessageW(var lpMsg: TMsg; hWnd: HWND;
  wMsgFilterMin, wMsgFilterMax: UINT): BOOL; stdcall;
上面代码来自windows.pas,其中有些地方不明白,提出两个问题。
1.$EXTERNALSYM 指示符是干啥用的,说明后面函数怎么啦?
2.为什么有GetMessage,GetMessageA,GetMessageW三个呢?三者
有啥区别?

解决方案 »

  1.   

    1、$EXTERNALSYM 是编译指令,表示GetMessage是一个外部符号
    2、GetMessage,GetMessageA,GetMessageW,同一API的不同字符集版本,A结尾的是单字节,W结尾的是双字节
      

  2.   

    顶亮剑。
    楼主,貌似这个按F1,外加百度或者GOOGLE都可以找到,
    难道是来散分的?
      

  3.   

    Syntax {$EXTERNALSYM identifier}
    The EXTERNALSYM directive prevents the specified Pascal symbol from appearing in header files generated for C++Builder. If an overloaded routine is specified, all versions of the routine are excluded from the header file.