Z zhanghl Unregistered / Unconfirmed GUEST, unregistred user! 1998-10-08 #1 我在使用Win32 API的WaveOutGetVolume函数时,它的第二个参数 被声明为PDWORD类型,请问如何获得这种类型变量的高字和低字, 并将其转换为整型变量。谢谢。
吕 吕雪松 Unregistered / Unconfirmed GUEST, unregistred user! 1998-10-08 #2 兄弟,是不是这样? PDWORD是pointer of Double word procedure TForm1.Button1Click(Sender: TObject); var II : PDWORD; HH,LL : integer; begin New(II); II^ := 1012; HH := Hi(II^); LL := Lo(II^); MessageDlg(IntToStr(HH)+','+IntToStr(LL),mtinformation,[mbYes],0); Dispose(II); end;
兄弟,是不是这样? PDWORD是pointer of Double word procedure TForm1.Button1Click(Sender: TObject); var II : PDWORD; HH,LL : integer; begin New(II); II^ := 1012; HH := Hi(II^); LL := Lo(II^); MessageDlg(IntToStr(HH)+','+IntToStr(LL),mtinformation,[mbYes],0); Dispose(II); end;
J jiangtao Unregistered / Unconfirmed GUEST, unregistred user! 1998-10-08 #3 code as below: var ptrWordDWORD; highInt,lowInt:Integer; highInt:=HiWord(ptrWord^); lowInt:=LoWord(ptrWord^);
code as below: var ptrWordDWORD; highInt,lowInt:Integer; highInt:=HiWord(ptrWord^); lowInt:=LoWord(ptrWord^);
K Kiven Unregistered / Unconfirmed GUEST, unregistred user! 1998-10-08 #4 一个DWORD是四字节的变量,而一个INTEGER也是四字节变量。可以这样用: dw: DWORD; pdw: PDWORD; dw:=3; pdw:=@dw; WaveOutGetVolume(var1,pdw,var2...);
一个DWORD是四字节的变量,而一个INTEGER也是四字节变量。可以这样用: dw: DWORD; pdw: PDWORD; dw:=3; pdw:=@dw; WaveOutGetVolume(var1,pdw,var2...);
Z zhl Unregistered / Unconfirmed GUEST, unregistred user! 1998-10-11 #5 Var aaDWORD; bb:INTEGER; BEGIN ... bb=@aa; ... END