|
CLSID aclsid;
//interface to be created
IMIConverter *m_pToConverter = NULL;
aIUnknown = NULL;
HRESULT hr;
//this step also gets the correct class ID
hr = CLSIDFromProgID(L"MITFConverter.MIConverter",&aclsid);
// This HRESULT gives the problem
hr=CoCreateInstance(aclsid,NULL,CLSCTX_ALL,IID_IMIConverter,(void**)&m_pToConverter);
Thanks for your help
|
|
|
|
|
Have you made an attempt (to load the Component) with OLEVIEW?
The hr value you reported shouldn't happen since MSDN reports S_OK , REGDB_E_CLASSNOTREG or CLASS_E_NOAGGREGATION as possible return values.
You can also try to use CoGetClassObject and then call CreateInstance on the (hopefully) obtained class factory pointer to see what is happening.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Hi,
When i tried to load the component using OLE view it displays an MK_E_INVALIDEXTENSION error.
I tried calling CoGetClassObject but the return is always the same (Class Factory cannot supply the requested class).I'm Totally lost
Is there Anything else that i can try??
Thanks for your help
|
|
|
|
|
as you can easily find here [^], CoGetClassObject cannot return such a hr value, hence I suggest to you to check well your code. can you post the hexadecimal value of the returned hr ?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
0x80040111..is the returned HRESULT s hexdecimal value...
|
|
|
|
|
It seems something went wrong during registration. I'm sorry I cannot help you with this.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
That alright..Anyhow thanks a lot for ur help
|
|
|
|
|
Hello all,
Can someone provide me interview questions on VC++, COM, ATL.
I need those desperatly.
Thanks...... .
|
|
|
|
|
Why r u not trying to search on Google..
its very best option to search..
shailesh
|
|
|
|
|
Dear all :
I wrote an ActiveX embedded in my web page.
The purpose of this ActiveX is to play Music Video with subtitles.
It will download a file contains informations of subtitle
from internet dynamically.
I want users can select songs they want to play in
web page, and I can use javaScript to write the
play list information to cookie,then the ActiveX
can read the play list from cookie and play it!
My question is how does this ActiveX read and write(delete) cookies .
Can or Can't ?
Thanks a lot !!
Martin Jiang
|
|
|
|
|
I am learning a COM.
I have read COM is nothing but the QueryInterface...
but there is so much importance to HRESULT,GUID and Registry also...
So what does mean about COM..
On which actually COM focusses more???
How to know more about COM
shailesh
|
|
|
|
|
Shaileshvb wrote: I have read COM is nothing but the QueryInterface...
QueryInterface is important in COM, but it is not all there is to it.
Shaileshvb wrote: but there is so much importance to HRESULT,GUID and Registry also...
So what does mean about COM..
HRESULT is a standard return code in COM, and is fairly complicated. GUID means Globally Unique Identifier, which is used to identify interfaces, classes, and other items. QueryInterface takes a GUID as a parameter. Both of these are important.
Shaileshvb wrote: On which actually COM focusses more???
How to know more about COM
COM involves lots of issues, and which ones you need to learn about depend on what you are trying to do with it. I learned most of mine by reading MSDN library. While I usually had it installed on my computer, you can access MSDN library on the web at http://msdn.microsoft.com/[^]
Nathan
|
|
|
|
|
Hi,
Thanks Nathan.
I have going through the Book Gale Rogerson(Inside COM).It is fantastic..but for more details
can u suggest some more books...for more codes....help me out since I am totally new to COM...
shailesh
|
|
|
|
|
Shaileshvb wrote: have going through the Book Gale Rogerson(Inside COM).
Since you have completed Inside COM, you can read Essential COM by Don Box which covers some advanced topics.
"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"
|
|
|
|
|
Shaileshvb wrote: can u suggest some more books...for more codes....help me out since I am totally new to COM...
I'm afraid not, since I didn't learn it from actual books. About all I can recomend is the MSDN library.
Nathan
|
|
|
|
|
hi shailesh,
there is book called inside COM by dale rogerson.
it's a good book for COM learner
all the best
|
|
|
|
|
Hi
can anyone help me finding a book about developing "com add-in" for office applications using mfc ?
thanks alot
Tarek
|
|
|
|
|
This is what I'm trying to do. I'm trying to write a DLL that will give me access to COM components that are available from an Off-The-Shelf product (Sherlock32) so I can get information from it while it is running. I've seen a lot of examples of how to write stand-alone code but I'm lost as to how to handle everything properly.
Now if I understand things I can use:
#import "c:\sherlock\bin\sp32.exe" named_guids no_namespace
in my header file to get access to the CSLID (CSLID_Sherlock) which was put in the exe.
Then I can use the following code to get access to the various features.
ISherlockPtr m_Sherlock;
CoInitialize(NULL);
m_Sherlock->CreateInstance(CSLID_Sherlock);
m_Sherlock->function;
CoUnitialize();
I'm I at least headed in the correct direction? I know I need to add some error checking to make sure the instance was created and the function is returning the correct stuff. One big question I have is should I create the instance once and hold on to it for the length of the use of the DLL or should I create and release it every time I want access to the functions?
[Side note: For those of you that are thinking why don't I just put my access code in the program that needs access to Sherlock here is the reason. The DLL is going to be used by a scripting program/language that has DLL capabilities but not COM.]
Thanks,
George
-- modified at 8:54 Friday 5th October, 2007
|
|
|
|
|
I had to google Sherlock32 to get an idea of what it was. You provide very little useful information.
But, if the executable or DLL that you are interested in is written in a way that it can act as a server for a COM class (this is not a requirement), it has to register its CLSID. Read this: COM Class Objects and CLSIDs[^]
The simplest approach is to call: CoCreateInstance[^]
Are you doing this in .NET? You gave no clue.
-- modified at 19:31 Thursday 4th October, 2007
|
|
|
|
|
Sorry for the lack of information but I was just trying to get a feel for whether my approach is correct and didn't realize you needed more information about Sherlock32. From what I understand about it it does run as a COM server and it has some functions available under its COMM server that should allow me to control it and get information from it. I'll take a look at the things you suggested.
I'm using Visual Studio C++ 6.0 to write my code and sticking with C++ & MFC for my coding. They haven't converted over to using .NET at my office yet.
Thanks,
George
|
|
|
|
|
Who know what the meaning of error code 269 ? I can't find it anywhere.
|
|
|
|
|
Hello,
Error 269 means that ReferenceBind is invalid. Reference name is missing.
I hope this helps.
Have a nice day.
Regards,
James Smith
James Smith
www.componentone.com
|
|
|
|
|
In which scenerios We can use Windows Service.
Can any body expling what is the purpose of windows services.
As windows service is continious running process.
Can we built windows service with out timer control? If Yes then please give a sample how.
Thanks in Advance
Chandra.Anumakonda
|
|
|
|
|
is a driver (sys file) a com program?
Zo.Naderi-Iran
|
|
|
|
|
I suppose it is possible, but that would be ridiculous for a device driver.
Most drivers are written in C or assembly. Typically, drivers are linked together in an operational stack, that is not COM-derived or dependent on the COM library. See the MSDN Kernel Architecture Design Reference[^] to get an idea of what types of system structures are required for Drivers. Its an entirely different world.
Programmers have been known to write kernel drivers to gain access to kernel mode data structures, as this is the only way to add user code to the operating system.
-- modified at 18:40 Thursday 4th October, 2007
|
|
|
|