Sign in to follow this  
Followers 0
JDaus

Translate C++ to autoit

2 posts in this topic

im stuck ...

if you can help me out with this, i will help you out with a few beers (or cash ... you decide)

bool
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

Share this post


Link to post
Share on other sites



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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0