Hi NG,
I am working on a project in VS2005 that has to comunicate with an older
application, using MailSlots.
As far as I know, I have to use pInvoke to achieve this.
It would be greate, to have a little sample on how to do this, please not
only the C# signature like:
[DllImport("kernel32.dll")]
static extern IntPtr CreateMailslot(string lpName, uint nMaxMessageSize,
uint lReadTimeout, IntPtr SecurityAttributes);
It would be greate to have a simple comlete sample that does a
create,write,read !
Regards
Rainer Queck 4 7130
Rainer,
Well, once you have the IntPtr which represents the mail slot, you can
pass that to the constructor of the FileStream class to read/write to the
mail slot. You don't need to be shown how to use that class, do you? =)
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Rainer Queck" <Ra****@noemail.noemail> wrote in message
news:uI*************@tk2msftngp13.phx.gbl... Hi NG,
I am working on a project in VS2005 that has to comunicate with an older application, using MailSlots. As far as I know, I have to use pInvoke to achieve this. It would be greate, to have a little sample on how to do this, please not only the C# signature like:
[DllImport("kernel32.dll")] static extern IntPtr CreateMailslot(string lpName, uint nMaxMessageSize, uint lReadTimeout, IntPtr SecurityAttributes);
It would be greate to have a simple comlete sample that does a create,write,read !
Regards Rainer Queck
Hi Rainer,
Welcome to MSDN Newsgroup!
I browse some following articles (including samples) from internet. I think
they are you want and hope it's useful for you,
Title: Using a Mailslot to read/write data over a network
URL: http://www.codeproject.com/internet/mailslots.asp
Title: Using Mailslots for Interprocess Communication
URL: http://www.codeproject.com/cpp/mailslots.asp
If you have any questions or concerns, please let me know. I am standing by
to help you. Thanks again and have a nice day!
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Terri, I browse some following articles (including samples) from internet. I think they are you want and hope it's useful for you,
Thanks, yes they were useful.
Regards
Rainer
Hi Rainer,
I am glad to know it's helpful for you.
Thanks for participating the community!
Best Regards,
Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ted |
last post by:
Is it possible to use mailslots in .NET using PInvoke?
I have a VC++ 6.0 based app that creates and listens to a
mailslot. I have a second VC++ 6.0 based app that opens
the mailslot and writes...
|
by: franklini |
last post by:
i cant seem to figure out what is wrong with this class. it has to do
with the input/output stream override. please can somebody help me.
#include <iostream>
#include <string>
#include <vector>...
|
by: aherzallah |
last post by:
Hi every one I have a question, how can I create a MailSlot in .NET using
C#, just like the windows API CreateMailslot (in case still not clear please
see the link...
|
by: aherzallah |
last post by:
Hi every one can anyone help me on how can I create/write/read from a
MailSlot in .NET using
C#, just like the windows API CreateMailslot,
(in case still not clear please see the link...
|
by: vertigo |
last post by:
Hello
Can i use mailslot mechnism in C# ?
I could find API for mailslot only for C/C++ for example:
HANDLE CreateMailslot(
LPCTSTR lpName,
DWORD nMaxMessageSize,
DWORD lReadTimeout,...
|
by: vertigo |
last post by:
Hello
I've tried to create mailslot server, and send there some packets.
On both sides every operation is successful, but on server side message
do not appear.
Is there any client under...
|
by: vertigo |
last post by:
Hello
I receive some mailslot packets. Can i check from whom i have received
them ?
Thanx
Michal
|
by: Hennie Coertze |
last post by:
Good day,
My knowledge of XML is next to none and I only have one XSL code to use.
I also assume I may be using incorrect jargon and hope you will
understand what I need.
I have an XSL style...
|
by: write2ashokkumar |
last post by:
hi...
i have the table like this,
Table Name : sample
Total Records : 500000 (Consider like this)
Sample Records:
id ------------ name
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |