I just have a simple question...i saw in a bunch of places that i could use Microsoft's mailslot functions to send messages equivlent to those from the Messenging Service using NetMessageBufferSend(), but this works on 9x as well, so i could broadcast the same messages from my 9x comps in my LAN...

I'm not very familar with the mailslots, so i'm probably doing alot of stuff wrong, the only source i actually got ahold of was in TASM, and at my level, i couldn't decipher a thing....and it didn't help much.

Well, here is my source:

It is suppose to broadcast the equivelent of those 'netsend' message in the primary domain:

it doesn't have much commenting, sowiee. :(


.model flat, stdcall
option casemap:none

includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\user32.lib
includelib \masm32\lib\gdi32.lib

include \masm32\include\windows.inc
include \masm32\include\kernel32.inc
include \masm32\include\user32.inc
include \masm32\include\gdi32.inc


MailMsg BYTE 'asdf',0
nNumberOfBytesToWrite = ($-MailSlot)
hfile DWORD ?
lpNumberOfBytesWritten DWORD ?


invoke CreateFile,
addr MailSlot,

mov hfile,eax

invoke WriteFile,
addr MailMsg,
addr lpNumberOfBytesWritten,

invoke CloseHandle,hfile
invoke ExitProcess,NULL

end start

Any help will be greatly appreciated!


bah, the spacing is sorta messed up
Posted on 2003-03-16 14:57:44 by Drocon
As i see the message format is wrong.
It should be like this:
In your case:

MailMsg BYTE 'me',0,'you',0,'asdf',0
Posted on 2003-03-18 09:41:03 by rdo
Hmm, thank you!

However, i have one more question, is it possible to send this message to a specific IP instead of primary domain?


doesn't work, and neither does


Posted on 2003-03-19 21:37:27 by Drocon
Just replace * with the ip or computer name, and the message will be delivered to that computer.
This should work.
Posted on 2003-03-20 03:05:01 by rdo
BackSlash is the correct delimiter.

Your non-working text shows Forward Slashes.

I also have a MASM sample program, but it's not mine and I can not remember where or who, to give credit to.

Regards, P1
Posted on 2003-03-20 13:24:26 by Pone
Oops, i made a mistake in the previous post, i meant \\s instead of //s. Is there anything special i need to do with the IPs or something?

Pone, would it be possible that you could attach it or something? I am quite interested in it.

Posted on 2003-03-20 16:07:25 by Drocon