Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
|
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 25th, 2006, 07:46 AM
Registered User
 
Join Date: Jul 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with recieving fax by FAXCOMEXLib

hi all i have a problem with recieving fax:
i am using win xp , FAXCOMEXLib and c# 2005. i tried to send fax and it work good but when i try to recieve the fax it didn't work !! the OnNewCall event didn't work !!and the other events are worked good.
so can any body help me in that ! thanx...
this is my code:

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

using FAXCOMEXLib;

namespace WindowsApplication2

{

publicpartialclassForm1 : Form

{

public FAXCOMEXLib.FaxServerClass fserver;

public Form1()

{

InitializeComponent();

}

privatevoid Form1_Load(object sender, EventArgs e)

{

fserver = new FAXCOMEXLib.FaxServerClass();

string machineName = System.Environment.MachineName;

fserver.Connect(machineName);

FAXCOMEXLib.FaxDevice fdc = (FaxDeviceClass)fserver.GetDevices()[0];

fdc.ReceiveMode = FAX_DEVICE_RECEIVE_MODE_ENUM.fdrmAUTO_ANSWER;

fdc.RingsBeforeAnswer = 1;



fserver.ListenToServerEvents(FAXCOMEXLib.FAX_SERVE R_EVENTS_TYPE_ENUM.fsetINCOMING_CALL | FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetFXSSVC _ENDED | FAXCOMEXLib.FAX_SERVER_EVENTS_TYPE_ENUM.fsetOUT_AR CHIVE);

fserver.OnNewCall += newIFaxServerNotify_OnNewCallEventHandler(fserver_ OnNewCall);

fserver.OnServerShutDown += newIFaxServerNotify_OnServerShutDownEventHandler(f server_OnServerShutDown);

fserver.OnOutgoingMessageAdded += newIFaxServerNotify_OnOutgoingMessageAddedEventHan dle r(fserver_OnOutgoingMessageAdded);

}

void fserver_OnOutgoingMessageAdded(FaxServer pFaxServer, string bstrMessageId)

{

MessageBox.Show(" Message sent ");

}

void fserver_OnNewCall(FaxServer pFaxServer, int lCallId, int lDeviceId, string bstrCallerId)

{

MessageBox.Show("There is a new call.");

}

void fserver_OnServerShutDown(FaxServer pFaxServer)

{

MessageBox.Show(" Shut Down Event Fired ");

}

}

}





Similar Threads
Thread Thread Starter Forum Replies Last Post
help in recieving fax by FAXCOMLib ahmedelmassry General .NET 3 June 23rd, 2011 09:12 AM
help in recieving fax by FAXCOMLib ahmedelmassry .NET Framework 2.0 0 July 26th, 2006 06:02 AM
Problem with Recieving Email in ASP qazi_nomi Classic ASP Components 1 June 6th, 2004 06:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.