Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>CreateProcess()</code> is a Windows API call to start a process, exactly as it sounds like, as a child of your program that you can control by knowing it's <code>HANDLE</code>. <code>system()</code> executes a system command. That's as much as you'll ever know and I personally avoid using it at all costs - not least because it isn't portable (the function exists on windows and linux but the command won't).</p> <p>It is possible to append the data to the end of an EXE image - this is how installers work. Have a look at this <a href="http://support.microsoft.com/kb/84062" rel="nofollow noreferrer">microsoft support article</a>, which bizarrely gives you code in basic but you should be able to turn it into C++ trivially. Here's an article on <a href="http://users.iafrica.com/d/da/dart/zen/Articles/SelfExtract/Self%20Extract.html" rel="nofollow noreferrer">creating a self-extractor</a> which might be more suitable. Both should allow you to embed files in the exe.</p> <p>I don't recommend you extract <code>7za</code> and call it from <code>System()</code> or <code>CreateProcess()</code> - I recommend you learn the SDK. It is difficult, but you'll learn a lot from doing it.</p> <p>Finally, as you'll have to modify an existing exe file you won't be able to do this at compile-time. You'll need to have the code add whatever to its own image or another image.</p> <p>More detail on <a href="http://www.the-interweb.com/progj/issue2/art1/index.htm" rel="nofollow noreferrer">addressing data</a> appended to an exe.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload