#include <atlbase.h>
// assume that iSpringSDK.tlb is located in the same folder
#import "iSpringSDK.tlb"
int main()
{
// we must initialize COM library before the creation of any COM objects
CoInitialize(NULL);
{
// IPresentationConverter is the default interface of PresentationConverter Object
CComPtr<iSpring::IPresentationConverter> pConverter;
// Create the instance of Presentation converter
HRESULT hr = pConverter.CoCreateInstance(__uuidof(iSpring::PresentationConverter));
ATLASSERT(SUCCEEDED(hr));
// CComPtr is a smart pointer. It will automatically call Release() method
// on pConverter COM object after leaving the scope of this block
}// <- pConverter object instance will be released here
// we must uninitialize COM library before exiting our application
CoUninitialize();
return 0;
}
CODE