日本語でのREADMEは、README-Japanese.mdを参照してください。
Implemented the VisM.OCX interface for .Net Applications using IRIS .Net Native API .
IRIS for Windows (x86-64) 2022.2 (Build 368U) Fri Oct 21 2022 16:43:20 EDT or later can work.
Native API for .Net Framework (4.x) will be removed in the future versions.
Importing CacheDirect.Emulator.cls into the appropriate namespace.
(The sample console application assumes that the namespace is USER)
Create a Console C# application project in Visual Studio 2019.
The version I used is as follows.
Microsoft Visual Studio Community 2019 Version 16.11.15
Add the following files to the project
- net4/cacheDirectWapper.cs
- ConsoleApp/ConsoleApp.cs
Delete Program.cs
When building with Visual Studio 2022, add the following files
- net60later/cacheDirectWapper.cs
- ConsoleApp/ConsoleApp.cs
Choose Add Reference from the project settings in Visual Studio and add the following files.
<InstallDir>\InterSystems\IRIS\dev\dotnet\bin\v4.6.2
InterSystems.Data.IRISClient.dll
<InstallDir>\InterSystems\IRIS\dev\dotnet\bin\net8.0
InterSystems.Data.IRISClient.dll
Click Build from the Visual Studio build menu.
Make sure there are no errors in the output window.
If you get an error, there's something wrong with the reference settings being not working properly.
- From the Visual Studio debug menu, click Start Debugging.
- you need to press any key to finish the sample application
- you can see the program output in the Visual Studio output window
VB/Module1.vb is a samle VB.Net code to use the emulator.
to run the sample
- create a c# class library project
- add cacheDirectWapper.cs to the project
- add references to InterSystems.Data.IRISClient.dll
- build the project
- create a VB.Net console application project
- add VB/Module1.vb to the project
- add references to InterSystems.Data.IRISClient.dll
- add refernce to the class library dll
- ConnectionState
- ConTag
- ElapsedTime
- ErrorTrap
- KeepAliveInterval
- KeepAliveTimeOut
- LogMask
- MServer
- MsgText
- PromptInterval
- Server
- Tag
- DeleteConnection
- SetMServer
- SetServer
- Shutdown Event
- ErrorTrapping
- The Keep Alive Feature
- Server Read Loop and Quick Check
- Read and Write Hooks
- Other Server Side Hooks
- User Cancel Option
It does not support any features specific to Visual Basic in the Cache Direct features as follows:.
- Callback function
- MessageBox
- DoEvents, etc.
2 Constructors are defined
cacheDirectWapper(string constr)
cacheDirectWapper(IRISConnection irisconn)
If you need to switch namespaces within your application, you must import CacheDirect.Emulator class into each namespace or do package mapping.