Solved

copture all incoming net send messeges!

Posted on 2004-04-22
16
271 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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 Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 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

16 Experts available now in Live!

Get 1:1 Help Now