Fax Inbox read in C#

  • Thread starter Thread starter Rambabu
  • Start date Start date
R

Rambabu

I want to read Fax inbox items and Send items uisng C#
Application

Any one Know this one send to me

(e-mail address removed)
 
The following code snippet might be helpful.
Note: Do add the FaxComex.dll to the C# project

using FAXCOMEXLib;
:

:

//number of messages to be fetched

int count = 10;

string messageId;

FaxServerClass fax = new FaxServerClass();

fax.Connect("");

FaxFolders folders = fax.Folders;

FaxIncomingArchive incoming = folders.IncomingArchive;

FaxIncomingMessageIterator iterator = incoming.GetMessages(count);

FaxIncomingMessage message ;

for(int i=0;i<count && (!iterator.AtEOF) ;i++)

{

message = iterator.Message;

messageId = message.Id;

iterator.MoveNext();

}

---

Renu Bhattar [MSFT]

Microsoft Printing, Imaging and Faxing
This posting isprovided "AS IS" with no warranties and confers no rights.
Please do not send mail directly to this aloas. This alias is for newsgroup
purposes only.
 
I got Error

An unhandled exception of type 'System.InvalidCastException' occurred in
FAx1.exe

Additional information: QueryInterface for interface
FAXCOMEXLib.IFaxFolders failed.


How to retify this error

Can you send as possible as
 
But i got QueryInterface for interface FAXCOMXLib.IFolder Error


How to remove this error
 
Renu said:
The following code snippet might be helpful.
Note: Do add the FaxComex.dll to the C# project

using FAXCOMEXLib;
:

:

//number of messages to be fetched

int count = 10;

string messageId;

FaxServerClass fax = new FaxServerClass();

fax.Connect("");

FaxFolders folders = fax.Folders;

FaxIncomingArchive incoming = folders.IncomingArchive;

FaxIncomingMessageIterator iterator = incoming.GetMessages(count);

FaxIncomingMessage message ;

for(int i=0;i<count && (!iterator.AtEOF) ;i++)

{

message = iterator.Message;

messageId = message.Id;

iterator.MoveNext();

}

---

Renu Bhattar [MSFT]

Microsoft Printing, Imaging and Faxing
This posting isprovided "AS IS" with no warranties and confers no rights.
Please do not send mail directly to this aloas. This alias is for newsgroup
purposes only.


Rambabu said:
I want to read Fax inbox items and Send items uisng C#
Application

Any one Know this one send to me

(e-mail address removed)
 
Renu said:
The following code snippet might be helpful.
Note: Do add the FaxComex.dll to the C# project

using FAXCOMEXLib;
:

:

//number of messages to be fetched

int count = 10;

string messageId;

FaxServerClass fax = new FaxServerClass();

fax.Connect("");

FaxFolders folders = fax.Folders;

FaxIncomingArchive incoming = folders.IncomingArchive;

FaxIncomingMessageIterator iterator = incoming.GetMessages(count);

FaxIncomingMessage message ;

for(int i=0;i<count && (!iterator.AtEOF) ;i++)

{

message = iterator.Message;

messageId = message.Id;

iterator.MoveNext();

}

---

Renu Bhattar [MSFT]

Microsoft Printing, Imaging and Faxing
This posting isprovided "AS IS" with no warranties and confers no rights.
Please do not send mail directly to this aloas. This alias is for newsgroup
purposes only.


Rambabu said:
I want to read Fax inbox items and Send items uisng C#
Application

Any one Know this one send to me

(e-mail address removed)
 
Do you have the interop DLL GAC-ed or placed in the same directory as the
program (exe file)? Also share out your code unless you are sure you didn't
modify anything at all from what Renu wrote in the previous post.

--
Raghavendra R
Microsoft Printing, Imaging and Fax Team
This posting is provided "AS IS" with no warranties, and confers no rights.
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.'
 
Back
Top