我应该引用什么 DLL(以及从哪里获取它们)来访问 Visual Studio 2008 中的 Exchange 2003 CDO API
我正在尝试创建一个在 Exchange 2003 上操作邮件消息的应用程序。我的开发环境是带有 Visual Studio 2008 的 Windows XP。在阅读了各种 API 的描述后,看来我应该使用 CDO。
我已经下载了 Exchange 2003 SDK。该文档有很多示例程序,但我无法编译其中任何一个。我知道我需要添加对正确的 .DLL 的引用。参考文档讨论了 CDOEX.DLL。我已经从 Exchange 2003 获取了 DLL 并在我的项目中引用了它。 (按照此链接。)它确实在 CDO 命名空间下添加了许多对象,但许多对象文档中引用的内容不存在。 (例如,有几个示例使用 CDO.Person,据我所知,这是不存在的。
我觉得特别令人困惑的是示例项目使用 CDO.Person,但 SDK 中的类参考文档却没有将该类列为属于 CDO 命名空间的类之一。
任何人都可以指出我需要引用或链接到我的项目才能访问 Exchange 2003 SDK 中的该类和其他相关类吗
? CDO 不是正确的方法吗?我的应用程序必须访问和更改 Exchange 服务器中数百甚至数千个不同用户邮箱的邮件。
I am trying to create an application that will manipulate mail messages on Exchange 2003. My development environment is Windows XP with Visual Studio 2008. After reading the description of the various APIs, it seems like CDO is what I should use.
I've downloaded the Exchange 2003 SDK. The documentation has a lot of example programs, but I can't get any of them to compile. I know I need to add references to the correct .DLL(s). The reference documentation talks about CDOEX.DLL. I've gotten the DLL from an Exchange 2003 and referenced it in my project. (Following this link.) It does add a number of objects under the CDO namespace, but many of the ones referenced in the documentation are not present. (For example a couple samples use CDO.Person, which is (as far as I can tell) does not exist.
What I find particularly confusing is that the sample projects use CDO.Person, yet the class reference documentation in the SDK does not list that class as one of the classes belonging to the CDO namespace.
Can anyone please point me to what I need to reference or link to my project to access this and other related classes in the Exchange 2003 SDK?
Additionally, am I missing a portion of the big picture? Is CDO not the way to go? My application will have to access and change are number of messages in hundreds, if not thousands, of different user mailboxes in the Exchange server.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我已经找到答案了。该文件需要首先使用
RegSvr32
注册。我没想到这种行为。如果您不运行 RegSvr32,则在引用 DLL 时,项目中只会显示类的子集。但是,如果您先在该文件上运行RegSvr32 cdoex.dll
,然后引用它,那么所有类都会显示出来。我尚未确认它运行时的正确行为(必须等到我能够访问 Exchange 2003 服务器进行测试),但它看起来确实可以正确编译。
I think I have found the answer. The file needs to be registered with
RegSvr32
first. I did not expect this behavior. If you do not runRegSvr32
then only a subset of the classes shows up in the project when the DLL is referenced. But, if you runRegSvr32 cdoex.dll
on the file first and then reference it, then all of the classes show up.I have not confirmed correct behavior when it runs (that will have to wait until I have access to an Exchange 2003 server for testing), but it does look like it compiles correctly.