 |
Cheat Engine The Official Site of Cheat Engine
|
| 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?
|
Posted: Sat Jun 09, 2007 3:37 pm Post subject: How do I delete a file in a C++? |
|
|
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 |
|
 |
UnLmtD Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 894 Location: Canada
|
Posted: Sat Jun 09, 2007 3:44 pm Post subject: |
|
|
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 |
|
 |
the_undead Expert Cheater
Reputation: 1
Joined: 12 Nov 2006 Posts: 235 Location: Johannesburg, South Africa
|
Posted: Sat Jun 09, 2007 3:52 pm Post subject: |
|
|
Two things:
DeleteFile();
CreateWindowEx(); _________________
|
|
| Back to top |
|
 |
|
|
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
|
|