The PresentationConverter class is the main class of iSpring SDK COM API. It provides presentation conversion methods and properties. To start working with the COM API, the application creates an instance of the PresentationConverter class.

Table 1. Interfaces

InterfaceInterface description
IPresentationConverterPresentationConverter implements this interface with all facilities of iSpring SDK.
_IPresentationConverterEventsThe interface used for conversion event subscription.


Samples

The following samples illustrate how PresentationConverter Object creation functions in different programming languages.

LanguageSample code
VB Script
Set fs = CreateObject("iSpring.PresentationConverter")
CODE
C#
iSpring.IPresentationConverter pc = new iSpring.PresentationConverter();
CODE
Visual Basic .NET
Dim pc as New iSpring.PresentationConverter
CODE
Visual Basic
Dim pc as New iSpring.PresentationConverter
CODE
C++ (VC++/ATL)
#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
PHP
<?php
$pc = new COM("iSpring.PresentationConverter")

// access PresentationConverter methods and properties
// ...

// it is necessary to set the presentation converter object to null
// when you don't need it anymore. Otherwise a runtime error will occur.
$pc = null;
?>
PHP