English 中文(简体)
背景 Menu项目延期没有在Windows 7中进行。
原标题:ContextMenu item extension did not work in Windows 7

我的软件是剪辑,并登记在背景/目录和桌面右 click上。 我在Win XP上演,工作成绩良好,但现在在视窗7上测试时,工作并不好。 背景项目只在桌面右边点菜单上存在,但并不在背景/目录上。 需要帮助!

这里是Delphi的常规功能,但关于接受的任何语言的例子,如果需要,可显示扩展的DL弧。

const
  CLSID_ContextMenu =  {AB69D961-B907-11D0-B8FA-A85800C10000} ;

procedure TForm1.Button1Click(Sender: TObject);
var
  Reg: TRegistry;
begin
  Reg := TRegistry.Create;
  try
    with Reg do
    begin
      RootKey := HKEY_CLASSES_ROOT;
      OpenKey( CLSID  + CLSID_ContextMenu, True);
      WriteString(  ,  Context Menu Shell Extension );
      OpenKey( CLSID  + CLSID_ContextMenu +  InProcServer32 , True);
      WriteString(  , ExtractFilePath(Application.ExeName) +  Project1.dll );
      WriteString( ThreadingModel ,  Apartment );
      CreateKey( DirectoryBackgroundShellExContextMenuHandlers  + CLSID_ContextMenu);
    end;
  finally
    Reg.Free;
  end;
end;
最佳回答

我发现这件事! 在XPi写道:

DirectoryBackgroundShell**Ex****ContextMenuHandlers**CLSID

但是,在Windows 7中,这条路应当一样。

DirectoryBackgroundShellName of your appcommand

在指挥下,我们用“%path%”的双重字眼来看待我们。

问题回答

你在使用<代码>时犯了一些重大错误。 TRegistry/code>。

You are not specifying any Access rights, so it defaults to KEY_ALL_ACCESS, which is restricted to admins only. Admin users in Vista and later do not have full admin rights like they did in XP. Make sure your app is running in an elevated state if UAC is enabled. Either right-click on the .exe and choose "Run as administrator", or give your .exe a UAC manifest that specifies "requestedExecutionLevel=requireAdministrator". If you do not want your main app to run elevated, then move the Registry logic into a separate .exe or COM object that you can then run elevated when needed.

页: 1 KongEY_CLASSES_ROOT. 不这样做。 管理网说了很多。 可在>>上查阅,但write。 您需要写到<代码>HKEY_CURRENT_USERSoftwareClasses或HKEY_LOCAL_MACHINESoftwareClasses,这取决于您是否有必要为目前用户或所有用户登记贵重机。

You are ignoring the return value of OpenKey()and CreateKey() to make sure the keys are opened/created successfully before then writing to them.





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签