mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +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,
|
||||
IUnknown *args)
|
||||
{
|
||||
LPWSTR selecttext;
|
||||
wil::unique_cotaskmem_string selecttext;
|
||||
CHECK_FAILURE(target->get_SelectionText(&selecttext));
|
||||
callback(selecttext);
|
||||
// 不需要free,free反而会崩溃
|
||||
callback(selecttext.get());
|
||||
return S_OK;
|
||||
})
|
||||
.Get(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user