-
May 27th, 2003, 05:45 PM
#1
Thread Starter
Addicted Member
API to display windows messenger alert?
Is there an API or something along the lines of an API to display a windows messenger alert?
-
Jun 4th, 2003, 12:21 AM
#2
Fanatic Member
Hi
Did you mean the Messenger Service on Windows..
I guess it uses UDP and may be you can write a socket to read from that port...
I tried and Tried and finally Gave up..
-
Jun 9th, 2003, 04:18 AM
#3
PowerPoster
You need to use the NetMessageBufferSend api call. This would work only on Win NT/2000/XP.
See this link:
http://www.mvps.org/vbnet/code/netwo...buffersend.htm
-
Jun 9th, 2003, 04:22 AM
#4
Fanatic Member
Hi Amitab
Hi,
But how do you catch it..
(The mesenger Service which runs on the windows Nt does it for us.)
If I wanto programatically catch the message sent.. is there any way .. to do it..?.
Thanks,
Pradeep
-
Jun 9th, 2003, 04:23 AM
#5
Fanatic Member
Hi
The following code is to send messages..
VB Code:
Private Declare Function NetMessageBufferSend Lib _
"NETAPI32.DLL" (yServer As Any, yToName As Byte, _
yFromName As Any, yMsg As Byte, ByVal lSize As Long) As Long
Private Const NERR_Success As Long = 0&
Public Function SendMessage(RcptToUser As String, _
FromUser As String, BodyMessage As String) As Boolean
Dim RcptTo() As Byte
Dim From() As Byte
Dim Body() As Byte
RcptTo = RcptToUser & vbNullChar
From = FromUser & vbNullChar
Body = BodyMessage & vbNullChar
If NetMessageBufferSend(ByVal 0&, RcptTo(0), ByVal 0&, _
Body(0), UBound(Body)) = NERR_Success Then
SendMessage = True
End If
End Function
Private Sub Form_Load()
'Example created by X-MaD (x-mad@zolnetwork.com)
'Visit his website at [url]http://www.zolnetwork.com/x-mad[/url]
Dim RetVal As Boolean
RetVal = SendMessage("Utente", "FromUser", "BodyText")
End Sub
Instead for using the above code..
Use
VB Code:
Winexec "net send " & machineName & " " & message, 1
-
Jun 9th, 2003, 04:26 AM
#6
PowerPoster
I haven't been able to do it till now. I am not even sure if the Message arrives on port 37,38,39(normal NetBios communication Ports) or 17 which I got through Newsgroups. I tried on both of them, but was unsuccessful.
-
Jun 9th, 2003, 04:29 AM
#7
Fanatic Member
Hi
Hi,
I will put on the Port Scaner and check which port it is using..
I still feel its UDP.. in that case we cant..
Regards,
Pradeep
-
Jun 9th, 2003, 04:32 AM
#8
PowerPoster
I have tried that already, but then, you might get a better result.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|