Hello Kenneth,
I noticed that the similar issue was posted in several groups (places)....I
have added a reply to you at your post:
"Does .Netframework have a way to add a network printer"
If you have follow up questions, please post there and I will work with
you. Thanks.
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| From: Kenneth Koski <kk*****@mindspring.com>
| References: <u5*************@TK2MSFTNGP10.phx.gbl>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: Re: How do you add a printer to a w2k server using C#
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <O7**************@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Date: Thu, 31 Jul 2003 12:25:48 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:173365
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hello Jim,
|
| I could not find "System.Win32" are you referring to System.Windows? I
| am using "System.Runtime.Interopservices" for most of the printer
| pieces, but I can not find the correct syntax for importing the
| AddPrinter dll.
| This is what I have , which works, for openprinter. Does anyone know
| what it would be for AddPrinter?
|
| [DllImport("winspool.Drv", EntryPoint="GetPrinterA", SetLastError=true,
| CharSet=CharSet.Ansi,ExactSpelling=true,
| CallingConvention=CallingConvention.StdCall)]
| private static extern bool GetPrinter(IntPtr hPrinter, Int32 dwLevel,
| IntPtr pPrinter, Int32 dwBuf, out Int32 dwNeeded);
|
| Thank You in Advance for Your Help,
| Ken
|
|
|
|
|
|
|
|
| *** Sent via Developersdex
http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|