开发者

c# pinvoke SndGetSoundFileList?

开发者 https://www.devze.com 2022-12-12 17:53 出处:网络
I\'d like to call SndGetSoundFileList from c#, but I got no idea how the p/invoke for this function needs to be, due to the pointer parameters.

I'd like to call SndGetSoundFileList from c#, but I got no idea how the p/invoke for this function needs to be, due to the pointer parameters.

HRESULT SndGetSoundFileList (
   SND_EVENT seSoundEvent,
   DWORD grfLocations, 
   SNDFILEINFO** ppS开发者_Python百科oundFiles,
   int* pcSoundFiles
);

I'd like to get the list as a string-array, of course.

Can anyone help me here?

Thanks!


For the array parameter, use out IntPtr as the parameter type. Then use Marshal.PtrToStructure to retrieve the structures, and call LocalFree to free the memory when you're done.

0

精彩评论

暂无评论...
验证码 换一张
取 消