Ole4D Methods

OCCreaLinkToFile(p_AreaVar;p_FilePath)

Method creates an Ole object linked to a file. The type of the ole object is decided by the operating system during OCCreaLinkToFile method call.

Parameters
Parameter Type   Description
p_AreaVar Longint -> Variable of the plug-in area.
p_FilePath String -> Path of the file from which the Ole object is created.


Return Values
The object is created in the inactive state. The user interface of the object like toolbars and menus is not shown at this time. To show the user interface and enable the object call OCActivate. An object linked to a file can not be activated in place.

Example
$i := OCCreaLinkToFile(Ole PlugIn,“c:\log.txt”)
If ($i#0)
  ALERT(String($i)+OCSysMessage($i))
Else
  $i:=OCActivate(OlePlugIn)
   If ($i#0)
    ALERT(OCSysMessage($i))
   End if
End if


See Also
OCCreaFromFile, OCCreaFromProgId, OCCreaFromCLSID, OCCreaFromBlob, OCDestroyObject, OCActivate