Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7671217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:59:55+00:00 2026-05-31T15:59:55+00:00

Possible Duplicate: /dev/null in Windows? I have a complex code that encodes input file

  • 0

Possible Duplicate:
/dev/null in Windows?

I have a complex code that encodes input file into output file. Usually it’s used just for that, but now I need to make another mode – I need to calculate something along the way of encoding and return that variable. I don’t want the output file to remain on the disk, or even appear on the disk for that matter. Its irrelevant in this mode.

Alterating the complex code to add cases like "if we are in mode x then do not actually write to file" is out of the question. It’s too complex.

Is it possible to open something like the "black hole" that /dev/null on UNIX systems is as a FILE in C (on MS Windows PC)? Meaning that you have a legit FILE* pointer, can write there (fprintf) correctly, but when you close it, it vanishes with no more cleanup required?

If not – what choices do I have save for changing my complex code or deleting the produced file after closing it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T15:59:56+00:00Added an answer on May 31, 2026 at 3:59 pm

    As it happens, DOS ripped off Unix "/dev/null": "NUL". You should be able to use it even in Windows today:

    https://web.archive.org/web/20120202063311/http://support.microsoft.com/kb/40592

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: C# okay with comparing value types to null Consider the following code
Possible Duplicate: Yield In VB.NET In C#, when writing a function that returns an
Possible Duplicate: Ruby 1.9.2 and Rails 3 cannot open rails console I have already
Possible Duplicate: regex for URL including query string I have a text or message.
Possible Duplicate: How can I combine multiple rows into a comma-delimited list in Oracle?
Possible Duplicate: How to call a JavaScript function from PHP? I have a php
Possible Duplicate: where to place an xml file with data in app I'm kinda
Possible Duplicate: Get path of executable I'm programming on Windows using MinGW, gcc 4.4.3.
Possible Duplicate: Extracting dollar amounts from existing sql data? I have a column in
Possible Duplicate: How can I develop for iPhone using a Windows development machine? I've

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.