|
I am having classical code to delete file to the recycle bin:
bool DeleteToRecycleBin(const char *pszFilePath)
{
//double-zero terminated string
char szFile[1024];
strncpy(szFile, pszFilePath, sizeof(szFile)-1);
szFile[strlen(szFile)+1] = '\0';
SHFILEOPSTRUCT fileop;
ZeroMemory(&fileop, sizeof(SHFILEOPSTRUCT));
fileop.wFunc = FO_DELETE;
fileop.pFrom = szFile;
fileop.pTo = NULL;
fileop.fFlags = FOF_ALLOWUNDO | FOF_SILENT | FOF_NOERRORUI | FOF_NOCONFIRMATION;
if(SHFileOperation(&fileop) != 0)
{
//failed to delete to recycle
return false;
}
return (0 != _access(szFile, 0));
//return true;
}
I found this very spooky problem when calling this function on the following file ararngement:
1. inside some test directory create directory "VC6-ch04-Documents and Views_files"
2. inside test directory create file "VC6-ch04-Documents and Views.htm"
3. when trying to delete the file, as a bonus, function also deletes the directory !!!! (grrr, I've lost some important data this way).
I also repeated this problem using delete feature from Total Commander file manager on the same OS plaform.
I didn't test if this bug is "available" on other versions.
Can anyone verify this bug (OS: windows XP Home, SP1, Compiler: VC++ 6.0) ? Also, if this is the bug, where can I report it officialy ?
Miroslav Rajcic
|
|
|
|
|
|
Thanks for your help, problem is soleved now
However, I still consider this an awfull practice.
MSDN coming with Visual C++ 6.0 never mentions theis flag. That means that all older programs will live in ilusion thet they have implemented single file deletion (example might be already mentioned Total Commander).
They might be surprised a lot just like me.
I managed to compile the code only by manually definig this flag (value found by google).
Anyway, enough ranting, thanks.
Miroslav Rajcic
|
|
|
|
|
Rant time, Windows 98 SE again, hated it to start with but now it's getting passionate.
Sent out to a customers site Monday night to look at a computer that couldn't dial-up to the internet. The company I get the work through is also the ISP in question.
I get there and find that basically the only thing wrong is an incorrect userid and password. But then we can't get out to any websites in Internet Explorer 6.
I install IE 6 SP1 thinking that it might rebuild any components that have become corrupt. No good. Outlook could get to mail server and DNS was resolving IP addresses. ping and tracert would reach the ISP DNS server and timeout for everything after that. I was told that was standard behaviour for this ISP (by the owner).
So I install Mozilla and SmartFTP to test if anything could get through. SnartFTP had no problems at all. Mozilla could view FTP but not HTTP while IE couldn't do anything.
They had Norton Internet Security 2002 installed and when I had a look IE, Mozilla and SmartFTP had the same settings. After bashing my head against a wall for 4 hours I gave up. Charged them for my time and suggested a fresh install or new machine was in order. There were other problems like the CD-ROM deciding at times not to read from the CD and lock up the machine. Keyboard amd mouse buffers filling up and other sh*t I can't remember.
Wednesday lunchtime (an hour ago) I get a phone call, someone else came out in 5 minutes made a change to Morton Internet Security and it's all go.
I f***ing hate computers.
Michael Martin
Australia
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|
|
Michael Martin wrote:
I f***ing hate computers
A clear case of mistaken identity... Norton is the true object of hatred. All of their products are deeply intrusive, non-intuitive, and far more trouble than they're worth. Anytime you spot a Norton product on a machine that has problems, suspect Norton. Over 70% of the time, the fault will lie with that product.
"Ask not for whom the bell tolls; It tolls for thee..."
|
|
|
|
|
Is it possible to make a laptop that is on a domain to the corp. headquarters "see" other machines in a workgroup? I have it hooked up to the same router that the others are, and it is able to use the internet just fine. Anyway I could bridge these two networks?
The laptop is using Cisco VPN to connect to the corp headquarters & all machines are running windows xp.
Steve
McLenithan
Is Bert Evil? | Homer: "Hello, operator, gimme the number for 911!"
|
|
|
|
|
Hi all
I was wondering if it is possible to create a local network between two or more computers throw a USB cable (assumed that the computers in question have USB ports), without using a normal network cable and adapter? If so then does it require any special configuration, if it does then how? And also, is it possible to use so called USB Hubs or Switchs to connect more then two computers together?
Aidman » over and out
|
|
|
|
|
Aidman wrote:
I was wondering if it is possible to create a local network between two or more computers throw a USB cable (assumed that the computers in question have USB ports), without using a normal network cable and adapter? If so then does it require any special configuration, if it does then how? And also, is it possible to use so called USB Hubs or Switchs to connect more then two computers together?
I believe it is though I have never done it so am not much help sorry. Having siad that I have seen adapters that fit into a USB post that take RJ45 connectors found on the end of Cat-5 cable. Might be worth looking int them as they are then just used as a normal NIC with TCP/IP.
Michael Martin
Australia
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|
|
Does anybody heared about go-mono? This is a nice .NET runtime and compiler
for linux.
Sergiu.
|
|
|
|
|
I've got an app that hangs up, and when I end the process it's temp file is left locked. Is there a way to kill this lock without rebooting the machine?
Thanks
BW
"I always wanted to be somebody, but now I realize I should have been more specific."
- Lily Tomlin
|
|
|
|
|
I am writing an application that uses the CrytpoAPI. In the CryptAcquireContext function call, I request the PROV_RSA_FULL provider. In my Windows 2000 development machine, it works, but on many other systems, I get the error for invalid keyset, meaning that a Cryptographic provider supporting RSA_FULL does not exist.
Windows 98 does not work
Windows XP clean install does not work.
Windows XP with Office XP DOES work
Windows 2000 clean does not work
Windows 2000 SP 3 does not work
Windows 2000 128-bit encryption does not work
Windows 2000 with Office 97 does not work
IE 6 SP 1 does not work
All of the above should have the MS Base cryptographic provider
How the fudge do I get RSA_FULL CryptoAPI support installed on a system?
|
|
|
|
|
|
I want to simulate unix in windows. |Like.. I want to know/chk the basic commands in UNIX machine. Any simple application for that?
I was born intelligent Education ruined me!.
|
|
|
|
|
Cygwin is a Linux/Unix-like environment under Windows.
|
|
|
|
|
will give a try! thanks
I was born intelligent Education ruined me!.
|
|
|
|
|
MS has had Interix for years.
From MSDN :
"Interix provides a POSIX compatible runtime environment with additional extensions on Windows. This enabled a large number of UNIX applications to run on Windows with little or no adjustment."
You get headers, libs, and common UNIX shell commands, if I remember correctly, allowing you to recompile POSIX compliant code to run in Windows.
I think Interix has been rolled into the MS Services for UNIX 3.0 SDK which I think can be found in the Win2K Resource Kit (if you have MSDN sub).
...cmk
|
|
|
|
|
I know that there are some limits on how many active service connections I can have coming in to my Windows XP - as I understand it, it is 5 for Windows XP Home Edition and 10 for Windows XP Professional edition.
But my question has to do with how many active network connections I can have going at the same time (or is there a limit at all ?) - so for example, if I want to have 500 simultaneous socket connections, is this possible ?
I am asking because I haven't found a definitive answer yet! Thanks.
RGB
|
|
|
|
|
Try under Linux, it is more flexible in changing these limits.
Sergiu.
|
|
|
|
|
This is a paying job, I cannot reinstall from scratch, I cannot tell the customer to use a proper operating system. If any of these were going to be your answer don't bother replying.
I received a Pentium III 1000MHz system with 512MB of RAM and a Nvidia GeForce2 video on an AOpen MX3S motherboard. It was running Windows 95B.
When I attempt to go into the Display Control Panel applet I received the following error message -
Rundll32
This program has performed an illegal operation
and will be shutdown.
If the problem persists, contact the program
vendor. If I click on the Details button I get -
Rundll32 has caused an invalid page fault
in module <unknown> at 0000:01662409 After the successful upgrade to Windows 98SE I am still receiving this message. I also get this message when I try to run anything from the motherboard driver CD.
I have searched the internet for answers and so far no luck. Any idea what may be the cause of this and how to fix it?
Michael Martin
Australia
mjm68@tpg.com.au
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|
|
Did the details view really not specify which module? That's unusual, and very important. Here's a list of Invalid Page Faults[^] in Win98. You might find something there that matches. You may also have a corrupt or missing device driver. Rundll32.exe is a utility that loads and executes a dll file as an exe, and a number of devices use it, particularly printer drivers and graphics systems. You might try uninstalling and reinstalling devices if you have access to the original disks for them. A better bet might be to search for updated drivers on the web - a lot of drivers written for Win95B don't work well in Win98 and, even though the problem occured before the upgrade, there's no reason to replace a corrupted driver with a good one that doesn't work.
"Ask not for whom the bell tolls; It tolls for thee..."
|
|
|
|
|
There was originally some form of video driver error appearing. It never said as much but the DLL that was mentioned in the error message was signed by NVIDIA. It just disappeared. I have downloaded the new drivers for the video and will give that a try in a minute.
The Rundll32 error also appears when I try and run any of the drivers setups from the motherboard CD and when the CD itself tries to Autorun.
The annoying thing is that I can't even connect to the internet for a Windows Update as one of the missing drivers I can't yet install is for the onboard NIC.
Also I ran Dependency Wlaker against the Rundll32.exe on the afffected machine. It reports that it can't find dependant modules APPHELP.DLL and USERENV.DLL. I had a friend search his system for these files and they don't exist.
I think it is a f***ed system that nees to be installed from scratch. But he wants to keep all the software that is installed on it and of course there were no CD's for hem when he bought it second hand.
Yes <unknown> is definitely shown in all the messages.
Michael Martin
Australia
mjm68@tpg.com.au
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|
|
I thought it sounded like a version conflict but didn't mention it - they're hard to resolve. The reason that apphelp.dll and userenv.dll can't be found is that they're WinXP files. Userenv.dll was also used in NT4, Win2K, and some early versions of IE, but neither is part of Win98 or 95. Is it possible that the user once tried to do an update of a driver and selected the wrong one?
Use regedit to search for instances of rundll32 and search for entries that contain either of these dlls. Checking which keys they appear in will give you clues about which device or program is invoking them. Be sure to back up the registry before you play in there, just in case. If you haven't used regedit, pressing ctrl-F opens a 'FIND' box where you can enter the string you're looking for. Pressing F3 after the first hit finds the next instance until you reach the end of the registry.
Also, check your version of rundll32.exe. It should be version 4.10.0.1998 and can be found, if you need a fresh copy, in win98_46.cab. Use the extract tool to get it out of the cab file on the CD. Once you get it online you might find this handy: Microsoft DLL Help Database[^].
"Ask not for whom the bell tolls; It tolls for thee..."
|
|
|
|
|
Roger Wright wrote:
The reason that apphelp.dll and userenv.dll can't be found is that they're WinXP files. Userenv.dll was also used in NT4, Win2K, and some early versions of IE, but neither is part of Win98 or 95. Is it possible that the user once tried to do an update of a driver and selected the wrong one?
apphelp.dll and userenv.dll are dependencies for lots of apps that are meant to be able to be run on Windows 9x/ME. The presence of these dependencies does not necessarily mean that an assembly cannot be run on Windows 9x/ME. Just because they are listed as dependencies, doesn't mean that the assembly depends on them in order to run.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Possibly... I found references to apphelp.dll in Google that refer to problems with games, but nothing else. As far as Microsoft is concerned, though, apphelp.dll only officially exists in WinXP (assuming, of course, that the Technet database is reliable).
"Ask not for whom the bell tolls; It tolls for thee..."
|
|
|
|
|
Regedit found no mention of the files. I ran Dependency Walker again and noticed that Rundll32.exe relies on Shlwapi.dll which in turn relies on Apphelp.dll and Userenv.dll.
I then look at the version information of Shlwapi.dll and get the follow details. Date 29-08-2003, Size 395,254 bytes, Version 6.00.2800.1106.
I checked out the Microsoft DLL Help Database you recommended and it said it was part of Microsoft Visual Studio .NET (2003) Enterprise Architect and Windows XP SP1. Not sure how that version would have got there.
Vesion 6.00.2600 comes from Internet Explorer 6 so I was thinking of reverting to this but don't know if that would resolve my problem.
Michael Martin
Australia
mjm68@tpg.com.au
"I personally love it because I can get as down and dirty as I want on the backend, while also being able to dabble with fun scripting and presentation games on the front end."
- Chris Maunder 15/07/2002
|
|
|
|