Solved

copture all incoming net send messeges!

Posted on 2004-04-22
16
274 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
select query - oracle 16 101
Firemonkey webbrowser scrollbars ? 1 57
Delphi: making a BW image transparent 10 91
Delphi TListView and TEdit (Select item and input into TEdit) 10 47
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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