string problem?

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.
 
D

Dave

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
 
G

Guest

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 !
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

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

cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top