.NET component and COM server

.NET component and COM server Commit Details

Date:2010-03-30 20:27:02 (8 years 3 months ago)
Author:Allan Cornet
Branch:master
Commit:99380cb5111879d6d6be73a79a86125a81b1bb6f
Parents: 4b22f7246daac5095f1f9ef418dff594d0435f1a
Message:remove warnings x64 + check dlls exists

Changes:
MNET_Component_and_COM_server/src/C#/Com_Interface/Scilab_COM_server.csproj (7 diffs)
MNET_Component_and_COM_server/src/C#/Scilab_Component/Properties/AssemblyInfo.cs (1 diff)
MNET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API.cs (1 diff)
MNET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API_Wrapper.cs (2 diffs)

File differences

NET_Component_and_COM_server/src/C#/Com_Interface/Scilab_COM_server.csproj
2121
2222
2323
24
24
2525
2626
2727
......
3030
3131
3232
33
33
3434
3535
3636
......
3939
4040
4141
42
42
4343
4444
4545
......
4848
4949
5050
51
51
5252
5353
5454
......
5757
5858
5959
60
60
6161
6262
6363
......
6666
6767
6868
69
69
7070
7171
7272
......
100100
101101
102102
103
104
105
106
107
103108
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<OutputPath>..\..\..\bin\x64\</OutputPath>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\bin\x86\</OutputPath>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<ErrorReport>prompt</ErrorReport>
<RegisterForComInterop>true</RegisterForComInterop>
<RegisterForComInterop>false</RegisterForComInterop>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Target Name="AfterBuild">
</Target>
-->
<PropertyGroup>
<PostBuildEvent>if /i "%25PlatformName%25" == "x64" "%25Windir%25\Microsoft.NET\Framework64\v2.0.50727\regasm" "$(TargetPath)"
if /i "%25PlatformName%25" == "x86" "%25Windir%25\Microsoft.NET\Framework\v2.0.50727\regasm" "$(TargetPath)"
</PostBuildEvent>
</PropertyGroup>
</Project>
NET_Component_and_COM_server/src/C#/Scilab_Component/Properties/AssemblyInfo.cs
55
66
77
8
9
8
9
1010
11
11
1212
13
14
13
14
1515
1616
1717
// 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: AssemblyTitle("Scilab .NET Component")]
[assembly: AssemblyDescription("Scilab .NET Component")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyCompany("Scilab - DIGITEO")]
[assembly: AssemblyProduct("Scilab_Component")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCopyright("Copyright © Scilab 2010")]
[assembly: AssemblyTrademark("By Allan CORNET")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
NET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API.cs
5555
5656
5757
58
5859
5960
6061
6162
6263
64
65
6366
6467
65
68
6669
6770
6871
public Scilab_API()
{
string ScilabPath = FindScilab.getScilabPath();
if (ScilabPath.CompareTo("") != 0)
{
AddScilabPathEnvironment.Add(ScilabPath + "\\bin");
}
if (!Scilab_API_Wrapper.checkDllsUsed(ScilabPath + "\\bin")) return;
scilabThread = new Thread(new ThreadStart(ThreadScilabLoop));
// Lancement du thread
// start scilab Thread
scilabThread.Start();
// We wait scilab
Thread.Sleep(2000);
NET_Component_and_COM_server/src/C#/Scilab_Component/Scilab_API_Wrapper.cs
1313
1414
1515
16
17
1618
1719
1820
......
4042
4143
4244
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
4373
4474
4575
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.IO;
using System.Windows.Forms;
//=============================================================================
namespace Scilab_Component
{
private const string LIBSCILAB_DLL = "libscilab.dll";
private const string CONSOLE_DLL = "sciconsole.dll";
private const string GUI_DLL = "scigui.dll";
private const string FILE_SEPARATOR = "\\";
//=============================================================================
public static Boolean checkDllsUsed(string pathScilabBin)
{
Boolean bOK = checkDllUsed(pathScilabBin, API_SCILAB_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, GRAPHICS_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, OUTPUT_STREAM_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, SCILAB_WINDOWS_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, ACTION_BINDING_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, LIBSCILAB_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, CONSOLE_DLL);
if (bOK) bOK = checkDllUsed(pathScilabBin, GUI_DLL);
return bOK;
}
//=============================================================================
private static Boolean checkDllUsed(string pathScilabBin, string dllName)
{
Boolean bOK = File.Exists(pathScilabBin + FILE_SEPARATOR + dllName);
if (!bOK)
{
MessageBox.Show(dllName + "not found.", "Error",
MessageBoxButtons.OK, MessageBoxIcon.Stop);
}
return bOK;
}
//=============================================================================
[DllImport(GUI_DLL, CharSet = CharSet.Ansi)]
public unsafe static extern int isVisibleMainWindow();

Archive Download the corresponding diff file

Branches