I have an interface, I1 declared in library A, another interface I2 in library B. I2 has a property whose type is I1.
Now I want to use I2 in project A, so I "#import 'B.tlb' rename_namespace('B'), named_guids", then compile failed with error C4772, for interface I1 that in B.tlh can not be indentified. How to resolve this problem?
Thanks for your suggestion, but it does not work. Because I have not write code using I2, if I comment the import clause, project A can be compiled well. But if I add import clause, compiled with error C4772.
1. add an item to the context menu from a right click in the background of a folder in explorer (not a right click ON a folder)
2. add an item to the context menu from a right click on an exe file
First question is... can I do this with ONE shell extension or does it have to be two separate modules? I'm really hoping I can do it all at once.
Secondly, I'm wondering what the best way to "package" a shell extension is (for easy installation later). Right now the DLL is being accessed from my project folder but that is just a temporary solution. I need to install it somewhere....where should it live and what's the best way to get it there? Should I create an installer of some sort?
You could do that with one or two extensions. IShellExtInit::Initialize() is called with different parameters when you click on a file versus the background, so you can tell those two cases apart. Check out part 1[^] and part 7[^] of my shell extension series for more details.
Having two extensions doesn't mean you need two DLLs. Each extension is just a coclass, and there's nothing preventing you from having multiple coclasses in one DLL.
Thanks Mike! I figured this was possible so I'll keep working on it. I've looked at your part7 tutorial, and you created two separate classes that derive from IShellExtInit, so I'll need to do this as well, right? It seems like I'll need one to handle right clicking on a file, and one to handle right clicking in the background. I don't see how else IShellExtInit::QueryContextMenu can differentiate.
In the case where you right-click files, Initialize() gets an IDataObject* that contains the list of selected items. In the case where you right-click the background, Initialize() gets a PIDL that tells you the folder.
Is there any way to get the instance of EXCEL.EXE from Process ID using COM?
Similar to GetActiveObject, is there any other thing through which we can get the instances of multiple EXCEL.EXE running in Task Manager?
After getting handle to each EXCEL.EXE, I want to track all workbooks and sheets. I am using EXCEL automation to do this using C++. Getting all workbooks and sheets is done. But after getting PID of EXCEL.exe's , how to get that object?
I am getting PID for each process using psapi.h.
I think I am not asking a question, which I am not supposed to or I shouldn't ask.
In C#.net we have BinkToMoniker to get the object. Is there any such thing in C++(unmanaged).
If you read the first page you link to, you have: However, because Office applications also register their documents in the ROT, you can successfully attach to other instances by iterating the ROT looking for a specific document, attaching to this document, and then getting the Application object from this document. For a code example of iterating the ROT and looking for a document name, click the article number below to view the article in the Microsoft Knowledge Base:...
You don't even have to reference each individual instance as all documents (from all instances of excel) is in the ROT. If you need the application object for a document, it's also there via the document object.
Its all ok in windows xp sp2 ie 6.0. I can call MyOwnDhtmlFunction from html. But its doesnt work in windows xp sp1 ie. 6.0. How can i make it work in win xp sp1 under ie 6.0. And one more thing, what are the system requirements for CdhtmlDialog ? Can i use it in windows NT sp6 with ie 6.0 ?
Please help me. Thanks for reply and sorry for my bad english.
Our company has an created an ActiveX control using Visual Basic 6 that allows users to view TIFF images in a web page. When Office 2007 is installed, the error "component not correctly registered" shows up when this web page is loaded and the ActiveX control calls the AsyncRead function. We do not see this error when other versions of Office are installed; it will work just fine with Office 2000 and Office 2003. Also, the applications in Office 2007 do not need to be running for this error to occur.
I have tried removing the control from the Downloaded Program Files folder and downloading it again, but I am still getting the same error.
Any help would be appreciated.
Last Visit: 31-Dec-99 19:00 Last Update: 6-Dec-16 0:50