473,698 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Move printjob

How can I move a printjob from one printqueue to another. The printqueue's
both have the same printerdriver.
Nov 21 '05 #1
1 1939
Hi Philip,

Welcome to MSDN newsgroup.
Regarding on the managing print job you mentioned, based on my experience,
the .NET framework dosn't directly provide such raw (low level) programming
interface. Interacting with printer need RAW platform api calls and on
windows operating system, we have the winspool components. So I'd suggest
you first try work this out through unmanaged code(like c/c++) than call
the unmanaged component through platform invoke in .net code. Here are some
related reference and article about windows spooler component programming:

#Introduction to Spooler Components
5-5eb8-4145-9081-c7418a466710.xm l.asp?frame=tru e

#Printing Architecture

How to monitor a printer queue from VB.NET

#PrintMon.exe Demonstrates the Win32 Spooler API


Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no

| Thread-Topic: Move printjob
| thread-index: AcXey7kvjlMhGZj uS9qQQWwUU4CZaQ ==
| X-WBNR-Posting-Host:
| From: =?Utf-8?B?UGhpbGlwIFd hZ2VuYWFy?= <ph************ *@online.nospam >
| Subject: Move printjob
| Date: Tue, 1 Nov 2005 02:05:01 -0800
| Lines: 2
| Message-ID: <0C************ *************** *******@microso ft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.publi c.dotnet.langua ges.vb
| NNTP-Posting-Host: TK2MSFTNGXA03.p hx.gbl
| Path: TK2MSFTNGXA01.p hx.gbl!TK2MSFTN GXA03.phx.gbl
| Xref: TK2MSFTNGXA01.p hx.gbl microsoft.publi c.dotnet.langua ges.vb:113000
| X-Tomcat-NG: microsoft.publi c.dotnet.langua ges.vb
| How can I move a printjob from one printqueue to another. The
| both have the same printerdriver.

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: bmgz | last post by:
I am have made a simple script that moves all desktop clutter (ie files that are not *.lnk) to a specified folder eg. c:\myhome\mydocs\desktopdebris\2003-12-16 ---------------------------------------------------------------------------- ----------------- import re, os, time, shutil os.chdir(os.environ+os.environ+"\\Desktop") DESKTOP = os.listdir(os.environ+os.environ+"\\Desktop")
by: Roger | last post by:
Hi, Im trying to cancle a specific printjob via code on a remote machine. the remote machine i a win2000 machine. Ive tried using System.Management , wmi but apparently im only allowed to delete jobs if the remote machine is a win XP machine. Ive also found some native api's for this.. however , those do not allow username and password so i assume they make the call as the current user (which is not allowed to delete jobs in my case)
by: trint | last post by:
Instead of just sending one document at a time, I need to send multiple documents as a print job because our laserprinter will only stack and staple one printjob it receives at a time. I need to use some of this code: PrinterSettings printerSettings = new PrinterSettings(); printerSettings.MaximumPage = m_numberOfPages; printerSettings.MinimumPage = 1; printerSettings.PrintRange = PrintRange.SomePages; printerSettings.FromPage = 1;...
by: notregister | last post by:
Hi i have a printer that is connected to my PC using a t100base lan cable instead of the usual usb or parallel port cable. how do i send a printjob directly to the printer using VB.Net??
by: Philip Wagenaar | last post by:
I want to change the Username/owner of a printjob in the spoolfile. I know I have to use the SetJob function in the winspool.drv and that I have to declare this by adding the following to my class: Declare Function SetJob Lib "winspool.drv" (ByVal hPrinter As IntPtr, ByVal JobId As Integer, ByVal Level As Integer, ByRef pJob As Byte, ByVal Command_Renamed As Integer) But how do I use this to change the owner/username of a print job?
by: Phil Endecott | last post by:
Dear Postgresql experts, According to the documentation for MOVE, it returns the number of rows that it has moved over. It seems to me that this is true for MOVE FORWARD n, but not for MOVE RELATIVE n or MOVE ABSOLUTE n when it always returns 1: db=> declare c scroll cursor for select * from p; DECLARE CURSOR db=> move absolute -1 in c;
by: Todd7 | last post by:
I am writing a python program to load a pdf file into an IEHtmlWindow which displays it through adobe acrobat reader 7. Depending on the buttons the user clicks, the program moves it to another subdirectory with a new name. I am using python 2.4 with wxpython 2.6 on a windowsxp machine. I encounter a permission denied error when trying to move the file. It appears to be caused due to the loading of the pdf file into the IEHtmlWindow....
by: kkizer | last post by:
I have a problem with this simple code below. Moving the files works perfectly, but once in a blue moon the file that it is trying to move dissapears before it can move it. and when this happens the "System.IO.Move" goes in to a loop and keeps creating the file on the destination folder with a 0byte size and keeps entering the error in the log i have until someone stop the service. so what i cant figure out is since it catches the...
by: Arpan | last post by:
A Form has a FileUpload, 2 Buttons & a TextBox web server controls. Using the FileUpload control, I want to give users the provision to move & delete files that DO NOT exist in C:\Inetpub\wwwroot (i.e. the root directory). This is the code: <script runat="server"> Sub MoveFile(ByVal obj As Object, ByVal ea As EventArgs) File.Move(fudFileSource.FileName, txtFileDest.Text) 'File.Move("F:\4.jpg", "C:\4.jpg") End Sub
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.