Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Using OLE Automation

Posted on 1999-01-20
1
Medium Priority
?
240 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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.

916 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