If this code compiled before then I cannot answer as to why but doing a quick google on pinvoke.net reveals the import should look like this.
Public Declare Auto Function SetupDiGetDeviceInterfaceDetail Lib "setupapi.dll" ( _
ByVal DeviceInfoSet As IntPtr, _
ByRef DeviceInterfaceData As SP_DEVICE_INTERFACE_DATA, _
ByRef DeviceInterfaceDetailData As SP_DEVICE_INTERFACE_DETAIL_DATA, _
ByVal DeviceInterfaceDetailDataSize As UInteger, _
ByRef RequiredSize As UInteger, _
ByRef DeviceInfoData As SP_DEVINFO_DATA) As Boolean '
Then you are passing (by ref) the structure, not a pointer to the structure. Additionally you didn't provide us all the input that you were passing so you may need to make additional changes as well. I'm also not sure that the SP_DEVICE_INTERFACE_DETAIL_DATA
structure is properly set for the charset or its size is correct. But I haven't tested this. You can refer to the earlier PInvoke.net link to see what should be working VB code for this API.