Hi,
I have a demo version of DVBViewer Pro v 6.0.4.
My C++ code for a COM interface is:
#include "stdafx.h"
#include <windows.h>
#include <objbase.h>
#include <comutil.h>
#include <stdio.h>
#include <time.h>
#include <locale.h>
#include "initguid.h"
int _tmain(int argc, _TCHAR* argv[])
{
HRESULT hr;
VARIANT varRetVal;
DISPID dispID;
hr = CoInitialize( NULL );
if ( FAILED( hr ) ) {
MessageBox( NULL, TEXT("CoInitialize"), TEXT("ERROR"), MB_OK );
return 2;
}
// Translate server ProgID into a CLSID. ClsidFromProgID
// gets this information from the registry.
//
CLSID clsid;
CLSIDFromProgID( L"DVBViewerServer.DVBViewer", & clsid );
IUnknown * pIUnknown;
hr = GetActiveObject( clsid, NULL, & pIUnknown );
if ( FAILED( hr ) ) {
MessageBox( NULL, TEXT("GetActiveObject"), TEXT("ERROR"), MB_OK );
return 2;
}
return 0;
}
I am getting the error message box:
MessageBox( TEXT("GetActiveObject"), TEXT("ERROR"), MB_OK );
Can't figure out what's the problem :-(
Anyone? Thanks in advance,
Adi