Article View: borland.public.cppbuilder.nativeapi
Article #7007Re: Execute a Self-Embeded Exefile from inside.
From: Remy Lebeau (TeamB)
Date: Tue, 22 Mar 2005 20:25
Date: Tue, 22 Mar 2005 20:25
16 lines
1570 bytes
1570 bytes
"Grety" <valid@emailaddress.com> wrote in message news:4240720a@newsgroups.borland.com... > In my project 2 I know how to Insert the HW.exe as a Resource > into runner.exe, but I dont know how can I execute that HW which > is inside runner.exe. You need to first extract HW.exe from the resources into a temporary file. Then you can execute the file. Look at FindResource(), LoadResource(), LockResource(), and SizeOfResource() to get access to the raw bytes of the resource. Then you can write those bytes to a file using CreateFile() and WriteFile(). Then use CreateProcess() to execute the file. Gambit
Technical Details
Message-ID:
<42408062$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<4240720a@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,4e27efe03a6582af X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <4240720a@newsgroups.borland.com> Subject: Re: Execute a Self-Embeded Exefile from inside. Date: Tue, 22 Mar 2005 12:25:29 -0800 Lines: 18 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <42408062$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111523426 68.69.17.41 (22 Mar 2005 12:30:26 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!npeer.de.kpn-eurorings.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail