How to Add GpStructuredStorage to Scripter?


I am using GpStructuredStorage for creating and storing data in StructuredStorage file.

I want to give Scripter access to this object/class so that a script can create and/read StructuredStorage file.

Here is the code that I am using:
stg: IGpStructuredStorage;
stg := CreateStructuredStorage;
Scripter.DefineClassByRTTI(stg);  //<= I get error here during compilation

What mistake am I making here?

I tried to use AddObject and also AddVariable but still I am getting compilation error.

Please guide me.


DefineClassByRTTI needs you pass a TClass to it, not an object or interface. 

Interfaces are not supported in TMS Scripter, unless they implement IDispatch like COM interfaces, I'm not sure IGpStructureStorage supports that. If it doesn't, then you would need to add objects, not interfaces to TMS Scripter to make it work.