Ole4D Methods

OCCreaFomFile(p_AreaVar;p_FilePath)



Method OCCreaFomFile, creates an Ole object from a file. The type of the ole object is decided by the operating system during OCCreaFomFile method call.

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


Return Values

0 – The method call was successful.
If the method call was not successful the return value is non zero. For more information call OCLastError.

Remarks

The object is created in the inactive state. The user interface of the object like toolbars and menus is not shown. To activate the object call OCActivate with the plug-in area variable as parameter.

Example

$i := OCCreaFomFile(OlePlugIn,“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
OCCreaLinkToFile, OCCreaFromProgId, OCCreaFromCLSID, OCCreaFromBlob, OCDestroyObject, OCActivate , OCDeactivate