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!

call an API function from dos

Status
Not open for further replies.

UrbaneRove

Programmer
Mar 21, 2002
48
CA
Hello there,

I was wondering if there was a way to call an API function directly from the DOS prompt.

What I need to return is the screen res as a variable in a batch file and then open the shell commend to control the monitor res depending on the answer.

Opening the shell control for the monitor I am fine with I just need to know how to pull the screen res to a variable. Using the 'GetSystemMetrics32' in the User32.dll

Any ideas or references are greatly appreciated.

Urbane Rove
 
Don't know of a way of doing this (RunDll32 will not work with the Win32 APIs).

However, it's extremely easy to write a simple EXE which does exactly what you want and returns the appropriate value to you cmd/bat file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top