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?
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?