|
I have a COM dll that is registered in HKEY_CURRENT_USER\Software\Classes.
It have the correct entries for creating it in the system provided DllSurrogate. ( Eg. DllHost.exe )
Creating an instance of it using Windows 2000 successfully launches DllHost.exe and creates the instance.
Trying the same with WinXP fails with "Class not registered".
( If i register the COM dll under HKEY_LOCAL_MACHINE it works with XP to. )
The creation under XP goes through svchost.exe ( running as system ),
it will find the registry keys registered under HKEY_CURRENT_USER but it will also try to find them under HKEY_CLASSES_ROOT and fail.
( Probably one call is done whilst impersonating and one not. )
For short, what needs to be done to successfully host a COM dll registered under HKEY_CURRENT_USER in DllHost.exe under windows XP?
/Magnus
- I don't necessarily agree with everything I say
|
|
|
|
|
I would to add two methods to already existing activex control. How to do go about it. Should I add a new interface. If yes, how to do it. Any article or help.
Best Regards
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Do you have the source code? If Yes what version of VS are you using?
|
|
|
|
|
HI
i want to create a wrapper class of win32_Process class and i want to define my own methods into that wrapper class and after that i want to display messages whenever a new process is started or class using that wrapper class .
Can you please suggest how to procedd with this
Thanks in Advance
abhi
|
|
|
|
|
Hi.
I need to get the user's active window text from the VS.Net IDE.
so far this is what I know:
<br />
using namespace EnvDTE;<br />
<br />
CComPtr<EnvDTE::_DTE> m_pDTE;<br />
<br />
CLSID clsid;<br />
CLSIDFromProgID(L"VisualStudio.DTE",&clsid);<br />
<br />
CComPtr<IUnknown> punk;<br />
HRESULT hr = GetActiveObject(clsid,NULL,&punk);<br />
<br />
Document *ADocument;<br />
m_pDTE->get_ActiveDocument(&ADocument);
<br />
Now how can I get the full text from it ?
Thanks in Advance,
David
|
|
|
|
|
Hi,
A friend of mine told me that I can boost performance in I let my COM clients use include _i.h instead of import tlb.
Is that correct?
Thanks
|
|
|
|
|
There should be very little difference between the two. The .tlh file generated by #import produces code which is typically virtually identical to that generated by MIDL in the header file, at least for the raw interface.
Optionally and by default, #import also generates wrappers that use exceptions to report errors and extended Visual C++-only syntax to support properties. This makes it syntactically nicer to use the interfaces. Exception handling is significantly slower than error code checking, but it's the user's choice whether to use these.
If you use the TLB there are limitations on the types you can use for parameters in your interface - for example, all strings must be BSTRs, and all arrays must be SAFEARRAYs. However, you need to conform to these requirements anyway for scripting, Visual Basic and .NET interop support.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
Hi,
I need to write an SDK for my system which is based on a proprietary camera. I thought of using COM for the interfacing of the SDK, but from what I read, I can't find a way not to marshal the video data.
I need a way to initialize a callback function and transfer a pointer to a grabbed frame. Can this be done with COM without marshaling the image data which is CPU expensive?
Is there a better recommended way of doing this? (My camera is not a standard camera, and has many special configuration and communication options).
Thank you very much,
Gil
|
|
|
|
|
how can i pass object/class/struct from any client to COM component and store it in ATL collection class which implements IEnumxxxx interface.
k.vamseedhar reddy
|
|
|
|
|
you can model the class/struct with an interface and pass that interface to the component.
|
|
|
|
|
You can use IUnknown * or IDispatch * interfaces to send the objects to COM by using reinterpret casting
Knock out "T" from CAN'T
You 'CAN' if you think you 'CAN'
|
|
|
|
|
i am getting this error after adding "mfc as shared dll", and inluding afxsock.h
#error WINDOWS.H already included. MFC apps must not #include <windows.h>
Thanx in Advance
Z.A
|
|
|
|
|
Hello, for a few weeks now I have been trying to get my directX-application work in internet explorer. The problem is, i don't know what lines of code i need or how to make a user control or activeX control work in internet explorer. My application scrolls text over the screen using DirectDraw. In a form as a stand-alone application, it works fine. But when I try to use the code in a ActiveX Control it shows sh*t!
Can anybody help me? I'm really desperate!
|
|
|
|
|
Hi,
i am working on Project(i.e distributed application) involves ATL COM component and MFC GUI application. The arcitecture of of the project is as follows
--> The ATL-COM component project (named as PAObjects) generates PAObjects.dll. This project is having few function written to querey the
database in MS SQL server 2000. These functions are exposed through COM interface.
--> I wrote MFC GUI application that make use of function written in above ATL-COM component project.
--> The above two project modules are running on windows 2000 server operating system.
Actually, I want to debug the functions written in ATL-COM component project (named as PAobjects). The following steps i followed to debug the
ATL-COM component.
1) In COM DLL project, i set the break point at the required location within function. Also in visual studio IDE project--> setting option, Under Debug Tab, for "executable for debug session" , i provide path to my MFC application EXE.
2) Also set Debug break point in MFC application, from where call is made to ATL-COM project function.
3) i compiled both the modules in Debug mode. Also registered the COM dll.
So when i am trying to debug the function in ATL-COM project, Control is not at all comming to function in ATL-COM project.
Can anybody suggest me, what else setting is required to debug this function.....Any Artical or E-book or Link focusing on this debugging issue will helpful to me..
thanks
Nimesh Patel.
Nimesh
|
|
|
|
|
Which project are you debugging? If you debug the MFC exe, then any breakpoints (using software, like Pressing F9) will not break execution in the DLL.
1- Either you can run the exe using the DLL project , and put breakpoints where needed in the DLL code.
2- Or, put a breakpoint on the function call in the exe like this:
pDll->SomeFunc();//---Breakpoint here---
Then step-into (F11) to enter the function in the dll code.
this is this.
|
|
|
|
|
Yes i am using first option ,
1) Either you can run the exe using the DLL project, and put breakpoints where needed in the DLL code.
i was following the same step but still it is not landing up into COM dll project breakpoints at all.
thanks
Nimesh
Nimesh
|
|
|
|
|
One more thing you can do: Put hard-coded breakpoints in the DLL code and compile and debug it:
__asm int 0x03;
And are you using a DCOM service? That would require a different methodology.
this is this.
|
|
|
|
|
And are you using a DCOM service? That would require a different methodology.
Yes I am using DCOM service... I like to know the Methodology which is requried for this. If u know good web-link exploring this topic or E-book or article ... Let me know ... which help me clearing my understanding .....
thanks
Nimesh
Nimesh
|
|
|
|
|
|
Hi all,
iam working on WMI(windows MAnagement Instrumentation). i have created a sample application using WIn32_process class . iam able to display messages when an Process is opened or closed.
now what i want to do is to create an object and then register a call back function . This class also take process names through another method . this class should call the above callbackfunction when one of the process(taken through the above method) is either started or exited.
can you please suggest me how to procedd with this task.
Thanks in advance
abhi
|
|
|
|
|
Hi all
i have a task on Server/client communication using DCOM.
genrally we communicate to server from client(we call component interface methods from client by getting the interface pointer).
But i want to communicate from server to client. i want to send messages from server to client.
Can you please suggest me how to proceed with this,
thanks
abhi
|
|
|
|
|
hi
i want to do some operation on opened file.
that means the file is already opened by
other process in exclusively mode.At the same time
i want to do some operation on that file like copy,open..
in my program.
is it possible in COM?
can anyone help me please?
nirmal
|
|
|
|
|
This issue is not releated to COM.
Steve
|
|
|
|
|
is there a pre-existing implementation of IStream (or ISequentialStream) that wraps around pipes or sockets or something? I want to send lots of data between two COM objects in different apartments & need something efficient
--Jason
|
|
|
|
|
The normal way to solve such a problem is simply to marshal a pointer to the receiving COM object to the senders apartment and then the sender can simply call a method on the receiver (really the receiver’s proxy) and push the data at it - There is no need for pipes and the like.
Steve
|
|
|
|