Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


two C++ questions

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Oct 14, 2007 6:34 pm    Post subject: two C++ questions Reply with quote

My first question is how do I embed files into an application. For example an installer embeds all the files into the program and then copies them into your hd. Or in a music player it can embed certain files and then play them. How would I do that.

My second question is how do i save certain files like mp3 files into another file. Or, that's not really good phrasing so I'll just give an example. In maplestory it has wz files, but in the wz files are the animation, which of course would be so you can't edit them. But how would I do something like that?

_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
sponge
I'm a spammer
Reputation: 1

Joined: 07 Nov 2006
Posts: 6009

PostPosted: Sun Oct 14, 2007 6:47 pm    Post subject: Reply with quote

Resources.
WZ is basically an archive. (Example is rar/zip.)

_________________
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Oct 14, 2007 7:34 pm    Post subject: Reply with quote

As Sponge said, your first one would be resource files. A small example, you could import a DLL into a resource file as a 'BIN' resource. Then extract it using FindResource, LoadResource, LockResource, CreateFile and WriteFile (CloseHandle too for the open resource handle). I can write a small example if you need one.
Back to top
View user's profile Send private message Visit poster's website
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sun Oct 14, 2007 7:37 pm    Post subject: Reply with quote

Sure.
_________________


8D wrote:

cigs dont make people high, which weed does, which causes them to do bad stuff. like killing
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Oct 14, 2007 8:37 pm    Post subject: Reply with quote

Here ya go.


The Extension 'rar' was deactivated by an board admin, therefore this Attachment is not displayed.

Back to top
View user's profile Send private message Visit poster's website
appalsap
Moderator
Reputation: 0

Joined: 27 Apr 2006
Posts: 6753
Location: Pakistan

PostPosted: Sun Oct 14, 2007 9:17 pm    Post subject: Reply with quote

That's the most portable solution, one disadvantage is when anti virus programs see you have an executable embed as a resource, they will be suspicious of you. A better one would be to embed as an object file at link-time but different compilers use different object file formats.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Sun Oct 14, 2007 9:49 pm    Post subject: Reply with quote

appalsap wrote:
That's the most portable solution, one disadvantage is when anti virus programs see you have an executable embed as a resource, they will be suspicious of you. A better one would be to embed as an object file at link-time but different compilers use different object file formats.


Depends on the file being extracted from the exe. Most virus scanners are aware that projects can use this method to extract files at runtime incase they are needed, such as the new .NET stuff that packs the required files that the project needs instead of needing the entire .NET framework to be used. All depends on whats in the resource thats being extracted for it to be flagged as a virus or other suspicious software.

As in my example, the embedded source was a hack I made for Nostale that included a speedhack and a chat filter bypass. Norton does not detect it as harmful, nor does any of the other scanners over at http://virusscan.jotti.org/

For the exe containing the dll to be extracted, again, nothing is found.

DLL:
Code:

Packers Detected: None
A-Squared     
Found nothing
AntiVir    
Found nothing
ArcaVir    
Found nothing
Avast    
Found nothing
AVG Antivirus    
Found nothing
BitDefender    
Found nothing
ClamAV    
Found nothing
CPsecure    
Found nothing
Dr.Web    
Found nothing
F-Prot Antivirus    
Found nothing
F-Secure Anti-Virus    
Found nothing
Fortinet    
Found nothing
Kaspersky Anti-Virus    
Found nothing
NOD32    
Found nothing
Norman Virus Control    
Found nothing
Panda Antivirus    
Found nothing
Rising Antivirus    
Found nothing
Sophos Antivirus    
Found nothing
VirusBuster    
Found nothing
VBA32    
Found nothing


Exe with embedded dll:
Code:

Packers Detected: None
A-Squared     
Found nothing
AntiVir    
Found nothing
ArcaVir    
Found nothing
Avast    
Found nothing
AVG Antivirus    
Found nothing
BitDefender    
Found nothing
ClamAV    
Found nothing
CPsecure    
Found nothing
Dr.Web    
Found nothing
F-Prot Antivirus    
Found nothing
F-Secure Anti-Virus    
Found nothing
Fortinet    
Found nothing
Kaspersky Anti-Virus    
Found nothing
NOD32    
Found nothing
Norman Virus Control    
Found nothing
Panda Antivirus    
Found nothing
Rising Antivirus    
Found nothing
Sophos Antivirus    
Found nothing
VirusBuster    
Found nothing
VBA32    
Found nothing
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites