Okay, So I am getting this weird error stating "ERROR_NO_CATALOG_FOR_OEM_INF" whenever I call DiInstallDevice, InstallSelectedDriver. The error code returned is 3758096943. When I look it up in err.exe, it says
# for decimal -536870353 / hex 0xe000022f :
ERROR_NO_CATALOG_FOR_OEM_INF setupapi.h
# for hex 0xffffffff / decimal -1 :
NO_TITLE ftsiface.h
USE_DEFAULT ftsiface.h
JET_wrnNyi esent98.h
# /* Function Not Yet Implemented */
LZERROR_BADINHANDLE lzexpand.h
# /* invalid input handle */
MAPI_DIAG_NO_DIAGNOSTIC mapidefs.h
MSIDBERROR_FUNCTIONERROR msiquery.h
# function error
ERROR_UNHANDLED_ERROR ntddchgr.h
# Unknown error condition
PDR_ERROR penwin.h
# parameter or unspecified error
ICERR_UNSUPPORTED vfw.h
ERROR_UNHANDLED_ERROR winioctl.h
# Unknown error condition
# 11 matches found for "3758096943"
I am using setupapi, therefore the error, Internet searches reveal nothing whatsoever apart from the error being associated with the "SetupCopyOEMInf()" Which I have no relation to. The Driver in Question is an Intel HD 520 Signed Driver. I have verified it and downloaded it via Microsoft update catalog.
The driver is Selected using SetupDiSetSelectedDriver() and the correct device is selected using SetupDiSetSelectedDevice(). If anyone can point me in the right direction itwould be great!.
Code :
PopulateDeviceInstaceIds(L"PCI\\VEN_8086&DEV_1916");
SP_DRVINFO_DATA drvData;
SP_DRVINFO_DETAIL_DATA drvDetailData;
SP_DEVINFO_DATA LocDevData;
MakeDevClassHandles(handle,instancesOfDevice.at(0).c_str());
SetDRVINFO(&LocDevData,&drvDetailData,&drvData,L"Intel Corporation",L"22.20.16.4836",TRUE);
std::cout<<SetupDiSetSelectedDevice(handle,&LocDevData)<<endl;
std::cout<<SetupDiSetSelectedDriver(handle,&LocDevData,&drvData)<<endl;
if(&drvData!=NULL)
{
HMODULE libHandle = LoadLibraryW(L"newdev.dll");
lpfnInstallSelectedDriver addr;
DWORD rebootRec;
addr = (lpfnInstallSelectedDriver)GetProcAddress(libHandle,"InstallSelectedDriver");
if(addr!=NULL && addr(NULL,handle,NULL,TRUE,&rebootRec))
{
}
else
cout<<"InstallSelectedDriver ERR : "<<GetLastError();
if(DiInstallDevice(NULL,handle,&LocDevData,&drvData,0,&nRebo))
{
}
else
{
cout<<"DiInstall Device error : "<<GetLastError();
std::cout<<"\n\nWaiting for upto 10 seconds for changes to reflect..";
Sleep(10000);
I guess this code will be enough, if not please let me know. The entire code is a few hundred lines, so.
The SetDRVINFO() function just sets the correct device and driver in the structures, i have verified them while debugging. Both the else cases throw the same error.