FireBoard
Welcome, Guest
Please Login or Register.    Lost Password?
line printer Line Printer output on Windows NT/2000 (1 viewing) (1) Guests
Go to bottom Post Reply Favoured: 0
TOPIC: line printer Line Printer output on Windows NT/2000
#18310
muchan (Visitor)
Click here to see the profile of this user
Birthdate:
line printer Line Printer output on Windows NT/2000  
A program started its history as written in C for MS-DOS. It calculate something, then as a main output, writes the information on line printer on LTP1: port. Sometimes 10 lines in a minute, sometimes 1 line in hours... (1) DOS version of program just wrote the ASCII characters to LPT1: port and     it worked normally. (2) we had to upgrade it to Win 3.1 platform, which discouraged the direct access     to the printer, but the SDK gave PASSTHROUGH option to bypass the print manager     like:         HDC          hdcPr;         struct lineout_s {                 int n;                 char line[LINLEN+1];         } lineout;         lll.n = 1; // one line         strcpy(lll.line, a string );         hdcPr =CreateDC (lpPrDrv, lpPrDev, LPT1: , (LPSTR) NULL);         Escape (hdcPr, PASSTHROUGH, NULL, (LPCSTR)&lineout, NULL); (3) Win32 SDK stopped supporting PASSTHROUGH option, then there was a way to     write directly to the port like:         HANDLE      file;         BOOL        bWrite;         DWORD       written;         OVERLAPPED  o;         char    string[LINELEN+1];         file = CreateFile( LPT1: , GENERIC_WRITE, 0, NULL, OPEN_EXISTING,                                           FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,NULL);         ...         bWrite = WriteFile(file, string, strlen(sting), &written, &o);    and it worked with Windows 95 and windows 98. Now, with Windows NT and with Windows 2000 doesn't do anything with this WriteFile() function. Now the client is upgrading to Windows 2000, we need to find the method to print one line on the line printer, without going through print manager (which would try to print a page at once.) Did anyone have the same or similar problem? Did you already find the solution? Any suggestion appreciated. Thanks in advance. muchan   < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#18311
Luc Kumps (Visitor)
Click here to see the profile of this user
Birthdate:
line printer Line Printer output on Windows NT/2000  
Any suggestion appreciated. Thanks in advance. muchan   < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#18312
muchan (Visitor)
Click here to see the profile of this user
Birthdate:
line printer Line Printer output on Windows NT/2000  
It calculate something, then as a main output, writes the information on line printer on LTP1: port. Sometimes 10 lines in a minute, sometimes 1 line in hours... (1) DOS version of program just wrote the ASCII characters to LPT1: port and     it worked normally. (2) we had to upgrade it to Win 3.1 platform, which discouraged the direct access     to the printer, but the SDK gave PASSTHROUGH option to bypass the print manager     like: HDC          hdcPr; struct lineout_s { int n; char line[LINLEN+1]; } lineout; lll.n = 1; // one line strcpy(lll.line, a string ); hdcPr =CreateDC (lpPrDrv, lpPrDev, LPT1: , (LPSTR) NULL); Escape (hdcPr, PASSTHROUGH, NULL, (LPCSTR)&lineout, NULL); (3) Win32 SDK stopped supporting PASSTHROUGH option, then there was a way to     write directly to the port like:    HANDLE      file; BOOL        bWrite; DWORD       written; OVERLAPPED  o; char string[LINELEN+1]; file = CreateFile( LPT1: , GENERIC_WRITE, 0, NULL, OPEN_EXISTING,   FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,NULL);         ... bWrite = WriteFile(file, string, strlen(sting), &written, &o);    and it worked with Windows 95 and windows 98. Now, with Windows NT and with Windows 2000 doesn't do anything with this WriteFile() function. Now the client is upgrading to Windows 2000, we need to find the method to print one line on the line printer, without going through print manager (which would try to print a page at once.) Did anyone have the same or similar problem? Did you already find the solution? Any suggestion appreciated. Thanks in advance. muchan   < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#18313
muchan (Visitor)
Click here to see the profile of this user
Birthdate:
line printer Line Printer output on Windows NT/2000  
Have you tried *not* defining a Windows printer to use that particular port? IMHO you can write directly to LPTx: *if* no printer driver has been installed for the corresponding port. Try removing the printer driver, and see what happens... Luc muchan < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it wrote in message A program started its history as written in C for MS-DOS. It calculate something, then as a main output, writes the information on line printer on LTP1: port. Sometimes 10 lines in a minute, sometimes 1 line in hours... (1) DOS version of program just wrote the ASCII characters to LPT1: port and     it worked normally. (2) we had to upgrade it to Win 3.1 platform, which discouraged the direct access     to the printer, but the SDK gave PASSTHROUGH option to bypass the print manager     like: HDC          hdcPr; struct lineout_s { int n; char line[LINLEN+1]; } lineout; lll.n = 1; // one line strcpy(lll.line, a string ); hdcPr =CreateDC (lpPrDrv, lpPrDev, LPT1: , (LPSTR) NULL); Escape (hdcPr, PASSTHROUGH, NULL, (LPCSTR)&lineout, NULL); (3) Win32 SDK stopped supporting PASSTHROUGH option, then there was a way to     write directly to the port like:    HANDLE      file; BOOL        bWrite; DWORD       written; OVERLAPPED  o; char string[LINELEN+1]; file = CreateFile( LPT1: , GENERIC_WRITE, 0, NULL, OPEN_EXISTING,   FILE_ATTRIBUTE_NORMAL|FILE_FLAG_OVERLAPPED,NULL);         ... bWrite = WriteFile(file, string, strlen(sting), &written, &o);    and it worked with Windows 95 and windows 98. Now, with Windows NT and with Windows 2000 doesn't do anything with this WriteFile() function. Now the client is upgrading to Windows 2000, we need to find the method to print one line on the line printer, without going through print manager (which would try to print a page at once.) Did anyone have the same or similar problem? Did you already find the solution? Any suggestion appreciated. Thanks in advance. muchan   < This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#18314
Luc Kumps (Visitor)
Click here to see the profile of this user
Birthdate:
line printer Line Printer output on Windows NT/2000  
Well... it worked. Simple test was     FILE  *fp;     fp = fopen( LPT1: , w );     if (fp != NULL)         fprintf(fp, testn );     }     fclose(fp); It printed the line!   unbelievable.... Elementary, my dear Watson ;^) Luc
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop


