Solved

Using OLE Automation

Posted on 1999-01-20
1
236 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

679 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