Problem sending color fax using C++ DLL

Fax C++/ActiveX related topics

Moderator: Technical Support Team

Problem sending color fax using C++ DLL

Postby rftghost » Thu Mar 10, 2005 5:05 am


I'm using the FAX SDK and I'm trying to send a color fax from a windows bitmap (24bit color) using a Class1 modem.
I previously used the OCX from VB and it worked ok.
I modified the example (FaxDem32\Sample Source Codes\DLL\Fax C++ SDK\SIMPLE\) and tried to send the fax. The program is stopping with a -105 error on SendFaxNow call.

Here is the struct for CreateFax call:

sFaxParam.PageNum = 1;
sFaxParam.Width = PWD_1728;
sFaxParam.Length = PLN_NOCHANGE;
sFaxParam.Compress = DCF_1DMH;
sFaxParam.Binary = BFT_NOCHANGE;
sFaxParam.BitOrder = BTO_FIRST_LSB;
sFaxParam.Ecm = ECM_DISABLE;
sFaxParam.ColorFax = CFAX_ENABLE;
sFaxParam.ColorType = CFAX_TRUECOLOR;
sFaxParam.SendMode = SEND_MH_ALWAYS;
sFaxParam.Send = TRUE;
sFaxParam.DeleteFiles = TRUE;[/code]

I tried all the configuration for sFaxParam.Ecm but with the same result.

the call to Create fax:
fax = CreateSendFax(REGTYPE_COLORFAX,&sFaxParam);
the call to set fax page image:
stat = SetFaxImagePage( fax, 0, IMT_FILE_BMP, &FaxPage, 0 );
both calls works ok.

Please help.

PS: I can send the entire program or the image if needed.

Posts: 2
Joined: Thu Mar 10, 2005 4:56 am
Location: Romania

Postby arcosoft » Fri Mar 11, 2005 9:37 am

Look in faxtype.h,


For color, you need to enable ECM:

sFaxParam.Ecm = ECM_ENABLE;
Posts: 7
Joined: Fri Mar 11, 2005 9:35 am


Postby rftghost » Fri Mar 11, 2005 9:52 am

I checked the error code... this was the first thing I did. As I said in my first post,
I tried all the ECM configs: DISABLED.NOCHANGE,ENABLED.
Posts: 2
Joined: Thu Mar 10, 2005 4:56 am
Location: Romania

Postby TechnicalSupportTeam » Mon Apr 11, 2005 5:29 pm

Both the sending and the receiving ends must have ECM enabled when sending color faxes to ensure that the transmission goes through correctly.
Posts: 1005
Joined: Sat Mar 20, 2004 11:50 am

Return to Fax C++ / ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest