PDA

Click to See Complete Forum and Search --> : OLE 2.0 APIs


Evil_Giraffe
Jan 17th, 2003, 09:53 AM
In making the leap from VB to C++, I'm slightly puzzled as to how to call APIs. All the tutorials for C++ I've found seem to assume you know how to do this.

What I need to do is use the OLE 2.0 APIs to open docfiles - specifically Word files. Any help (general tutorials on accessing APIs, documents on the OLE 2.0 APIs, etc.) would be greatly appreciated.

CornedBee
Jan 18th, 2003, 08:58 AM
You include the correct header (only <windows.h> in 99% of the cases) and simply call them. There's no need to explicitly declare them like in VB.

You might have to look them up in the reference to find out exactly what parameters they expect. The reference also tells you what include file you need.

As for OLE storage, this is the address of the reference page for VC++7 (.Net).
ms-help://MS.VSCC/MS.MSDNVS/com/structuredstoragestartpage_19d1.htm

If you have 6, search for the functions StgCreateStorageEx and StgOpenStorageEx, they should be a good starting point.