?
Solved

GetTypeInfoOfGuid returns not found on Automation class

Posted on 2008-11-09
5
Medium Priority
?
967 Views
Last Modified: 2013-11-10
Hello!
I cannot get to find out why the attached code is not working. MyObject is a MFC Automation Class (Visual Studio 2008). It contains just one function that works just fine on my scripting host. So the ODL file looks fine.
But I just cannot find out how to provide the class info so that I can use GetTypeInfoOfGuid.

Thank You for your help!

LCID lc=GetUserDefaultLCID();
MyObject m_Obj;
CLSID clsid;
m_Obj.GetClassID(&clsid);
LPTYPEINFO ppti;
HRESULT hr=m_Obj.GetTypeInfoOfGuid(lc, clsid, &ppti);

Open in new window

0
Comment
Question by:hlienert
  • 3
  • 2
5 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 22916955
What is the HRESULT code that is returned?
0
 

Author Comment

by:hlienert
ID: 22917137
It returns -2147319765 / 0x8002802b
Something like "Element not found"
0
 
LVL 86

Expert Comment

by:jkr
ID: 22917149
Does you automation object implement ITypeInfo?
0
 

Author Comment

by:hlienert
ID: 22917190
To be honest, I'm not quite sure how to verify that....
0
 

Accepted Solution

by:
hlienert earned 0 total points
ID: 22917311
Hey,
I found out my problem:
#ifdef _DEBUG
1 TYPELIB "Debug\\AppName.tlb"
#else
1 TYPELIB "Release\\AppName.tlb"
#endif
had to be included in my ressource file.
But thank you for the tips!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

840 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