HtmlUtilities.ConvertToText(String) Method
Код
html := "<p>test</p>"
string := "Windows.Data.Html.HtmlUtilities"
DllCall("Combase.dll\WindowsCreateString", "wstr", string, "uint", StrLen(string), "ptr*", hString)
VarSetCapacity(GUID, 16)
DllCall("ole32\CLSIDFromString", "wstr", IHtmlUtilities := "{FEC00ADD-2399-4FAC-B5A7-05E9ACD7181D}", "ptr", &GUID)
DllCall("Combase.dll\RoGetActivationFactory", "ptr", hString, "ptr", &GUID, "ptr*", HtmlUtilities)
DllCall("Combase.dll\WindowsDeleteString", "ptr", hString)
DllCall("Combase.dll\WindowsCreateString", "wstr", html, "uint", StrLen(html), "ptr*", hHtml)
DllCall(NumGet(NumGet(HtmlUtilities+0)+6*A_PtrSize), "ptr", HtmlUtilities, "ptr", hHtml, "ptr*", hText) ; ConvertToText
DllCall("Combase.dll\WindowsDeleteString", "ptr", hHtml)
ObjRelease(HtmlUtilities)
buffer := DllCall("Combase.dll\WindowsGetStringRawBuffer", "ptr", hText, "uint*", length, "ptr")
msgbox % StrGet(buffer, "UTF-16")