3 <META NAME=
"GENERATOR" Content=
"Microsoft Developer Studio">
4 <META HTTP-EQUIV=
"Content-Type" content=
"text/html; charset=iso-8859-1">
5 <TITLE>Document Title
</TITLE>
9 <script language=
"JScript">
10 function callOleTest( id)
12 var factory= new ActiveXObject(
"com.sun.star.ServiceManager");
13 var oletest= factory.createInstance(
"oletest.OleTest");
16 var arr= new Array(
1,
2,
3,
4,
0);
17 var arrDouble= new Array(
1.2345,
12.345,
123,
45,
1234.5,
12345);
18 var arrBool= new Array(
1,
0,
2,
0,
3);
19 var arrChar= new Array( '
1', 'A',
"1",
"A", ' ',
55,
56);
20 var arrString= new Array(
"hamburger",
"cheeseburger",
"chicken nuggets",
"chicken wings" ,
"pizza");
21 var arrAny= new Array(
100,
100.1235,
"hallo");
22 var arrSeq= new Array( arr, arr, arr);
23 var arrSeq2= new Array( arrSeq, arrSeq, arrSeq)
25 // var ob= new Object();
26 // ob.value=
"A JScript object";
27 // var arrObject= new Array( ob, ob, ob);
30 var arrout1= new Array();
31 var arrout2= new Array();
32 var arrout3= new Array();
35 var sfarray, sfarray1, sfarray2, sfarray3;
36 var value= oletest._GetValueObject();
37 var outValue= oletest._GetValueObject();
38 outValue.InitOutParam();
39 var outValue2= oletest._GetValueObject();
40 outValue2.InitOutParam();
41 var outValue3= oletest._GetValueObject();
42 outValue3.InitOutParam();
44 var inoutValue= oletest._GetValueObject();
45 // inoutValue.InitInOutParam();
51 value.Set(
"[]byte", arr)
52 ret= oletest.methodByte( value);
53 sfarray= new VBArray( ret);
54 document.writeln(
"Param: " + arr.toString() +
"<br>");
55 document.writeln(
"Returns a Sequence< BYTE > <br>" + sfarray.toArray()) ; break;
58 value.Set(
"[]double", arrDouble)
59 ret= oletest.methodDouble( value);
60 sfarray= new VBArray( ret);
61 document.writeln(
"Param: " + arrDouble.toString() +
"<br>");
62 document.writeln(
"Returns a Sequence< double > <br>" + sfarray.toArray()) ; break;
65 value.Set(
"[]boolean", arrBool)
66 ret= oletest.methodBool( value);
67 sfarray= new VBArray( ret);
68 document.writeln(
"Param: " + arrBool.toString() +
"<br>");
69 document.writeln(
"Returns a Sequence< BOOL > <br>" + sfarray.toArray()) ; break;
72 value.Set(
"[]short", arr)
73 ret= oletest.methodShort( value);
74 sfarray= new VBArray( ret);
75 document.writeln(
"Param: " + arr.toString() +
"<br>");
76 document.writeln(
"Returns a Sequence< SHORT > <br>" + sfarray.toArray()) ; break;
79 value.Set(
"[]unsigned short", arr)
80 ret= oletest.methodUShort( value);
81 sfarray= new VBArray( ret);
82 document.writeln(
"Param: " + arr.toString() +
"<br>");
83 document.writeln(
"Returns a Sequence< unsigned SHORT > <br>" + sfarray.toArray()) ; break;
86 value.Set(
"[]long", arr)
87 ret= oletest.methodLong( value);
88 sfarray= new VBArray( ret);
89 document.writeln(
"Param: " + arr.toString() +
"<br>");
90 document.writeln(
"Returns a Sequence< LONG > <br>" + sfarray.toArray()) ; break;
93 value.Set(
"[]unsigned long", arr)
94 ret= oletest.methodULong( value);
95 sfarray= new VBArray( ret);
96 document.writeln(
"Param: " + arr.toString() +
"<br>");
97 document.writeln(
"Returns a Sequence< unsigned LONG > <br>" + sfarray.toArray()) ; break;
100 value.Set(
"[]char", arrChar)
101 ret= oletest.methodChar( value);
102 sfarray= new VBArray( ret);
103 document.writeln(
"Param: " + arrChar.toString() +
"<br>");
104 document.writeln(
"Returns a Sequence< wchar_t > <br>" + sfarray.toArray()) ; break;
107 value.Set(
"[]string", arrString)
108 ret= oletest.methodString( value);
109 sfarray= new VBArray( ret);
110 document.writeln(
"Param: " + arrString.toString() +
"<br>");
111 document.writeln(
"Returns a Sequence< UString > <br>" + sfarray.toArray()) ; break;
114 value.Set(
"[]any", arrAny)
115 ret= oletest.methodAny( value);
116 sfarray= new VBArray( ret);
117 document.writeln(
"Param: " + arrAny.toString() +
"<br>");
118 document.writeln(
"Returns a Sequence< UsrAny > <br>" + sfarray.toArray() ) ; break;
121 var allArray= new Array();
122 for(var i=
0; i
<3; i++)
124 var value1= oletest._GetValueObject();
125 value1.Set(
"[]long", arr);
129 value.Set(
"[][]long", allArray);
131 ret= oletest.methodSequence( value);
132 sfarray= new VBArray( ret);
133 document.writeln(
"Param: " + arrSeq.toString() +
"<br>");
134 document.writeln(
"Returns a Sequence< Sequence < long >> <br>") ;
135 var arr1= new Array();
136 arr1= sfarray.toArray();
137 for( i=
0; i < arr1.length; i++)
139 sfarray2= new VBArray( arr1[i]);
140 var arr2= new Array();
141 arr2= sfarray2.toArray();
142 document.writeln( arr2.toString() +
"<br>" );
147 var array1= new Array();
148 for(var i=
0; i
<3; i++)
150 var array2 = new Array();
151 for( var j=
0; j <
3; j++)
153 var value2= oletest._GetValueObject();
154 value2.Set(
"[]long", arr);
158 var value1= oletest._GetValueObject();
159 value1.Set(
"[][]long", array2)
162 var valueAll= oletest._GetValueObject();
163 valueAll.Set(
"[][][]long",array1);
165 ret= oletest.methodSequence2( valueAll);
166 document.writeln(
"Param: " + arrSeq2.toString() +
"<br>");
167 sfarray1= new VBArray( ret);
168 arr1= sfarray1.toArray();
169 for( i=
0; i < arr1.length; i++)
171 sfarray2= new VBArray( arr1[i]);
172 arr2= sfarray2.toArray();
174 for ( j=
0; j < arr2.length; j++)
176 sfarray3= new VBArray( arr2[j]);
177 arr3= sfarray3.toArray();
178 document.write( i+
" ");
179 document.writeln(j +
": "+ arr3.toString() +
"<br>" );
190 var ob= new Object();
191 var valueObject= oletest._GetValueObject();
192 ob.value=
"A JScript object!";
193 valueObject.Set(
"com.sun.star.uno.XInterface", ob);
194 // valueObject.Set(
"long",
5);
197 value.Set(
"[]com.sun.star.uno.XInterface", ar);
198 // value.Set(
"[]long", ar);
200 ret = oletest.methodXInterface( value);
201 sfarray= new VBArray( ret);
202 var arRet= sfarray.toArray();
204 document.writeln(
"Params : Array containing objects ")
207 document.writeln(
"object " + index +
": " + ar[index].Get().value +
" ");
209 document.writeln(
"<br>" ) ;
210 document.writeln(
"Return: <br>");
213 document.writeln(
"object " + index +
": " + arRet[index].value +
" ");
220 // Properties: setting and getting values
222 value.Set(
"[]byte", arr)
223 oletest.AttrByte = value;
224 ret= oletest.AttrByte;
225 sfarray= new VBArray( ret);
226 document.writeln(
"Setting AttrByte: " + arr.toString() +
"<p>");
227 document.writeln(
"Getting AttrByte: " + sfarray.toArray()); break;
230 value.Set(
"[]double", arrDouble)
231 oletest.AttrDouble= value;
232 ret= oletest.AttrDouble;
233 sfarray= new VBArray( ret);
234 document.writeln(
"Setting AttrDouble: " + arrDouble.toString() +
"<p>");
235 document.writeln(
"Getting AttrDouble: " + sfarray.toArray()); break;
238 value.Set(
"[]boolean", arrBool)
239 oletest.AttrBool= value;
240 ret= oletest.AttrBool;
241 sfarray= new VBArray( ret);
242 document.writeln(
"Setting AttrBool: " + arrBool.toString() +
"<p>");
243 document.writeln(
"Getting AttrBool: " + sfarray.toArray()); break;
246 value.Set(
"[]short", arr)
247 oletest.AttrShort= value;
248 ret= oletest.AttrShort;
249 sfarray= new VBArray( ret);
250 document.writeln(
"Setting AttrShort: " + arr.toString() +
"<p>");
251 document.writeln(
"Getting AttrShort: " + sfarray.toArray()); break;
254 value.Set(
"[]unsigned short", arr)
255 oletest.AttrUShort= value;
256 ret= oletest.AttrUShort;
257 sfarray= new VBArray( ret);
258 document.writeln(
"Setting AttrUShort: " + arr.toString() +
"<p>");
259 document.writeln(
"Getting AttrUShort: " + sfarray.toArray()); break;
262 value.Set(
"[]long", arr)
263 oletest.AttrLong= value;
264 ret= oletest.AttrLong;
265 sfarray= new VBArray( ret);
266 document.writeln(
"Setting AttrLong: " + arr.toString() +
"<p>");
267 document.writeln(
"Getting AttrLong: " + sfarray.toArray()); break;
270 value.Set(
"[]unsigned long", arr)
271 oletest.AttrULong= value;
272 ret= oletest.AttrULong;
273 sfarray= new VBArray( ret);
274 document.writeln(
"Setting AttrULong: " + arr.toString() +
"<p>");
275 document.writeln(
"Getting AttrULong: " + sfarray.toArray()); break;
278 value.Set(
"[]char", arrChar)
279 oletest.AttrChar= value;
280 ret= oletest.AttrChar;
281 sfarray= new VBArray( ret);
282 document.writeln(
"Setting AttrChar: " + arrChar.toString() +
"<p>");
283 document.writeln(
"Getting AttrChar: " + sfarray.toArray()); break;
286 value.Set(
"[]string", arrString)
287 oletest.AttrString= value;
288 ret= oletest.AttrString;
289 sfarray= new VBArray( ret);
290 document.writeln(
"Setting AttrString: " + arrString.toString() +
"<p>");
291 document.writeln(
"Getting AttrString: " + sfarray.toArray()); break;
294 value.Set(
"[]any", arrAny)
295 oletest.AttrAny= value;
296 ret= oletest.AttrAny;
297 sfarray= new VBArray( ret);
298 document.writeln(
"Setting AttrAny: " + arrAny.toString() +
"<p>");
299 document.writeln(
"Getting AttrAny: " + sfarray.toArray()); break;
302 var allArray= new Array();
303 for(var i=
0; i
<3; i++)
305 var value1= oletest._GetValueObject();
306 value1.Set(
"[]long", arr);
310 value.Set(
"[][]long", allArray);
312 oletest.AttrSequence= value;
313 ret= oletest.AttrSequence;
314 sfarray= new VBArray( ret);
316 document.writeln(
"Param: " + arrSeq.toString() +
"<br>");
317 document.writeln(
"Returns a Sequence< Sequence < long >> <br>") ;
318 var arr1= new Array();
319 arr1= sfarray.toArray();
320 for( i=
0; i < arr1.length; i++)
322 sfarray2= new VBArray( arr1[i]);
323 var arr2= new Array();
324 arr2= sfarray2.toArray();
325 document.writeln( arr2.toString() +
"<br>" );
330 var array1= new Array();
331 for(var i=
0; i
<3; i++)
333 var array2 = new Array();
334 for( var j=
0; j <
3; j++)
336 var value2= oletest._GetValueObject();
337 value2.Set(
"[]long", arr);
341 var value1= oletest._GetValueObject();
342 value1.Set(
"[][]long", array2)
345 var valueAll= oletest._GetValueObject();
346 valueAll.Set(
"[][][]long",array1);
348 oletest.AttrSequence2= valueAll;
349 ret= oletest.AttrSequence2;
350 sfarray1= new VBArray( ret);
351 arr1= sfarray1.toArray();
352 for( i=
0; i < arr1.length; i++)
354 sfarray2= new VBArray( arr1[i]);
355 arr2= sfarray2.toArray();
357 for ( j=
0; j < arr2.length; j++)
359 sfarray3= new VBArray( arr2[j]);
360 arr3= sfarray3.toArray();
361 document.write( i+
" ");
362 document.writeln(j +
": "+ arr3.toString() +
"<br>" );
372 var ob= new Object();
373 var valueObject= oletest._GetValueObject();
374 ob.value=
"A JScript object!";
375 valueObject.Set(
"com.sun.star.uno.XInterface", ob);
378 value.Set(
"[]com.sun.star.uno.XInterface", ar);
380 oletest.AttrXInterface= value;
381 ret= oletest.AttrXInterface;
382 sfarray= new VBArray( ret);
383 var arRet= sfarray.toArray();
385 document.writeln(
"Params : Array containing objects ")
388 document.writeln(
"object " + index +
": " + ar[index].Get().value +
" ");
390 document.writeln(
"<br>" ) ;
391 document.writeln(
"Return: <br>");
394 document.writeln(
"object " + index +
": " + arRet[index].value +
" ");
399 // Out-parameter ------------------------------------------------------------
402 oletest.testout_methodByte( outValue );
403 alert(
"byte: " + outValue.Get() ); break;
405 oletest.testout_methodDouble( outValue );
406 alert(
"double: " + outValue.Get() ); break;
408 oletest.testout_methodBool( outValue );
409 alert(
"boolean: " + outValue.Get() ); break;
411 oletest.testout_methodShort( outValue );
412 alert(
"short: " + outValue.Get() ); break;
414 oletest.testout_methodUShort( outValue );
415 alert(
"unsigned short: " + outValue.Get() ); break;
417 oletest.testout_methodLong( outValue );
418 alert(
"long: " + outValue.Get() ); break;
420 oletest.testout_methodULong( outValue );
421 alert(
"unsigned long: " + outValue.Get() ); break;
423 oletest.testout_methodChar( outValue );
424 alert(
"char: " + outValue.Get() ); break;
426 oletest.testout_methodString( outValue );
427 alert(
"string: " + outValue.Get()); break;
429 oletest.testout_methodAny( outValue );
430 alert(
"any: " + outValue.Get() ); break;
432 oletest.testout_methodSequence( outValue );
433 var sfarray= new VBArray( outValue.Get());
434 arr= sfarray.toArray();
435 document.writeln(
"use the browser's back arrow to go to the previous page <p>");
436 document.writeln( arr.toString());
439 oletest.testout_methodSequence2( outValue );
440 var sfarray= new VBArray( outValue.Get());
441 arr= sfarray.toArray();
443 for( i=
0; i < arr.length; i++)
445 var sfarray= new VBArray( arr[i]);
446 var arr2= new Array();
447 arr2= sfarray.toArray();
448 document.writeln( arr2.toString() +
"<br>" );
452 oletest.testout_methodMulParams1( outValue, outValue2 );
453 document.writeln(
"int : " + outValue.Get() +
" int :" + outValue2.Get()); break;
455 oletest.testout_methodMulParams2( outValue, outValue2, outValue3 );
456 document.writeln(
"int: " + outValue.Get() +
" int: " + outValue2.Get() +
" string: " + outValue3.Get() ); break;
458 oletest.testout_methodMulParams3(
"hallo", outValue );
459 document.writeln(
"string: " + outValue.Get() ); break;
461 oletest.testout_methodXInterface( outValue );
462 var out= outValue.Get();
463 document.writeln(
"string: " + out.AttrAny2); break;
465 // INOUT - Parameter -------------------------------------------------------------------------------
466 // The in value has to be placed on index
0 of the passed in array
468 inoutValue.InitInOutParam(
"byte",
100);
469 oletest.testinout_methodByte( inoutValue );
470 alert(
"byte: " + inoutValue.Get() ); break;
472 inoutValue.InitInOutParam(
"double",
3.14);
473 oletest.testinout_methodDouble( inoutValue );
474 alert(
"double: " + inoutValue.Get() ); break;
476 inoutValue.InitInOutParam(
"boolean", false);
477 oletest.testinout_methodBool( inoutValue );
478 alert(
"boolean: " + inoutValue.Get() ); break;
480 inoutValue.InitInOutParam(
"short",
200);
481 oletest.testinout_methodShort( inoutValue );
482 alert(
"short: " + inoutValue.Get() ); break;
484 inoutValue.InitInOutParam(
"unsigned short",
300);
485 oletest.testinout_methodUShort( inoutValue );
486 alert(
"unsigned short: " + inoutValue.Get() ); break;
488 inoutValue.InitInOutParam(
"long",
400);
489 oletest.testinout_methodLong( inoutValue );
490 alert(
"long: " + inoutValue.Get() ); break;
492 inoutValue.InitInOutParam(
"unsigned long",
500);
493 oletest.testinout_methodULong( inoutValue );
494 alert(
"unsigned long: " + inoutValue.Get() ); break;
496 inoutValue.InitInOutParam(
"char",
"A");
497 oletest.testinout_methodChar( inoutValue );
498 alert(
"char: " + inoutValue.Get() ); break;
500 inoutValue.InitInOutParam(
"string",
"I am a string");
501 oletest.testinout_methodString( inoutValue );
502 alert(
"string: " + inoutValue.Get() ); break;
504 inoutValue.InitInOutParam(
"[]long", arr);
505 oletest.testinout_methodAny( inoutValue ); // the method simply returns the argument
506 sfarray= new VBArray( inoutValue.Get());
507 arr= sfarray.toArray();
508 alert(
"any: " + arr.toString() ); break;
510 inoutValue.InitInOutParam(
"[]long", arr);
511 oletest.testinout_methodSequence( inoutValue );
512 var sfarray= new VBArray( inoutValue.Get());
513 arr= sfarray.toArray();
514 document.writeln(
"use the browser's back arrow to go to the previous page <p>");
515 document.writeln( arr.toString());
518 inoutValue.InitInOutParam(
"[][]long", arrSeq);
519 oletest.testinout_methodSequence2( inoutValue );
520 var sfarray= new VBArray( inoutValue.Get());
521 arr= sfarray.toArray();
523 for( i=
0; i < arr.length; i++)
525 var sfarray= new VBArray( arr[i]);
526 var arr2= new Array();
527 arr2= sfarray.toArray();
528 document.writeln( arr2.toString() +
"<br>" );
532 var ob= new Object();
533 ob.value=
"this is a string";
534 inoutValue.InitInOutParam(
"com.sun.star.script.XInvocation", ob);
535 oletest.testinout_methodXInterface( inoutValue);
536 document.write(
"Out value: " + inoutValue.Get().value );
547 ret= oletest.methodAnyTest1( i);
548 document.writeln(
"in: " + i +
" ret: " + ret);
552 ret= oletest.methodAnyTest1( i);
553 document.writeln(
"in: " + i +
" ret: " + ret);
557 ret= oletest.methodAnyTest1( i);
558 document.writeln(
"in: " + i +
" ret: " + ret);
562 ret= oletest.methodAnyTest1( i);
563 sfarray= new VBArray( ret);
564 document.writeln(
"in: " + i +
" ret: " + sfarray.toArray());
567 var obj= new Object();
568 obj[
1]=
"This is index 0";
569 ret= oletest.methodAnyTest1( obj);
570 document.writeln(
"in: " + obj +
" ret: " + ret);
578 ret= oletest.AttrAny2;
579 document.writeln(
"set: " + i +
" get: " + ret);
584 ret= oletest.AttrAny2;
585 document.writeln(
"set: " + i +
" get: " + ret);
590 ret= oletest.AttrAny2;
591 document.writeln(
"set: " + i +
" get: " + ret);
596 ret= oletest.AttrAny2;
597 sfarray= new VBArray( ret);
598 document.writeln(
"set: " + i +
" get: " + sfarray.toArray());
601 var obj= new Object();
602 obj[
1]=
"This is index 0";
603 oletest.AttrAny2= obj;
604 ret= oletest.AttrAny2;
605 document.writeln(
"set: " + obj +
" get: " + ret);
611 var ret= oletest.retMethodByte();
612 var sfarray= VBArray( ret);
613 document.writeln( sfarray.toArray() );
618 // oletest.other_methodAnyIn(
"hallo");
626 function funcOut( out)
633 <script language=
"VBScript">
638 Set factory= GetObject(
"",
"com.sun.star.ServiceManager")
640 Set oletest= factory.createInstance(
"oletest.OleTest")
643 arrInt= Array(
1,
2,
3,
4,
5)
644 arrInt2= Array( -
1, -
2,
127,
128,
0)
645 arrDouble= Array(
1.1,
2.2,
3.3,
4.4,
5.5)
646 arrBool= Array(
0,
1,
0,
2,
0)
647 arrLong= Array( &Hff, &Hffff, &Hffffff, &Hffffffff)
648 arrString= Array(
"Chicken Wings",
"Cheeseburger",
"Hamburger")
649 arrChar= Array(
"a",
65,
"M")
650 arrAny= Array(
"Mickey",
3.14,
100,
"A")
655 arrDim2Int(i,j) = i*
2 + j
659 Dim arrDim3Int(
1,
1,
1)
663 arrDim3Int(i,j,k) = i*
2 + j*
2 + k
669 set outValue= factory.Bridge_GetValueObject()
670 outValue.InitOutParam
671 set value= factory.Bridge_GetValueObject()
674 value.Set
"[]byte", arrInt
675 ret= oletest.methodByte(value)
676 document.writeln
"<br> return value: "
679 document.writeln
"param: "
681 ret= oletest.methodDouble(arrDouble)
682 document.writeln
"<br> return value: "
685 document.writeln
"param: "
687 ret= oletest.methodBool(arrBool)
688 document.writeln
"<br> return value: "
691 document.writeln
"param: "
693 ret= oletest.methodShort(arrInt2)
694 document.writeln
"<br> return value: "
697 document.writeln
"param: "
699 ret= oletest.methodUShort(arrInt)
700 document.writeln
"<br> return value: "
703 document.writeln
"param: "
705 ret= oletest.methodLong(arrLong)
706 document.writeln
"<br> return value: "
709 document.writeln
"param: "
711 ret= oletest.methodULong(arrInt)
712 document.writeln
"<br> return value: "
715 document.writeln
"param: "
717 ret= oletest.methodString(arrString)
718 document.writeln
"<br> return value: "
721 document.writeln
"param: "
723 ret= oletest.methodChar(arrChar)
724 document.writeln
"<br> return value: "
727 document.writeln
"param: "
729 ret= oletest.methodAny(arrAny)
730 document.writeln
"<br> return value: "
733 document.writeln
"param: "
734 printArray2 arrDim2Int
735 ret= oletest.methodSequence(arrDim2Int)
736 document.writeln
"<br> return value: "
738 document.write
"<br> array: "
744 // In Out Parameter --------------------------------------------------
747 document.write
"param: " & CStr( a) &
"<br>"
748 oletest.testinout_methodByte a
752 document.write
"param: " & CStr( a) &
"<br>"
753 oletest.testinout_methodDouble a
757 document.write
"param: "& CStr( a) &
"<br>"
758 oletest.testinout_methodBool a
762 document.write
"param: "& CStr( a) &
"<br>"
763 oletest.testinout_methodShort a
767 document.write
"param: "& CStr( a) &
"<br>"
768 oletest.testinout_methodUShort a
772 document.write
"param: "& CStr( a) &
"<br>"
773 oletest.testinout_methodLong a
777 document.write
"param: "& CStr( a) &
"<br>"
778 oletest.testinout_methodULong a
782 document.write
"param: "& CStr( a) &
"<br>"
783 oletest.testinout_methodString a
787 document.write
"param: "& CStr( a) &
"<br>"
788 oletest.testinout_methodChar a
791 a=
"Ein String im Any"
792 document.write
"param: "& CStr( a) &
"<br>"
793 oletest.other_methodAnyIn a
795 // Attributes -----------------------------------------------------------------
797 document.write
"set: "
799 oletest.AttrByte= arrInt
801 call printArrayEx(
"<br> get: ",
"<br>", b)
803 document.write
"set: "
805 oletest.AttrDouble= arrDouble
806 b= oletest.AttrDouble
807 call printArrayEx(
"<br> get: ",
"<br>", b)
809 document.write
"set: "
811 oletest.AttrBool= arrBool
813 call printArrayEx(
"<br> get: ",
"<br>", b)
815 document.write
"set: "
817 oletest.AttrShort= arrInt2
819 call printArrayEx(
"<br> get: ",
"<br>", b)
821 document.write
"set: "
823 oletest.AttrUShort= arrInt
824 b= oletest.AttrUShort
825 call printArrayEx(
"<br> get: ",
"<br>", b)
827 document.write
"set: "
829 oletest.AttrLong= arrInt2
831 call printArrayEx(
"<br> get: ",
"<br>", b)
833 document.write
"set: "
835 oletest.AttrULong= arrInt
837 call printArrayEx(
"<br> get: ",
"<br>", b)
839 document.write
"set: "
841 oletest.AttrString= arrString
842 b= oletest.AttrString
843 call printArrayEx(
"<br> get: ",
"<br>", b)
845 document.write
"set: "
847 oletest.AttrChar= arrChar
849 call printArrayEx(
"<br> get: ",
"<br>", b)
851 document.write
"set: "
853 oletest.AttrAny= arrAny
855 call printArrayEx(
"<br> get: ",
"<br>", b)
858 document.write
"set: <br>"
859 printArray2 arrDim2Int :
860 oletest.AttrSequence= arrDim2Int
861 ret= oletest.AttrSequence
862 document.write
"get: "
864 document.write
"<br> array: "
872 oletest.testout_methodByte( outValue )
873 alert(
"byte: " & outValue.Get() )
879 document.write
"array: "
881 document.write CStr(val) &
" "
885 // print a
2 dimensional Array
887 sub printArray2( arr)
888 elements1= UBound( arr,
1) - LBound( arr,
1) +
1
889 elements2= UBound( arr,
2) - LBound( arr,
2) +
1
891 For i=
0 To elements1 -
1
892 document.write(
"array " & CStr( i) &
": " )
893 For j=
0 To elements2 -
1
894 document.write CStr( arr(i,j))
896 document.write(
"<br>")
900 sub printArrayEx( pre, post, array)
909 <!-- Insert HTML here -->
911 <h2> JScript with _GetValueObject
</h2>
912 Tests Array/Sequence conversion.
<br>
913 All methods receive a Sequence as Parameter. The element type of the Sequence is written on the buttons.
915 <button onclick='callOleTest(
1)'
>byte
</Button>
916 <button onclick='callOleTest(
2)'
>double
</Button>
917 <button onclick='callOleTest(
3)'
>boolean
</Button>
918 <button onclick='callOleTest(
4)'
>short
</Button>
919 <button onclick='callOleTest(
5)'
>unsigned short
</Button>
920 <button onclick='callOleTest(
6)'
>long
</Button>
921 <button onclick='callOleTest(
7)'
>unsigned long
</Button>
922 <button onclick='callOleTest(
8)'
>char
</Button>
923 <button onclick='callOleTest(
10)'
>any
</Button>
924 <button onclick='callOleTest(
11)'
>sequence<long>
</Button>
925 <button onclick='callOleTest(
12)'
>sequence<sequence<long> >
</Button>
926 <button onclick='callOleTest(
13)'
>XInterface
</Button>
931 <button onclick='callOleTest(
2000)'
>byte
</Button>
932 <button onclick='callOleTest(
2001)'
>double
</Button>
933 <button onclick='callOleTest(
2002)'
>boolean
</Button>
934 <button onclick='callOleTest(
2003)'
>short
</Button>
935 <button onclick='callOleTest(
2004)'
>unsigned short
</Button>
936 <button onclick='callOleTest(
2005)'
>long
</Button>
937 <button onclick='callOleTest(
2006)'
>unsigned long
</Button>
938 <button onclick='callOleTest(
2007)'
>char
</Button>
939 <button onclick='callOleTest(
2008)'
>string
</Button>
940 <button onclick='callOleTest(
2009)'
>any
</Button>
941 <button onclick='callOleTest(
2010)'
>sequence<long>
</Button>
942 <button onclick='callOleTest(
2011)'
>sequence<sequence<long> >
</Button>
943 <button onclick='callOleTest(
2012)'
>2 out
</Button>
944 <button onclick='callOleTest(
2013)'
>3 out
</Button>
945 <button onclick='callOleTest(
2014)'
>1 in &
1 out
</Button>
946 <button onclick='callOleTest(
2015)'
>XInterface
</Button>
949 In Out Parameter
<br>
950 <button onclick='callOleTest(
500)'
>byte
</Button>
951 <button onclick='callOleTest(
501)'
>double
</Button>
952 <button onclick='callOleTest(
502)'
>boolean
</Button>
953 <button onclick='callOleTest(
503)'
>short
</Button>
954 <button onclick='callOleTest(
504)'
>unsigned short
</Button>
955 <button onclick='callOleTest(
505)'
>long
</Button>
956 <button onclick='callOleTest(
506)'
>unsigned long
</Button>
957 <button onclick='callOleTest(
507)'
>char
</Button>
958 <button onclick='callOleTest(
508)'
>string
</Button>
959 <button onclick='callOleTest(
509)'
>any
</Button>
960 <button onclick='callOleTest(
510)'
>sequence<long>
</Button>
961 <button onclick='callOleTest(
511)'
>sequence<sequence<long> >
</Button>
962 <button onclick='callOleTest(
512)'
>XInterface
</Button>
965 Tests Array/Sequence conversion with Attributes. All params are of type Sequence and
966 the element type of the Sequence is written on the buttons.
<br>
967 <button onclick='callOleTest(
200)'
>byte
</Button>
968 <button onclick='callOleTest(
201)'
>double
</Button>
969 <button onclick='callOleTest(
202)'
>boolean
</Button>
970 <button onclick='callOleTest(
203)'
>short
</Button>
971 <button onclick='callOleTest(
204)'
>unsigned short
</Button>
972 <button onclick='callOleTest(
205)'
>long
</Button>
973 <button onclick='callOleTest(
206)'
>unsigned long
</Button>
974 <button onclick='callOleTest(
207)'
>char
</Button>
975 <button onclick='callOleTest(
208)'
>string
</Button>
976 <button onclick='callOleTest(
209)'
>any
</Button>
977 <button onclick='callOleTest(
210)'
>sequence<long>
</Button>
978 <button onclick='callOleTest(
211)'
>sequence<sequence<long> >
</Button>
979 <button onclick='callOleTest(
212)'
>XInterface
</Button>
983 Test of Any parameter in a method. Any contains:<br>
984 <button onclick='callOleTest( 1000)'>integer </Button>
985 <button onclick='callOleTest( 1001)'>double </Button>
986 <button onclick='callOleTest( 1002)'>string</Button>
987 <button onclick='callOleTest( 1003)'>array</Button>
988 <button onclick='callOleTest( 1004)'>object</Button>
990 Test of Any parameter in a property. Any contains:<br>
991 <button onclick='callOleTest( 1010)'>integer </Button>
992 <button onclick='callOleTest( 1011)'>double </Button>
993 <button onclick='callOleTest( 1012)'>string</Button>
994 <button onclick='callOleTest( 1013)'>array</Button>
995 <button onclick='callOleTest( 1014)'>object</Button>
1000 <h2> Visual Basic Tests
</h2>
1001 Test array /Sequence conversion and return value
<br>
1002 Template:
<b> Sequence < type > method( Sequence< type > )
</b>
1006 <button onclick='callBasic(
0)'
>byte
</button>
1008 <button onclick='callBasic(1)'>double</button>
1009 <button onclick='callBasic(2)'>boolean</button>
1010 <button onclick='callBasic(3)'>short</button>
1011 <button onclick='callBasic(4)'>u short</button>
1012 <button onclick='callBasic(5)'>long</button>
1013 <button onclick='callBasic(6)'>u long</button>
1014 <button onclick='callBasic(7)'>string</button>
1015 <button onclick='callBasic(8)'>char</button>
1016 <button onclick='callBasic(9)'>any</button> <br>
1017 <button onclick='callBasic(10)'>Seq < int ></button>
1023 Template:
<b> void method( Sequence < type > )
</b> <br>
1024 <button onclick='callBasic(
300)'
>byte
</button>
1026 <button onclick='callBasic(101)'>double</button>
1027 <button onclick='callBasic(102)'>boolean</button>
1028 <button onclick='callBasic(103)'>short</button>
1029 <button onclick='callBasic(104)'>u short</button>
1030 <button onclick='callBasic(105)'>long</button>
1031 <button onclick='callBasic(106)'>u long</button>
1032 <button onclick='callBasic(107)'>string</button>
1033 <button onclick='callBasic(108)'>char</button>
1034 <button onclick='callBasic(109)'>any</button> <br>
1038 Tests Array/Sequence conversion with <b>Attributes</b>. All params are of type Sequence and
1039 the element type of the Sequence is written on the buttons. <br>
1040 <button onclick='callBasic( 200)'>byte </Button>
1041 <button onclick='callBasic( 201)'>double</Button>
1042 <button onclick='callBasic( 202)'>boolean</Button>
1043 <button onclick='callBasic( 203)'>short</Button>
1044 <button onclick='callBasic( 204)'>unsigned short</Button>
1045 <button onclick='callBasic( 205)'>long</Button>
1046 <button onclick='callBasic( 206)'>unsigned long</Button>
1047 <button onclick='callBasic( 207)'>string</Button>
1048 <button onclick='callBasic( 208)'>char</Button>
1049 <button onclick='callBasic( 209)'>any</Button>
1050 <button onclick='callBasic( 210)'>sequence<long> </Button>