c# - COMException when getting the Class member of an Exchange folder -


I have an Outlook Interp program that lists folders in Outlook. This works perfectly for local PST files. Outlook throws commexation errors for some Exchange server folders when I try to access Class members of the Folder Interface. Up to now, I received these error codes: 0xE304011D and 0x8834011D Message

The Microsoft Exchange is unavailable. There are network problems or have been discontinued for repair of Exchange Server.

  Public Zero Listfolders (UltraTree Control, Outlook Folders, UltraTrint, ParentNode) {Ultratry Node; Outlook.OlObjectClass class ID; Outlook.OlItemType type; String name; Foreach (Folder in parent.folders.folderf) {try {name = f.Name; ClassID = f.Class; Type = f.DefaultItemType; If (classID == Outlook.OlObjectClass.olFolder & amp; type == Outlook.OlItemType.olMailItem) {node = ParentNode.Nodes.Add ("", f.Name); Node Override. NodeAppearance.Image = 0; If (f.Folders.Count> 0) ListFolders (Ctrl, f, node); }} Hold (COMException E) {switch (E. ARC code) {case unchecked (int) 0xE304011D): uncontrolled case (int) 0x8834011D): break; Default: throw; }}}}  

An exception to the line classID = f.Class

Does anyone know about these exceptions? I searched the web and I did not get any discussion about them. The user said that there is no problem in reaching the Exchange in Outlook. Unfortunately the user is in another country, so I can only work with what he told me.

As you are opening a lot of folders, do not process all the folders continuously, you can run the RPC channel Are bound to

Process only the current extended node For each subfolder, check the PR_SUBFOLDERS property (DASL name). If this is true, make sure that the "+" button is added to add a dummy node. When a subfolder is expanded, add its kid folders.

You may also want to use MAPI tables: The Outlook Object Model provides access to the folder content MAPI table (MAPIFolder.GetTable) only.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -