I'm writing a client-server software which should emulate an email service. I'm now at the beginning and I'm trying to let communicate the client and the server process. I have no problem writing a new email, I send it to the server and the server saves it. I have a problem when I have to read an email from the server.
The client sends the request, the server receives it and read the email, but it doesn't send the message to the client, I've seen the server doesn't write on the mailslot, the number of bytes written is always 0.
Can you see the problem?
sorry for my english... I'm italian :p
[C] Server doesn't send a message on mailslot
Started by Alhazred, Jul 23 2007 02:45 AM
3 replies to this topic
#1
Posted 23 July 2007 - 02:45 AM
|
|
|
#3
Posted 09 August 2007 - 09:22 AM
I solved some problems... now I have a problem with the function "Leggi email" ("LeggiDaFile()" inside the server code) which should read an email on the server, the server should read a text file and send the content to the client, I can't do the last part. The server reads the file and fills the structured type but doesn't send it through the mailslot to the client, I have an "Access Denied" error.
Why does it happen? I set read/write flags.
Updated code is available at the links in the first post.
Why does it happen? I set read/write flags.
Updated code is available at the links in the first post.
#4
Posted 13 August 2007 - 02:48 AM
I found a reason why the problem could happen, messages sent from server must be less than 400 bytes and mine were 404 bytes.
Now the size of my messages has been changed to stay under 400 bytes, but still have problems.
It should be due to security attributes, I set NULL and it seems I have to set a security attribute structure. Unfortunatly can't understand how to do reading MSDN.
Can you help me?
Changed code linked in the first post.
Thanks :)
Now the size of my messages has been changed to stay under 400 bytes, but still have problems.
It should be due to security attributes, I set NULL and it seems I have to set a security attribute structure. Unfortunatly can't understand how to do reading MSDN.
Can you help me?
Changed code linked in the first post.
Thanks :)


Sign In
Create Account


Back to top









