-
September 6th, 2002, 01:37 PM
#1
Net Send Message Capture
I have an app that i can send messages with using net send but i want to recieve the messages also. How can i get the message that is sent and what is the trigger in the program when a message pops up???
Thank you
-
September 6th, 2002, 01:55 PM
#2
Did you write the app? Are you calling NetMessageBufferSend?
-
September 6th, 2002, 03:36 PM
#3
yes i wrote the app. No i am using shellexecute on net send
-
September 6th, 2002, 03:46 PM
#4
I'd suggest using NetMessageBufferSend rather than shell exec, just a personal preference.
But either way you should already know what buffer of message data you are sending, after all your code is the one sending it,why not just shell exec or netmessagebuffersend again to your 'name alais' with the buffered data or am I reading this wrong? If your talking about just storing the data. There is alot of ways to do that, like writing a small winsock client/server app, that just writes the data to a file wherever on the network. Or if the app runs in only one place, writing it to file on that machine.
-
September 6th, 2002, 04:05 PM
#5
i want to capture any net send box text that comes up
-
September 6th, 2002, 04:17 PM
#6
Other than writing a TDI filter hook device driffer, running sniffer software on your machine...that's off the top of my head, I can't think of any other way to do it.
But...and this is a big but you do realize the message is logged in the event log on the target machine? You could easily write some code to parse the event log....
Still I go back to saying you can write a client/server app to log the data somewhere. My point is again, what do you care about what is displayed in the message box, it's the same thing as what your app sent...except for a data/time and there again that's just a api call to get that.
Hope that helps, if not I can't think of anything else right now.
-
September 6th, 2002, 11:11 PM
#7
Hi:
I have captured the net send message. because the popup windows often are dissmissed by mistake when i edit files.
but i did it in the lower layer. the Messenger use netbios interface and smb protocols. i use the function netbios(). and received the raw smb packages and sent thought the raw smb packages. It's funny that you can modify the sender name and receiver name by this way. I know in the high layer . you can use function like netsendbuffermsg . but the function is not available in win9x . and there is no function to receive the message.
best regards.
-
September 6th, 2002, 11:19 PM
#8
Hi£º
Btw. you can read the message from a mailslot named by the windows on the win9x. but sorry i can't remeber the name . but you can capture the package to look up the name. but i 'm not sure whether it can be done by this way on winnt /2k .
Best Regards
-
September 8th, 2002, 11:03 AM
#9
kewl beans tiesun, maybe you could post a code snippet of that, or email him something that works. Not much of a Lan Man person, only wrote things on the fringe of it...more of a sockets and LPC guy
-
September 9th, 2002, 11:01 AM
#10
Hi: Mick_2002
I don't understand what's your meaning about "LAN Man". and " kewl beans " exactly. because my poor english . and this is one of the reason why i can't speak more. I got many help from the site . so I also want to help everyone. I have said that the code is not only a piece of codes and serval functions call . so sorry that I didn't post some code about it . and I think I can mail the code to strych9.
thanks for your comments.
best regards
-
September 9th, 2002, 11:17 AM
#11
I have trouble with english myself, and it's my primary language Kewl beans means hmm has alot of meanings...but I guess 'awesome' suits it best.
-
September 9th, 2002, 03:42 PM
#12
Mick_2002
Are you fimiliar with the NetMessageBufferSend API?
I have a dialog based app with 2 edit fields on it. And a control variables called:
m_cCompName.
m_cSendText.
LPWSTR awcToNameW;
LPWSTR awcFromNameW;
CString ComputerName;
awcToNameW = T2W(ComputerName);
awcFromNameW = T2W(ComputerName);
NET_API_STATUS nasStatus;
nasStatus = NetMessageBufferSend(NULL,
awcToNameW,
awcFromNameW,
(LPBYTE)(LPCTSTR)TextSend,
TextSend.GetLength());
So what am I doing wrong. This should work. Right?
Do you ahve any suggestions?
Thanks
Tom Wright
-
September 9th, 2002, 03:45 PM
#13
I've never had the need to use it. But I did write some small test code before I posted to the thread. It worked for me, what's not working for you?
-
September 9th, 2002, 03:46 PM
#14
When the message box comes up is full of ?'s where my message should be.
Thanks
Tom Wright
-
September 9th, 2002, 03:51 PM
#15
here's a link to some sample code and another discussion on it It looks like a casting issue to me.
http://www.codeguru.com/network/alert.shtml
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
|