Board index » cppbuilder » About the maximum full path string length.

About the maximum full path string length.


2005-08-30 06:25:27 PM
cppbuilder108
Hi.
I don't know where to ask my question by I think this is the right place as
many of C-programmers must know an operation system detalies. I am asking
this question as I don't know how much memory I need to allocate for storing
full path specification.
If you will look through Microsoft Programmer Reference for DOS version 5.0
you will find that DOS function Get Current Directory (or path) returns a
string with length of 64 characters which contains a full path specification
starting from root directory and without leading slash. But if you start
command prompt box in Windows XP you can create subdirectories with total
specification length much more than 64 characters.
It is interesting What is the maximum path string length? Is any reference
in internet where I could read about new features of DOS functions in XP
environment?
Vladimir Grigoriev
 
 

Re:About the maximum full path string length.

"Vladimir Grigoriev" < XXXX@XXXXX.COM >wrote in message
Quote
Hi.
<SNIP>
It is interesting What is the maximum path string length? Is any reference
in internet where I could read about new features of DOS functions in XP
environment?
Vladimir Grigoriev

Hi Vladimir,
I think you are looking for the _MAX_PATH macro which is defined in the
stdlib.h file.
Best regards,
Gary
 

Re:About the maximum full path string length.

Thank you Gary.
While I have been waiting answers from the forum I have looked through
internet and have found information about long file names in DOS. As I have
understood I can use long file names in DOS. There is such DOS int 21h
function as 71h. It allows you to deal with long file names. For example in
my XP system I have NTFS. So I need preserve 260 bytes for full file
specification.
If you run Command prompt box on XP and try to create a directory with
ordinary DOS command MKDIR you will see that you can create directories with
names of more than 11 characters. So I think DOS replaces standard int 21h
functions with 71h function while you are working with DOS commands.
Vladimir Grigoriev
"Gary Setter" < XXXX@XXXXX.COM >wrote in message
Quote

"Vladimir Grigoriev" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>Hi.
<SNIP>
>It is interesting What is the maximum path string length? Is any
reference
>in internet where I could read about new features of DOS functions in XP
>environment?
>Vladimir Grigoriev
>
Hi Vladimir,
I think you are looking for the _MAX_PATH macro which is defined in the
stdlib.h file.
Best regards,
Gary

 

{smallsort}