开发者

c# pinvoke SndGetSoundFileList?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