473,394 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

SHFileOperation: Unmanaged code debugging

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
0 1446

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mt | last post by:
How can i use the "SHFileOperation" with vb.net. i use the below code; but i get the error " Object reference not set to an instance of an object" please advise (and can i use this api for...
1
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking aftwerwards with ILDASM at what is visible in those assemblies from a...
5
by: Adam McKee | last post by:
We are using Visual Studio.NET 2003 in our project with .NET framework 1.1. One of our libraries is a mixed-mode dll assembly consisting of one managed C++ library, and several unmanaged C++...
0
by: Niall | last post by:
I'm attempting to put a C# front end on my unmanaged C++ ray tracer code. It's still in experimental stage, as I have never done anything with exporting types from an unmanaged dll through to a...
2
by: Bob Rock | last post by:
Hello, in the last few days I've made my first few attempts at creating mixed C++ managed-unmanaged assemblies and looking afterwards with ILDASM at what is visible in those assemblies from a...
1
by: John Ericson | last post by:
I am using SHFileOperation() to copy files from the local hard drive a network share using a mapped drive. I want to set the up as a batch process with no user intervention. I have using the fFlags...
1
by: Smugsboy | last post by:
Hi, I have a managed Application (C#) that uses a managed DLL (MC++) which uses an unmanaged DLL (C++). All reside under the same solution. The unmanaged DLL has virtual methods, it is loaded...
4
by: Michael | last post by:
I was wondering if it is possible and how to debug from managedC++ dll into unmanaged C++ code. I tried, but without any success. What I try to do is to wrap a unmanaged C++ dll using a Managed C++...
0
by: narsys | last post by:
I'm using SHFileOperation in my project. Everything is ok but something goes wrong when I want to use FOF_SIMPLEPROGRESS falg. when I set it it doesn't work. I can't see nothing! if I use ansi...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.