Skip to content

Commit

Permalink
2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
LTRData committed Oct 30, 2021
1 parent 3c8a4d1 commit 1270e0e
Show file tree
Hide file tree
Showing 157 changed files with 8,082 additions and 3,299 deletions.
13 changes: 11 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,8 @@ devio_with_options/
cab/
ImDiskNet/Help/
private/
*/obj*
*/objchk*
*/objfre*
*.exe
*.dll
*.cpl
Expand Down Expand Up @@ -387,6 +388,9 @@ devio/devio.static.Linux_x86_64
*.diff
*.cat
*.old
*.old2
*.old3
*.old4
*.err
*.zip
*.cab
Expand All @@ -400,4 +404,9 @@ changes.txt
*.gz
*.xz
*.cer
devio/iobridge/Release64/Bridge.asm
*/*/Release*
*.py
*.snk
*.filters
dirs.sln
ImDiskNet/DevioNet/Server/Services/DevioDrvService.vb
98 changes: 98 additions & 0 deletions ImDisk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution files", "Solution
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cplcore", "cplcore\cplcore.vcxproj", "{4052F81F-5D49-4457-8F78-4DCE5DAD91E1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "deviodrv", "deviodrv\deviodrv.vcxproj", "{457B6C05-3FED-4056-A4B3-B1B110242F14}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM = Debug|ARM
Expand Down Expand Up @@ -580,6 +582,102 @@ Global
{4052F81F-5D49-4457-8F78-4DCE5DAD91E1}.Win8.1 Release|Win32.Build.0 = Release|Win32
{4052F81F-5D49-4457-8F78-4DCE5DAD91E1}.Win8.1 Release|x64.ActiveCfg = Release|x64
{4052F81F-5D49-4457-8F78-4DCE5DAD91E1}.Win8.1 Release|x64.Build.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM.ActiveCfg = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM.Build.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM.Deploy.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM64.ActiveCfg = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM64.Build.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|ARM64.Deploy.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|Win32.ActiveCfg = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|Win32.Build.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|Win32.Deploy.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|x64.ActiveCfg = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|x64.Build.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Debug|x64.Deploy.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM.ActiveCfg = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM.Build.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM.Deploy.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM64.ActiveCfg = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM64.Build.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|ARM64.Deploy.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|Win32.ActiveCfg = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|Win32.Build.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|Win32.Deploy.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|x64.ActiveCfg = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|x64.Build.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Release|x64.Deploy.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM.ActiveCfg = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM.Build.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM.Deploy.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM64.ActiveCfg = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM64.Build.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|ARM64.Deploy.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|Win32.ActiveCfg = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|Win32.Build.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|Win32.Deploy.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|x64.ActiveCfg = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|x64.Build.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Debug|x64.Deploy.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM.ActiveCfg = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM.Build.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM.Deploy.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM64.ActiveCfg = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM64.Build.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|ARM64.Deploy.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|Win32.ActiveCfg = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|Win32.Build.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|Win32.Deploy.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|x64.ActiveCfg = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|x64.Build.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win7 Release|x64.Deploy.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM.ActiveCfg = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM.Build.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM.Deploy.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM64.ActiveCfg = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM64.Build.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|ARM64.Deploy.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|Win32.ActiveCfg = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|Win32.Build.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|Win32.Deploy.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|x64.ActiveCfg = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|x64.Build.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Debug|x64.Deploy.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM.ActiveCfg = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM.Build.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM.Deploy.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM64.ActiveCfg = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM64.Build.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|ARM64.Deploy.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|Win32.ActiveCfg = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|Win32.Build.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|Win32.Deploy.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|x64.ActiveCfg = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|x64.Build.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8 Release|x64.Deploy.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM.ActiveCfg = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM.Build.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM.Deploy.0 = Debug|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM64.ActiveCfg = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM64.Build.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|ARM64.Deploy.0 = Debug|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|Win32.ActiveCfg = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|Win32.Build.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|Win32.Deploy.0 = Debug|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|x64.ActiveCfg = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|x64.Build.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Debug|x64.Deploy.0 = Debug|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM.ActiveCfg = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM.Build.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM.Deploy.0 = Release|ARM
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM64.ActiveCfg = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM64.Build.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|ARM64.Deploy.0 = Release|ARM64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|Win32.ActiveCfg = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|Win32.Build.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|Win32.Deploy.0 = Release|Win32
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|x64.ActiveCfg = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|x64.Build.0 = Release|x64
{457B6C05-3FED-4056-A4B3-B1B110242F14}.Win8.1 Release|x64.Deploy.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
9 changes: 6 additions & 3 deletions ImDiskNet/DevioNet/Client/DevioProviderStream.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Imports LTR.IO.ImDisk.Devio.Server.Providers
Imports System.ComponentModel
Imports System.IO
Imports LTR.IO.ImDisk.Devio.Server.Providers

Namespace Client

Expand All @@ -8,8 +10,9 @@ Namespace Client
Public Class DevioProviderStream
Inherits Stream

Private _Provider As IDevioProvider
Private _OwnsProvider As Boolean
Public ReadOnly Property Provider As IDevioProvider

Public ReadOnly Property OwnsProvider As Boolean

Public Sub New(Provider As IDevioProvider, ownsProvider As Boolean)
_Provider = Provider
Expand Down
38 changes: 20 additions & 18 deletions ImDiskNet/DevioNet/Client/DevioShmStream.vb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
Imports LTR.IO.ImDisk.Devio.IMDPROXY_CONSTANTS
Imports System.IO
Imports System.IO.MemoryMappedFiles
Imports System.Runtime.InteropServices
Imports System.Threading
Imports LTR.IO.ImDisk.Devio.IMDPROXY_CONSTANTS

Namespace Client

Expand All @@ -22,11 +26,11 @@ Namespace Client
''' communication with a Devio service using this shared memory object.
''' </summary>
''' <param name="name">Name of shared memory object to use for communication.</param>
''' <param name="read_only">Specifies if communication should be read-only.</param>
''' <param name="[readOnly]">Specifies if communication should be read-only.</param>
''' <returns>Returns new instance of DevioShmStream.</returns>
Public Shared Function Open(name As String, read_only As Boolean) As DevioShmStream
Public Shared Function Open(name As String, [readOnly] As Boolean) As DevioShmStream

Return New DevioShmStream(name, read_only)
Return New DevioShmStream(name, [readOnly])

End Function

Expand All @@ -35,9 +39,9 @@ Namespace Client
''' communication with a Devio service using this shared memory object.
''' </summary>
''' <param name="name">Name of shared memory object to use for communication.</param>
''' <param name="read_only">Specifies if communication should be read-only.</param>
Public Sub New(name As String, read_only As Boolean)
MyBase.New(name, read_only)
''' <param name="[readOnly]">Specifies if communication should be read-only.</param>
Public Sub New(name As String, [readOnly] As Boolean)
MyBase.New(name, [readOnly])

Try
Using Mapping = MemoryMappedFile.OpenExisting(ObjectName,
Expand All @@ -47,11 +51,11 @@ Namespace Client

End Using

RequestEvent = New EventWaitHandle(initialState:=False, mode:=EventResetMode.AutoReset, name:="Global\" & ObjectName & "_Request")
RequestEvent = New EventWaitHandle(initialState:=False, mode:=EventResetMode.AutoReset, name:=$"Global\{ObjectName}_Request")

ResponseEvent = New EventWaitHandle(initialState:=False, mode:=EventResetMode.AutoReset, name:="Global\" & ObjectName & "_Response")
ResponseEvent = New EventWaitHandle(initialState:=False, mode:=EventResetMode.AutoReset, name:=$"Global\{ObjectName}_Response")

ServerMutex = New Mutex(initiallyOwned:=False, name:="Global\" & ObjectName & "_Server")
ServerMutex = New Mutex(initiallyOwned:=False, name:=$"Global\{ObjectName}_Server")

MapView.Write(&H0, IMDPROXY_REQ.IMDPROXY_REQ_INFO)

Expand Down Expand Up @@ -89,9 +93,7 @@ Namespace Client

For Each obj In New IDisposable() {ServerMutex, MapView, RequestEvent, ResponseEvent}
Try
If obj IsNot Nothing Then
obj.Dispose()
End If
obj?.Dispose()

Catch

Expand All @@ -116,11 +118,11 @@ Namespace Client

Dim Response = MapView.Read(Of IMDPROXY_READ_RESP)(&H0)
If Response.errorno <> 0 Then
Throw New EndOfStreamException("Read error: " & Response.errorno)
Throw New EndOfStreamException($"Read error: {Response.errorno}")
End If
Dim Length = CInt(Response.length)

MapView.ReadArray(CULng(IMDPROXY_HEADER_SIZE), buffer, offset, Length)
MapView.ReadArray(IMDPROXY_HEADER_SIZE, buffer, offset, Length)
Position += Length
Return Length

Expand All @@ -135,7 +137,7 @@ Namespace Client

MapView.Write(&H0, Request)

MapView.WriteArray(CULng(IMDPROXY_HEADER_SIZE), buffer, offset, count)
MapView.WriteArray(IMDPROXY_HEADER_SIZE, buffer, offset, count)

RequestEvent.Set()
If WaitHandle.WaitAny({ResponseEvent, ServerMutex}) <> 0 Then
Expand All @@ -144,13 +146,13 @@ Namespace Client

Dim Response = MapView.Read(Of IMDPROXY_WRITE_RESP)(&H0)
If Response.errorno <> 0 Then
Throw New EndOfStreamException("Write error: " & Response.errorno)
Throw New EndOfStreamException($"Write error: {Response.errorno}")
End If
Dim Length = CInt(Response.length)
Position += Length

If Length <> count Then
Throw New EndOfStreamException("Write length mismatch. Wrote " & Length & " of " & count & " bytes.")
Throw New EndOfStreamException($"Write length mismatch. Wrote {Length} of {count} bytes.")
End If

End Sub
Expand Down
Loading

0 comments on commit 1270e0e

Please sign in to comment.