只是说实现原理,没必要深研结构要不要我贴不完了。。。。
void mbInit(const mbSettings* settings)
typedef struct { mbProxy proxy; unsigned int mask; } mbSettings; mask可以取:
WKE_SETTING_PROXY:效果和mbSetProxy一样,通过proxy设置
WKE_SETTING_PAINTCALLBACK_IN_OTHER_THREAD:这是个高级用法,开启时,on paint回调会在另外个线程(其实就是渲染线程)。
这个是用来实现多线程上屏功能,性能更快。
//结构 public struct mbSettings
{
public mbProxy proxy;
public mbSettingMask mask;
[MarshalAs(UnmanagedType.FunctionPtr)]
internal mbOnBlinkThreadInitCallback blinkThreadInitCallback;
public IntPtr blinkThreadInitparam;
}
public struct mbProxy
{
public mbProxyType type;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 100)]
public string hostname;
public ushort port;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
public string username;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 50)]
public string password;
}
[此贴子已经被作者于2022-12-18 11:43编辑过]