Hi people,
I need to write a C# program which communicates with a thermal printer.
After a search for the web I found that a way to comunicate with the ports
is calling the kernel32.dll, which has some external methods (CreateFile,
WriteFile, ReadFile, Get/Set CommSettings, Get / Set CommTimeOuts) to
communicate with the port.
My first problems with this dll is that I couldn't find the right
settings to send data to the port ( only exception I got, maybe configure
that is harder than I thought) and the second problem is that I can't use the
dll's readFile method with the parallel port (:S).
Don't worry, jejeje, I found an alternative way to read and write the
parallel port: another dll called inpout32.dll which has 2 external methods
only: Output (write the port) and Input (read the file). My problem with this
is the following (I'll describe an example): If I try to send a command with
hexadecimal code 0x05 to my printer (parallel) which must return me a byte
status, and I read after the write I read the same thing that I write. If I
send other hexadecimals commands to my printer no action is taken and I read
the last hexadecimal code that I write.
What is my problem? I'm using wrong the dlls? Can somebody help me?
Thanks for the support. 0 1155 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Joseph Suprenant |
last post by:
I am looking to read a byte or write a byte on the parallel port in linux.
I am using red hat 7.3. I tired using this but i couldnt get anywere.
{
unsigned char value;
__asm__ volatile ("inb %1,%0"
: "=a" (value)
: "d" ((unsigned short)port));
return value;
} */
|
by: karan |
last post by:
I would like to know how one can use the parallel port through
c/c++.Also, how does one determine what port is
installed(EPP/ECP/SSP/PS2)?
What is the differnece between these?
What are the current sinking/drawing capacities of these ports?
If possible, please give examples in C/C++.
Thanks
I would be grateful if any ebooks/tutorials could be provided at
karanmalhotra85@yahoo.com
|
by: Kevin |
last post by:
Hi All,
I am fairly new to C#, but I do have Programming
experience in VB, and the best way to learn C# is by
doing, so I want to create an application that can monitor
printers connected to my PC, via USB,LPT and possibly COM
ports. What I want to do is be able to run my app and
after a week, of people printing to my printers(My
printers are shared on the network), I want to be able to
say that bob printed x amount of documents, John...
|
by: Dave |
last post by:
Im just starting in vb6 and want to write a scanning
program, but iam being flumoxed by the use of and access
to parallel ports.
Can anyone help? please
Thanks
Dave
|
by: Diego Solis |
last post by:
Hi people,
I need to write a C# program which communicates with a thermal printer.
After a search for the web I found that a way to comunicate with the ports
is calling the kernel32.dll, which has some external methods (CreateFile,
WriteFile, ReadFile, Get/Set CommSettings, Get / Set CommTimeOuts) to
communicate with the port.
My first problems with this dll is that I couldn't find the right
| |
by: Isaac T Alston |
last post by:
Basically, I'm thinking about building a robot which can be controlled by
programs which I write, I'm going to interface to the robot through the
parallel port (like in this tutorial here:
linuxfocus.org/English/May2001/article205.shtml). However, I know that this
will probably need to be done in low level C. Now, although I can code in
C, I don't particularly want to :-) , instead I'd like to use Python. I'm
wondering, is there any way I...
|
by: cddeboer |
last post by:
I am using MS-Access XP and am using the following syntax Set
Application.Printer = Application.Printers("PrinterName") to change the
default printer.
Then when I go to check the associated printer port for any of the
printers (using application.printers("differentprintername").port, they
all return the same printer port as the printer that I switched to,
even though some printers have different ports associated.
Anyone know what is going...
|
by: Timothy Smith |
last post by:
hello people.
i've been trying to send an 8 byte string to my parallel port under
freebsd. the purpose is it to control a relay board.
the board simply responds to the output byte coming from the port. eg.
00000001 will set pin 1 high and flick the relay open.
todate i've attempted this with merely open() on /dev/ppi0 and numpy for
the byte array, but i just can't seem to get it working.
i know the parallel port works and i know the...
|
by: Soren |
last post by:
Hi,
I want to control some motors using the parallel port.. however, my
laptop does not have any parallel ports (very few do). What I do have
is a USB->Parallel converter... I thought about using PyParallel, but
the USB->Parallel converter doesn't actually map to the LPT port ..
and PyParallel only looks for LPT ports?
Has anyone tried doing this? What are my options for controlling
parallel connections on a laptop with no parallel...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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...
| |