Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

borland c++ variant mapi q

Okay here is what I am trying to do, I am trying to do a GetFreeBusy with Variant in borland's cpp builder. I have seen a lot of VB examples and a few delphi examples and the problem is that bcb all I can do is just try to guess my way through. Here is what I have.


Variant V = Variant::CreateObject("Outlook.Application");
Variant ns, folder, appt, exc, rcp, ae;
ns = V.OleFunction("GetNameSpace", "MAPI");
folder = ns.OleFunction("GetDefaultFolder", olFolderCalendar);
appt = folder.OlePropertyGet("Items", 1); //THIS IS WORKING, I AM CHECKING IT FIRST, THAT PART IS OMITTED FOR READABILITY
rcp = appt.OlePropertyGet("Recipients");
rcp.OleFunction("GetFreeBusy", 1, 10); //THIS LINE ERRORS WITH "Unknown Name"

Any thoughts?
[783 byte] By [skunkd] at [2007-11-11 9:52:23]