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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

length of a standard DOS line 1

Status
Not open for further replies.

Sedai

Programmer
Mar 4, 2001
158
US
i don't how correct my quesions is but
how many characters can fit on a standard line
in a DOS environment?
I mean the DOS-prompt.

thanks.
Avendeval


 
I believe the default console size for a dos prompt is -> 80x25 characters. Of course you can always change this with a few api calls ->

#define WIN32_LEAN_AND_MEAN
#include <windows.h>

void Set_ConSize( int iX,int iY );

int main()
{

Set_ConSize( 200,50 );

return 0;

}

void Set_ConSize( int iX,int iY )
{
HANDLE hCon;
COORD conSize = {iX,iY};

hCon = CreateFile(&quot;CONOUT$&quot;,GENERIC_WRITE |
GENERIC_READ,
FILE_SHARE_READ |
FILE_SHARE_WRITE,
0L,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
0L);

SetConsoleScreenBufferSize( hCon,conSize );
} Mike L.G.
mlg400@blazemail.com
 
thanks!!

one more thing, which is unrelated to the previous question.
have you ever had a similar error generated while you ran a program from VC++
Debug Error!
Program:xxx\xxx\db.exe
DAMAGE: after Normal block (#55) at [some memory location (NOT 0x00000000)
I've never seen anyth like that before.
Do u know what it means? Avendeval


 
never mind, got it :)
i guess it's some type of self-protection for writing out of bounds/range when using arrays.
Avendeval


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top