pwap.gml
来自「开放源码的编译器open watcom 1.6.0版的源代码」· GML 代码 · 共 38 行
GML
38 行
.func PASS_WORD_AS_POINTER
.if '&lang' eq 'FORTRAN 77' .do begin
c$include 'winapi.fi'
integer*4 function PASS_WORD_AS_POINTER( dw )
integer*4 dw
.do end
.if '&lang' eq 'C' or '&lang' eq 'C/C++' .do begin
#include <windows.h>
void *PASS_WORD_AS_POINTER( DWORD dw );
.do end
.funcend
.desc begin
Some Windows API functions have pointer parameters that do not always
take pointers.
Sometimes these parameters are pure data.
In order to stop the supervisor from trying to convert the data into a
16-bit far pointer, the &func function is used.
.desc end
.return begin
The &func returns a 32-bit "near" pointer, that is really the parameter
.arg dw.
.return end
.if '&lang' eq 'FORTRAN 77' .do begin
.exmp begin
c$include winapi.fi
call Func( PASS_WORD_AS_POINTER(1) )
.exmp end
.do end
.if '&lang' eq 'C' or '&lang' eq 'C/C++' .do begin
.exmp begin
#include <windows.h>
Func( PASS_WORD_AS_POINTER( 1 ) );
.exmp end
.do end
.class WIN386
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?