Solved

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

Posted on 2011-03-09
1
502 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

617 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