Using the WindowsXP FaxService from C#
-
Hello everybody ! I want to use the WindowsXP FaxService COM API in my solution. I`m using Visual Studio .NET I added a reference to the FaxService TypeLibrary in the project and the generated NameSpace is FAXCOMEXLib. Then I wrote the following code:
try { FAXCOMEXLib.FaxServerClass FaxServer=new FAXCOMEXLib.FaxServerClass(); // OK FaxServer.Connect(""); // OK FAXCOMEXLib.FaxFolders FaxFolders=FaxServer.Folders; // NOT OK } catch(Exception ex) { MessageBox.Show(ex.Message); }
After creating the FaxServer object and connecting it to the local FaxService, the Properties that return an object (like Folders,InboundRouting,LoggingOptions) are not valid. There is a {System.InvalidCastException} in the Value of the Autos section in the debugger. Why? Thank you !