简体   繁体   English

资源管理器正在重新导航到我的名称空间扩展的根文件夹

[英]Explorer is re-navigating to the root folder of my namespace extension

In my namespace extension, I have folders that doesn't actually exist in the file system. 在我的命名空间扩展中,我拥有文件系统中实际上不存在的文件夹。

Sometimes, when browsing my namespace extension, Explorer simply re-navigates the user back to the root folder. 有时,在浏览我的名称空间扩展时,资源管理器只是将用户重新导航回到根文件夹。

For example, navigating to 例如,导航到

C:\root\folder\subfolder

I'm redirected back to 我被重定向回

C:\root

This happens in unclear scenarios, but keeps reproducing. 在不清楚的情况下会发生这种情况,但会不断复制。

I'm trying to debug it and identify what messes with Explorer, but I can't find the right tool. 我正在尝试调试它,并确定与Explorer混淆的地方,但是我找不到合适的工具。

I've tried ProcMon and DbgView of sysinternals , but couldn't find any relevant data. 我已经尝试了sysinternals ProcMonDbgView ,但是找不到任何相关数据。

I've added traces to any explicit calls I make to ShchangeNotify , but none are executed at the relevant time. 我已经在对ShchangeNotify进行的所有显式调用中添加了跟踪,但是在相关时间没有执行任何跟踪。

I've also tried to add traces to my implementation of IShellFolderViewCB.MessageSFVCB() . 我还尝试向我的IShellFolderViewCB.MessageSFVCB()实现中添加跟踪。 Again, no logs printed in the relevant timestamps. 同样,在相关的时间戳中没有打印日志。

I assume no one would be able to help my case without further information, but that applies to me as well. 我想如果没有进一步的信息,谁也无法帮助我的案子,但这也适用于我。 I need some better tool to catch the explorer events and identify what goes wrong. 我需要一些更好的工具来捕获资源管理器事件并找出问题所在。

Any suggestions? 有什么建议么?

This is not answer. 这不是答案。 This is advice only. 这仅是建议。

In my NSE I use logging. 在我的NSE中,我使用日志记录。 I see EVERY call of EVERY function of my NSE in realtime. 我可以实时看到NSE的每个函数的每次调用。 I see all in and all out parameters. 我看到了全部输入和全部输出参数。 Every function in my sources looks like this: 我的资源中的每个函数如下所示:

function TdecShellNamespaceFolder.IShellFolder_ParseDisplayName(AWnd: HWND; ABindCtx: Pointer; ADisplayName: POLESTR; out AEaten: ULONG; out AItemIDList: PItemIDList; var AAttributes: ULONG): HRESULT;
var
  {$IFDEF USE_LOGS}
  CurrentMethod: string;
  {$ENDIF}
  Eaten: DWORD;
  Attr: TdecFileShellAttributes;
begin
  {$IFDEF USE_LOGS}
  CurrentMethod := 'IShellFolder.ParseDisplayName';
  LogSendEnter(CurrentMethod);
  LogSendInHWND(CurrentMethod, 'AOwner', AWnd);
  LogSendInBindCtx(CurrentMethod, 'ABindCtx', IBindCtx(ABindCtx));
  LogSendInParam(CurrentMethod, 'ADisplayName', ADisplayName);
  LogSendInNil(CurrentMethod, '@AEaten', @AEaten);
  LogSendInNil(CurrentMethod, '@AItemIDList', @AItemIDList);
  if Assigned(@AAttributes) then
    LogSendInParam(CurrentMethod, 'AAttributes', SFGAOToString(AAttributes))
  else
    LogSendInNil(CurrentMethod, '@AAttributes');
  Result := E_FAIL;
  try
  {$ENDIF}
    try
      // FUNCTION BODY
    except
      on E: Exception do
        begin
          {$IFDEF USE_LOGS}
          LogSendException(CurrentMethod, E);
          {$ENDIF}
          Result := HResultFromException(E);
        end;
    end;
  {$IFDEF USE_LOGS}
  finally
    if Result = S_OK then
      begin
        if Assigned(@AEaten) then
          LogSendOutParam(CurrentMethod, 'AEaten', IntToStr(AEaten));
        LogSendOutItemIDList(CurrentMethod, 'AItemIDList', AItemIDList);
        if Assigned(@AAttributes) then
          LogSendOutParam(CurrentMethod, 'AAttributes', SFGAOToString(AAttributes));
      end;
    LogSendResult(CurrentMethod, Result);
    LogSendExit(CurrentMethod);
  end;
  {$ENDIF}
end;

And logs look like this: 日志如下所示:

日志

And logs helped me a lot of times to find problems in my code. 日志帮助我很多次在代码中发现问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在解决方案资源管理器中更改项目文件夹后,命名空间未更新 - Namespace not updating after I alter my project folder in solution explorer 在Windows资源管理器c#/ vb .net中的命名空间扩展中选择文件/文件夹 - Select file/folder in namespace extension in windows explorer c#/vb .net 文件夹浏览器 - Folder Explorer Explorer命名空间扩展-在第三方应用程序中输入Save的方法是什么? - Explorer Namespace Extension- what is the entering method of Save in third party application? 可以在系统命名空间中编写自己的扩展方法吗? - Is it ok to write my own extension methods in the system namespace? 如果你不看它,webbrowser不会导航 - webbrowser not navigating if you're not looking at it 从结果C#中打开窗口资源管理器文件夹 - open window explorer folder from my results c# 创建一个外壳名称空间扩展 - Create a shell namespace extension 无法在具有 vsix 扩展名的解决方案资源管理器中打开项目或项目文件夹(通过提供路径)? - Unable open a project or project folder (by giving the path) into solution explorer with an vsix extension? 在名称空间(不是没有名称空间)中序列化根元素 - Serialize root element in a namespace, not without a namespace
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM