[英]Namespace not updating after I alter my project folder in solution explorer
[英]Explorer is re-navigating to the root folder of my namespace extension
在我的命名空间扩展中,我拥有文件系统中实际上不存在的文件夹。
有时,在浏览我的名称空间扩展时,资源管理器只是将用户重新导航回到根文件夹。
例如,导航到
C:\root\folder\subfolder
我被重定向回
C:\root
在不清楚的情况下会发生这种情况,但会不断复制。
我正在尝试调试它,并确定与Explorer混淆的地方,但是我找不到合适的工具。
我已经尝试了sysinternals
ProcMon
和DbgView
,但是找不到任何相关数据。
我已经在对ShchangeNotify
进行的所有显式调用中添加了跟踪,但是在相关时间没有执行任何跟踪。
我还尝试向我的IShellFolderViewCB.MessageSFVCB()
实现中添加跟踪。 同样,在相关的时间戳中没有打印日志。
我想如果没有进一步的信息,谁也无法帮助我的案子,但这也适用于我。 我需要一些更好的工具来捕获资源管理器事件并找出问题所在。
有什么建议么?
这不是答案。 这仅是建议。
在我的NSE中,我使用日志记录。 我可以实时看到NSE的每个函数的每次调用。 我看到了全部输入和全部输出参数。 我的资源中的每个函数如下所示:
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;
日志如下所示:
日志帮助我很多次在代码中发现问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.