HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2020
0216
さかモニカでhtml読み込みする際のセキュリティダイアログ制御 20未解決


さか

リンク

2020/2/16(Sun) 21:55:42|NO.89495

一旦、自己解決したのですが教えてください。

htmlの内容をIEコンポーネントを使用しないでCreateURLMonikerを使用してます。
セキュリティ警告が出なくしたいのですがpDoc("designMode")="ON"以外に方法
はないでしょうか?
pDoc("designMode")="ON"を入れると出なくなりますがjavascriptが実行されなく
なってしまいます。
以下のスクリプトを実行すると警告が出ます。出ない方法ないでしょうか。

#define IID_IHTMLDocument "{626FC520-A41E-11CF-A731-00A0C9082637}" #define IID_IHTMLDocument2 "{332C4425-26CB-11D0-B483-00C04FD90119}" #define IID_IHTMLDocument3 "{3050f485-98b5-11cf-bb82-00aa00bdce0b}" #define IID_IHTMLDocument4 "{3050f69a-98b5-11cf-bb82-00aa00bdce0b}" #define CLSID_HTMLDocument "{25336920-03F9-11CF-8FD0-00AA00686F13}" #usecom IHTMLDocument IID_IHTMLDocument CLSID_HTMLDocument #usecom IHTMLDocument2 IID_IHTMLDocument2 CLSID_HTMLDocument #usecom IHTMLDocument3 IID_IHTMLDocument3 CLSID_HTMLDocument #usecom IHTMLDocument4 IID_IHTMLDocument4 CLSID_HTMLDocument #comfunc IHTMLDocument4_createDocumentFromUrl 8 int, int, int #uselib "urlmon" #func CreateURLMoniker "CreateURLMoniker" int, wstr, int #uselib "ole32" #func CreateBindCtx "CreateBindCtx" int, int #define IID_IMoniker "{0000000f-0000-0000-C000-000000000046}" #define IID_IBindCtx "{0000000e-0000-0000-C000-000000000046}" #define IID_IPersistMoniker "{79eac9c9-baf9-11ce-8c82-00aa004ba90b}" #define STGM_READ 0x00000000 #define STGM_READWRITE 0x00000002 #usecom IPersistMoniker IID_IPersistMoniker #comfunc IPersistMoniker_Load 5 int, int, int, int #comfunc IPersistMoniker_Release 2 #usecom IMoniker IID_IMoniker #comfunc IMoniker_Release 2 #usecom IBindCtx IID_IBindCtx #comfunc IBindCtx_Release 2 url="h"+"ttps://www.yahoo.co.jp/" newcom pDoc, IHTMLDocument2 ppMoniker = 0 CreateURLMoniker 0, url, varptr(ppMoniker) newcom pMoniker, IID_IMoniker, -1, ppMoniker ppBindCtx = 0 CreateBindCtx 0, varptr(ppBindCtx) newcom pBindCtx, IID_IBindCtx, -1, ppBindCtx querycom pPersistMoniker, pDoc, IPersistMoniker IPersistMoniker_Load pPersistMoniker, 0, ppMoniker, ppBindCtx, STGM_READWRITE delcom pPersistMoniker delcom pBindCtx delcom pMoniker pDoc("designMode")="OFF" ; セキュリティ抑止ON a=pDoc("cookie"): mes "cookie:"+a ; クッキー取得 // 準備が完了するまで待つ repeat if pDoc("readyState") == "complete" : break wait 10 loop pBody = pDoc("body") txt = pBody("innerHTML") mes txt title "end"



この記事に返信する


ONION software Copyright 1997-2023(c) All rights reserved.