Thread: MS Exchange Calender access

  1. #1

    MS Exchange Calender access

    is it possible to connect to a ms exchange server (from a difrent pc) and then view/ modify the calendar of difrent users.

    I downloaded thje exchange sdk and I was able to connect to the exchange server and add an appointment to the callendar of every user.
    But this app has to run on the server and started by the admin user.

    How can I connect to the server with my app from a remote location?

    here's the code I used and that works when I run it on the server:
    IMailboxPtr ConnectToMailbox(bstr_t mailTo)
            // Create a pointer to the CDOEX Person interface. This will
            // be used to determine the URL of the user's inbox.
            IPersonPtr iPerson(__uuidof(Person));
            // Create a pointer to the ADO Connection interface. This
            // will be used as the connection to the mailbox.
            _ConnectionPtr connection(__uuidof(Connection));
    		// Set the provider to the Exchange OLEDB driver.
    		connection->Provider = "ExOLEDB.DataSource";
            // Open the user's mailbox.
    		iPerson->DataSource->Open(mailTo,variant_t( (IDispatch*)connection, true),
    adModeRead,adFailIfNotExists,adOpenSource, bstr_t(),bstr_t());
    		cout << "Datasource open" <<endl;
    		// Return a pointer to the CDOEX Person interface.
    		return iPerson;
    	catch(_com_error error)
            // Display error information. Implement custom error handling here.
    		cout << endl
    			 << "ConnectToMailbox threw the following error:"
    			 << endl
    			 << endl
    			 << "\t"
    			 << error.ErrorMessage()
    			 << endl
    			 << endl
    			 << "Make sure the alias exists. Also check to see if you "
                 << "are running this application on an Exchange server."
    			 << endl;
    		throw error;
    So I figured I need to say where he can find the exchange server.
    I added this line (found on google)
    server is the pc name and "testexchange.test"is the domain
    and I've put that string in my host file.
    when I enter "http://server.testexchange.test/exchange" in my browser, it works fine and I can logon to my mailbox.
    but that doesn't seem to work in my program

    Does anyone here has experience with CDO, or knows where I can find on overview of the api (like: _ConnectionPtr, IAppointmentPtr), what memberfunctions they have and what arguments they take etc. All I can find on msdn are examples that need to run on the server (wich won't be possible I think in my case)

    any help on CDO's calendar functions, connections, etc is welcome. (even if you're not sure it can help me )

    Last edited by maes; 07-16-2004 at 07:52 AM.

  2. #2
    Yes, my avatar is stolen anonytmouse's Avatar
    Join Date
    Dec 2002

    The final key to accessing Exchange data through ADO 2.5 is the Exchange OLE DB provider (ExOLEDB). Exoledb.dll is installed with the Exchange 2000 Server and is used to access Web Storage System items on a local server. This is really important. The Exchange OLE DB provider is a server-side component, meaning that currently it can be used only to access public folder and mailbox stores that reside locally on the server. ExOLEDB is designed for use in COM+ components, ASP pages, and Web Storage System event sinks that run on the server. It is not designed for use from a client application for accessing back-end data on a remote Exchange server.

  3. #3
    It is not designed for use from a client application for accessing back-end data on a remote Exchange server
    I was affraid for that

    But the links look promising. I can't test it right now because the server is at work. I'll try it first thing moday morning.

    Thx for the links

    damn, I can't give you reputation points, I have to spread around first, I'll remeber
    Last edited by maes; 07-17-2004 at 02:20 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Speed test result
    By audinue in forum C Programming
    Replies: 4
    Last Post: 07-07-2008, 05:18 AM
  2. Error connecting from Dev C++ to MS Access Database
    By Sridar in forum C++ Programming
    Replies: 0
    Last Post: 04-15-2006, 06:09 PM
  3. Ping
    By ZakkWylde969 in forum Tech Board
    Replies: 5
    Last Post: 09-23-2003, 12:28 PM
  4. The Timing is incorret
    By Drew in forum C++ Programming
    Replies: 5
    Last Post: 08-28-2003, 04:57 PM
  5. using DAO without MS Access installed
    By zMan in forum Windows Programming
    Replies: 2
    Last Post: 02-20-2002, 03:14 PM