Solved

How to create a custom file format in C using file operations?

Posted on 2011-03-09
1
501 Views
Last Modified: 2012-06-27
Experts,

How to create custome file formats for a specific application?
Example: I am developing an application which stores huge data to a file and i dont want extension for that file as .TXT or .bin,
Instead i want to defile my own file extension like ".pkg", ".kar" ,".xxx "
0
Comment
Question by:srimallikarthik
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 4

Accepted Solution

by:
parnasso earned 500 total points
ID: 35092907
Ithink you need to create an association between a file extension and your application. Therefore every time someone clicks on a file with your extension a new instance of your application is created.

In order to that to happen you need to modify some registry keys, to make the registry look like this:

 .myextension = MyApp
      MyApp = My Application
        |
         -- Shell
              |
               -- open
                    |
                     -- command = c:\directory\myapp.exe %1

Find this Microsoft Link to a VB sample code. Hopefully it is esay to change to C code.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question