|
If I create an instance of an Out of Process Server, what part of Windows actually calls CreateProcess() to launch the executable?
Is it one of the services, or something deeper?
|
|
|
|
|
Is the COM Service Control Manager see [^] for details and references.
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.
|
|
|
|
|
Good day
I have a got a big problem on my hands and it has been bugging me for a week now. I have got a .Net assembly that communicates to an SQL Compact Edition DB file (.sdf) via a web service. Inside this assembly is a thread that, on regular intervals, talks to the DB via the web service. This works well if the assembly is consumed by a .Net application.
My problem is that I have a Delphi application and I was to use the .Net assembly which is exposed as a COM object. The assembly does get registered and everything looks right. I have established that the thread in the now COM object does get triggered and it does what it's supposed to do. What I have noticed though is that i get file violation errors on the .sdf file. This I find disturbing because it is only the processes hosting the web service that is communicating with the DB file, and this only happens when the using Delphi application to use the COM object, it does not happened with .Net applications.
I have also traced the error to the method that is being called by the COM thread. So i would like anyone who has had something to help me. I have run out of ideas as to how to debug this problem. Please point me to the right direction.
Thanks in advance
Kulile --- RSA
|
|
|
|
|
Hi all,
I've created a simple COM component using ATL and itz registered also.When i tried to create the component using CoCreateInstance i get a HRESULT which tells that
<b>"0x80040111 ClassFactory cannot supply requested class ".</b>
There is only one instance of the component present in the registry and the CLSID,Interface ID everything i passed to the COCreateInstance are correct but still the problem is not over.
Any help would be greatly apppreciated.Thanks in advance.
Regards,
Rajeev
|
|
|
|
|
Try to load the component using OLEVIEW tool. Also try to post the CoCreateInstance code snippet.
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.
|
|
|
|
|
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
|
|
|
|