OpenProfile()

Top  Previous  Next

Object: EHL7.EHL7Processor

FileName: EHL7.dll

 

METHOD

 

Name: OpenProfile()

Parameters: None

Returns: Boolean

Description: Loads the profile from the ini file specified in the IniFileName property.

 

The HL7Processor object is modeless.  This method spawns a separate processing thread of execution and returns to the calling program immediately with the return value (boolean) indicating whether execution of the profile was started successfully.  The ProcessingStarted event will fire BEFORE this method returns, as will a ProfileError event if a problem occurs while validating the object properties.  Execution will continue until the object is destroyed OR the CancelProcessing() method is called.

 

 

Example:

'Declare the object

Private WithEvents myProcessorObj As EHL7.EHL7Processor

 

Private Sub Form_Load()

'Instantiate the object

Set myProcessorObj = New EHL7.EHL7Processor

myProcessorObj.IniFileName = "C:\EasyHL7\MyProfile.ini"

If Not myProcessorObj.OpenProfile() Then

       MsgBox myProcessorObj.LastError

       myProcessorObj.ClearErrors

       'Would display 'Profile filename does not exist or is not visible at this time'

End If

If Not myProcessorObj.ProcessProfile() Then

       MsgBox myProcessorObj.LastError

       myProcessorObj.ClearErrors

End If

End Sub

 

Private Sub CancelButton_Click

myProcessorObj.CancelProcessing

End Sub

 

See Also: Polling event