-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Ganesh Rao
Message 1 in Discussion

   Hi All, I have written a VC++ COM component. In that two functions are 
there. These functions are being called from script language, (Javascript, 
vbscript).   The function  STDMETHODIMP CCJS::ArrayArgVB(VARIANT *pInArry, 
VARIANT *pOutArray) is called from VBScript. This is working fine. The i/p and 
o/p arguments are properly coming as VT_ARRAY, Vt_BYREF. sub Test()
Dim inParam(1)
Dim OutParam(1)
OutParam(0) = "                                   "
OutParam(1) = "                                       "
inParam(0) = "Ganesh"
inParam(1) = "Rao"
msgbox "Executing test result from VBscript"
msgbox "Input   : 1->" &  inParam(0) & "    2->" & inParam(1)
VCCOMP.ArrayArgVB inParam, OutParam
msgbox "Output   : 1->" &  OutParam(0) & "    2->" & OutParam(1)
end sub       The function STDMETHODIMP CCJS::ArrayArgJAVA(VARIANT *pInArry, 
VARIANT *pOutArray) is called from Javascript. This function shows the i/p, o/p 
argument type as VT_DISPATCH. I am not able to get the array values in this 
case. It will be great if somebody can help me, to find out how to get the 
array values passed from javascript. function Test()
{
var inParam = new Array(1);
var OutParam = new Array(1);
var y = new ActiveXObject("Scripting.Dictionary"); 
inParam[0] = "ganesh";
inParam[1] = "rao";
OutParam[0] = " ";
OutParam[1] = " ";
VCCOMP.ArrayArgJAVA(inParam, OutParam);
}         The attachment is the sample code. Use VBScript for VBscript button 
and Javascript for JAvascript button.   Thanks  Ganesh Rao  
View Attachment(s):
http://groups.msn.com/BDotNet/_notifications.msnw?type=msg&mview=1&parent=1&item=23823
-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDotNet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member 
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you 
received this message by mistake, please click the "Remove" link below. On the 
pre-addressed e-mail message that opens, simply click "Send". Your e-mail 
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to