Thread: How to load/run file

  1. #1
    Registered User Inkinsarto's Avatar
    Join Date
    Apr 2013

    How to load/run file

    Let's say I create a small program or just want to open any kind of file on my computer, but I want to run a program that forces the user to enter a password or something (I already know this part). How does one create the code that would open the file?

  2. #2
    Registered User
    Join Date
    Oct 2006
    what type of file do you want to open? what do you want to do with it once it's open? what have you tried so far?
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  3. #3
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Rishon LeZion, Israel
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    David J. Wheeler

  4. #4
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Liverpool UK
    open any kind of file on my computer
    You understand that a lot of the output file types on your computer are opened by application specific code? That is to say you wont just be able to open a file stream and output a pdf document for example - you need code/ suitable context to view that kind of content, unles you just want to see a load of jumbled symbols.
    Last edited by rogster001; 09-26-2013 at 12:18 PM.
    Thought for the day:
    "Are you sure your sanity chip is fully screwed in sir?" (Kryten)
    FLTK: "The most fun you can have with your clothes on."

    "If I had thought of it and had some marketing sense every computer and just about any gadget would have had a little 'C++ Inside' sticker on it'"

  5. #5
    Registered User Inkinsarto's Avatar
    Join Date
    Apr 2013
    Would there be a specific code to use for any executable file. I mean this in the sense of something like, Minecraft. Let us say that you want to have a code that when someone clicks a file to play Minecraft, a box is displayed that forces the user to enter a password to be given permission for the file to be opened. What kind of code would be written to load that kind of file?

  6. #6
    Join Date
    Oct 2007
    Inside my computer
    You would need to write some driver or some DLL that uses "grey" methods for intercepting this kind of thing. I wouldn't recommend it. Why you can't you just use an existing solution out there (ie program)? TrueCrypt?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. load file to structure
    By nynicue in forum C Programming
    Replies: 18
    Last Post: 08-06-2009, 04:41 PM
  2. Load font from *.ttf file
    By Born_2B_Alone in forum Windows Programming
    Replies: 1
    Last Post: 12-04-2004, 04:45 PM
  3. Load BMP from file func
    By Death_Wraith in forum C++ Programming
    Replies: 2
    Last Post: 09-20-2004, 06:46 PM
  4. how to load file in C#
    By SuperNewbie in forum C# Programming
    Replies: 1
    Last Post: 07-04-2002, 04:41 AM
  5. How do you Load a Header file?
    By opengl15 in forum C Programming
    Replies: 6
    Last Post: 03-27-2002, 09:26 PM

Tags for this Thread