Interop without interop

T

Tamir Khason

Is it possible (if 'yes' - how) to transfer data from VB application to .NET
application and v.v WITHOUT using Interop (very expencive process).
I need to manipulate big bunches of raw data between VB6 and .NET
application (both are running) - done benchmark:
1) XML dom - VERY BAD
2) Interop - BAD
3) Pointers - GOOD and fast, but BAD (unmanaged)

Any ideas how to do it/???
 
D

Daniel O'Connell

Tamir Khason said:
Is it possible (if 'yes' - how) to transfer data from VB application to ..NET
application and v.v WITHOUT using Interop (very expencive process).
I need to manipulate big bunches of raw data between VB6 and .NET
application (both are running) - done benchmark:
1) XML dom - VERY BAD
2) Interop - BAD
3) Pointers - GOOD and fast, but BAD (unmanaged)
Well, unsafe anyway. There are managed pointers
Any ideas how to do it/???

Have you considered using sockets, they are the standard workhorses used in
most situations where large amounts of data need to be transfered(named
pipes can be used as well, but I don't know if VB has support for them and I
know .NET doesn't). Pretty fast, accessible through both VB and .NET, not to
hard to work with.
 
T

Tamir Khason

I have a problem with that:
1) VB - builded *not small* applications CAN NOT be rewrited (due client's
budget issues)
2) Working with *really BIG chunks of data and a LOT of iterations (1000
i/sec - 500k each one)

I have a way to do it in optomal low-budget way WITHOUT changing the current
VB application
 
D

Daniel O'Connell

Tamir Khason said:
I have a problem with that:
1) VB - builded *not small* applications CAN NOT be rewrited (due client's
budget issues)
2) Working with *really BIG chunks of data and a LOT of iterations (1000
i/sec - 500k each one)

Hmm, interesting, ok, how does the VB app output its data?
 
J

Jeffrey Tan[MSFT]

Hi Tamir,

In windows, there are many ways of sharing data between processes, such as:
Memory Mapping File(MMF), Named Pipe, CopyData Message, ClipBoard etc..
But normally, all the other technologies use MMF to interprocess
communication(or transfer data).

In the article below, the author tells you the way of using MMF to Cache
and Share data between processes.
And he wrote a class enabled us to read and write data between manage and
unmanaged memory.
http://www.codeproject.com/dotnet/globalcache.asp

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
T

Tamir Khason

A well as I already mentioned, Socket is good solution for low iteractional
data, however in this project this not a state...
 
T

Tamir Khason

I agree, that unmanaged code is the fastest way to do it, but I want to try
to do it wihout (you know why...))
 
D

Daniel O'Connell

Tamir Khason said:
A well as I already mentioned, Socket is good solution for low iteractional
data, however in this project this not a state...
Well, whatever you do, you have to send it out somehow, its up to you to
send it out. If sockets aren't acceptable, then use memmapped files like
Jeffrey Tan suggested, or any other option.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top