Solved

Using OLE Automation

Posted on 1999-01-20
1
232 Views
Last Modified: 2013-11-25
How do you get a specific Interface...

I have:

CLSIDFromProgID(OLESTR("BackWeb"),&CLSID_BackWeb);
Hr = CoCreateInstance(CLSID_BackWeb,NULL,CLSCTX_SERVER,IID_IDispatch,(void**)&pDisp);

I have tried:
IBackWeb* pIBackWeb;
pDisp->QueryInterface(IID_IBackWeb, (void **)&pIBackWeb);

The compiler complains that 'IBackWeb' : missing storage-class or type specifiers
and
'IID_IBackWeb' : undeclared identifier

Is there a way to get the IID for IID_IBackWeb?
0
Comment
Question by:bjstorey
1 Comment
 

Accepted Solution

by:
sankar012898 earned 0 total points
ID: 1328059
Is that class Ur some custom object or is it a PREDEFINED one ?

Does the CoCreateInstance succeed ?
check HR Value .

Check if the object CLSID_BackWeb support a TYPELIBRARY interface
i.e. ITypeLib interface , ITypeInfo interface .

if it does  , check it there is a TLB file  for that
DLL . To get the DLL path , search for the CLSID_BackWeb
in the Registry . Locate the object in the registry and
check if there is a TYPELIB entry .  Use the TLB file .

If there is a TLB file , goto OLE/COM Viewer see the
object there .

If there is no explicit TLB file for the DLL ,  and if
the  DLL Supports  TypeLibrary interface then
do a  
         #IMPORT  "DLLPATH"

to generate the requred header TLH/TLI files  .
See  the  IID of  IID_IBackWeb there .

sankar














0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now