How to communicate between a ruby and VB.Net application using Memory Mapped Files?

We are trying to read/write a memory mapped file created from VB.Net in
ruby.

The gem we are using for this purpose is win32-mmap.While creating a
sample application we have created a file named “myFile” in VB.Net and
then to read it we tried the below code:

require ‘win32/mmap’
include Win32

begin
mmap = MMap.open(‘myFile’)

rescue Exception => ex
puts ex.message
end

This code recognizes the file created in memory and doesn’t throw any
exception.
Now the problem is how to get the contents of file using the mmap
object?

Also to get value from mmap if we try something like mmap.value it gives
the following exception
“incompatible marshal file format (can’t be read) format version 4.8
required; 57.84 given”

So is there any way we can read/write the contents of Memory Mapped File
written in .Net from ruby?

Any help will be greatly appreciated.