string problem?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

the following string was from windows 2000 server print eventlog message, i
want to get the print info. from the string, anybody can help me ?

1)Document 126, Exprot List 04-15.xls owned by jackzhang was printed on
printserver1 via port IP_192.168.0.1. Size in bytes: 46205; pages printed: 2

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.
 
Please supply more information as to what you are attempting.

If you are asking how to parse the string, you can use any of the static String.* functions for searching. A more robust solution
is to use System.Text.RegularExpressions.Regex for pattern matching (if the pattern of the eventlog info will always be the same).

The System.Diagnostics.EventLog class supplies you with a means for reading event log entries.

Hope that helps
 
Hi,Dave, i just want get the print user,print date,printed pages,print
server,print computer IP Etc from the print eventlog message. pls.help me !
 
Hi,

Then you will need to parse the string, a regex should be the best thing in
this escenario.

cheers,
 
Back
Top