473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

sending periodic info from dll to interface

Hi to all!

We are designing a dll that needs to send some information periodically to a
possible interface application that is listening to these messages.

The information, which consist on a complex structure with several fields,
must be sent periodically, and although the frequency depends on calculations
in the dll, on average we can say that a new message is being sent every 33
milliseconds.

Is very important to note that the dll must proceed with its work after
sending the message without waiting for the interface to finish reading the
new info. The dll does not care about the treatment that the interface is
doing and is not waiting for any results, so we can talk about an
asynchronous way of sending the information. Indeed, the dll doesn’t know
anything about the interface application, and it must be possible to develop
a new listener interface once the dll has been completely finished.

The dll is being developed in C++ using Microsoft Visual Studio .NET 2003
(.NET Framework 1.1) .

We would like to know what is the best way of achieving this communication:
what mechanism is the best one to use in the dll and how should an interface
listen to it.
If possible, we would like to know how to do it in two situations:

1. Supposing that any possible interface will be coded using .NET
environment (.NET Libraries, Managed code, etc…)
2. Thinking of a more general interface, that could be coded without using
..NET.
Thanks in advance!

Mar 6 '06 #1
3 1226
Hello, aitzi!

a> 1. Supposing that any possible interface will be coded using .NET
a> environment (.NET Libraries, Managed code, etc…)
a> 2. Thinking of a more general interface, that could be coded without
a> using .NET.

If dll and interface are on the same process then you can use async delegates
( http://feeds.feedburner.com/LifeChronicles?m=13 )

If dll and interface are on separate processes then you can use
- memory mapped files ( can work without .NET but withi same machine )
- windows messages ( can work without .NET but within same machine )
- remoting ( uses .NET can work over multiple machines)
- sockets ( can work without .NET & can work on multiple machines)
- names pipes ( same as sockets )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Mar 6 '06 #2
Hi Vadym!

Thanks a lot for your answer, really!
My dll an interface will be running in the same machine, so I think I can
forget remoting, sockets and pipes. Now I have to choose between others.

I have already tried async delegates and windows messages, but I haven't
tried memory mapped files, has it got any advantages? (For instante, CPU
charge and speed are quite important in this application)
Regarding async delegates, I have two questions:
1. I can't use them if interface doesn't use .NET, can I?
2. If I'm not wrong, using async delegates means that a new thread is
automatically generated each time I send the info. In my case this results in
generating about 30 threads per second... isn't this a problem?
Thanks again!

Regards,

aitzi
"Vadym Stetsyak" wrote:
Hello, aitzi!

a> 1. Supposing that any possible interface will be coded using .NET
a> environment (.NET Libraries, Managed code, etc…)
a> 2. Thinking of a more general interface, that could be coded without
a> using .NET.

If dll and interface are on the same process then you can use async delegates
( http://feeds.feedburner.com/LifeChronicles?m=13 )

If dll and interface are on separate processes then you can use
- memory mapped files ( can work without .NET but withi same machine )
- windows messages ( can work without .NET but within same machine )
- remoting ( uses .NET can work over multiple machines)
- sockets ( can work without .NET & can work on multiple machines)
- names pipes ( same as sockets )

--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot

Mar 9 '06 #3
Thanks again Vadym,

I'll do some more test and see how performation is affected.

Regards,

aitzi
Mar 9 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
0
by: Hans Forbrich | last post by:
Section 1. Ballot: ------------------- 1.YES NO: I agree that there should be a periodic post describing the newsgroup charter and providing a FAQ on newsgroup usage. 2.MONTHLY BI-WEEKLY...
5
by: vanisathish | last post by:
Hi All, I need to constantly update some values to the User Interface. In order to do the updation efficiently, i am planning to run some script in the server side that constantly keeps sending...
17
by: Bonj | last post by:
Right guys. (I would like a solution to this in VB6 as this is what our needy app is written in, but any solutions that involve .NET would be much appreciated likewise as I could instantiate...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
5
by: nishantxl | last post by:
Hi there, I am looking to design a project using C++ The main objective of the project is to display details of periodic table elements such as periodic element name, properties(such as atomic...
3
by: Juergen | last post by:
hi, I've got a problem sending floating point values to an corba server. With other datatyes like short or string it works fine. So having this idl file : module Example{ interface User{
3
by: Daniel Clark | last post by:
I have a Windows command line based application that only shuts down cleanly if it sees "CTRL-C" on the console. I need to automate the running of this application, but still allow the user sitting...
4
by: srivineel | last post by:
Hello EveryBody I need to send sms from dotnet application to my mobile. For this task i have gone through the material on the net. Iam getting good info abt this. And in ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.