.NET component and COM server

.NET component and COM server Commit Details

Date:2010-03-11 11:29:04 (8 years 4 months ago)
Author:Allan Cornet
Branch:master
Commit:c1e7a1c5d14061010f1500581884ff4f8b3f6d76
Message:initial import

Changes:
ANET_Component_and_COM_server/NET component and COM server.sln (full)
ANET_Component_and_COM_server/NET component and COM server.suo
ANET_Component_and_COM_server/bin/x64/Scilab_COM_server.dll
ANET_Component_and_COM_server/bin/x64/Scilab_COM_server.pdb
ANET_Component_and_COM_server/bin/x64/Scilab_Component.dll
ANET_Component_and_COM_server/bin/x64/Scilab_Component.pdb
ANET_Component_and_COM_server/bin/x86/Scilab_COM_server.dll
ANET_Component_and_COM_server/bin/x86/Scilab_COM_server.pdb
ANET_Component_and_COM_server/bin/x86/Scilab_Component.dll
ANET_Component_and_COM_server/bin/x86/Scilab_Component.pdb
ANET_Component_and_COM_server/src/C#/Com_Interface/COM_server.cs (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/Properties/AssemblyInfo.cs (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/Scilab_COM_server.csproj (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/Scilab_COM_server.csproj.UnmanagedRegistration.cache
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Debug/COM_server.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Debug/COM_server.dll
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Debug/COM_server.pdb
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/ResolveAssemblyReference.cache
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/Scilab_COM_server.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/Scilab_COM_server.dll
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/Scilab_COM_server.pdb
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/build.force
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/COM_server.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/ResolveAssemblyReference.cache
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/Scilab_COM_server.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/Scilab_COM_server.dll
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/Scilab_COM_server.pdb
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Release/ResolveAssemblyReference.cache
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Release/Scilab_COM_server.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Release/Scilab_COM_server.dll
ANET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Release/Scilab_COM_server.pdb
ANET_Component_and_COM_server/src/C#/Scilab_Component/AddScilabPathEnvironment.cs (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/FindScilab.cs (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/Properties/AssemblyInfo.cs (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API.cs (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API_Wrapper.cs (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_Component.csproj (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Debug/Scilab_Component.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Debug/Scilab_Component.dll
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Debug/Scilab_Component.pdb
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Release/Scilab_Component.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Release/Scilab_Component.dll
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Release/Scilab_Component.pdb
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Debug/Refactor/Scilab_Component.dll
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Debug/Scilab_Component.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Debug/Scilab_Component.dll
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Debug/Scilab_Component.pdb
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Release/Scilab_Component.csproj.FileListAbsolute.txt (full)
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Release/Scilab_Component.dll
ANET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Release/Scilab_Component.pdb
ANET_Component_and_COM_server/tests/tests_excel.xlsm

File differences

