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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ranu s

    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=tru e/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 ***
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: How to print from network printer ??????

    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 GetLastWin32Err or 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]
    - mvp@spam.guard. caspershouse.co m

    "ranu s" <ranu2006@gmail .comwrote in message
    news:uex4R$Y0GH A.1304@TK2MSFTN GP05.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=tru e/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 ***

    Comment

    Working...