473,499 Members | 1,595 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Shell extensions

Hello,

I built property page shellextensions, based on the DependencyWalker sample
from Microsoft.
On some machines these shellextensions do not work. I implemented it like
this (consider the registration code):
[Guid("CB262AEB-CD12-40f6-9712-F0956048B080"), ComVisible(true)]
public class ExtensionHandler : IShellExtInit, IShellPropSheetExt

{
//implementation of Addhandler, etc

//Registration

[System.Runtime.InteropServices.ComRegisterFunction Attribute()]
static void RegisterServer(String str1)
{
RegistryKey root = Registry.LocalMachine;

RegistryKey rk;

// For WINNT set me as an approved shellex
rk =
root.OpenSubKey("Software\\Microsoft\\Windows\\Cur rentVersion\\Shell
Extensions\\Approved", true);

rk.SetValue(guid, "My Shell Extensions");

rk.Close();

root.Close();

root = Registry.ClassesRoot;

string subKey =
"dllfile\\Shellex\\PropertySheetHandlers\\MyShellE xtensions";
rk = root.CreateSubKey(subKey);

rk.SetValue("", guid);

rk.Close();

root.Close();
}

I made an install program like this:

System.Runtime.InteropServices.RegistrationService s regservice = new
System.Runtime.InteropServices.RegistrationService s();

Assembly asm = Assembly.LoadFrom("XshellExtensions.dll");

regservice.RegisterAssembly(asm, AssemblyRegistrationFlags.SetCodeBase );

Which registers the assembly. I am also putting the assembly into the GAC.
My questions are: How do I exactly register the shellextensions correctly?
What is missing, and can I find any documentation about this topic?

Thanks in advance,
Arthur
Nov 15 '05 #1
2 2019
Arthur,
On some machines these shellextensions do not work.


Can you be a bit more specific about what, exactly, doesn't work? Are
you sure the failure is related to registration?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 15 '05 #2
I think it has something to do with the registration, since AddPages is not
invoked. Strange thing is that on my development machine it actually works
fine (since I started with the sample, I think something is registered that
I forgot later on, but I couldn't find out what). On all other machines,
AddPages is not invoked.

"Mattias Sjögren" <ma********************@mvps.org> wrote in message
news:uF**************@TK2MSFTNGP11.phx.gbl...
Arthur,
On some machines these shellextensions do not work.


Can you be a bit more specific about what, exactly, doesn't work? Are
you sure the failure is related to registration?

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3243
by: R.Marquez | last post by:
I just happened to bump into this today when I went to the Win32 Python Extensions page. I think the M.H. and his team are a bit too modest. Quote: "win32com.shell grows many more interfaces,...
2
4159
by: Sin | last post by:
Hello everyone, I'm totally stumped at how little info I can find in MSDN or on the web concerning this. It's almost as if only microsoft personel hold the key to these secrets or something!!! ...
4
2694
by: yxq | last post by:
Hello Can anyone tell me Context Menu shell extension? It is better that provide some samples or links. Thanks
5
4589
by: gjuro kladaric | last post by:
it was not possible to make a shell extension from within VB2003, I believe has anything changed since then, can I (easily) write a VB code that would function as a shell extension thank you ...
8
11899
by: Pieter | last post by:
Hi, I want for my application a Windows Shell Integration (for example like TortoiseSVN: http://tortoisesvn.tigris.org/), but i can't find anything about it?? What I basicly wnat is to be...
1
2175
by: James Maeding | last post by:
I was looking for the easiest way to add an item to explorer's right click menus, and I found what looks to be a goldmine. There is a vb.net project available on:...
3
5013
by: Poggs | last post by:
Hi everyone, I used the pattern for Shell Extensions for Context menu from Dino Esposito's article. However I implemented it in more than one application and it seems that those two right click...
3
2568
by: Shafiq | last post by:
Hi, I am trying to insert a new toolbar button to the windows explorer menu. I an able to locate the correct ToolbarWindow32, and inserted a button using the code snippet shown below. However...
5
2876
by: AGP | last post by:
I have been looking far and wide for an easy to implement shell extension. My needs are basic...for two file extensions .YYY and .ZZZ I would like the context menu in explorer to simply show my app...
1
1231
by: Patrick Philippot | last post by:
Hi, According to this discussion: http://forums.msdn.microsoft.com/en-US/netfxbcl/thread/1428326d-7950-42b4-ad94-8e962124043e/ it is very unsafe to write shell extensions in managed code...
0
7131
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3091
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.