FAXCOMEXLib Folders problem under XP Sp1

  • Thread starter Thread starter Nasko
  • Start date Start date
N

Nasko

hi, i have a problem retrieving messages in incoming & outgoing archive.
here is the code, it's picked from similar sample in MSDN and works fine
under Windows2003 but gives a strange exception with WindowsXP.

[STAThread]
static void Main(string[] args)
{
try
{
FaxServer server = new FaxServerClass();
server.Connect( "" );
server.Folders.OutgoingArchive.Refresh();
FaxOutgoingMessageIterator iter =
server.Folders.OutgoingArchive.GetMessages( 100 );

iter.MoveFirst();
while( iter.AtEOF )
{
Console.WriteLine( iter.Message.Id );
iter.MoveNext();
}
server.Folders.IncomingArchive.Refresh();
FaxIncomingMessageIterator it =
server.Folders.IncomingArchive.GetMessages( 100 );
it.MoveFirst();
while( !it.AtEOF )
{
Console.WriteLine( it.Message.Id );
it.MoveNext();
}

Console.ReadLine();
}
catch( Exception ex )
{
Console.WriteLine( "Ex: " + ex.ToString() );
Console.ReadLine();
}
}

Here is the exception :

System.Runtime.InteropServices.COMException (0x80070103): Operation failed.
at FAXCOMEXLib.FaxOutgoingMessageIteratorClass.MoveFirst()
at ConsoleApplication1.Class1.Main(String[] args)

It works on Win2003 fine but fails on XP SP1 system.
Any suggestions?
 
I tried it on other XP machines - sp1 & sp2;
When creating FaxIncomingMessageIterator the object is created but all
fields give exception when accessed.
Note that this happenes in .NET environmet only. i tried VB and C#. when i
wrote a simple C++ that use FaxServer, it worked fine.

Any suggesions ?
thanks
 
Back
Top