?
Hier mal den Code zum testen.
#include <windows.h>
#include <setupapi.h>
#include <stdio.h>
#define MAX_CLASS_NAME_LEN 10
LPTSTR err();
void main(void)
{
PCTSTR pctstrPath = "c:\\blabla.inf";
LPGUID lpguid = NULL;
PTSTR ptstrClassName = NULL;
if(!SetupDiGetINFClassA(pctstrPath, lpguid, ptstrClassName, MAX_CLASS_NAME_LEN, NULL))
printf("%s\n",err());
else
printf("%s\n%s\n", lpguid, ptstrClassName);
}
LPTSTR err()
{
LPVOID lpMsgBuf;
FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
GetLastError(), 0, (LPTSTR) &lpMsgBuf, 0, NULL);
return (LPTSTR)lpMsgBuf;
}