LaunchExplorer

LaunchExplorer

Useage:

LaunchExplorer("c:\\windows\\desktop");

BOOL LaunchExplorer(char * pDir)
{
    HINSTANCE hInst;

    hInst = ShellExecute(NULL, "explore", pDir, NULL, NULL, SW_SHOW);

    if ((unsigned int) hInst < 32)
    {
        MessageBox(NULL,"Error, unable to launch Explorer", "Error", MB_OK);
        return FALSE;
    }
    return TRUE;
}

Back to main page