Solved

Using OLE Automation

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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 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…

746 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

12 Experts available now in Live!

Get 1:1 Help Now