Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm having problems trying to run a bunch of old 16-bit applications in Windows 2008 Server. The applications ran fine up to Windows 2003 Server, but when I try to print from any of them, all show printing errors (Unable to create printer driver / TERM error / etc)

  • The LPT1 port is redirected to a shared printer via NET USE LPT1 \ServerName\SharedPrinter
  • DIR > LPT1 (or any shell redirection to the printer) is working fine.
  • I'm using an Administrator account, so it shouldn't be a permissions problem, right?

To reproduce the behavior, I made a small test program in C (TCC 1.01 for DOS). It runs fine in XP / 2003 Server, but on 2008 Server it shows the handle opening (5) but when is trying to write in that handle, issues an error (Write fault error writing device LPT1, Abort, Retry, Ignore, Fail)

#include <io.h>
#include <fcntl.h>
#include <sys\stat.h>

int main(void)
{
 int handle, status;
 char* sbuff;

 handle = open("LPT1", O_WRONLY, S_IFBLK);
 printf("%d\n", handle);

 if (!handle)
 {
    printf("open failed\n");
    exit(1);
 }

 sbuff = "[print test]\n";
 write(handle, sbuff, strlen(sbuff));

 close(handle);
 getch();

 return 0;
}

Any clues?

TIA, Pablo

share|improve this question
    
32-bit or 64-bit Windows 2008? –  squillman Sep 8 '10 at 23:44
    
I'm guessing 32 bit, since 64-bit Win2008 won't run 16 bit applications at all. –  imoatama Sep 9 '10 at 6:17

1 Answer 1

up vote 1 down vote accepted

I think this thread solves your problem. Key step is to use printer pooling instead of net use.

2) Open Printer properties (in Vista, open as Administrator)

3) Turn on "printer pooling" (under Ports tab)

4) In addition to whatever is already selected (for example, USB), also select "LPT1:"

5) Click apply

share|improve this answer
    
If that doesn;t work, a workaround exists by using Printfil printfil.com/english.htm to print from your DOS app. –  imoatama Sep 9 '10 at 6:32

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.