FeResPost Web Site                     FeResPost Online User Manual

VI.0.1.1 Accessing the COM component in ruby

Even though FeResPost is first programmed as a ruby extension, the COM component can also be accessed from ruby language. For this, one first requires the “win32ole” ruby extension that allows the access to all the COM components installed on the computer. Then the FeResPost component can be accesses by requiring the corresponding application:

   require ’win32ole’  
 
   ...  
 
   frpApp = WIN32OLE.new("FeResPost_3_4_4.Application")

In the example, above one required the 3.4.4 version of the FeResPost COM component, and stores a reference to this application in “frpApp” variable.

Note that memory leakage has been observed in win32ole extension of ruby language. This can result in COM objects not being released when they should be. This bug, not related to FeResPost, is currently under investigation, and should be fixed in version 1.8.7 of ruby.