473,785 Members | 2,714 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to find the status of fax operation using FAXCOM.dll

111 New Member
This article will explain you how to find the status of the fax operation. (Using FAXCOM.dll). Author: Bharath Reddy VasiReddy

Reference to the FAXCOM.DLL

Reference to
Expand|Select|Wrap|Line Numbers
  1. import FAXCOM
  2. import FAXCOMLib 
  3.  
Tracking The Status of Faxes:

After sending the fax, we need to confirm whether the fax has been sent or not. For this, we need to employ tracking for the status of faxes. In this, if the file gets transmitted in its first attempt of dialing the Faxmodem, the status of the fax Queue will be changed; otherwise it will try two more times (the exact no. of times can be modified programmaticall y). For this we have to create FaxJob object, which permits a fax client Visual Basic application to access the job status for incoming and outgoing fax transmissions, and to pause, resume, cancel or restart a fax job.

We can also use the object to retrieve information about fax jobs. The information includes, among other items, the fax number to which the fax server will send the transmission, job attributes, and recipient and sender information. There is one FaxJob object for each queued job associated with the server.

Prior to that, we have to call the GetJobs method of the FaxServer object to create a FaxJobs object on the connected fax server. Using the SetStatus method of Fax Status object, we can change the job status of a specified FaxJob object. We can use this method to pause, resume, cancel, or restart a specified fax job.
Expand|Select|Wrap|Line Numbers
  1. Dim FJ As New FaxJobs     
  2. 'to access the job status for incoming    
  3. 'and outgoing fax transmissions   
  4. Dim intCount As Integer  
  5. Dim FJ1 As New FaxJob   
  6.    Set FJ = FS.GetJobs   
  7.    intCount = FJ.Count   
  8. For i = 1 To intCount   
  9.    Set FJ1 = FJ.Item(i)   
  10.    MsgBox "JobId=" & FJ1.JobId   
  11.    MsgBox "QueueStatus   " + FJ1.QueueStatus   
  12. Next I   
  13. Dim FJ As New FaxJobs  
  14. 'to access the job status for incoming 
  15. 'and outgoing fax transmissions
  16. Dim intCount As Integer
  17. Dim FJ1 As New FaxJob
  18. Set FJ = FS.GetJobs
  19. intCount = FJ.Count
  20. For i = 1 To intCount
  21. Set FJ1 = FJ.Item(i)
  22. MsgBox "JobId=" & FJ1.JobId
  23. MsgBox "QueueStatus   " + FJ1.QueueStatus
  24. Next I
  25.  
  26.  

Monitoring Port Status:
The Fax Status allows our application to keep track of each stage of a fax’s sending or receiving progress. Using Get Status method of the FaxPort object, we can create Fax Status object. The FaxStatus object permits a fax client Visual Basic application to retrieve status information for a specific port on a connected fax server.

Before that, we have to create FaxPorts object by calling the GetPorts method of the FaxServer object. Using the Receive property of Fax Status object, we can find whether the specified fax port is currently receiving a fax transmission or not. If this property is a nonzero value, the port is currently receiving a fax.

The Send property of FaxStatus object tells us whether the specified fax port is currently sending a fax transmission. If this property is a nonzero value, the port is currently sending a fax.

The sample code for monitoring Fax status as follows:
Expand|Select|Wrap|Line Numbers
  1. Dim FS As New FaxServer    
  2. Dim   FST As New FaxStatus   
  3. Dim FP As New FaxPort   
  4. Dim lReceive As Long  
  5. Dim lSend As Long  
  6.    Set FP = FS.GetPorts   
  7.    Set FST = FP.Item(1)   
  8. lReceive = FP1.Receive   
  9. If lReceive Then  
  10.    MsgBox "port is enabled to receive faxes"  
  11. Else  
  12.    MsgBox "port is not enabled to receive faxes"  
  13. End If  
  14. lSend = FP1.Send   
  15. If  lSend Then  
  16.    MsgBox "port is enabled to Send faxes"  
  17. Else  
  18.    MsgBox "port is not enabled to Send faxes"  
  19. End If  
  20. Dim FS As New FaxServer 
  21. Dim   FST As New FaxStatus
  22. Dim FP As New FaxPort
  23. Dim lReceive As Long
  24. Dim lSend As Long
  25. Set FP = FS.GetPorts
  26. Set FST = FP.Item(1)
  27. lReceive = FP1.Receive
  28. If lReceive Then
  29. MsgBox "port is enabled to receive faxes"
  30. Else
  31. MsgBox "port is not enabled to receive faxes"
  32. End If
  33. lSend = FP1.Send
  34. If  lSend Then
  35. MsgBox "port is enabled to Send faxes"
  36. Else
  37. MsgBox "port is not enabled to Send faxes"
  38. End If
  39.  
  40.  
