473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

embed s file in exe

Dear all,

I want to embed a motorola s file in my exe file using Visual
C++.net,
and then I can use the data in the Motorola file. How should I
do?
I am urgently need your help.
Thanks a lot.

Oct 4 '06 #1
2 2963

"Robert" <wa*********@gmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Dear all,

I want to embed a motorola s file in my exe file using Visual
C++.net,
and then I can use the data in the Motorola file. How should I
do?
I am urgently need your help.
Thanks a lot.
Why do you need to "embed" a file in an executable? Why not just write your
executable so that it opens and reads the file?

Anyway, if you really need it to be part of the executable for some reason,
you might be able to create a resource out of it which you can import into
your project and which will then compile into the executable. But resources
are specific to your operating system (Windows, in this case), and importing
them into a VC++ project is specific to VC++. You should ask in a VC++ or
other microsoft newsgroup.

(By the way, I have no idea if your "s" file, whatever that is, is
proprietary data, but if it is, you'd better check on whether it's ok to
distribute it before distributing your executable.)

-Howard


Oct 4 '06 #2
Howard wrote:
Why do you need to "embed" a file in an executable? Why not just write
your executable so that it opens and reads the file?
Anyway, if you really need it to be part of the executable for some
reason, you might be able to create a resource out of it which you can
import into your project and which will then compile into the executable.
But resources are specific to your operating system (Windows, in this
A portable way is to write a program that reads the executable in binary
mode and generates some like:

const char filecontent []=
{
byte1, byte2 ...
};

Add a header file with the extern declaration for filecontente if needed,
add other variable with the file lenght if you need it, compile and link
with the main program, and voila.

--
Salu2
Oct 4 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
3
by: Tony Sutton | last post by:
I have this following code in my html file: <object classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#...
0
by: Anna | last post by:
Hi all. I don't know if I should ask this question here or on html group. I'll try. I have an embed element whose src is a big SVG file. The width and height of embed are set to 100%. When the...
3
by: M | last post by:
Hi Folks, Does anyone know how to embed a file into a resource in C#? You seem to be able to embed Icon, Bitmap, Cursor's & Strings. But how do you embed a file??? In VC++ version 6 you...
2
by: benmourra | last post by:
Hi all, I'm trying to create a web page using VS2005, ASP.NET 2.0, that will allow me to choose from a list of media files on my computer and then play my selection within an embedded Windows...
3
by: abrtlt | last post by:
I would like to have a web page in which, when the user clicks on any of several specific elements, a specific audio file is played, without reloading the page. The specific audio file name is...
8
by: CodeLeon | last post by:
Hi, All. I am creating a setup program. The way it works is that the user creates their setup info, my program generates the C# code for a setup executable, embeds the xml file containing the info...
6
by: qualitychecker | last post by:
Hello thanks for your help.. I try to reference a PHP module from within a HTML file, see below ---------------------------------------- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">...
0
by: VigneshS | last post by:
Hi, I am a newbie to Globalization and Localisation Concepts. I tried almost all the methods of the Globalization concepts. But i cannot be able to embed a text file within a Resource. ...
2
dream party
by: dream party | last post by:
Inserting a Flash (SWF, FLV) file into HTML web page is already an old and familiar thing to all of us. It is a rather non-flexible thing that just to edit some options in the template. However, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.