Page 17 of 21 FirstFirst ... 71516171819 ... LastLast
Results 161 to 170 of 201

Thread: Programming Language

  1. #161
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    How, specially? No real idea.
    But, basically, it's just all written as binary code along with the rest of it and some markers are added so the program knows what bit is what.
    It depends on the executable format, but at least in PE (Windows) and ELF (almost all modern UNIX-like platforms) extraneous data can simply be appended to an executable. The length of important sectors is stored at the top, so anything over that is simply ignored. All that's left to do after that is for the executable part of the program to be able to parse its file to see which bit is which.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #162
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ...but at least in PE (Windows) and ELF (almost all modern UNIX-like platforms)...
    What is PE? I will look it up and someone can explain what it is to me so that I may be confirmed...

    edit- I can't find the meaning!
    edit- PLease also tell me how to add images and sounds to cnsole programs...
    Last edited by pcbrainbuster; 05-29-2007 at 02:50 PM.

  3. #163
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by pcbrainbuster View Post
    How is [resource data added to a program]?
    With Windows, there are built-in functions that can be used to edit an executable to insert, remove, or update resources. There are various types of resource, including fonts, icons and string tables. One can also insert user-defined data which can be literally anything.

    I don't know exactly how programs such as WinZIP create self-extracting archives, but it's possible that the normal resource system is used, inserting compressed data as an application-defined resource.

    1) How do you add bitmaps/images and sound to a console program?
    The only images that would be worth including in a console program is the application icon shown in Explorer. The documentation for your development tools will contain instructions for creating resources; the application icon is the usually the first resource.

    As for sound, it depends: either interact directly with Windows Multimedia, or use a cross-platform library like OpenAL.

    Quote Originally Posted by djr33 View Post
    In the compilation process, they would simply be embedded.
    I don't remember when resources are usually added, but I'd expect it to occur later in the build process.

    Quote Originally Posted by Twey View Post
    It depends on the executable format, but at least in PE (Windows) and ELF (almost all modern UNIX-like platforms) extraneous data can simply be appended to an executable.
    I don't think it's that simple for PE (pcbrainbuster: Portable Executable, one of many executable file formats). The PE/COFF specification implies that a resource (.rsrc) section would be created. I would have thought that a similar read-only, initialised data section would be used but I did read that section tables don't have to cover the entire file contents.
    Mike

  4. #164
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I would have thought that a similar read-only, initialised data section would be used but I did read that section tables don't have to cover the entire file contents.
    It probably would, but it's also possible to simply append. I'm sure I tried it at some point.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #165
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    ...that can be used to edit an executable to insert, remove, or update resources. There are various types of resource, including fonts, icons and string tables. One can also insert user-defined data...
    I know what resources are, but I really want to know how to do this, does anyone here have a C++ book that may have such info?

    ...console program is the application icon shown in Explorer. The documentation for your development tools will contain instructions for creating resources; the application icon is the usually the first resource...
    I don't plan to use any other library then the standard one for my own twisted particular reason... Plus say your where making a game then your would need images, or if your were introducing yourself, etc... Again please check your books .

    edit- I think I just found out how programs are protected! I think - http://www.codeproject.com/system/inject2exe.asp look at the preface section...
    edit- By the way you could also use resource hacker to check out all the hundreds of resources used by one program (not always hundred )...

    Thanks.

  6. #166
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by pcbrainbuster View Post
    I know what resources are, but I really want to know how to do this,
    If you know what resources are, then you should either already know how to add them to an executable, or know where to look for that information. I've already warned you about overestimating the depth of your knowledge.

    does anyone here have a C++ book that may have such info?
    This has precisely nothing to do with C++. That's why I referred you to the documentation for your development tools.

    I don't plan to use any other library then the standard one for my own twisted particular reason...
    The only standard C++ libraries are the template (STL) and C run-time libraries, but I doubt you mean either of those.

    Plus say your where making a game then your would need images,
    C++, as a language, knows nothing of images.

    or if your were introducing yourself,
    Mike

  7. #167
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    If you know what resources are, then you should either already know how to add them to an executable, or know where to look for that information. I've already warned you about overestimating the depth of your knowledge.
    By me saying I understand what resources are I was pointing out that I understand what resource are and not how to add them and what not...

    This has precisely nothing to do with C++. That's why I referred you to the documentation for your development tools.
    OK I see, while I do that someone here maybe able to help me (my compiler is borland's C++ Builder 6 Enterprise Trial)...

    The only standard C++ libraries are the template (STL) and C run-time libraries, but I doubt you mean either of those.
    I don't know what I am talking about, but I mean I will only use the standard C++ items such as libraries etc...

    C++, as a language, knows nothing of images.
    I don't understand what you mean... But just recently I came across a console program with Images and sound but don't remember where I downloaded it from...

    I mean that if you wanted to introduce yourself through a program you will be using both text and image(s)...

    other -
    1) You seem to be slowing down on your posts, what happend?
    2) I just learnt that you can create popup windows which can contain images, sound, buttons etc through the console, is this true? And if so then would this require me to learn win32 programming?

    edit- Check this out! A free win32 API book which gives info on resources but I am lost typical, http://www.rohitab.com/discuss/index...pe=post&id=698 look for using resources in the menu...
    Last edited by pcbrainbuster; 05-31-2007 at 08:24 PM.

  8. #168
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by pcbrainbuster View Post
    I don't know what I am talking about, but I mean I will only use the standard C++ items such as libraries etc...
    I still have no idea what you're trying to say.


    C++, as a language, knows nothing of images.
    I don't understand what you mean...
    You wrote:

    Quote Originally Posted by pcbrainbuster View Post
    Plus say [you were] making a game then [you] would need images ... Again please check your books
    None of this - images, sounds, etc. - has anything to do with C++. Stop trying to do something "cool": you barely know the language, let alone how to do something useful with it.

    1) You seem to be slowing down on your posts, what happend?
    I do have a life outside this forum, and I do like spending some of my free time selfishly.

    2) I just learnt that you can create popup windows which can contain images, sound, buttons etc through the console, is this true?
    If a program is built to run in a graphical environment (such as Windows), then of course it can create graphical elements.

    At least in Windows, a console program is simply software that causes the OS to create a console. GUI-based programs are essentially the same thing, minus the console.

    And if so then would this require me to learn win32 programming?
    You would need to understand the Win32 API if you were going to use it, yes. However, you'd also need to know more about writing software, too.
    Mike

  9. #169
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote:
    I still have no idea what you're trying to say.

    Well don't worry this line isn't going anywhere anyway .


    Quote:
    None of this - images, sounds, etc. - has anything to do with C++. Stop trying to do something "cool": you barely know the language, let alone how to do something useful with it.

    I wasn't trying to do anything cool, I don't really have anyone to impress. I just wanted to know how to add images and sound using C++... For example IE is probably mostly C and yet using scripts and what not you can add images, sound and animation. And C++ is basically C but with improvements and you should be able to see why I keep asking the same question...


    Quote:
    I do have a life outside this forum, and I do like spending some of my free time selfishly.

    How could you! .


    Quote:
    If a program is built to run in a graphical environment (such as Windows), then of course it can create graphical elements.

    At least in Windows, a console program is simply software that causes the OS to create a console. GUI-based programs are essentially the same thing, minus the console.

    You do realize I was talking about the console itself in a graphical environment all this time right?

    question -
    1) What is a *.net language?
    2) Is Windows Live Messenger completely C? I am asking this because I like its features such as 'remote desktop' and 'live message sending' and would one day like to do the same thing in a different way...

  10. #170
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    1) What is a *.net language?
    http://www.google.com/search?q=dot+net
    2) Is Windows Live Messenger completely C? I am asking this because I like its features such as 'remote desktop' and 'live message sending' and would one day like to do the same thing in a different way...
    I think so.
    Where did you find "Remote Desktop"? I can't find it anywhere.
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •