I have written an ATL COM server in a DLL with merged proxy/stub using Visual Studio 2005. It can sometimes be used locally and other times remotely. Deploying locally is straightforward and I've now got a client using it that way. However I've been wading through all sorts of internet articles, discussions etc. about how to deploy, debug, and use the component remotely, but to no avail.
I need to be able to deploy and debug on a remote machine via peer-to-peer and/or ethernet switched networks, including guidance on how to configure the security correctly on Windows XP Prof. with SP 2. I've got to believe there is a 'step by step' guide on how to do this, but I haven't found one yet.
i developed a com addin for msword in MFC
i have done the registration issues for it ,and i added a menu item for invoking the addin functionality , so it is registered and working properly when i open NEW word document.
the problem occurs when i OPEN an already saved word document, when i click the menu item the famous error message appears "Microsoft office word has encountered a problem and needs to close, we are sorry for the inconvience"
when i work on a new word document i can attach to the word process and debug but when i work on an opened word document i can attach but the break points are not active
if i have a DLL (could be a COM DLL, could be a generic Windows DLL), is there a way to inspect it to see if it implements a specific IDispatch interface without registering the DLL and using CreateDispatch.
i imagine the process is something like:
GetProcAddress for QueryInterface
use QueryInterface to find .... (?)
i need this to test DLLs to see if they meet the requirements for our plugin interface without registering the DLL (to avoid cluttering the users' registry)
the problem is - the DLL can be any DLL at all. assume you've got a file named foo.DLL: no typelib, no other information - just a DLL file. you can't assume anything has called DLLRegisterServer on it, and you know have a CLSID for it. there is no CLSID, no registered interface, just a DLL file.
given that, is there a way to tell if it implements a given IDispatch interface ?
it's been so long since i've even looked at any of the low-level COM stuff... i'm not even sure what i need to do with QueryInterface... all the examples i've seen assume you have a CLSID.
But DLLs most often contain a type library. Are you sure it's "clean"? Sounds very odd... Load the DLL in OleView (tool which comes with VS.NET 2k3, 2k2 and VS6. Not sure about 2k5). If you can see the classes in it, you will be able to use LoadLibraryEx (that's what it does).
You could always do manual COM-plumbing to create instances of COM-classes contained within the DLL, but that's useless, as you need the CLSID...
I believe CLSID would be required because it is possible that a single COM Inproc server can expose multiple components of which few would support IDispatch and few would support VTBL binding only.
Considering that only DLL is available to us you might not take TypeLib processing (COM servers can have the TLB shipped seperately and are not embeded in DLL resource), DllGetClassObject function can be used (after LoadLibrary)to get ClassFactory. You can use Class factory to intantiate an Object of that class passing IDispatch IID.
I believe you must also consider about single server supporting more than one components and hence more than one Class factories.
i've just programmed an activex control using c++ and mfc. now i've got the problem that it doesn't show up in my html page. the weird thing is that i can load the page from my harddisk and everything is fine. However when loading from my server the activex area just displays a white box with a little x in the upper left corner.
more weird stuff to follow:
when i open my offline document and THEN browse to my online page the activex control DOES show up correctly. O_o
I've already debugged my ocx and can say the following:
When not showing up, the module is still loaded (CMyApp::InitInstance is called) it's not unloaded prematurely (CMyApp::ExitInstance is called upon closing explorer only) CMyCtrl::OnCreate is not called... what could it be? The control was successfully VeriSign'ed by the way
Any Help is very appreciated.
Thanks in advance,
The problem occurs even with a blank project from the MFC ActiveX Wizard!!!
I am also pasting peace of code related to this error ..Please help me get out of this error.
I am linking against xpcomglue_s.lib ,xpcom.lib ,plc4.lib nspr4.lib and plds4,lib.
class WebLock : public nsIWebProgressListener,
I have a problem with COM ( object is Internet Explorer )
I designed a form with Internet Explorer object. Everything seem OK but when I surf a website contain inline frame ( the inline frame's location is in other domain ), I met a problem. With the main page, I can do everthing with it such as view HTML source, list links ..etc.. but with the inline frame, I can't do anything with it ! All request return message "access denied".
Thought, the error came from something about security reason of IE ( may be cross domain ? ). I can't find a way to solve this problem. I tried to set some config on IE but nothing except "access denied" message return .
Anyone can help me ? Thanks lot !
p/s : I have admin privillige to run this program.
My English's so bad, butI hope you'll understand my question !