bentom Posted May 13, 2009 Share Posted May 13, 2009 Hi, I have an Nvidia card here and the latest driver installed. There are some nice hotkey that you can use for turning on and off the CloneMode. Is it possible to get the information if the clonemode is on or off? I know that there are several dll calls but I didN#t find a proper one yet Thanks for your help Regards, Alex Link to comment Share on other sites More sharing options...
weaponx Posted May 13, 2009 Share Posted May 13, 2009 $Msg = "" $aResult = DllCall("nvcpl.dll","int","NvGetWindowsDisplayState","int",1) If @ERROR Then $Msg = "@ERROR: " & @ERROR Else Switch $aResult[0] Case -1 $Msg = "Unknown state or view mode." Case 0 $Msg = "The call failed internal error" Case 1 $Msg = "Unrecognized Windows monitor number" Case 2 $Msg = "Graphics card not attached to desktop" Case 3 $Msg = "Graphics card attached to desktop but not an NVIDIA device" Case 4 $Msg = "Graphics card in Single-Display mode" Case 5 $Msg = "Graphics card in DualView mode" Case 6 $Msg = "Graphics card in Clone mode" Case 7 $Msg = "Graphics card in Horizontal Span mode" Case 8 $Msg = "Graphics card in Vertical Span mode" EndSwitch EndIf MsgBox(0,"",$Msg) Link to comment Share on other sites More sharing options...
bentom Posted May 13, 2009 Author Share Posted May 13, 2009 Thank you very much for this information Regards, Alex Link to comment Share on other sites More sharing options...
bentom Posted May 14, 2009 Author Share Posted May 14, 2009 Hello, the code perfects perfectly, just another question to the experts. Is it also possible to get the information which port is in use. I have 3 Ports, two digital DVI and one Analog. The digital should always be the primary one wherealse the analog should be only used in clone mode (for a second small touch device) So it would be fantastic to know exactly which port is in use and if possible to switch through the ports. Thanks in advance Alex Link to comment Share on other sites More sharing options...
bentom Posted May 14, 2009 Author Share Posted May 14, 2009 Hi,I just found a nvidia document describing most of nvidia api funktions. You can get it here:http://developer.download.nvidia.com/SDK/9...olPanel_API.pdfThis helps me a lot to get the information on the attached displays.I have one problem left using the clone mode. I want to set the digital connected display per default as pimary (if available). I did not find a function in that document that can help me with that. Have you got any idea?Thanks in advanceAlex Link to comment Share on other sites More sharing options...
bentom Posted May 17, 2009 Author Share Posted May 17, 2009 Hi, unfortunately i often get the problem that after a resolution switch there's no picture. I have to plug out and the in the connector and it refreshes and works again. I wanted to automate that and found a function in the nvidia documentation: NvCplRefreshConnectedDevices() I try and try but always get an error when executing the file. This is my skript DllCall("nvcpl.dll","BOOL","NvCplRefreshConnectedDevices","NVREFRESH_SYSTEMWID") Can Someone help? Thanks Alex Link to comment Share on other sites More sharing options...
ProgAndy Posted May 17, 2009 Share Posted May 17, 2009 (edited) Look at the definition of the function and read the entry about DLLCall in the helpfile: Const $NVREFRESH_SYSTEMWIDE = 0x00000002 DllCall("nvcpl.dll","INT","NvCplRefreshConnectedDevices", "dword", $NVREFRESH_SYSTEMWIDE) Edited May 17, 2009 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
bentom Posted May 18, 2009 Author Share Posted May 18, 2009 Thamk you very much for your help. I did not understand the definition of nvidia, but with your help it's fine. Thanks again Regards, Alex Link to comment Share on other sites More sharing options...
bentom Posted May 20, 2009 Author Share Posted May 20, 2009 Hi again, sorry for asking again, but I have a big problem with the NvGetDisplayInfo() function. I would like to know specific information of the monitor but it'r really difficult. The function prototype is discribed as BOOL APIENTRY NvGetDisplayInfo ( IN LPCSTR pszUserDisplay, OUT NVDISPLAYINFO* pDisplayInfo); In a first step I want it for the primary display so I set: $aResult = DllCall("nvcpl.dll","LPCSTR","NvGetDisplayInfo", "int",0, "Here is the Output") But I do not know how to get to the Output function. It is described in a table but I did not get the idea behind. Can someone help? Regards, Alex Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now