-----------------------------------------------------------------------------------------------------------------------------------
To open and print manuals use Adobe Reader. You can download it from Adobe's site. Click here to dlownload Adobe Reader.


COPYRIGHT 2007 MANUALS-LIBRARY - THE LARGEST ONLINE MANUSALS DOWNLOAD SOURCE
Mieszkania i Nieruchomo¶ci - Detox - skrypt sklepu internetowego - kredite - Small Business - ¿yczenia ¶lubne - Lifepac senior - apartments in poznan - teksty piosenek - paroles - Letras - Airports in USA - Trockenbau Hamburg - stumer schreis - hotel krakow
Get Free Stuff
Search Exchange Web Portal SpyderMap
pozycjonowanie i optymalizacja | light blue pour homme | pour homme givenchy | Cytatkiz Niemcad | Cytat iniemiecki | Kaszuby Nocą | Teksty | Teksty | Teksty | Najładniejsze żaluzje po atrakcyjnych cenach. | żłobek Warszawa | Książka Tokarczuk Bieguni w księgarni "Książki Rudolfa" | Najlepsze szkoły językowe w warszawie w Warszawie | Renomowane Projekty ekskluzywnych domów. | popularne hotele Egipt chirurgii plastycznej mieszkania zegarek praca noclegi Moda Modny portal Fotografowanie Pozycjonowanie