mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
.
This commit is contained in:
parent
40fce13b1c
commit
0b9ccb4aa2
@ -251,10 +251,9 @@ DECLARE_API void *add_ContextMenuRequested(void *m_host, int index, const wchar_
|
|||||||
ICoreWebView2ContextMenuItem *sender,
|
ICoreWebView2ContextMenuItem *sender,
|
||||||
IUnknown *args)
|
IUnknown *args)
|
||||||
{
|
{
|
||||||
LPWSTR selecttext;
|
wil::unique_cotaskmem_string selecttext;
|
||||||
CHECK_FAILURE(target->get_SelectionText(&selecttext));
|
CHECK_FAILURE(target->get_SelectionText(&selecttext));
|
||||||
callback(selecttext);
|
callback(selecttext.get());
|
||||||
// 不需要free,free反而会崩溃
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
})
|
})
|
||||||
.Get(),
|
.Get(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user