GetProcID for VF61

I would like to use function GetProcID to determinate which Colibri board is used. Do you provide such function for VF61?

Hi,

Yes there is a way to detect this. We are currently implementing SysInfo library for Vybrid. But in the mean time you can use this →

#define IOCTL_HAL_QUERY_BOARD_ID      CTL_CODE(FILE_DEVICE_HAL, 3073, METHOD_BUFFERED, FILE_ANY_ACCESS)
#define BOARD_ID_VF50    0x00500000
#define BOARD_ID_VF61    0x00610000
DWORD                boardid;
if (!KernelIoControl(IOCTL_HAL_QUERY_BOARD_ID,NULL,0,&boardid,sizeof(DWORD),NULL))
{
    RETAILMSG(1, (_T("Error %d reading board id\r\n"),GetLastError()));
    goto CleanUp;
}

When I have tried to use your example. After compilation I have got errors:

error C2065: ‘FILE_DEVICE_HAL’ : undeclared identifier
error C2065: ‘METHOD_BUFFERED’ : undeclared identifier
error C2065: ‘FILE_ANY_ACCESS’ : undeclared identifier
error C3861: ‘KernelIoControl’: identifier not found
error C3861: ‘CTL_CODE’: identifier not found

Should I include any additional headers?

# define FILE_DEVICE_HAL              0x101
# define METHOD_BUFFERED              0x0
# define FILE_ANY_ACCESS              0x0
# define CTL_CODE( DeviceType, Function, Method, Access ) (((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method))
# define IOCTL_HAL_REBOOT         CTL_CODE(FILE_DEVICE_HAL,  15,      METHOD_BUFFERED, FILE_ANY_ACCESS)
 extern  "C" {
BOOL KernelIoControl(DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned);

}

Add this entries and it should work. Its also documented on developers network.

Now it works fine.
Thank you.
Konrad