469,922 Members | 2,141 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,922 developers. It's quick & easy.

How to print from network printer ??????


M trying to print image by calling print api (web based application )

As my knowledge is concerned aspnet account wont provide access to
netwrk printers .......

My questn is

1)How to print from network printer ??????

( I have set < identity impersonate=true/and m having adminstrator
prvilege ,
even then its not wrking )

2) StartDocPrint returns 0 .

GetLastError returns 5
Can anybody help me in this regard

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***
Sep 6 '06 #1
1 3106
I'm going to assume you want to print something on the server side.

Why are you calling GetLastError? Are you declaring it yourself? You
shouldn't do this. If you are calling an API function, make sure that the
SetError property on the DllImport attribute is set to true, and then call
the GetLastWin32Error method on the Marshal class to get the last error.

Then, you can look that error up in winerror.h in the platform sdk to
find out what the error is.

If you show the code you use to print, it would help as well.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"ranu s" <ra******@gmail.comwrote in message
news:ue**************@TK2MSFTNGP05.phx.gbl...
>
M trying to print image by calling print api (web based application )

As my knowledge is concerned aspnet account wont provide access to
netwrk printers .......

My questn is

1)How to print from network printer ??????

( I have set < identity impersonate=true/and m having adminstrator
prvilege ,
even then its not wrking )

2) StartDocPrint returns 0 .

GetLastError returns 5
Can anybody help me in this regard

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***

Sep 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by KohlerTommy | last post: by
1 post views Thread by Maileen | last post: by
reply views Thread by Broadica | last post: by
13 posts views Thread by Daniel Crespo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.