NET_Component_and_COM_server/NET component and COM server.sln
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scilab_COM_server", "src\C#\Com_Interface\Scilab_COM_server.csproj", "{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}"
ProjectSection(ProjectDependencies) = postProject
{B53630BF-5641-4414-9A5B-68FD8C30FF26} = {B53630BF-5641-4414-9A5B-68FD8C30FF26}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Scilab_Component", "src\C#\Scilab_Component\Scilab_Component.csproj", "{B53630BF-5641-4414-9A5B-68FD8C30FF26}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Debug|x64.ActiveCfg = Debug|x64
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Debug|x64.Build.0 = Debug|x64
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Debug|x86.ActiveCfg = Debug|x86
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Debug|x86.Build.0 = Debug|x86
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Release|x64.ActiveCfg = Release|x64
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Release|x64.Build.0 = Release|x64
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Release|x86.ActiveCfg = Release|x86
{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}.Release|x86.Build.0 = Release|x86
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Debug|x64.ActiveCfg = Debug|x64
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Debug|x64.Build.0 = Debug|x64
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Debug|x86.ActiveCfg = Debug|x86
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Debug|x86.Build.0 = Debug|x86
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Release|x64.ActiveCfg = Release|x64
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Release|x64.Build.0 = Release|x64
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Release|x86.ActiveCfg = Release|x86
{B53630BF-5641-4414-9A5B-68FD8C30FF26}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
NET_Component_and_COM_server/src/C#/Com_Interface/COM_server.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2010 - DIGITEO - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
//=============================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Scilab_Component;
using System.Runtime.InteropServices;
//=============================================================================
namespace Scilab_COM_server
{
[Guid("FD29A67C-7321-4cf8-AA17-987AF0D2FA14"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
public interface Interface_COM_Scilab
{
//=============================================================================
/// <summary>
///
/// </summary>
/// <returns></returns>
Boolean isVisibleMainWindow();
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="newState"></param>
void setVisibleMainWindow(Boolean newState);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="command"></param>
/// <returns></returns>
int sendScilabJob(string command);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scriptFilename"></param>
/// <returns></returns>
int executeScript(string scriptFilename);
//=============================================================================
/// <summary>
///
/// </summary>
/// <returns></returns>
int getLastErrorCode();
//=============================================================================
/// <summary>
///
/// </summary>
void clearAllVariables();
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="varName"></param>
/// <returns></returns>
Boolean clearVariable(string varName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <returns></returns>
Boolean haveGraphicWindows();
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
int[] getNamedVarDimension(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixString"></param>
/// <returns></returns>
int createNamedMatrixOfString(string matrixName,
int iRows, int iCols,
string[] matrixString);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
string[] readNamedMatrixOfString(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedStringType(String matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="matrixString"></param>
/// <returns></returns>
Boolean createNamedSingleString(string matrixName,
string matrixString);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
String getNamedSingleString(String matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
int getNamedVarType(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedVarComplex(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedVarMatrixType(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean createNamedEmptyMatrix(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixBoolean"></param>
/// <returns></returns>
int createNamedMatrixOfBoolean(string matrixName,
int iRows, int iCols,
Boolean[] matrixBoolean);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean[] readNamedMatrixOfBoolean(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean getNamedScalarBoolean(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="scalarBoolean"></param>
/// <returns></returns>
Boolean createNamedScalarBoolean(string matrixName, Boolean scalarBoolean);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedVarExist(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedRowVector(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedColumnVector(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedVector(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedScalar(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedSquareMatrix(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedEmptyMatrix(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedPointerType(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixDouble"></param>
/// <returns></returns>
int createNamedMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDouble);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixDoubleReal"></param>
/// <param name="matrixDoubleImg"></param>
/// <returns></returns>
int createNamedComplexMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDoubleReal, double[] matrixDoubleImg);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double[] readNamedMatrixOfDouble(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double[] readNamedComplexMatrixOfDoubleRealPart(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double[] readNamedComplexMatrixOfDoubleImgPart(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedDoubleType(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double getNamedScalarDouble(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double getNamedScalarComplexDoubleRealPart(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
double getNamedScalarComplexDoubleImgPart(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scalarName"></param>
/// <param name="dblValue"></param>
/// <returns></returns>
Boolean createNamedScalarDouble(string scalarName,
double dblValue);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scalarName"></param>
/// <param name="dblRealPartValue"></param>
/// <param name="dblImgPartValue"></param>
/// <returns></returns>
Boolean createNamedScalarComplexDouble(string scalarName,
double dblRealPartValue, double dblImgPartValue);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt8"></param>
/// <returns></returns>
int createNamedMatrixOfInteger8(string matrixName,
int iRows, int iCols,
sbyte[] matrixInt8);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixUInt8"></param>
/// <returns></returns>
int createNamedMatrixOfUnsignedInteger8(string matrixName,
int iRows, int iCols,
byte[] matrixUInt8);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt16"></param>
/// <returns></returns>
int createNamedMatrixOfInteger16(string matrixName,
int iRows, int iCols,
Int16[] matrixInt16);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt32"></param>
/// <returns></returns>
int createNamedMatrixOfInteger32(string matrixName,
int iRows, int iCols,
Int32[] matrixInt32);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixUInt32"></param>
/// <returns></returns>
int createNamedMatrixOfUnsignedInteger32(
string matrixName,
int iRows, int iCols,
UInt32[] matrixUInt32);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
int getNamedMatrixOfIntegerPrecision(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
sbyte[] readNamedMatrixOfInteger8(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
byte[] readNamedMatrixOfUnsignedInteger8(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Int16[] readNamedMatrixOfInteger16(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
UInt16[] readNamedMatrixOfUnsignedInteger16(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Int32[] readNamedMatrixOfInteger32(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
UInt32[] readNamedMatrixOfUnsignedInteger32(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Boolean isNamedIntegerType(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
sbyte getNamedScalarInteger8(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Int16 getNamedScalarInteger16(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
Int32 getNamedScalarInteger32(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
byte getNamedScalarUnsignedInteger8(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
UInt16 getNamedScalarUnsignedInteger16(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
UInt32 getNamedScalarUnsignedInteger32(string matrixName);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_cData"></param>
/// <returns></returns>
Boolean createNamedScalarInteger8(string matrixName, sbyte _cData);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_sData"></param>
/// <returns></returns>
Boolean createNamedScalarInteger16(string matrixName, Int16 _sData);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_iData"></param>
/// <returns></returns>
Boolean createNamedScalarInteger32(string matrixName, Int32 _iData);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_ucData"></param>
/// <returns></returns>
Boolean createNamedScalarUnsignedInteger8(string matrixName, byte _ucData);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_usData"></param>
/// <returns></returns>
Boolean createNamedScalarUnsignedInteger16(string matrixName, UInt16 _usData);
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="_uiData"></param>
/// <returns></returns>
Boolean createNamedScalarUnsignedInteger32(string matrixName, UInt32 _uiData);
//=============================================================================
}
//=============================================================================
[Guid("57D9917C-5422-4d66-ABD7-4728390EF4E2")]
public class IScilab : Interface_COM_Scilab
{
//=============================================================================
private static Scilab_API scilabObject = new Scilab_API();
//=============================================================================
public Boolean isVisibleMainWindow()
{
return scilabObject.isVisibleMainWindow();
}
//=============================================================================
public void setVisibleMainWindow(Boolean newState)
{
scilabObject.setVisibleMainWindow(newState);
}
//=============================================================================
public int executeScript(string scriptFilename)
{
return scilabObject.executeScript(scriptFilename);
}
//=============================================================================
public int sendScilabJob(string command)
{
return scilabObject.sendScilabJob(command);
}
//=============================================================================
public void clearAllVariables()
{
scilabObject.clearAllVariables();
}
//=============================================================================
public Boolean clearVariable(string matrixName)
{
return scilabObject.clearVariable(matrixName);
}
//=============================================================================
public int getLastErrorCode()
{
return scilabObject.getLastErrorCode();
}
//=============================================================================
public Boolean haveGraphicWindows()
{
return scilabObject.haveGraphicWindows();
}
//=============================================================================
public int[] getNamedVarDimension(string matrixName)
{
return scilabObject.getNamedVarDimension(matrixName);
}
//=============================================================================
public int createNamedMatrixOfString(string matrixName,
int iRows, int iCols,
string[] matrixString)
{
return scilabObject.createNamedMatrixOfString(matrixName,
iRows, iCols,
matrixString);
}
//=============================================================================
public string[] readNamedMatrixOfString(string matrixName)
{
return scilabObject.readNamedMatrixOfString(matrixName);
}
//=============================================================================
public Boolean isNamedStringType(String matrixName)
{
return scilabObject.isNamedStringType(matrixName);
}
//=============================================================================
public Boolean createNamedSingleString(string matrixName, string matrixString)
{
return scilabObject.createNamedSingleString(matrixName, matrixString);
}
//=============================================================================
public String getNamedSingleString(String matrixName)
{
return scilabObject.getNamedSingleString(matrixName);
}
//=============================================================================
public int getNamedVarType(string matrixName)
{
return scilabObject.getNamedVarType(matrixName);
}
//=============================================================================
public Boolean isNamedVarComplex(string matrixName)
{
return scilabObject.isNamedVarComplex(matrixName);
}
//=============================================================================
public Boolean isNamedVarMatrixType(string matrixName)
{
return scilabObject.isNamedVarMatrixType(matrixName);
}
//=============================================================================
public Boolean createNamedEmptyMatrix(string matrixName)
{
return scilabObject.createNamedEmptyMatrix(matrixName);
}
//=============================================================================
public int createNamedMatrixOfBoolean(string matrixName,
int iRows, int iCols,
Boolean[] matrixBoolean)
{
return scilabObject.createNamedMatrixOfBoolean(matrixName,
iRows, iCols,
matrixBoolean);
}
//=============================================================================
public Boolean[] readNamedMatrixOfBoolean(string matrixName)
{
return scilabObject.readNamedMatrixOfBoolean(matrixName);
}
//=============================================================================
public Boolean isNamedBooleanType(string matrixName)
{
return scilabObject.isNamedBooleanType(matrixName);
}
//=============================================================================
public Boolean getNamedScalarBoolean(string matrixName)
{
return scilabObject.getNamedScalarBoolean(matrixName);
}
//=============================================================================
public Boolean createNamedScalarBoolean(string matrixName, Boolean scalarBoolean)
{
return scilabObject.createNamedScalarBoolean(matrixName, scalarBoolean);
}
//=============================================================================
public Boolean isNamedVarExist(string matrixName)
{
return scilabObject.isNamedVarExist(matrixName);
}
//=============================================================================
public Boolean isNamedRowVector(string matrixName)
{
return scilabObject.isNamedRowVector(matrixName);
}
//=============================================================================
public Boolean isNamedColumnVector(string matrixName)
{
return scilabObject.isNamedColumnVector(matrixName);
}
//=============================================================================
public Boolean isNamedVector(string matrixName)
{
return scilabObject.isNamedVector(matrixName);
}
//=============================================================================
public Boolean isNamedScalar(string matrixName)
{
return scilabObject.isNamedScalar(matrixName);
}
//=============================================================================
public Boolean isNamedSquareMatrix(string matrixName)
{
return scilabObject.isNamedSquareMatrix(matrixName);
}
//=============================================================================
public Boolean isNamedEmptyMatrix(string matrixName)
{
return scilabObject.isNamedEmptyMatrix(matrixName);
}
//=============================================================================
public Boolean isNamedPointerType(string matrixName)
{
return scilabObject.isNamedPointerType(matrixName);
}
//=============================================================================
public int createNamedMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDouble)
{
return scilabObject.createNamedMatrixOfDouble(matrixName,
iRows, iCols,
matrixDouble);
}
//=============================================================================
public int createNamedComplexMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDoubleReal, double[] matrixDoubleImg)
{
return scilabObject.createNamedComplexMatrixOfDouble(matrixName,
iRows, iCols,
matrixDoubleReal, matrixDoubleImg);
}
//=============================================================================
public double[] readNamedMatrixOfDouble(string matrixName)
{
return scilabObject.readNamedMatrixOfDouble(matrixName);
}
//=============================================================================
public double[] readNamedComplexMatrixOfDoubleRealPart(string matrixName)
{
return scilabObject.readNamedComplexMatrixOfDoubleRealPart(matrixName);
}
//=============================================================================
public double[] readNamedComplexMatrixOfDoubleImgPart(string matrixName)
{
return scilabObject.readNamedComplexMatrixOfDoubleImgPart(matrixName);
}
//=============================================================================
public Boolean isNamedDoubleType(string matrixName)
{
return scilabObject.isNamedDoubleType(matrixName);
}
//=============================================================================
public double getNamedScalarDouble(string matrixName)
{
return scilabObject.getNamedScalarDouble(matrixName);
}
//=============================================================================
public double getNamedScalarComplexDoubleRealPart(string matrixName)
{
return scilabObject.getNamedScalarComplexDoubleRealPart(matrixName);
}
//=============================================================================
public double getNamedScalarComplexDoubleImgPart(string matrixName)
{
return scilabObject.getNamedScalarComplexDoubleImgPart(matrixName);
}
//=============================================================================
public Boolean createNamedScalarDouble(string scalarName,
double dblValue)
{
return scilabObject.createNamedScalarDouble(scalarName,
dblValue);
}
//=============================================================================
public Boolean createNamedScalarComplexDouble(string scalarName,
double dblRealPartValue, double dblImgPartValue)
{
return scilabObject.createNamedScalarComplexDouble(scalarName,
dblRealPartValue, dblImgPartValue);
}
//=============================================================================
public int createNamedMatrixOfInteger8(string matrixName,
int iRows, int iCols,
sbyte[] matrixInt8)
{
return scilabObject.createNamedMatrixOfInteger8(matrixName,
iRows, iCols,
matrixInt8);
}
//=============================================================================
public int createNamedMatrixOfUnsignedInteger8(string matrixName,
int iRows, int iCols,
byte [] matrixUInt8)
{
return scilabObject.createNamedMatrixOfUnsignedInteger8(matrixName,
iRows, iCols,
matrixUInt8);
}
//=============================================================================
public int createNamedMatrixOfInteger16(string matrixName,
int iRows, int iCols,
Int16[] matrixInt16)
{
return scilabObject.createNamedMatrixOfInteger16(matrixName,
iRows, iCols,
matrixInt16);
}
//=============================================================================
public int createNamedMatrixOfUnsignedInteger16(string matrixName,
int iRows, int iCols,
UInt16[] matrixUInt16)
{
return scilabObject.createNamedMatrixOfUnsignedInteger16(matrixName,
iRows, iCols, matrixUInt16);
}
//=============================================================================
public int createNamedMatrixOfInteger32(string matrixName,
int iRows, int iCols,
Int32[] matrixInt32)
{
return scilabObject.createNamedMatrixOfInteger32(matrixName,
iRows, iCols, matrixInt32);
}
//=============================================================================
public int createNamedMatrixOfUnsignedInteger32(
string matrixName,
int iRows, int iCols,
UInt32[] matrixUInt32)
{
return scilabObject.createNamedMatrixOfUnsignedInteger32(
matrixName,
iRows, iCols,
matrixUInt32);
}
//=============================================================================
public int getNamedMatrixOfIntegerPrecision(string matrixName)
{
return scilabObject.getNamedMatrixOfIntegerPrecision(matrixName);
}
//=============================================================================
public sbyte[] readNamedMatrixOfInteger8(string matrixName)
{
return scilabObject.readNamedMatrixOfInteger8(matrixName);
}
//=============================================================================
public byte[] readNamedMatrixOfUnsignedInteger8(string matrixName)
{
return scilabObject.readNamedMatrixOfUnsignedInteger8(matrixName);
}
//=============================================================================
public Int16[] readNamedMatrixOfInteger16(string matrixName)
{
return scilabObject.readNamedMatrixOfInteger16(matrixName);
}
//=============================================================================
public UInt16[] readNamedMatrixOfUnsignedInteger16(string matrixName)
{
return scilabObject.readNamedMatrixOfUnsignedInteger16(matrixName);
}
//=============================================================================
public Int32[] readNamedMatrixOfInteger32(string matrixName)
{
return scilabObject.readNamedMatrixOfInteger32(matrixName);
}
//=============================================================================
public UInt32[] readNamedMatrixOfUnsignedInteger32(string matrixName)
{
return scilabObject.readNamedMatrixOfUnsignedInteger32(matrixName);
}
//=============================================================================
public Boolean isNamedIntegerType(string matrixName)
{
return scilabObject.isNamedIntegerType(matrixName);
}
//=============================================================================
public sbyte getNamedScalarInteger8(string matrixName)
{
return scilabObject.getNamedScalarInteger8(matrixName);
}
//=============================================================================
public Int16 getNamedScalarInteger16(string matrixName)
{
return scilabObject.getNamedScalarInteger16(matrixName);
}
//=============================================================================
public Int32 getNamedScalarInteger32(string matrixName)
{
return scilabObject.getNamedScalarInteger32(matrixName);
}
//=============================================================================
public byte getNamedScalarUnsignedInteger8(string matrixName)
{
return scilabObject.getNamedScalarUnsignedInteger8(matrixName);
}
//=============================================================================
public UInt16 getNamedScalarUnsignedInteger16(string matrixName)
{
return scilabObject.getNamedScalarUnsignedInteger16(matrixName);
}
//=============================================================================
public UInt32 getNamedScalarUnsignedInteger32(string matrixName)
{
return scilabObject.getNamedScalarUnsignedInteger32(matrixName);
}
//=============================================================================
public Boolean createNamedScalarInteger8(string matrixName,
sbyte _cData)
{
return scilabObject.createNamedScalarInteger8(matrixName, _cData);
}
//=============================================================================
public Boolean createNamedScalarInteger16(string matrixName,
Int16 _sData)
{
return scilabObject.createNamedScalarInteger16(matrixName, _sData);
}
//=============================================================================
public Boolean createNamedScalarInteger32(string matrixName,
Int32 _iData)
{
return scilabObject.createNamedScalarInteger32(matrixName, _iData);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger8(string matrixName,
byte _ucData)
{
return scilabObject.createNamedScalarUnsignedInteger8(matrixName, _ucData);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger16(string matrixName,
UInt16 _usData)
{
return scilabObject.createNamedScalarUnsignedInteger16(matrixName, _usData);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger32(string matrixName,
UInt32 _uiData)
{
return scilabObject.createNamedScalarUnsignedInteger32(matrixName, _uiData);
}
//=============================================================================
}
//=============================================================================
}
//=============================================================================
NET_Component_and_COM_server/src/C#/Com_Interface/Properties/AssemblyInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Scilab COM server")]
[assembly: AssemblyDescription("COM server for Scilab 5.x")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("DIGITEO - Allan CORNET")]
[assembly: AssemblyProduct("Scilab COM server")]
[assembly: AssemblyCopyright("Copyright © Scilab 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a20aa843-902d-411c-97ac-df0adc60bded")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
NET_Component_and_COM_server/src/C#/Com_Interface/Scilab_COM_server.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{720F16B4-0A86-4B29-B9C7-DB1630EAA4FA}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Scilab_COM_server</RootNamespace>
<AssemblyName>Scilab_COM_server</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\bin\x64\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\..\bin\x64\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\bin\x86\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\bin\x86\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="COM_server.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Scilab_Component\Scilab_Component.csproj">
<Project>{B53630BF-5641-4414-9A5B-68FD8C30FF26}</Project>
<Name>Scilab_Component</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
NET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Debug/COM_server.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x64\COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x64\COM_server.pdb
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x64\Debug\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x64\Debug\COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x64\Debug\COM_server.pdb
NET_Component_and_COM_server/src/C#/Com_Interface/obj/x64/Release/Scilab_COM_server.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x64\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x64\Scilab_COM_server.pdb
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x64\Release\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x64\Release\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x64\Release\Scilab_COM_server.pdb
NET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/COM_server.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\COM_server.pdb
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\COM_server.pdb
NET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Debug/Scilab_COM_server.csproj.FileListAbsolute.txt
1
2
3
4
5
6
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\Scilab_COM_server.pdb
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\Scilab_COM_server.tlb
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Com_Interface\obj\x86\Debug\Scilab_COM_server.pdb
NET_Component_and_COM_server/src/C#/Com_Interface/obj/x86/Release/Scilab_COM_server.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x86\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x86\Scilab_COM_server.pdb
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x86\Release\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x86\Release\Scilab_COM_server.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Com_Interface\obj\x86\Release\Scilab_COM_server.pdb
NET_Component_and_COM_server/src/C#/Scilab_Component/AddScilabPathEnvironment.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2010 - DIGITEO - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
//=============================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
//=============================================================================
namespace Scilab_Component
{
public class AddScilabPathEnvironment
{
/// <summary>
/// Add a directory to current PATH environment variable
/// </summary>
/// <param name="ScilabPath">string directory to add</param>
public static void Add(string ScilabPath)
{
string PATH = Environment.GetEnvironmentVariable("PATH");
string newPATH = ScilabPath + ";" + PATH;
Environment.SetEnvironmentVariable("PATH", newPATH);
}
}
}
//=============================================================================
NET_Component_and_COM_server/src/C#/Scilab_Component/FindScilab.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2010 - DIGITEO - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
//=============================================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Win32;
//=============================================================================
namespace Scilab_Component
{
public class FindScilab
{
//=============================================================================
/// <summary>
/// returns Scilab x86 PATH from registry
/// </summary>
/// <returns> string Scilab x86 path</returns>
private static String getScilabPathX86()
{
String ScilabPath = "";
String LastInstall = getLastInstallScilab();
if (LastInstall.CompareTo("") != 0)
{
RegistryKey start = Registry.LocalMachine;
RegistryKey ScilabPathRegistryKey;
string ScilabKeyX86 = "SOFTWARE\\Scilab\\" + LastInstall;
string ScilabKeyWow6432Node = "SOFTWARE\\Wow6432Node\\Scilab\\" + LastInstall;
ScilabPathRegistryKey = start.OpenSubKey(ScilabKeyWow6432Node);
if (ScilabPathRegistryKey == null)
{
ScilabPathRegistryKey = start.OpenSubKey(ScilabKeyX86);
if (ScilabPathRegistryKey == null)
{
start.Close();
return ScilabPath;
}
}
ScilabPath = (string)ScilabPathRegistryKey.GetValue("SCIPATH");
if (ScilabPath == null)
{
ScilabPath = "";
}
start.Close();
}
return ScilabPath;
}
//=============================================================================
/// <summary>
/// returns Scilab x64 PATH from registry
/// </summary>
/// <returns> string Scilab x64 path</returns>
private static String getScilabPathX64()
{
String ScilabPath = "";
String LastInstall = getLastInstallScilab();
if (LastInstall.CompareTo("") != 0)
{
RegistryKey start = Registry.LocalMachine;
RegistryKey ScilabPathRegistryKey;
string ScilabKeyX64 = "SOFTWARE\\Scilab\\" + LastInstall;
ScilabPathRegistryKey = start.OpenSubKey(ScilabKeyX64);
if (ScilabPathRegistryKey == null)
{
start.Close();
return ScilabPath;
}
ScilabPath = (string)ScilabPathRegistryKey.GetValue("SCIPATH");
if (ScilabPath == null)
{
ScilabPath = "";
}
start.Close();
}
return ScilabPath;
}
//=============================================================================
/// <summary>
/// returns last install scilab x86 path from registry
/// </summary>
/// <returns>string last install x86 path</returns>
private static String getLastInstallScilabX86()
{
RegistryKey start = Registry.LocalMachine;
RegistryKey LastInstallRegistryKey;
string lastInstallValue = "";
string ScilabKeyX86 = "SOFTWARE\\Scilab\\";
string ScilabKeyWow6432Node = "SOFTWARE\\Wow6432Node\\Scilab";
LastInstallRegistryKey = start.OpenSubKey(ScilabKeyWow6432Node);
if (LastInstallRegistryKey == null)
{
LastInstallRegistryKey = start.OpenSubKey(ScilabKeyX86);
if (LastInstallRegistryKey == null)
{
start.Close();
return lastInstallValue;
}
}
lastInstallValue = (string)LastInstallRegistryKey.GetValue("LASTINSTALL");
if (lastInstallValue == null)
{
lastInstallValue = "";
}
start.Close();
return lastInstallValue;
}
//=============================================================================
/// <summary>
/// returns last install scilab x64 path from registry
/// </summary>
/// <returns>string last install x64 path</returns>
private static String getLastInstallScilabX64()
{
RegistryKey start = Registry.LocalMachine;
RegistryKey LastInstallRegistryKey;
string lastInstallValue = "";
string ScilabKeyX64 = "SOFTWARE\\Scilab\\";
LastInstallRegistryKey = start.OpenSubKey(ScilabKeyX64);
if (LastInstallRegistryKey == null)
{
start.Close();
return lastInstallValue;
}
lastInstallValue = (string)LastInstallRegistryKey.GetValue("LASTINSTALL");
if (lastInstallValue == null)
{
lastInstallValue = "";
}
start.Close();
return lastInstallValue;
}
//=============================================================================
/// <summary>
/// returns last install scilab directory from registry
/// </summary>
/// <returns>string last install scilab directory</returns>
private static String getLastInstallScilab()
{
if (isX64())
{
return getLastInstallScilabX64();
}
else
{
return getLastInstallScilabX86();
}
}
//=============================================================================
/// <summary>
/// get Scilab path from registry
/// </summary>
/// <returns>string scilab path detected</returns>
public static String getScilabPath()
{
if (isX64())
{
return getScilabPathX64();
}
else
{
return getScilabPathX86();
}
}
//=============================================================================
private static bool isX64()
{
bool bX64 = false;
if (IntPtr.Size == 8)
{
bX64 = true;
}
return bX64;
}
//=============================================================================
}
}
//=============================================================================
NET_Component_and_COM_server/src/C#/Scilab_Component/Properties/AssemblyInfo.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Scilab_Component")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Scilab_Component")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4984ebe3-758e-425c-9870-81dc24c844ef")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
NET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2010 - DIGITEO - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
//=============================================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Threading;
using System.Windows.Forms;
//=============================================================================
namespace Scilab_Component
{
/* Scilab Types */
public enum ScilabType
{
sci_matrix = 1,
sci_poly = 2,
sci_boolean = 4,
sci_sparse = 5,
sci_boolean_sparse = 6,
sci_matlab_sparse = 7,
sci_ints = 8,
sci_handles = 9,
sci_strings = 10,
sci_u_function = 11,
sci_c_function = 13,
sci_lib = 14,
sci_list = 15,
sci_tlist = 16,
sci_mlist = 17,
sci_pointer = 128,
sci_implicit_poly = 129,
sci_intrinsic_function = 130
};
public sealed class Scilab_API
{
//=============================================================================
static Scilab_API instance = null;
static readonly object padlock = new object();
Thread scilabThread;
//=============================================================================
/// <summary>
/// Constructor, initialize scilab engine.
/// </summary>
public Scilab_API()
{
string ScilabPath = FindScilab.getScilabPath();
if (ScilabPath.CompareTo("") != 0)
{
AddScilabPathEnvironment.Add(ScilabPath + "\\bin");
}
scilabThread = new Thread(new ThreadStart(ThreadScilabLoop));
// Lancement du thread
scilabThread.Start();
// We wait scilab
Thread.Sleep(2000);
waitEmptyCommandQueue();
while (Scilab_API_Wrapper.ConsoleIsWaitingForInput() != 1)
{
Thread.Sleep(10);
}
setVisibleMainWindow(false);
}
//=============================================================================
/// <summary>
/// start Scilab
/// </summary>
private static void ThreadScilabLoop()
{
int SHOW_HIDE = 0;
Scilab_API_Wrapper.Windows_Main(0, 0, "", SHOW_HIDE);
}
//=============================================================================
/// <summary>
/// Singleton
/// Only one instance of Scilab_API can be launch
/// thread safe
/// </summary>
public static Scilab_API Instance
{
get
{
lock (padlock)
{
if (instance == null)
{
instance = new Scilab_API();
}
return instance;
}
}
}
//=============================================================================
/// <summary>
/// Destructor
/// </summary>
~Scilab_API()
{
scilabThread.Abort();
}
//=============================================================================
public void setVisibleMainWindow(Boolean newState)
{
if (newState)
{
Scilab_API_Wrapper.setVisibleMainWindow(1);
}
else
{
Scilab_API_Wrapper.setVisibleMainWindow(0);
}
}
//=============================================================================
public Boolean isVisibleMainWindow()
{
return (Scilab_API_Wrapper.isVisibleMainWindow() == 1 ? true : false);
}
//=============================================================================
public void clearAllVariables()
{
sendScilabJob("clear");
}
//=============================================================================
public Boolean clearVariable(string varName)
{
if ( isNamedVarExist(varName) )
{
sendScilabJob("clear " + varName);
return (isNamedVarExist(varName) == false);
}
return false;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scriptFilename"></param>
/// <returns></returns>
public int executeScript(string scriptFilename)
{
string EXEC_STRING = "Err_executeScript = exec('" + scriptFilename + "','errcatch');";
int ierr = sendScilabJob(EXEC_STRING);
if (ierr == 0)
{
if (isNamedVarExist("Err_executeScript"))
{
ierr = (int)getNamedScalarDouble("Err_executeScript");
Scilab_API_Wrapper.StoreCommandWithFlag("clear Err_executeScript", 1);
waitEmptyCommandQueue();
}
}
return ierr;
}
//=============================================================================
/// <summary>
/// Send a job to scilab
/// </summary>
/// <param name="command">command to send to scilab</param>
/// <returns>error code operation, 0 : OK</returns>
public int sendScilabJob(string command)
{
int ierr = -1;
string COMMAND_EXECSTR =
"Err_SendScilabJob = execstr(TMP_EXEC_STRING,\"errcatch\", \"n\");";
if (createNamedSingleString("TMP_EXEC_STRING", command))
{
Scilab_API_Wrapper.StoreCommandWithFlag(COMMAND_EXECSTR, 1);
waitEmptyCommandQueue();
Scilab_API_Wrapper.StoreCommandWithFlag("clear TMP_EXEC_STRING", 1);
waitEmptyCommandQueue();
if (isNamedVarExist("Err_SendScilabJob"))
{
ierr = (int)getNamedScalarDouble("Err_SendScilabJob");
Scilab_API_Wrapper.StoreCommandWithFlag("clear Err_SendScilabJob", 1);
waitEmptyCommandQueue();
}
}
return ierr;
}
//=============================================================================
/// <summary>
/// wait scilab command queue
/// </summary>
private void waitEmptyCommandQueue()
{
while (Scilab_API_Wrapper.isEmptyCommandQueue() != 1)
{
Thread.Sleep(100);
}
}
//=============================================================================
/// <summary>
/// get last error code
/// </summary>
/// <returns>last error code</returns>
public int getLastErrorCode()
{
return Scilab_API_Wrapper.GetLastErrorCode();
}
//=============================================================================
/// <summary>
/// Detect if a Scilab graphic window is opened
/// </summary>
/// <returns>true or false</returns>
public Boolean haveGraphicWindows()
{
return (Scilab_API_Wrapper.sciHasFigures() == 1);
}
//=============================================================================
/// <summary>
/// Get dimensions of a named matrix in scilab
/// </summary>
/// <returns>a int array.
/// if variable name does not exist dimensions are null </returns>
public unsafe int[] getNamedVarDimension(string matrixName)
{
int[] iDim = null;
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.getNamedVarDimension(
ptrEmpty,
matrixName,
&iRows, &iCols);
if (SciErr.iErr == 0)
{
iDim = new int[2];
iDim[0] = iRows;
iDim[1] = iCols;
}
return iDim;
}
//=============================================================================
/// <summary>
/// Write a named matrix of string in scilab
/// </summary>
/// <param name="matrixName"> variable name</param>
/// <param name="iRows"> Number of row</param>
/// <param name="iCols"> Number of column</param>
/// <param name="matrixDouble"> pointer on data</param>
/// <returns> if the operation successes (0) or not ( !0 )</returns>
public int createNamedMatrixOfString(string matrixName,
int iRows, int iCols,
string[] matrixString)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfString(ptrEmpty,
matrixName,
iRows, iCols,
matrixString);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
/// Read a named matrix of string from scilab
/// </summary>
/// <param name="matrixName"> variable name</param>
/// <returns>a matrix of string from scilab. If Variable name does not exist returns null</returns>
public unsafe string[] readNamedMatrixOfString(string matrixName)
{
string[] matrixString = null;
int[] iDim = getNamedVarDimension(matrixName);
if (iDim != null)
{
int iRows = iDim[0];
int iCols = iDim[1];
// we allocate lengthmatrixString
int[] lengthmatrixString = new int[iRows * iCols];
System.IntPtr ptrEmpty = new System.IntPtr();
// we get length of strings
Scilab_API_Wrapper.SciErr SciErr = Scilab_API_Wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
&iRows, &iCols,
lengthmatrixString, null);
// we allocate each string
matrixString = new string[iRows * iCols];
for (int i = 0; i < iRows * iCols; i++)
{
matrixString[i] = new string(' ', lengthmatrixString[i]);
}
// we get strings from scilab
SciErr = Scilab_API_Wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
&iRows, &iCols,
lengthmatrixString,
matrixString);
}
return matrixString;
}
//=============================================================================
/// <summary>
/// check if named variable is a string matrix
/// </summary>
/// <param name="matrixName">variable name</param>
/// <returns>true or false</returns>
public Boolean isNamedStringType(String matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedStringType(ptrEmpty, matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="_pstName"></param>
/// <param name="_pstStrings"></param>
/// <returns></returns>
public Boolean createNamedSingleString(String _pstName, String _pstStrings)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedSingleString(ptrEmpty,
_pstName,
_pstStrings) == 0);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="_pstName"></param>
/// <returns></returns>
public unsafe String getNamedSingleString(String matrixName)
{
string returnedString = null;
int[] iDim = getNamedVarDimension(matrixName);
if (iDim != null)
{
string[] matrixString = null;
int iRows = iDim[0];
int iCols = iDim[1];
// we allocate lengthmatrixString
int[] lengthmatrixString = new int[iRows * iCols];
System.IntPtr ptrEmpty = new System.IntPtr();
// we get length of strings
Scilab_API_Wrapper.SciErr SciErr = Scilab_API_Wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
&iRows, &iCols,
lengthmatrixString, null);
// we allocate each string
matrixString = new string[iRows * iCols];
for (int i = 0; i < iRows * iCols; i++)
{
matrixString[i] = new string(' ', lengthmatrixString[i]);
}
// we get strings from scilab
SciErr = Scilab_API_Wrapper.readNamedMatrixOfString(ptrEmpty, matrixName,
&iRows, &iCols,
lengthmatrixString,
matrixString);
if (SciErr.iErr == 0)
{
returnedString = matrixString[0];
}
}
return returnedString;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe int getNamedVarType(string matrixName)
{
int iType = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr = Scilab_API_Wrapper.getNamedVarType(ptrEmpty,
matrixName, &iType);
if (SciErr.iErr == 0) return iType;
return 0;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedVarComplex(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedVarComplex(ptrEmpty, matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedVarMatrixType(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedVarMatrixType(ptrEmpty, matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean createNamedEmptyMatrix(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iVal = Scilab_API_Wrapper.createNamedEmptyMatrix(ptrEmpty, matrixName);
if (iVal == 0) return true;
return false;
}
//=============================================================================
/// <summary>
/// Write a named matrix of boolean in Scilab
/// </summary>
/// <param name="matrixName"> variable name</param>
/// <param name="iRows"> Number of row</param>
/// <param name="iCols"> Number of column</param>
/// <param name="matrixBoolean"> pointer on data</param>
/// <returns> if the operation successes (0) or not ( !0 )</returns>
public int createNamedMatrixOfBoolean(string matrixName,
int iRows, int iCols,
Boolean[] matrixBoolean)
{
int[] matrixInt = new int[matrixBoolean.Length];
for (int i = 0; i < matrixBoolean.Length; i++)
{
matrixInt[i] = matrixBoolean[i].CompareTo(true);
}
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfBoolean(ptrEmpty,
matrixName,
iRows, iCols,
matrixInt);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
/// Read a named matrix of boolean from Scilab
/// </summary>
/// <param name="matrixName"> variable name</param>
/// <returns>a matrix of boolean from scilab. If Variable name does not exist returns null</returns>
public unsafe Boolean[] readNamedMatrixOfBoolean(string matrixName)
{
Boolean[] matrixBoolean = null;
int[] iDim = getNamedVarDimension(matrixName);
if (iDim != null)
{
int iRows = iDim[0];
int iCols = iDim[1];
int[] matrixInt = new int[iRows * iCols];
System.IntPtr ptrEmpty = new System.IntPtr();
// get values in matrixDouble
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfBoolean(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixInt);
if (matrixInt != null)
{
matrixBoolean = new Boolean[iRows * iCols];
for (int i = 0; i < iRows * iCols; i++)
{
matrixBoolean[i] = (matrixInt[i] == 1);
}
}
}
return matrixBoolean;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedBooleanType(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedBooleanType(ptrEmpty, matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean getNamedScalarBoolean(string matrixName)
{
Boolean returnedBoolvalue = false;
Boolean[] bVals = readNamedMatrixOfBoolean(matrixName);
if (bVals != null)
{
returnedBoolvalue = bVals[0];
}
return returnedBoolvalue;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="scalarBoolean"></param>
/// <returns></returns>
public Boolean createNamedScalarBoolean(string matrixName,
Boolean scalarBoolean)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int scalarInt = scalarBoolean.CompareTo(true);
return (Scilab_API_Wrapper.createNamedScalarBoolean(ptrEmpty,
matrixName,
scalarInt) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedVarExist(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedVarExist(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedRowVector(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedRowVector(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedColumnVector(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedColumnVector(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedVector(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedVector(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedScalar(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedScalar(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedSquareMatrix(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedSquareMatrix(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedEmptyMatrix(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedEmptyMatrix(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedPointerType(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedPointerType(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixDouble"></param>
/// <returns></returns>
public int createNamedMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDouble)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfDouble(ptrEmpty,
matrixName,
iRows, iCols,
matrixDouble);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixDoubleReal"></param>
/// <param name="matrixDoubleImg"></param>
/// <returns></returns>
public int createNamedComplexMatrixOfDouble(string matrixName,
int iRows, int iCols,
double[] matrixDoubleReal, double[] matrixDoubleImg)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedComplexMatrixOfDouble(ptrEmpty,
matrixName,
iRows, iCols,
matrixDoubleReal, matrixDoubleImg);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double[] readNamedMatrixOfDouble(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfDouble(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
double[] matrixDouble = new double[iRows * iCols];
// get values in matrixDouble
SciErr = Scilab_API_Wrapper.readNamedMatrixOfDouble(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixDouble);
if (SciErr.iErr != 0) return null;
return matrixDouble;
}
return null;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double[] readNamedComplexMatrixOfDoubleRealPart(string matrixName)
{
double[] dRealPart = null;
int[] iDim = getNamedVarDimension(matrixName);
if (iDim != null)
{
int iRows = iDim[0];
int iCols = iDim[1];
double[] dImagPart = new double[iRows * iCols];
dRealPart = new double[iRows * iCols];
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedComplexMatrixOfDouble(ptrEmpty,
matrixName,
&iRows, &iCols,
dRealPart,
dImagPart);
}
return dRealPart;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double[] readNamedComplexMatrixOfDoubleImgPart(string matrixName)
{
double[] dImagPart = null;
int[] iDim = getNamedVarDimension(matrixName);
if (iDim != null)
{
int iRows = iDim[0];
int iCols = iDim[1];
double[] dRealPart = new double[iRows * iCols];
dImagPart = new double[iRows * iCols];
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedComplexMatrixOfDouble(ptrEmpty,
matrixName,
&iRows, &iCols,
dRealPart,
dImagPart);
}
return dImagPart;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public Boolean isNamedDoubleType(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedDoubleType(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double getNamedScalarDouble(string matrixName)
{
double returnedValue = double.NaN;
if (isNamedVarMatrixType(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarDouble(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return double.NaN;
}
return returnedValue;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double getNamedScalarComplexDoubleRealPart(string matrixName)
{
double dRealPart = double.NaN;
double dImgPart = double.NaN;
if (isNamedVarMatrixType(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarComplexDouble(ptrEmpty,
matrixName,
&dRealPart, &dImgPart);
if (iErr != 0) return double.NaN;
}
return dRealPart;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe double getNamedScalarComplexDoubleImgPart(string matrixName)
{
double dRealPart = double.NaN;
double dImgPart = double.NaN;
if (isNamedVarMatrixType(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarComplexDouble(ptrEmpty,
matrixName,
&dRealPart, &dImgPart);
if (iErr != 0) return double.NaN;
}
return dImgPart;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scalarName"></param>
/// <param name="dblValue"></param>
/// <returns></returns>
public Boolean createNamedScalarDouble(string scalarName,
double dblValue)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarDouble(ptrEmpty,
scalarName,
dblValue) == 0);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="scalarName"></param>
/// <param name="dblRealPartValue"></param>
/// <param name="dblImgPartValue"></param>
/// <returns></returns>
public Boolean createNamedScalarComplexDouble(string scalarName,
double dblRealPartValue, double dblImgPartValue)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarComplexDouble(ptrEmpty,
scalarName,
dblRealPartValue, dblImgPartValue) == 0);
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt8"></param>
/// <returns></returns>
public int createNamedMatrixOfInteger8(string matrixName,
int iRows, int iCols,
sbyte[] matrixInt8)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfInteger8(ptrEmpty,
matrixName,
iRows, iCols,
matrixInt8);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixUInt8"></param>
/// <returns></returns>
public int createNamedMatrixOfUnsignedInteger8(string matrixName,
int iRows, int iCols,
byte [] matrixUInt8)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfUnsignedInteger8(ptrEmpty,
matrixName,
iRows, iCols,
matrixUInt8);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt16"></param>
/// <returns></returns>
public int createNamedMatrixOfInteger16(string matrixName,
int iRows, int iCols,
Int16[] matrixInt16)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfInteger16(ptrEmpty,
matrixName,
iRows, iCols,
matrixInt16);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixUInt16"></param>
/// <returns></returns>
public int createNamedMatrixOfUnsignedInteger16(string matrixName,
int iRows, int iCols,
UInt16[] matrixUInt16)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfUnsignedInteger16(ptrEmpty,
matrixName,
iRows, iCols,
matrixUInt16);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixInt32"></param>
/// <returns></returns>
public int createNamedMatrixOfInteger32(string matrixName,
int iRows, int iCols,
Int32[] matrixInt32)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfInteger32(ptrEmpty,
matrixName,
iRows, iCols,
matrixInt32);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <param name="iRows"></param>
/// <param name="iCols"></param>
/// <param name="matrixUInt32"></param>
/// <returns></returns>
public int createNamedMatrixOfUnsignedInteger32(
string matrixName,
int iRows, int iCols,
UInt32[] matrixUInt32)
{
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.createNamedMatrixOfUnsignedInteger32(ptrEmpty,
matrixName,
iRows, iCols,
matrixUInt32);
return SciErr.iErr;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe int getNamedMatrixOfIntegerPrecision(string matrixName)
{
int iPrecision = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.getNamedMatrixOfIntegerPrecision(ptrEmpty,
matrixName,
&iPrecision);
if (SciErr.iErr != 0)
{
iPrecision = 0;
}
return iPrecision;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe sbyte[] readNamedMatrixOfInteger8(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfInteger8(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
sbyte[] matrixSbyte = new sbyte[iRows * iCols];
// get values in matrixSbyte
SciErr = Scilab_API_Wrapper.readNamedMatrixOfInteger8(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixSbyte);
if (SciErr.iErr != 0) return null;
return matrixSbyte;
}
return null;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe byte[] readNamedMatrixOfUnsignedInteger8(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger8(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
byte[] matrixbyte = new byte[iRows * iCols];
// get values in matrixbyte
SciErr = Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger8(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixbyte);
if (SciErr.iErr != 0) return null;
return matrixbyte;
}
return null;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe Int16[] readNamedMatrixOfInteger16(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfInteger16(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
Int16[] matrixInt16 = new Int16[iRows * iCols];
// get values in matrixInt16
SciErr = Scilab_API_Wrapper.readNamedMatrixOfInteger16(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixInt16);
if (SciErr.iErr != 0) return null;
return matrixInt16;
}
return null;
}
//=============================================================================
/// <summary>
///
/// </summary>
/// <param name="matrixName"></param>
/// <returns></returns>
public unsafe UInt16[] readNamedMatrixOfUnsignedInteger16(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger16(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
UInt16[] matrixUInt16 = new UInt16[iRows * iCols];
// get values in matrixUInt16
SciErr = Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger16(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixUInt16);
if (SciErr.iErr != 0) return null;
return matrixUInt16;
}
return null;
}
//=============================================================================
public unsafe Int32[] readNamedMatrixOfInteger32(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfInteger32(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
Int32[] matrixInt32 = new Int32[iRows * iCols];
// get values in matrixInt32
SciErr = Scilab_API_Wrapper.readNamedMatrixOfInteger32(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixInt32);
if (SciErr.iErr != 0) return null;
return matrixInt32;
}
return null;
}
//=============================================================================
public unsafe UInt32[] readNamedMatrixOfUnsignedInteger32(string matrixName)
{
int iRows = 0;
int iCols = 0;
System.IntPtr ptrEmpty = new System.IntPtr();
Scilab_API_Wrapper.SciErr SciErr =
Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger32(ptrEmpty,
matrixName,
&iRows, &iCols,
null);
if (iRows * iCols > 0)
{
UInt32[] matrixUInt32 = new UInt32[iRows * iCols];
// get values in matrixUInt32
SciErr = Scilab_API_Wrapper.readNamedMatrixOfUnsignedInteger32(ptrEmpty,
matrixName,
&iRows, &iCols,
matrixUInt32);
if (SciErr.iErr != 0) return null;
return matrixUInt32;
}
return null;
}
//=============================================================================
public Boolean isNamedIntegerType(string matrixName)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.isNamedIntegerType(ptrEmpty,
matrixName) == 1);
}
//=============================================================================
public unsafe sbyte getNamedScalarInteger8(string matrixName)
{
sbyte returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarInteger8(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public unsafe Int16 getNamedScalarInteger16(string matrixName)
{
Int16 returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarInteger16(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public unsafe Int32 getNamedScalarInteger32(string matrixName)
{
Int32 returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarInteger32(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public unsafe byte getNamedScalarUnsignedInteger8(string matrixName)
{
byte returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarUnsignedInteger8(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public unsafe UInt16 getNamedScalarUnsignedInteger16(string matrixName)
{
UInt16 returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarUnsignedInteger16(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public unsafe UInt32 getNamedScalarUnsignedInteger32(string matrixName)
{
UInt32 returnedValue = 0;
if (isNamedVarExist(matrixName) == true)
{
System.IntPtr ptrEmpty = new System.IntPtr();
int iErr = Scilab_API_Wrapper.getNamedScalarUnsignedInteger32(ptrEmpty,
matrixName,
&returnedValue);
if (iErr != 0) return returnedValue = 0;
}
return returnedValue;
}
//=============================================================================
public Boolean createNamedScalarInteger8(string matrixName,
sbyte _cData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarInteger8(ptrEmpty,
matrixName,
_cData) == 0);
}
//=============================================================================
public Boolean createNamedScalarInteger16(string matrixName,
Int16 _sData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarInteger16(ptrEmpty,
matrixName,
_sData) == 0);
}
//=============================================================================
public Boolean createNamedScalarInteger32(string matrixName,
Int32 _iData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarInteger32(ptrEmpty,
matrixName,
_iData) == 0);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger8(string matrixName,
byte _ucData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarUnsignedInteger8(ptrEmpty,
matrixName,
_ucData) == 0);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger16(string matrixName,
UInt16 _usData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarUnsignedInteger16(ptrEmpty,
matrixName,
_usData) == 0);
}
//=============================================================================
public Boolean createNamedScalarUnsignedInteger32(string matrixName,
UInt32 _uiData)
{
System.IntPtr ptrEmpty = new System.IntPtr();
return (Scilab_API_Wrapper.createNamedScalarUnsignedInteger32(ptrEmpty,
matrixName,
_uiData) == 0);
}
//=============================================================================
}
}
//=============================================================================
NET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API_Wrapper.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
/*
* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
* Copyright (C) 2010 - DIGITEO - Allan CORNET
*
* This file must be used under the terms of the CeCILL.
* This source file is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
* are also available at
* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
*
*/
//=============================================================================
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
//=============================================================================
namespace Scilab_Component
{
public class Scilab_API_Wrapper
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public unsafe struct api_Ctx
{
public String pstName; /**< Function name */
}
//=============================================================================
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public unsafe struct SciErr
{
public int iErr;
public int iMsgCount;
public fixed int pstructMsg[5];
}
//=============================================================================
private const string API_SCILAB_DLL = "api_scilab.dll";
private const string GRAPHICS_DLL = "graphics.dll";
private const string OUTPUT_STREAM_DLL = "output_stream.dll";
private const string SCILAB_WINDOWS_DLL = "scilab_windows.dll";
private const string ACTION_BINDING_DLL = "sciaction_binding.dll";
private const string LIBSCILAB_DLL = "libscilab.dll";
private const string CONSOLE_DLL = "sciconsole.dll";
private const string GUI_DLL = "scigui.dll";
//=============================================================================
[DllImport(GUI_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isVisibleMainWindow();
[DllImport(GUI_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern void setVisibleMainWindow([In]int bVisibleState);
//=============================================================================
[DllImport(ACTION_BINDING_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isEmptyCommandQueue();
//=============================================================================
[DllImport(ACTION_BINDING_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int StoreCommandWithFlag([In]string command, Int32 flag);
//=============================================================================
[DllImport(SCILAB_WINDOWS_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int Windows_Main([In]System.Int32 hInstance,
[In]System.Int32 hPrevInstance,
[In]string szCmdLine, Int32 iCmdShow);
//=============================================================================
[DllImport(CONSOLE_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int ConsoleIsWaitingForInput();
//=============================================================================
[DllImport(GRAPHICS_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int sciHasFigures();
//=============================================================================
[DllImport(OUTPUT_STREAM_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int GetLastErrorCode();
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfString([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] String[] _pstStrings);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfString([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[In, Out] int[] _piLength,
[In, Out] String[] _pstStrings);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedStringType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedSingleString([In]IntPtr _pvCtx,
[In] String _pstName,
[In] String _pstStrings);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr getNamedVarType([In]IntPtr _pvCtx,
[In] String _pstName,
[Out]Int32* _piType);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedVarComplex([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr getNamedVarDimension([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedVarMatrixType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedEmptyMatrix([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedVarExist([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedRowVector([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedColumnVector([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedVector([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedScalar([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedSquareMatrix([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedEmptyMatrix([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfBoolean([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] int[] _piBool);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfBoolean([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] int[] _piBool);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedBooleanType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarBoolean([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piBool);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarBoolean([In]IntPtr _pvCtx,
[In] String _pstName,
int _iBool);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedPointerType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int32 _iRows, [In] Int32 _iCols,
[In] double[] _pdblReal);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedComplexMatrixOfDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int32 _iRows, [In] Int32 _iCols,
[In] double[] _pdblReal, [In] double[] _pdblImg);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[In, Out] Double[] _pdblReal);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedComplexMatrixOfDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[In, Out] Double[] _pdblReal, [In, Out] Double[] _pdblImg);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedDoubleType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Double * _pdblReal);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarComplexDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Double* _pdblReal, [Out] Double* _pdblImg);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[In]double _dblReal);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarComplexDouble([In]IntPtr _pvCtx,
[In] String _pstName,
[In] double _dblReal, [In]double _dblImg);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int32 _iRows, [In] Int32 _iCols,
[In] sbyte[] _pcData8);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfUnsignedInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] byte [] _pucData8);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] Int16[] _psData16);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfUnsignedInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] UInt16 [] _pusData16);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int32 _iRows, [In]Int32 _iCols,
[In] Int32[] _piData32);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr createNamedMatrixOfUnsignedInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[In] int _iRows, [In] int _iCols,
[In] UInt32[] _puiData32);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr getNamedMatrixOfIntegerPrecision([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piPrecision);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows,
[Out] Int32* _piCols,
[Out] sbyte[] _pcData8);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfUnsignedInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] byte [] _pucData8);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] Int16[] _psData16);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfUnsignedInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] ushort[] _pusData16);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] Int32[] _piData32);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern SciErr readNamedMatrixOfUnsignedInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piRows, [Out] Int32* _piCols,
[Out] UInt32[] _puiData32);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedIntegerType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] sbyte* _pcData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int16* _psData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] Int32* _piData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarUnsignedInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] byte* _pucData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarUnsignedInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] UInt16* _pusData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int getNamedScalarUnsignedInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[Out] UInt32* _puiData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[In] sbyte _cData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int16 _sData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[In] Int32 _iData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarUnsignedInteger8([In]IntPtr _pvCtx,
[In] String _pstName,
[In] byte _ucData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarUnsignedInteger16([In]IntPtr _pvCtx,
[In] String _pstName,
[In] UInt16 _usData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int createNamedScalarUnsignedInteger32([In]IntPtr _pvCtx,
[In] String _pstName,
[In] UInt32 _uiData);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isNamedBooleanSparseType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
[DllImport(API_SCILAB_DLL, CharSet = CharSet.Ansi)]
[return: MarshalAs(UnmanagedType.Struct)]
public unsafe static extern int isNamedPolyType([In]IntPtr _pvCtx,
[In] String _pstName);
//=============================================================================
}
}
//=============================================================================
NET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_Component.csproj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{B53630BF-5641-4414-9A5B-68FD8C30FF26}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Scilab_Component</RootNamespace>
<AssemblyName>Scilab_Component</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\bin\x64\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\..\bin\x64\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>..\..\..\bin\x86\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\bin\x86\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AddScilabPathEnvironment.cs" />
<Compile Include="Scilab_API.cs" />
<Compile Include="FindScilab.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scilab_API_Wrapper.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
NET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Debug/Scilab_Component.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x64\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x64\Scilab_Component.pdb
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x64\Debug\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x64\Debug\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x64\Debug\Scilab_Component.pdb
NET_Component_and_COM_server/src/C#/Scilab_Component/obj/x64/Release/Scilab_Component.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x64\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x64\Scilab_Component.pdb
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x64\Release\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x64\Release\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x64\Release\Scilab_Component.pdb
NET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Debug/Scilab_Component.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\bin\x86\Scilab_Component.pdb
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x86\Debug\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x86\Debug\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\COM_server\src\C#\Scilab_Component\obj\x86\Debug\Scilab_Component.pdb
NET_Component_and_COM_server/src/C#/Scilab_Component/obj/x86/Release/Scilab_Component.csproj.FileListAbsolute.txt
1
2
3
4
5
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x86\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\bin\x86\Scilab_Component.pdb
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x86\Release\ResolveAssemblyReference.cache
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x86\Release\Scilab_Component.dll
D:\GIT-forge-toolboxes\COM_server\NET_Component _and_COM_server\src\C#\Scilab_Component\obj\x86\Release\Scilab_Component.pdb

Archive Download the corresponding diff file

Branches