Thanks & Regs
Bharath Reddy VasiReddy
eXensys
May 22 '07 #1
3 16763
Frinavale
9,735 Recognized Expert Moderator Expert
Bharath, thank you for providing such an insight on how to use faxes in .NET!
I'm sure this will be very useful for many people!

-Frinny
May 22 '07 #2
mushtaq22
1 New Member
Hi

Can you tell me how can i find the port in which fax modem is connected. when i am accessing through network.

I mean to say i need to send a fax which is connected to some other machine.

Pls help
Jan 23 '08 #3
HamzaFassi
8 New Member
Hi, I was wondering if it's possible to connect many fax modems to a single PC.. then to create multiple objects for every fax modem then send the next fax with the next available faxmodem.. is it possible? any suggestion?

please help
Sep 22 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5047
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified folder structure and naming conventions and then send a Net send message to those users telling them to rectify. The information I want to get is when you select the file/folder and then: Properties -> Security Tab -> Advanced Button -> Owner Tab ->...
3
14167
by: jadionne | last post by:
I am doing a rollforward and want to query the status of the rollforward. I issue the command: DB2 Rollforward database namdwh query status. I get the following error: C:\Documents and Settings\webi>db2 rollforward database namdwh query status SQL1035N The database is currently in use. SQLSTATE=57019 I know its in use...I am the one using it. How do I get around this?
3
1990
by: iw3arv | last post by:
Hello, I've, probably, a simple problem but I'm not able to figure the solution!!! I've realized a web service method that reads an Excel sheet and convert the information in xml. This conversion is time consuming and I've the idea to spilt the web service in 3 metods: "Xls2Xml" that converts the files, generate the xml and store it in the
0
1149
by: iw3arv | last post by:
Hello, I've, probably, a simple problem but I'm not able to figure the solution!!! I've realized a web service method that reads an Excel sheet and convert the information in xml. This conversion is time consuming and I've the idea to spilt the web service in 3 metods: "Xls2Xml" that converts the files, generate the xml and store it in the
1
5369
by: Divakar | last post by:
Hi, When I do a LIST HISTORY BACKUP, the following is shown the O/P. ---------------------------------------------------------------------------- Comment: DB2 BACKUP ABCD ONLINE Start Time: 20060823230001 End Time: 20060824001941 Status: A
9
1577
by: pamelafluente | last post by:
Hi guys, After the Exception question, I have another one, strictly related. I would also like what is your preferred device to bubble a message (not by exception) to the user Interface. Assume for instance the following simple schema. What is the best way to bubble the "Status" string message to the UI ? Please suggest appropriate code changes.
1
1871
by: Bharath Reddy VasiReddy | last post by:
hai all, I am using FAXCOM.dll for fax operation in my application. Here i am getting an "Unspecified error" exception. Can anyone say me whats wrong in my code. Thanks in advance.... Here is the Code:
7
8807
by: bharathreddy | last post by:
Dear ALL, I am trying to work with FAXCOM.dll to send fax. But here i am getting an error at send() function. Here is the code: ----------------------- FAXCOMLib.FaxServer fxsrv = new FAXCOMLib.FaxServer(); FAXCOMLib.FaxDoc fxdoc = (FAXCOMLib.FaxDoc)fxsrv.CreateDocument("fbharath.txt"); try
9
4122
by: tshad | last post by:
I have a Windows App that is doing some work and then writing a "Now Processing..." line to the status line of the window as well as the Textbox on the form. But the problem is that the work is in another class from the main class. So it couldn't access the Status Line or textbox. So what we did was set them up as properties: string IStatusDisplay.Status
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10319
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9947
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7496
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5380
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3645
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.