DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Tim Mathias Guest

    Accessing Hardware Ports


    Hi,

    I need to access the parallel ports to communicate with a custom made hardware
    device. I did this successfully using Turbo C++ (DOS) a few years ago. I
    now need to port it to Win95 and Win NT. Where do I start?
    I think I may need to write a device driver. I've tried using assembly "in
    al, dx". This seems OK in Win95 but causes a privileged intruction fault
    in WinNT. Any help would be much appreciated.

    Cheers,
    Tim.

  2. #2
    jonnin Guest

    Re: Accessing Hardware Ports


    Nt device access is not trivial. It is easy in 98. You need the nt driver
    sdk and a month to read and play with it. I think there is also a 98/95
    driver sdk.

    A driver is not necessary but could make it nicer. A driver would allow
    any windows program to use the device. The port routines would be required
    if only your program wants to use it.

    Visual c has some built in port access routines for limited use; maybe that
    will work? do a search on visual c parallel port and see if you can find
    source code. I have some for serial ports if you want that; its untested
    on NT but should work with it.

    I do not recommend assembly for the NT stuff. You must ask NT's permission
    for device access and perform detailed OS stuff before using the device.
    (this will unlock those instructions.)
    Sorry no details; I have only done this from a distance.


    "Tim Mathias" <tim.mathias@talk21.com> wrote:
    >
    >Hi,
    >
    >I need to access the parallel ports to communicate with a custom made hardware
    >device. I did this successfully using Turbo C++ (DOS) a few years ago. I
    >now need to port it to Win95 and Win NT. Where do I start?
    >I think I may need to write a device driver. I've tried using assembly

    "in
    >al, dx". This seems OK in Win95 but causes a privileged intruction fault
    >in WinNT. Any help would be much appreciated.
    >
    >Cheers,
    >Tim.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links