Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Printing Ascii Characters

Printing Ascii Characters

Printing Ascii Characters

I need to open a Posiflex Cash drawer by sending Ascii Character <07> to the POS printer to which it is connected.
How do I send Ascii Characters to an LPT port?


RE: Printing Ascii Characters


I Recommend 2 ya to Write a TextFile the Code, and use the
DOS Command "PRINT LPT1 C:\Open.txt" ;)

If you want something more enlightment:

Just Go and analyze the LinePrint Template (FREE), there is some API's That are Called for writing in LPT ports.

There are Also a Plenty of Funtions in API that does what you're intending:


The Recommended for 32bit app is using:

The CreateFile function creates or opens the following objects and returns a handle that can be used to access the object:

·    files
·    pipes
·    mailslots
·    communications resources
·    disk devices (Windows NT only)
·    consoles
·    directories (open only)


HANDLE CreateFile(

    LPCTSTR lpFileName,    // pointer to name of the file
    DWORD dwDesiredAccess,    // access (read-write) mode
    DWORD dwShareMode,    // share mode
    LPSECURITY_ATTRIBUTES lpSecurityAttributes,    // pointer to security attributes
    DWORD dwCreationDistribution,    // how to create
    DWORD dwFlagsAndAttributes,    // file attributes
    HANDLE hTemplateFile     // handle to file with attributes to copy  

Best Regards


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close