News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

IContextMenu problem

Started by donkey, November 18, 2007, 05:02:57 PM

Previous topic - Next topic

donkey

I've been struggling with creating a COM server for IContextMenu for the last couple of days and have hit an impasse. Explorer should call IShellExtInit:Initialize directly after the QueryInterface however it is not being called. Debugging this is very difficult since the error is generated inside explorer though the error is somewhere in my implementation of the interface. I have attached my source etc... if anyone has an idea why it's not working I would appreciate the input.

Note: GoAsm syntax

"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

donkey

Well, here's the final version of the IContextMenu example, I'll be testing it over the next few days then posting it on the website next weekend. Everything seems to work fine, it will do the following...

Register and unregister a Shell extension using DllRegisterServer/DllUnregisterServer
Create a class object
Create an instance of IShellExtInit and initialize the extension
Send Explorer a pointer to an instance of IContextMenu
Add to the context menu for EXE and DLL files
Extract the selected filename using the IDataObject interface and DragQueryFile
Display the filename

From this point you can do whatever you like with the file, I have simply displayed the name for the purpose of the demo.

The demo can be downloaded from the GoAsm section of the board.

Donkey
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable