需要实现一个接口指针传递的接口方法,并且需要取消引用指针并为其分配OleVariant.这是什么语法?
// Code I have no access to change
function GetEntry: string;
var
value: OleVariant;
begin
Entry(@value);
Result := VarToStr(value);
end;
// My code
procedure Entry(Value: Pointer);
begin
Value^ := ??? // Not sure whats the syntax here in order to assign an OleVariant
end
Run Code Online (Sandbox Code Playgroud)
你可以使用这样的值:
OleVariant(Value^) := ...
Run Code Online (Sandbox Code Playgroud)
或者你可以施放指针:
POleVariant(Value)^ := ...
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
258 次 |
| 最近记录: |