Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnLoadUrlBegin事件中wkeNetGetRawHttpHead出返回null值 #565

Open
liangruiben opened this issue Jan 22, 2023 · 0 comments
Open

OnLoadUrlBegin事件中wkeNetGetRawHttpHead出返回null值 #565

liangruiben opened this issue Jan 22, 2023 · 0 comments

Comments

@liangruiben
Copy link

liangruiben commented Jan 22, 2023

使用MBforNET的MiniBlink_DLL来构建一个C#浏览器,在OnLoadUrlBegin事件检测HTTP请求数据时
wkeSlist rawHead = (sender as WebView).NetGetRawHttpHead(e.Job); 会出错,访问网址www.qq.com
查看是在MB_WebView.cs

        public wkeSlist NetGetRawHttpHead(IntPtr job)
        {
            IntPtr ptr = MBApi.wkeNetGetRawHttpHead(job);
            return (wkeSlist)ptr.UTF8PtrToStruct(typeof(wkeSlist));//在 这一步已经跳出错误了。ptr.UTF8PtrToStruct(typeof(wkeSlist))会出现NULL值。
        }

其中wkeNetGetRawHttpHead是MB_API.cs中的

        [DllImport(m_strDll, EntryPoint = "wkeNetGetRawHttpHead", CallingConvention = CallingConvention.Cdecl)]
        public static extern IntPtr wkeNetGetRawHttpHead(IntPtr job);

不知如何解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant