473,395 Members | 1,581 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,395 software developers and data experts.

help with CHDIR function

175 100+
I'm using a function in some C++ code in visual studio .NET 2003 that uses the chdir command. For example, if I want to change the working directory to the C: ( the hard drive ), I just put

Expand|Select|Wrap|Line Numbers
  1.  int result = _chdir( "C:/" ); 
and the result is zero, meaning success. However, if I try ANY other drive, spefically CD or DVD drives, the result is -1, meaning it couldn't find the drive. Can anyone tell me what the problem might be, or turn me in the right direction to figure this out. Thanks.
Jun 7 '10 #1
3 2992
Banfa
9,065 Expert Mod 8TB
There was a CD/DVD in the drive when you ran the code?
Jun 7 '10 #2
manontheedge
175 100+
yes, I tried with a DVD and then with a CD ... got same result
Jun 7 '10 #3
manontheedge
175 100+
Okay, I am sorry for wasting your time, but I do appreciate the quick response. I did not realise I had a blank disk. It works when a disk is inserted that has data, but not a blank one ......
Jun 7 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Jean-Daniel Gamache | last post by:
Hi, I want to be able to call a function specified at run-time (in a string). How can I do that in C++ ???? ie: char myFunctionName = "myFunction"; void myFunction () {
2
by: spawncamper | last post by:
Hi - I posted here a few weeks back and people were kind enough to help. In lieu of my PL/SQL class I take in a few weeks, I was hoping to get some more advice. Here's my scenario: I need a...
8
by: Johno | last post by:
I have written the two associated base classes below (Digital_camera and Review) to manage digital camera and review objects. They are base classes for which other derived classes can be written to...
5
by: xuatla | last post by:
Hi, I have the following code for function pointer. compiling is ok. Can you help me to check whether it's a good way to implement as: class CA { ..... private: void f1( double ) ;
3
by: Andreas Schittlipz | last post by:
Hallo Newsgroup! I am wanting to write a function using VBA - but I don't know why. Please can someone help? Andreas Schittlipz Germany
3
by: Stephen Sprunk | last post by:
On a project I'm working on, I ran across the following macros: /* assume s is struct stream *, s->p is char, v is unit16_t or uint32_t */ #define in_uint16_le(s,v) { v = *((s)->p++); v +=...
9
by: Angel | last post by:
Hi again, I'm trying to call functions from a proprietary DLL but it's turned out to be more difficult than I thought. I have this W32.DLL which was written in C by USPS. They don't provide the...
5
by: Andy | last post by:
Sigh... working on it for whole day and got no idea... Basically I want to have a bitmask filtering function, I will throw in 3 parameters: bitMaskValue - current bitmask value filterValue -...
9
by: Thunder | last post by:
Hi, I use this function to center a DIV both horizonatally and vertically. function divCenterer(id, w, h){ if (document.layers){ document.layers.width=w; document.layers.pageX...
10
by: lasmith329 | last post by:
I've never posted a question on any site before, but after racking my head over this hurdle for days, I've caved. I'm working on a program that creates a kml file and exports it to Google Earth. In...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.