FaxMan SDK Version 4.7



lParam PSEND_FAX points to a SEND_FAX structure containing the up to date information regarding this fax.


The FAXSENDMSG is sent to your application during fax send/receive events to keep your app informed of a fax’s progress. By subscribing to this message stream, your application can easily display the progress of every fax sent and received. Each time the FAXSENDMSG is sent, the underlying SEND_FAX structure will have changed to reflect the new status of the fax. The easiest way to follow the progress of a fax is to follow the SEND_FAX’s fs member, which reflects the current FAXSTATE. The following code shows how this is done:




 pFax = (PSEND_FAX)lParam;

  switch (pFax->fs) {











 // you can include case statements for all of the faxstates

 // you wish to track...



The next question you might ask is "Sure, it gives me the status events, but how do I know what has changed at each event, and what order can I expect them to come in?" Well, the following table should give you some better idea what’s happening with each status event (these entries correspond to the FAXSTATUS enumeration defined in FAXDLL.H):


Sending Status Event

It’s Meaning


FaxMan is initializing the sending structures. Can be ignored


The faxmodem is being initialized. If an error occurs at this stage, the faxmodem is probably not responding at all. It is probably a good idea to present a dialog to your users asking them to verify that the faxmodem is turned on and working properly.


The phone is off-hook and dialing.


Dialing is completed and we’re waiting for a response from the remote faxmodem.


We’re connected to the remote fax and have received its ID string. At this point, the szRemoteID field is filled in with the remote fax’s ID string.


We’ve successfully negotiated with the remote fax machine and have established this session’s parameters. The fields dwSpeed and nFaxRes now reflect the values for this fax session


We are now actually transmitting the fax data


We have completed sending a page of data. At this point, depending on whether there

are more pages to be sent, we will receive either FAXST_COMPLETE or return to FAXST_SENDING.


The fax has been completed


The faxmodem has been freed and all activity for this fax is now finished. The comm port is not released until this notification is received. You should also check the FAXERROR member, fe, to determine whether the fax went through successfully or not. If it did not, the nHangCode member will generally indicate what happened.

Receive Status Event



The faxmodem is being initialized for receiving a fax. Until the FAXST_ANSWERING notification is received the faxmodem has not yet received a call. If there is an error at this point, the faxmodem is probably not responding at all, and the end-user should be instructed to make sure the faxmodem is turned on and is installed properly, etc...


The faxmodem was initialized successfully and is now waiting patiently for a call.


The faxmodem is now receiving a call.


The faxmodem has successfully negotiated the session parameters. The dwSpeed and nSendRes structure members are now valid, as is the szRemoteID string.


We’re receiving page data from the remote fax.


We’ve completed page data reception. At this point we may return to the FAXST_RXDATA stage or we may continue to the FAXST_COMPLETE stage, depending on whether there are more pages to be sent.


We’re done with the receive session


We’ve now closed the faxmodem and freed the comm port. You should check the FAXERROR member, fe, to determine if the fax was successful. If it was now, the nHangCode member will probably indicate why it was not.


This should give you what you need to put together your fax monitoring code.



© 2013 Data Techniques, Inc. All Rights Reserved.

Send comments on this topic.