By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,064 Members | 1,388 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,064 IT Pros & Developers. It's quick & easy.

SHFileOperation: Unmanaged code debugging

P: n/a
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.
Apr 23 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.