Solved

Initialize and Test Printer (LX-300+) in windows 200/xp

Posted on 2006-10-26
3
236 Views
Last Modified: 2008-02-01
Experts,

The codes below iniatialize and test printer LX-300+ using windows 2000/xp but it does'nt work. Is there anything that I forget?


Thanks.

// Initialize the port
#include <dos.h>

union REGS regs;

regs.h.ah = 1;
regs.x.dx = 0;
int86(0x17, &regs, &regs);

// Test if Online

#include <dos.h>

union REGS regs;

regs.h.ah = 2;
regs.x.dx = 0;
int86(0x17, &regs, &regs);

if (regs.h.ah) printf("Printer is not ready.");
0
Comment
Question by:marvelsoft
3 Comments
 
LVL 8

Accepted Solution

by:
deepu chandran earned 125 total points
ID: 17810674
Hi,
Just go through this example program then you will get an idea,
http://ftp.wayne.edu/kermit/a/msphpl.c
Deepu
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now