C++翻译成C#

seaonce 2014-04-30 09:38:39

以下是C++代码,谁能帮我翻译成C#代码,谢谢

StRealDataCallBack结构体
typedef struct _STREALDATACALLBACK_ {
pFunRealDataCallBack FunCallBack; /* function pointer: point to the user's function */
void *pContext; /* user's pointer */
}StRealDataCallBack;

typedef void(*pFunRealDataCallBack)(StVideoStreamInfo *pVideoInfo, void *pContext);
...全文
109 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
bigbaldy 2014-04-30
  • 打赏
  • 举报
回复

        public struct StVideoStreamInfo {/*...*/ }
        public delegate void pFunRealDataCallBack(StVideoStreamInfo* pVideoInfo, void* pContext);

        struct _STREALDATACALLBACK_
        {
            pubic pFunRealDataCallBack FunCallBack; /* function pointer: point to the user's function */
            void* pContext;                   /* user's pointer */
        }
lidechao886 2014-04-30
  • 打赏
  • 举报
回复
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] public delegate void pFunRealDataCallBack(IntPtr pVideoInfo, IntPtr pContext); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)] public struct StRealDataCallBack { public pFunRealDataCallBack FunCallBack ; public IntPtr buffer; // pContext }

110,533

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