I have a .NET component (VC++) with native C++ at it's core. The native C++
code makes a call to SHFileOperation to delete a directory and it's contents.
When I host the .NET component in a VB app, and the SHFileOperation delete
is called, the application hangs forever unless I have the "Enable Unmanaged
code debugging" project setting on. Note the hang only occurs when I'm
running the VB app through the debugger. What gives?
Thanks for any help.
PS. I am aware of the pitfalls SHFileOperation (i.e., double null
termination, etc), but this same code works fine in other applications, this
application in release, and this application in debug if not run from the
debugger. I believe the code is OK, and that it's the managed/unmanaged
environment that is causing problems for SHFileOperation. If there is an
easy workaraound, I'll take it. I would like to understand why the
difference in behavior.