SetupAPI in IoTCore?

54 Views Asked by At

Can I use SetupApi Functions in windows10 IoTCore?

I writed only one line : HDEVINFO Handle = SetupDiGetClassDevs(NULL,NULL,NULL,DIGCF_ALLCLASSES);
But Handle = 0xfff...
GetlastError = 127 means "The specified procedure could not be found."

1

There are 1 best solutions below

0
On BEST ANSWER

I can't reproduce your issue and your code works for me. I test on Raspberry Pi 3 with Windows 10 IoT Core version 17763.1.

The code I used in a Windows IoT Core Console Application and debug follow this tutorial:

#include <windows.h>
#include <setupapi.h>


int main(int argc, char **argv)
{
    HDEVINFO Handle = SetupDiGetClassDevs(NULL, NULL, NULL, DIGCF_ALLCLASSES);
    DWORD errCode = GetLastError();
}

You can have a try to see if it works.

I upload my project here.