Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Using OLE Automation

Posted on 1999-01-20
1
Medium Priority
?
239 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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 …
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…

670 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