Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum character array size for NT?

Status
Not open for further replies.

swordfish

Technical User
May 1, 2001
5
GB
I am getting a memory error when I run my app on certain versions of NT. I think it has something to do w/ the array size limitations I am assigned to various variables. Does anyone know what the maximum char array size is for NT 4.0 SP 6.1?

Also, what is the maximum length that a path nesting/directory name size? I have my app returning the path name to a char array and I am thinking I might have memory overflow there since some of the data can be very long (eg C:\folder\sub\x\y\z\stuff\my stuff\application_name_date_Host_etc.exe).

I hope I havent' been too confusing here.

Thanks
 
a char can be -255 to 255 per char.

the array can be as large as your memory can hold
try re-thinking your approach. also I dont think that string you just put above is very large, large is like the size of a novel, VC++ cant hadle way past that, I think your problem can be, perhaps, if you are looping or something, and you dont free the memory, instead you just assume VC++ automatically kills it for you. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Hi

NT 4 have a limitation for the file path defined as MAX_PATH

#define MAX_PATH 260

To solve the problem, Microsoft proposes to use redirection ( using 'net use')

HTH
Thierry
EMail: Thierry.Marneffe@swing.be


 
hmm an OS limitation for paths, I didnt know that NT4 had that limitation, well least we both know, it's not the length of your string thats the problem, but the limit of the path in the function you can use it in. Karl Blessing aka kb244{fastHACK}
kblogo.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top