• 0

[C++] Parallel I/O


Question

7 answers to this question

Recommended Posts

  • 0

What OS? If you use windows, you should be able to use CreateFile and specify file = "LPT1". From MSDN:

hCom = CreateFile("LPT1",

GENERIC_READ | GENERIC_WRITE,

0, // must be opened with exclusive-access

NULL, // no security attributes

OPEN_EXISTING, // must use OPEN_EXISTING

0, // not overlapped I/O

NULL // hTemplate must be NULL for comm devices

);

You can then use ReadFile and WriteFile and treat LPT1 just like a file.

Link to comment
https://www.neowin.net/forum/topic/227398-c-parallel-io/#findComment-584692353
Share on other sites

  • 0

You'll probably need to use DeviceIoControl to access specific ports on the parallel connector. Look for IOCTL_PAR_SET_READ_ADDRESS and IOCTL_PAR_SET_WRITE_ADDRESS. You'll probably need to use a few other operations, too.

http://msdn.microsoft.com/library/en-us/pa....asp?frame=true

Link to comment
https://www.neowin.net/forum/topic/227398-c-parallel-io/#findComment-584697706
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I think that the last game I bought on day-one was something like Ghost of Tsushima. I've come to realise that I don't have enough time (or sometimes inclination) to game as much as I used to, and I've got plenty of games to keep me occupied if I do decide to play. So I don't see the need to buy a game when it first releases - I wait until it goes on sale. If I'm really excited about a game and the price is under £50 then I would consider it, but anything over that price point gets ignored until the price comes down.
    • For the foreseeable that is your choice. I'm interested tom try one, my wife was very pleased because one she is anti-social and driver chat annoys her and two more seriously there is a long history of drivers abusing women, it's rare, but it happens and more than it should. Sometimes she needs to get a late taxi and she says it may make her feel safer.
    • 5800x3d was chopped because it was too good, why bother releasing a new mid range.
    • Was it bad, sure, but I got it on PC so it was nowhere near as bad as the PS4/XBO versions. Besides, I spent around 200hrs in there and have yet to play the expansion for it. All in all I think I got my monies worth. Maybe I was lucky and didn't run into anything game breaking like others. Either way, $60 is my limit for a game, the point is I'm not going over that no matter what the title is or how much I want to play it. Thank god I don't suffer from FOMO.
    • spwave 0.9.0-1 by Razvan Serea spwave is a cross-platform audio editor designed for research and advanced analysis. It supports a wide range of audio formats, including WAV, AIFF, MP3, Ogg Vorbis, FLAC, ALAC, raw PCM, and more via plug-ins. spwave offers precise editing tools such as zoom, crop, fade in/out, gain adjustment, and region extraction. It enables detailed spectral and phase analysis and supports unlimited undo/redo. Users can drag and drop files, edit metadata, save labeled regions, and view multiple synchronized waveforms. Internally, spwave processes audio in 64-bit precision, ensuring high accuracy. It runs on Windows, macOS, and Linux, making it a reliable and flexible tool for audio research and editing. spwave has following features: Support for multiple platforms: Windows, macOS, Linux (Motif, gtk), etc. Support for WAV, AIFF, MP3, Ogg Vorbis, FLAC, ALAC, raw, and text files by using plug-ins. Support for many bits/samples: 8bits, 16bits, 24bits, 32bits, 32bits float, 64bits double. Converting the sampling frequency and the bits/sample of a file. Playing, zooming, cropping, deleting, extracting, etc. of a selected region. Fade-in, fade-out, gain adjustment, channel swapping, etc of a selected region. Editing file information that supports comments of WAV and AIFF, and ID3 tag of MP3. Analysis of a selected region using several analysis types, e.g. spectrum, smoothed spectrum, phase, unwrapped phase and group delay. Undoing and redoing without limitation of the number of times. Waveform extraction by drag & drop. Opening files by drag & drop. Autosaving of selected regions (you can do this by drag & drop also). Saving positions and regions as labels. Viewing some waveforms and setting regions synchronously. Almost all processing is 64 bits processing internally. Supported Formats: Read/Write: WAV, AIFF, AIFC, CAF, MP3, Ogg Vorbis, FLAC, ALAC (.caf, .mp4), WMA (Windows), APE, AU/SND, PARIS, NIST, IRCAM, raw PCM, text. Read-only: MPEG-2 Layer 3 MP3, RMP files with VBR support. With 64-bit internal processing, autosave capabilities, and synchronized multi-view waveform editing, spwave is a solid tool for anyone handling complex audio editing or acoustic research. spwave 0.9.0-1 changelog: Implemented CQT spectrum and CQT spectrogram (beta version). Implemented piano-key display for spectrum/spectrogram view. Implemented indication of musical note name in cursor information for spectrum/spectrogram view. Fixed a bug that spectrogram view after zoom-in with large factor sometimes freezes. Fixed a bug that scroll and zoom-out in spectrogram view after zoom-in with large factor do not work correctly. Fixed a bug that spectrogram view provides sometimes wrong time information. Fixed a bug that plugin errors sometimes cause a crash. Fixed a bug that the color of grid lines is wrong in printing. Optimized layout of spectrogram view for printing. Enhanced the function of waveform cropping from label information. Fixed a bug that some items in the preference dialog related to labels do not work. Added some items related to the region label in the preference dialog. Fixed a bug that drawing selected region in the log-frequency axis does not work correctly. Added partial support for the dark mode of Windows (the menu bar and the menus). Fixed a bug that the cursor to indicate current calculation position of spectrogram is sometimes not shown. Changed drawing of cursor information into that with white background so as to make the information legible. Fixed a bug that moving to the head by scrolling the overview display sometimes fails. Added feature of alignment of the view region between spectrum view and spectrogram view. Download: spwave 64-bit | spwave 32-bit | ~3.0 MB (Freeware) Download: spwave ARM64 | 2.9 MB Links: spwave Home page | Other OSes | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • Apprentice
      Wireless wookie went up a rank
      Apprentice
    • Week One Done
      bukro earned a badge
      Week One Done
    • One Year In
      Wulle earned a badge
      One Year In
    • One Month Later
      Wulle earned a badge
      One Month Later
    • One Month Later
      Simmo3D earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      602
    2. 2
      ATLien_0
      283
    3. 3
      +FloatingFatMan
      181
    4. 4
      Michael Scrip
      152
    5. 5
      Steven P.
      111
  • Tell a friend

    Love Neowin? Tell a friend!