Fax Event is not fired in VB.NET for incoming fax
-
Hi, I want to use fax service extended com api with VB.NET and did the following: I am using faxcomex.dll for fax server connection and etc. Public Class frmSendFax Inherits System.Windows.Forms.Form Public WithEvents objFaxServer As New FAXCOMEXLib.FaxServer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Connect to the fax server objFaxServer.Connect("") objFaxServer.ListenToServerEvents(FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL + FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE) End Sub Private Sub objFaxServer_OnIncomingJobAdded(ByVal objFaxServer As FAXCOMEXLib.IFaxServer, ByVal jobid As String) Handles objFaxServer_OnIncomingJobAdded Dim objFaxIncomingQueue As FAXCOMEXLib.FaxIncomingQueue Dim objFaxIncomingJob As FAXCOMEXLib.FaxIncomingJob Dim strCallerID As String objFaxIncomingJob = objFaxIncomingQueue.GetJob(jobid) strCallerID = objFaxIncomingJob.CallerId() MsgBox(strCallerID) End Sub But how can I get the event called as it not happening in VB.NET??? I hope anybody can help me. Thanks Prasananjit Dash
-
Hi, I want to use fax service extended com api with VB.NET and did the following: I am using faxcomex.dll for fax server connection and etc. Public Class frmSendFax Inherits System.Windows.Forms.Form Public WithEvents objFaxServer As New FAXCOMEXLib.FaxServer Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Connect to the fax server objFaxServer.Connect("") objFaxServer.ListenToServerEvents(FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL + FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE) End Sub Private Sub objFaxServer_OnIncomingJobAdded(ByVal objFaxServer As FAXCOMEXLib.IFaxServer, ByVal jobid As String) Handles objFaxServer_OnIncomingJobAdded Dim objFaxIncomingQueue As FAXCOMEXLib.FaxIncomingQueue Dim objFaxIncomingJob As FAXCOMEXLib.FaxIncomingJob Dim strCallerID As String objFaxIncomingJob = objFaxIncomingQueue.GetJob(jobid) strCallerID = objFaxIncomingJob.CallerId() MsgBox(strCallerID) End Sub But how can I get the event called as it not happening in VB.NET??? I hope anybody can help me. Thanks Prasananjit Dash
At a glance, I can see one mistake:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL + _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)Should be:
objFaxServer.ListenToServerEvents( _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetINCOMING_CALL Or _
FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetIN_QUEUE)Adding values together will cause bits to be set/reset where they shouldn't because of mathmatical carry's. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome -- modified at 10:46 Wednesday 15th February, 2006