recource for VC and script
The post is written by Onega(www.fruitfruit.com)
//var d; d = new ActiveXObject("Scripting.Dictionary");
//d.Add( "a" , "Athens" ) ;
//d.Items()
Array passed from jscript via d.Items() , type is VT_ARRAY | VT_VARIANT
SAFEARRAY* psa = NULL;
VARIANT *varImages = NULL;
BSTR* bstrImages = NULL;
if(newVal.vt == (VT_ARRAY | VT_VARIANT) )
{
psa = newVal.parray;
SafeArrayAccessData(psa, (void**) &varImages);
}
type of array passed by vbscript is [2416] incoming vt=0000400c, VT_BYREF | VT_VARIANT
if(newVal.vt VT_BYREF|VT_VARIANT)
{
VARIANT *ptmp = newVal.pvarVal;
VARTYPE vtmp = ptmp->vt; // 0x600c VT_BYREF|VT_ARRAY|VT_VARIANT
if(vtmp & VT_BYREF)
psa = *(ptmp->pparray);
else
psa = ptmp->parray;
SafeArrayAccessData(psa, (void**) &varImages);
}
else
{
psa = newVal.parray;
SafeArrayAccessData(psa, (void**) &bstrImages);
}
http://support.microsoft.com/kb/218454/EN-US/
How To Implement Array Arguments in Visual C++ COM Objects for Active Server Pages
http://www.codeguru.com/Cpp/misc/misc/article.php/c3907/
Hosting VBScript in your own Application
Perry Bruins
http://www.codeguru.com/Cpp/misc/misc/article.php/c6093/
Scripter Library
Ivan Martynov
http://www.codeguru.com/Cpp/COM-Tech/atl/scripting/article.php/c23/
Implementing Active Script Site with ATL
Leonid Belkind
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2563/
ActiveX script hosting
Andrew Garbuzov
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2583/
Adding Debug facilities to an Active Scripting Host
Stuart Lodge
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2613/
ActiveX script hosting (2)
Andrew Garbuzov
http://www.codeguru.com/Cpp/COM-Tech/activex/controls/article.php/c5559/
Adding Scripting Support to an Application
Yuri Polyakov
http://www.codeproject.com/com/scripter.asp
Embeddable script editor for MFC applications
By Alex Hazanov
//var d; d = new ActiveXObject("Scripting.Dictionary");
//d.Add( "a" , "Athens" ) ;
//d.Items()
Array passed from jscript via d.Items() , type is VT_ARRAY | VT_VARIANT
SAFEARRAY* psa = NULL;
VARIANT *varImages = NULL;
BSTR* bstrImages = NULL;
if(newVal.vt == (VT_ARRAY | VT_VARIANT) )
{
psa = newVal.parray;
SafeArrayAccessData(psa, (void**) &varImages);
}
type of array passed by vbscript is [2416] incoming vt=0000400c, VT_BYREF | VT_VARIANT
if(newVal.vt VT_BYREF|VT_VARIANT)
{
VARIANT *ptmp = newVal.pvarVal;
VARTYPE vtmp = ptmp->vt; // 0x600c VT_BYREF|VT_ARRAY|VT_VARIANT
if(vtmp & VT_BYREF)
psa = *(ptmp->pparray);
else
psa = ptmp->parray;
SafeArrayAccessData(psa, (void**) &varImages);
}
else
{
psa = newVal.parray;
SafeArrayAccessData(psa, (void**) &bstrImages);
}
http://support.microsoft.com/kb/218454/EN-US/
How To Implement Array Arguments in Visual C++ COM Objects for Active Server Pages
http://www.codeguru.com/Cpp/misc/misc/article.php/c3907/
Hosting VBScript in your own Application
Perry Bruins
http://www.codeguru.com/Cpp/misc/misc/article.php/c6093/
Scripter Library
Ivan Martynov
http://www.codeguru.com/Cpp/COM-Tech/atl/scripting/article.php/c23/
Implementing Active Script Site with ATL
Leonid Belkind
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2563/
ActiveX script hosting
Andrew Garbuzov
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2583/
Adding Debug facilities to an Active Scripting Host
Stuart Lodge
http://www.codeguru.com/Cpp/COM-Tech/activex/scripting/article.php/c2613/
ActiveX script hosting (2)
Andrew Garbuzov
http://www.codeguru.com/Cpp/COM-Tech/activex/controls/article.php/c5559/
Adding Scripting Support to an Application
Yuri Polyakov
http://www.codeproject.com/com/scripter.asp
Embeddable script editor for MFC applications
By Alex Hazanov
0 Comments:
Post a Comment
<< Home