I have written a small shell extension. Its a context menu handler sample. To be a bit more "useful" than just displaying "I'm here" some functionality has been added. I decided to show the registry entries related to the type of the selected file. Some
restricted edit capabilities are implemented too.

Actually I want to know if this tool works as supposed with Win2k, Win98, WinME and WinXP.

To test it there is to do:

1. download it :) and unzip
2. register the extension with "regsvr32 shellext.dll"

Now for files with an extension registered in HKEY_CLASSES_ROOT there should be a new context menu entry "Edit registry" when right clicking that file. In the dialog box that should popup there should be shown some entries of the registry in a treeview, below that a edit control in which the selected value can be changed (be very careful here. The changes in the registry are made when selecting another item or pressing OK!!!)

3. unregister the dll with "regsvr32 /u shellext.dll"

Source code is included and it is free.

Posted on 2002-01-22 04:33:42 by japheth
works as supposed to with Win98.

Nice example, thanks
Posted on 2002-01-22 10:14:06 by Wayne
tried in W2k, but got this message when registering

DllRegisterServer in NamSpExt.dll failed.
Return code was: 0xc0000005

ps: maybe it's because I'm not logged in on this PC as an admin
Posted on 2002-01-22 11:32:15 by random
now for some reason I have the namespace extention appering correctly under Explorer ... but I can't unregister ("Entry point was not found" error message)

any help will be VERY appreciated

Posted on 2002-01-22 12:10:45 by random

may be you are a bit confused? The name of the dll was ShellExt.Dll, not NamSpExt.dll. Are you sure you have registered the right dll? The namespace extension stuff was in another thread.

Posted on 2002-01-23 03:39:08 by japheth
Ops ... you're right. Go figure :)


the "context menu handler" works just fine on Win2K!! :)

Posted on 2002-01-23 03:51:55 by random

I rebuilt the project and the Release dll was 15k, compared to the 25k dll in your zip file. ( Debug build was 17k).
I was wondering why the size differance. Any thoughts, anyone?
Posted on 2002-01-25 21:20:02 by Wayne
Its mostly due to the linker settings...

This is what i most often link with (and i often find "savings" from other's source)

\masm32\bin\link /SUBSYSTEM:WINDOWS /RELEASE /MERGE:.rdata=.text /SECTION:.text,EWR /IGNORE:4078 %1.obj rsrc.obj

Posted on 2002-01-26 02:30:42 by NaN
NaN, you shouldn't generally make your code section writable.
It's okay for smallish applications, but bad on larger apps (which is
why UPXing a delphi/bcb/vb app is braindead). It's not too bad to
*just* have codesection writeable, as we have Copy-On-Write, and
the stuff is handled on a page level...

but once you start compressing executables, something bad happens.
All sections are suddenly marked dirty, and if the app needs to be
paged out, the code section can't just be discarded and paged in
from the executable file again - it has to be paged to disk. As if the
bloat of delphi/bcb apps wasn't bad enough already :P.
Posted on 2002-01-26 03:25:46 by f0dder
Thanks for the replies so far. Has anyone tested it with WinXP? With shell extensions you can never be sure!
Posted on 2002-01-28 11:12:58 by japheth