Solved

copture all incoming net send messeges!

Posted on 2004-04-22
16
272 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
ID: 10890603
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
ID: 10890624
Sorry, you will need to add Netapi32 to your uses clause

Shane
0
 

Author Comment

by:d1kGroup
ID: 10891225
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

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

Expert Comment

by:shaneholmes
ID: 10891287
K, let me know if you need anymore help!

Shane
0
 

Author Comment

by:d1kGroup
ID: 10891291
i tryed NetAlertRaise but not working...

pls give a simple example!!!

d1k
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10891314
You tried it that quick!

Shane
0
 

Author Comment

by:d1kGroup
ID: 10891390
i just translate the msdn example!!!

d1k
0
 
LVL 11

Expert Comment

by:shaneholmes
ID: 10891432
please post me what you used for code...

ANd I will look

Shane
0
 

Author Comment

by:d1kGroup
ID: 10891658
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
ID: 10891693
i forgot to mention that it raise an exception!!!
prb service is not called netsvcs... but how???
0
 

Author Comment

by:d1kGroup
ID: 10891726
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
ID: 10896877

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

d1k
0
 

Author Comment

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

d1k
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best Firemonkey component pack 1 106
Delphi cmd execution 6 62
Communication Between RC4 Delphi <-> PHP 3 115
tvirtualstringtree freeze when load too manny images 10 63
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

825 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