mirror of
https://github.com/eliboa/TegraRcmGUI.git
synced 2024-11-12 21:46:39 +00:00
Fixed libusbK.dll not found error
This commit is contained in:
parent
441b6f325d
commit
4bd9e8dfd6
2 changed files with 17 additions and 1 deletions
|
@ -74,6 +74,9 @@ BOOL CTegraRcmGUIDlg::OnInitDialog()
|
||||||
RCM_BITMAP2.SetBitmap(DRIVER_KO);
|
RCM_BITMAP2.SetBitmap(DRIVER_KO);
|
||||||
RCM_BITMAP3.SetBitmap(RCM_DETECTED);
|
RCM_BITMAP3.SetBitmap(RCM_DETECTED);
|
||||||
|
|
||||||
|
BOOL isDriverInstalled = LookForDriver();
|
||||||
|
if (!isDriverInstalled) InstallDriver();
|
||||||
|
|
||||||
string value = GetPreset("AUTO_INJECT");
|
string value = GetPreset("AUTO_INJECT");
|
||||||
if (value == "TRUE")
|
if (value == "TRUE")
|
||||||
{
|
{
|
||||||
|
@ -222,12 +225,15 @@ void CTegraRcmGUIDlg::OnTimer(UINT nIDEvent)
|
||||||
this->GetDlgItem(IDC_INJECT)->EnableWindow(FALSE);
|
this->GetDlgItem(IDC_INJECT)->EnableWindow(FALSE);
|
||||||
this->GetDlgItem(IDC_SHOFEL2)->EnableWindow(FALSE);
|
this->GetDlgItem(IDC_SHOFEL2)->EnableWindow(FALSE);
|
||||||
s = "lbusbK driver is needed !";
|
s = "lbusbK driver is needed !";
|
||||||
|
|
||||||
|
/*
|
||||||
if (!ASK_FOR_DRIVER)
|
if (!ASK_FOR_DRIVER)
|
||||||
{
|
{
|
||||||
ASK_FOR_DRIVER = TRUE;
|
ASK_FOR_DRIVER = TRUE;
|
||||||
InstallDriver();
|
InstallDriver();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -534,3 +540,12 @@ void CTegraRcmGUIDlg::InstallDriver()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
typedef int(__cdecl *MYPROC)(LPWSTR);
|
||||||
|
|
||||||
|
BOOL CTegraRcmGUIDlg::LookForDriver()
|
||||||
|
{
|
||||||
|
CString LIBUSBKDLL = _T("C:\\Windows\\System32\\libusbK.dll");
|
||||||
|
std::ifstream infile(LIBUSBKDLL);
|
||||||
|
BOOL file_exists = infile.good();
|
||||||
|
return file_exists;
|
||||||
|
}
|
|
@ -63,4 +63,5 @@ public:
|
||||||
afx_msg string GetPreset(string param);
|
afx_msg string GetPreset(string param);
|
||||||
afx_msg void SetPreset(string param, string value);
|
afx_msg void SetPreset(string param, string value);
|
||||||
afx_msg void InstallDriver();
|
afx_msg void InstallDriver();
|
||||||
|
afx_msg BOOL LookForDriver();
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue