2

I'm trying to debug a class library (PDM Add-in) using Explorer.exe for SOLIDWORKS PDM Professional. I'm on Windows 10. Explorer starts for a second and then something happens that shutdown the debugger.

This what I see in my debug tab.

onecoreuap\shell\windows.storage\sharedstoragesources\util.cpp(6571)\windows.storage.dll!76538288: (caller: 765382E5) ReturnHr(1) tid(c0c) 80004002 No such interface supported
pcshell\shell\appresolver\lib\pintostartcontextmenu.cpp(97)\appresolver.dll!7720C6F5: (caller: 7720DA4B) ReturnHr(1) tid(c0c) 8007007E The specified module could not be found.
onecoreuap\shell\windows.storage\sharedstoragesources\util.cpp(6571)\windows.storage.dll!76538288: (caller: 765382E5) ReturnHr(2) tid(c0c) 80004002 No such interface supported
    CallContext:[\InvokeAssociatedProgram] 
Amen Jlili
  • 1,884
  • 4
  • 28
  • 51
  • How did you use the Explorer.exe in your side? Whether you add the breakpoint? Maybe you could try to delay the Explorer.exe process before it was closed:https://stackoverflow.com/questions/6156327/open-explorer-window-and-wait-for-it-to-close using custom code. – Fletcher Mar 12 '18 at 02:10
  • I'm have a better way to working with debugging addin for the pdm i'm using by using .notepad.exe instead of explorer.exe I think I'll close this question – Amen Jlili Mar 12 '18 at 04:10
  • 1
    If so, you could share it as an answer,and then mark it, it would help other community members if you could share this solution as an answer. Have a nice day. – Fletcher Mar 12 '18 at 06:39

1 Answers1

0

There is some sort of unhandled exception that gets thrown in Explorer by some stupid Microsoft extension. I think it's OneDrive. Since the debugger is attached to Explorer, it crashes because of this fatal error. The debugger doesn't catch the exception because the symbol file of the culprit code is not loaded. Actually, you can see something illuding to that in the output window In Visual Studio.

This didn't happen to me in Windows 7.

Solution 1

Use Notepad.exe to debug Solidworks PDM addins (This is already recommended by Solidworks API doc examples) but I don't really feel comfortable having to go To File > Open > Going to the vault (login) and setting the file filter to solidworks document types every time I start debugging. Moreover, Notepad OpenFileDialog dialog does not support multi-selection.

Solution 2

Use this console application I developed that invokes the OpenFileDialog dialog. The console app will:

  1. Log you into the vault.
  2. Uses the vault's path as the start up directory for the OpenFileDialog.
  3. Sets the extension filter for SOLIDWORKS files

You can enable multiple-selection if you need it.

Amen Jlili
  • 1,884
  • 4
  • 28
  • 51
  • There's another solution as well, and that's using a webBrowser control to point to the vault directory. There's an example app somewhere in the SW KB if you have access. If you don't, let me know and I'll send you the sample application. – ehcanadian Mar 13 '18 at 01:25
  • That'be great. Email is amen AT cadsharp DOT com. Thanks @ehcanadian – Amen Jlili Mar 13 '18 at 19:29