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

Setting system variables on Win 2000

Status
Not open for further replies.

SwapSawe

Programmer
Apr 24, 2001
148
0
0
US
Dear all this is a prog. which means to turn the CAPSLOCK on. This prog works fine in Win9x, WINNT, DOS but when I tried it in Windows 2000 - DOS it simply didnot work.

the code follows -
int main()
{
int *p;
p=0x417;
*p=65;
}

I wud also like to know how to access the system variables which determine resolution, Speaker on/Off or Volume control, Machine reboot, changing font.
Regards,
swapSawe
 
I'm assuming you are writing win32 console applications and not DOS programs.
You may be able to use the keybd_event() win32 API function call to do this. I haven't tried it. I do know that the API function SetKeyboardState() won't change the caps lock key in Win32...
Win2000 may not allow an application to change the global state of the system and only allow it to change what affects its own thread or process (Caplock would be global)


Kim_Christensen@telus.net
 
Hey i need to know whether this is a problem with the difference b/w OS or the Machine architecture. It doesnot run on IBM Machine with Win2000 but runs very fine with Win 95 and Win NT on a clone PC.

how could that be.
And ya there was a problem with earlier prog it was :
char far *p; than being int *p;

Thanx for your help.... in adv.
SwapSawe.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top