Go Up to Using Delphi or RIDL Syntax
COM requires that arrays be passed via a special data type known as a SafeArray. You can create and destroy SafeArrays by calling special COM functions to do so, and all elements within a SafeArray must be valid automation-compatible types. The Delphi compiler has built-in knowledge of COM SafeArrays and automatically calls the COM API to create, copy, and destroy SafeArrays.
procedure HighLightLines(Lines: PSafeArray);
HRESULT STDMETHODCALLTYPE HighlightLines(LPSAFEARRAY Lines)
In the Type Library Editor, a SafeArray must specify the type of its elements. For example, the following line from the text page declares a method with a parameter that is a SafeArray with an element type of Integer:
HRESULT _stdcall HighlightLines(SAFEARRAY(long) Lines);