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 


How do I delete a file in a C++?

 
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: Sat Jun 09, 2007 3:37 pm    Post subject: How do I delete a file in a C++? Reply with quote

Yea, how do I delete a file, and how do I make a GUI with C++?
_________________


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
UnLmtD
Grandmaster Cheater
Reputation: 0

Joined: 13 Mar 2007
Posts: 894
Location: Canada

PostPosted: Sat Jun 09, 2007 3:44 pm    Post subject: Reply with quote

Google and MSDN are nice tool. To delete a file you can use DeleteFile if you want to delete 1 file. If you want to delete all the files in a folder, you can either search the folder for files and then delete them
Code:
char searchname[MAX_PATH];
            WIN32_FIND_DATA wfdData;
            HANDLE hFind;
            BOOL keeplooking;
         char filename[MAX_PATH];
           
             sprintf(searchname, "%s\\*.*", rgValue);
             hFind = FindFirstFile(searchname, &wfdData);
             keeplooking = 1;
             if(hFind == INVALID_HANDLE_VALUE){
             SetDlgItemText(Hwnd, IDC_STATUS, "GameGuard Folder Not Found" );
             SetDlgItemText(Hwnd, IDC_STATUS2, "Deletition Aborded" );

          }
         
          if(hFind != INVALID_HANDLE_VALUE)
          {
             SetDlgItemText(Hwnd, IDC_STATUS, rgValue );
             while(keeplooking)
        {
            sprintf(filename, "%s\\%s", rgValue, wfdData.cFileName);
            DeleteFile(filename);
            keeplooking = FindNextFile(hFind, &wfdData);
        }
            FindClose( hFind );
             RemoveDirectory(rgValue);


Or you can search for "SHFileOperation". No exemple, never used.

For the GUI, http://forum.cheatengine.org/viewtopic.php?t=93806&start=15

_________________
Back to top
View user's profile Send private message
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Sat Jun 09, 2007 3:52 pm    Post subject: Reply with quote

Two things:

DeleteFile();
CreateWindowEx();

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
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