Using sockets, if I connect to port 139, how (or is it possible) to redirect data to 135?
Printable View
Using sockets, if I connect to port 139, how (or is it possible) to redirect data to 135?
Nevermind,
I CAN connect to port 135. When I send the data, the Messenger service window is not popping up though.
It's not that simple, If you want to send messenger messages, you can't just send a packet on port 135/139 and expect it to work. I sniffed those packets and it's a series UDP/TCP/IP packets on multiple sends. Anyways you need to either shell out and use the Net Send command OR do it the preferred way (as I have) and use NetMessageBufferSend API, it works fine in .Net.
Thanks,
The current way I have been doing it is using the DOS shell. My app uses sockets to ping the user first, then, if the user is pingable, sends the message.
I wanted to have uniformity with the ping and the net send.
I could'nt get the API to work right :( I was using NetMessageBufferSend from the netapi32.
Could you post your code for the api?
Private Declare Unicode Function NetMessageBufferSend Lib "NetApi32" (ByVal inServ As String, ByVal inTo As String, ByVal inFrom As String, ByVal inMsg As String, ByVal MsgLen As Int32) As Int32
And to call it....
intRet = NetMessageBufferSend(vbNullString, objIP.ToString, strFrom, strMsg, strMsg.Length * 2)
Hope that helps...