HOW TO
When the MapObjects LT type library is imported into Delphi, the Reverse method of the Points collection may not be wrapped correctly. In this case, the raw dispatch interface must be used.
Code:
var
ClassDispatchInterface : IDispatch;
Names : array [0..0] of PWideChar;
NameDispIds : array [0..0] of TDispID;
Params : TDispParams;
Code:
ClassDispatchInterface := pts;
Code:
Names[0] := StringToOleStr('Reverse');
ClassDispatchInterface.GetIDsOfNames (GUID_NULL, @Names, 1, LOCALE_SYSTEM_DEFAULT,@NameDispIds);
Code:
Params.rgvarg := nil;
Params.rgdispidNamedArgs := nil;
Params.cArgs := 0;
Params.cNamedArgs := 0;
ClassDispatchInterface.Invoke(NameDispIds[0], GUID_NULL, LOCALE_SYSTEM_DEFAULT,DISPATCH_METHOD, Params, nil,nil,nil);
Article ID:000005489
Get help from ArcGIS experts
Download the Esri Support App