我在Visual Studio 2012中使用C#来调用包含在我的项目所需的一组外部库中的函数.该函数需要传入一个双指针,但我不确定确切的语法.单指针对我很有用.我使用的是unsafe关键字.
AVFormatContext _file = new AVFormatContext();
fixed (AVFormatContext* p_file = &_file)
{
avformat_alloc_output_context2(&p_file,null,null,filename);
}
Run Code Online (Sandbox Code Playgroud)
VS抱怨"&p_file"语法错误为"无法获取只读局部变量的地址".
任何帮助将非常感激!