JDaus Posted May 31, 2010 Share Posted May 31, 2010 im stuck ... if you can help me out with this, i will help you out with a few beers (or cash ... you decide) expandcollapse popupbool CheckVideoDriver(bool Box) { typedef BOOL (WINAPI* pEnumDisplayDevices)(PVOID,DWORD,PVOID,DWORD); HDC m_hrootdc=NULL; pEnumDisplayDevices pd=NULL; LPSTR driverName = "mv video hook driver2"; BOOL DriverFound; DEVMODE devmode; FillMemory(&devmode, sizeof(DEVMODE), 0); devmode.dmSize = sizeof(DEVMODE); devmode.dmDriverExtra = 0; BOOL change = EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&devmode); devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; HMODULE hUser32=LoadLibrary("USER32"); if (hUser32) pd = (pEnumDisplayDevices)GetProcAddress( hUser32, "EnumDisplayDevicesA"); if (pd) { LPSTR deviceName=NULL; DISPLAY_DEVICE dd; ZeroMemory(&dd, sizeof(dd)); dd.cb = sizeof(dd); devmode.dmDeviceName[0] = '\0'; INT devNum = 0; BOOL result; DriverFound=false; while (result = (*pd)(NULL,devNum, &dd,0)) { if (strcmp((const char *)&dd.DeviceString[0], driverName) == 0) { DriverFound=true; break; } devNum++; } if (DriverFound) { } else if(Box) MessageBox(NULL,"Driver not found: Perhaps you need to reboot after install","driver info: required version 1.22",0); } if (hUser32) FreeLibrary(hUser32); return false; } ive naturally googled this, with no luck. if you can point me in the right direction, i should be able to figure out the rest (hopefully) ... ask a silly question and remain a fool for 5 minutes...don't ask, and remain a fool for life__JD - YTS | VNC2Me - Secure remote Desktop Support Solutions Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2010 Share Posted May 31, 2010 Maybe... _WinAPI_EnumDisplayDevices Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! 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