Solved

copture all incoming net send messeges!

Posted on 2004-04-22
16
270 Views
Last Modified: 2010-04-05
how i can capture all incoming messeges sended with "net send" command under nt platform?
0
Comment
Question by:d1kGroup
  • 9
  • 5
16 Comments
 
LVL 11

Accepted Solution

by:
shaneholmes earned 125 total points
Comment Utility
Look at the NetAlertRaiseEx & NetAlertRaise API functions

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/netmgmt/netmgmt/netalertraise.asp


Shane
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
Sorry, you will need to add Netapi32 to your uses clause

Shane
0
 

Author Comment

by:d1kGroup
Comment Utility
i look in msdn an NetAlertRaise and it's look to be what i need but is not NetAPI32.dcu in delphi! can you give me a header of NetAPI.dll???
or (better) a simple delphi example!!!

d1k
0
 

Author Comment

by:d1kGroup
Comment Utility
no more need header for netapi.dll!!
i found it!! it's call lm!!!
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
K, let me know if you need anymore help!

Shane
0
 

Author Comment

by:d1kGroup
Comment Utility
i tryed NetAlertRaise but not working...

pls give a simple example!!!

d1k
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
You tried it that quick!

Shane
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:d1kGroup
Comment Utility
i just translate the msdn example!!!

d1k
0
 
LVL 11

Expert Comment

by:shaneholmes
Comment Utility
please post me what you used for code...

ANd I will look

Shane
0
 

Author Comment

by:d1kGroup
Comment Utility
Shane, here is the code i tried:

const
  VAREDSIZE = 312;
type
  TPUSER_OTHER_INFO = record
                        alrtus_errcode: Integer;
                        alrtus_numstrings: Integer;
  end;
var
  buf: array [0..VAREDSIZE] of char;
  pUserInfo: ^TPUSER_OTHER_INFO;
begin
  FreeMem(pUserInfo, VAREDSIZE);
  pUserInfo.alrtus_errcode := -1;
  pUserInfo.alrtus_numstrings := 1;
  if NetAlertRaiseEx(ALERT_MESSAGE_EVENT, pUserInfo, 255, 'netsvcs') = NERR_Success then begin
    ShowMessage('something is coming!!!');
  end;

d1k
0
 

Author Comment

by:d1kGroup
Comment Utility
i forgot to mention that it raise an exception!!!
prb service is not called netsvcs... but how???
0
 

Author Comment

by:d1kGroup
Comment Utility
i tried too

NetAlertRaiseEx(ALERT_MESSAGE_EVENT, pUserInfo, VAREDSIZE, 'svchost.exe')

but it raise the same exception!!!
0
 
LVL 12

Expert Comment

by:Ivanov_G
Comment Utility

   You need mail slot component. Download some of them from here :

   http://swiss.torry.net/lan_comms.htm

   I use Mailslot v.1.1 - you just install it, drop on the form and write you code in OnNewMessage event...
0
 

Author Comment

by:d1kGroup
Comment Utility
i try all mail slots components from torry.net but noone capture messeges sended with "net send"!!!

d1k
0
 

Author Comment

by:d1kGroup
Comment Utility
more info: i don't want a replacer for Messenger service... i junst want to capture all incoming messeges!!!!

d1k
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now