Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

VB code to VC++

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2000] >> Information Stores >> VB code to VC++ Page: [1]
Login
Message << Older Topic   Newer Topic >>
Limited time MSExchange.org offer! -- 1.Sep.2008 1:00:00 PM
TechGenix and SolarWinds have partnered to provide free copies of SolarWinds Exchange Monitor to all visitors who join the MSExchange.org Forums. SolarWinds Exchange Monitor is a handy desktop dashboard that continuously monitors Microsoft Exchange to deliver real-time insight into Exchange services, mail queue sizes, and host server health. Learn more about Exchange Monitor and the free offer!
VB code to VC++ - 19.Mar.2003 4:10:00 PM   
Dror

 

Posts: 4
Joined: 19.Mar.2003
From: Israel
Status: offline
I have the following VB code from the MSDN samples

Can any one has this sample for VC++?

Visual Basic
' This subroutine will find all the stores on the local machine.
Sub EnumerateStore()

Dim iExs As New CDOEXM.ExchangeServer
Dim isg As New CDOEXM.StorageGroup
Dim ipsDB As New CDOEXM.PublicStoreDB
Dim imbxDB As New CDOEXM.MailboxStoreDB
Dim ift As New CDOEXM.FolderTree

Dim ds2 As IDataSource2
Set ds2 = iExs

Debug.Print Chr(13) + Chr(13) + Chr(13) + "================================="

Dim server_nm As String
server_nm = Environ("COMPUTERNAME") 'The computer name is the servername.

ds2.Open server_nm
Debug.Print "ExchangeVersion = " + iExs.ExchangeVersion

Debug.Print "DirectoryServer = " + iExs.DirectoryServer

Dim storegroup As Variant
Dim pubstore As Variant
Dim mbx As Variant

For Each storegroup In iExs.StorageGroups
Debug.Print "StorageGroup Distinguished Name = " + storegroup + Chr(13)
isg.DataSource.Open storegroup

For Each pubstore In isg.PublicStoreDBs

Debug.Print "Public Store = " + pubstore
ipsDB.DataSource.Open pubstore
Debug.Print " Name = " + ipsDB.name + Chr(13)

Debug.Print "FolderTree = " + ipsDB.FolderTree
ift.DataSource.Open ipsDB.FolderTree
Debug.Print " RootFolderURL = " + ift.RootFolderURL
Debug.Print " Name = " + ift.name + Chr(13)

Next 'public store
For Each mbx In isg.MailboxStoreDBs

Debug.Print "Mailbox = " + mbx
imbxDB.DataSource.Open mbx
Debug.Print " Name = " + imbxDB.name + Chr(13)

Next 'mailbox
Next 'storage group

Set iExs = Nothing
Set isg = Nothing
Set ipsDB = Nothing
Set imbxDB = Nothing
Set ift = Nothing

End Sub
Post #: 1

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2000] >> Information Stores >> VB code to VC++ Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts