Print Page | Close Window

Can't use ActiveX in C++

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=2569
Printed Date: 04 Apr 26 at 7:52PM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: Can't use ActiveX in C++
Posted By: changzz
Subject: Can't use ActiveX in C++
Date Posted: 18 Mar 13 at 10:07AM
m_sModuleName = _T("C:/Program Files/Debenu/PDF Library/ActiveX/DebenuPDFLibraryAX0912.dll");
...
HMODULE hModule = ::LoadLibrary((LPCTSTR)m_sModuleName);
        if( hModule != NULL ) {
            IClassFactory* aClassFactory = NULL;
            DllGetClassObjectFunc aDllGetClassObjectFunc = (DllGetClassObjectFunc)::GetProcAddress(hModule, "DllGetClassObject");
            Hr = aDllGetClassObjectFunc(m_clsid, IID_IClassFactory, (LPVOID*)&aClassFactory);
            if( SUCCEEDED(Hr) ) {
                Hr = aClassFactory->CreateInstance(NULL, IID_IOleObject, (LPVOID*)&pOleControl);
            }
            aClassFactory->Release();
        }

When it went to:
Hr = aClassFactory->CreateInstance(NULL, IID_IOleObject, (LPVOID*)&pOleControl);
The Hr was set the value "E_NOINTERFACE".

(I have installed the library and registered the dll.)



Replies:
Posted By: AndrewC
Date Posted: 21 Mar 13 at 7:59AM
Hello,

Have you tried referring to the DebenuPDFLibraryAX0912.cpp and DebenuPDFLibraryAX0912.h files in the ActiveX\Import\CPlusPlus directory of your Debenu PDF Library installation ?

All of the required code should be included in these 2 files.

Andrew.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk