-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: spark
Message 3 in Discussion
take a look at the new console api ....
[DllImport("kernel32.dll")]
public static extern bool AllocConsole();
[DllImport("kernel32.dll")]
public static extern bool FreeConsole();
[DllImport("kernel32.dll")]
public static extern long GetStdHandle(long nStdHandle);
[DllImport("kernel32.dll")]
public static extern long WriteConsoleA(long hConsoleOutput,void *lpBuffer,long
nNumberOfCharsToWrite, long lpNumberOfCharsWritten,void * lpReserved);
(this is snipped from some api - chatty cs code).
also since you have asked this question praveen you would have noticed how the console
window changes when you run a 16 bit app. it suddenly becomes the old 25*80 dos window
and your 0xb800:0000 works and stuff.
take some time out and imagine how this works under windows - when the os detects the
16 bits app it changes all the settings for the console window and simulates the old
dos environment for you. we guys for teh dos world find it hard to come to terms with
this - but this is a different OS. it just provides the most unimagianbly best
backward compatibilit and vm86 simulation that is all. so cosnider the new console api.
also heres a handy tip - try to write your code in a resolution independat manner -
dont assume 25*80. also if you are using direct memory writes (char far * src = (char
far *)0xB8000000) then try to change those writes to a buffer that is allocated and
have variables that determine the size of the buffer and such. then try writing code
that maps the buffer to your video ram under a dos or mapping to a windows console
under a windows build by using console api. that way you will not need to sprinkle
console specific code throughout your app.
rosh
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]