Enumerating Windows Portable Devices in C#

后端 未结 6 1026
半阙折子戏
半阙折子戏 2020-12-14 04:09

I am attempting to enumerate connected portable devices on Windows using the Windows Portable Devices API and the PortableDeviceManager provided by this API.

I have

6条回答
  •  暖寄归人
    2020-12-14 05:07

    Just an update on the accepted answer.

    The correct replacement is as follows.

    GetDevices([in][out] string& marshal( lpwstr) pPnPDeviceIDs,

    to

    GetDevices([in][out] string[] marshal( lpwstr[]) pPnPDeviceIDs,

    As per Andrew Trevarrow.

提交回复
热议问题