copture all incoming net send messeges!

how i can capture all incoming messeges sended with "net send" command under nt platform?
d1kGroupAsked:
Who is Participating?
 
shaneholmesConnect With a Mentor Commented:
Look at the NetAlertRaiseEx & NetAlertRaise API functions

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


Shane
0
 
shaneholmesCommented:
Sorry, you will need to add Netapi32 to your uses clause

Shane
0
 
d1kGroupAuthor Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
d1kGroupAuthor Commented:
no more need header for netapi.dll!!
i found it!! it's call lm!!!
0
 
shaneholmesCommented:
K, let me know if you need anymore help!

Shane
0
 
d1kGroupAuthor Commented:
i tryed NetAlertRaise but not working...

pls give a simple example!!!

d1k
0
 
shaneholmesCommented:
You tried it that quick!

Shane
0
 
d1kGroupAuthor Commented:
i just translate the msdn example!!!

d1k
0
 
shaneholmesCommented:
please post me what you used for code...

ANd I will look

Shane
0
 
d1kGroupAuthor Commented:
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
 
d1kGroupAuthor Commented:
i forgot to mention that it raise an exception!!!
prb service is not called netsvcs... but how???
0
 
d1kGroupAuthor Commented:
i tried too

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

but it raise the same exception!!!
0
 
Ivanov_GCommented:

   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
 
d1kGroupAuthor Commented:
i try all mail slots components from torry.net but noone capture messeges sended with "net send"!!!

d1k
0
 
d1kGroupAuthor Commented:
more info: i don't want a replacer for Messenger service... i junst want to capture all incoming messeges!!!!

d1k
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.