?
Solved

copture all incoming net send messeges!

Posted on 2004-04-22
16
Medium Priority
?
277 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 375 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses
Course of the Month10 days, 4 hours left to enroll

762 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