2008-12-05 7 views
3

Inno Setup에서 함수 포인터가 지원됩니까? 문서에서 아무것도 찾을 수 없습니다. 필자는 Delphi/Pascal이 그들을 지원한다는 것을 알고 Inno Setup 스크립팅 엔진이 그것을 기반으로하므로 지원되기를 바랍니다.Inno Setup의 함수 포인터

답변

7

방금 ​​테스트를 수행했고 함수 포인터가 실제로 작동합니다. 다음 [Code] 부분은 컴파일하고 잘 작동 :

type 
    TStrProc = procedure (const AStr: String); 

procedure Call(const AProc: TStrProc; const AStr: String); 
begin 
    AProc(AStr); 
end; 

procedure ShowStr(const AStr: String); 
begin 
    MsgBox(AStr, mbInformation, MB_OK); 
end; 

function InitializeSetup(): Boolean; 
begin 
    Call(@ShowStr, 'Hello World!'); 
end; 

을 BTW : 이노 설정 the Pascal Script engine from RemObjects를 사용합니다. 어쩌면 거기에 더 많은 정보를 찾을 수 있습니다.