1

我有一个小问题。我想将一点代码从 C/C++ 翻译成 Delphi。

LPVOID lpMyVar;

*(LPWORD)lpMyVar = 0xF9EB;

我尝试了几种方法,但无济于事。如果有人可以帮助我,请。提前致谢!

4

1 回答 1

5
type PDWORD = ^DWORD;
var lpMyVar: Pointer;

PDWORD(lpMyVar)^ := $F9EB;

但最好声明lpMyVar为类型化指针:

var lpMyVar: ^DWORD;

lpMyVar^ := $F9EB;
于 2013-07-02T15:56:49.937 回答