|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
HI i was wondering how i could make a prog that when i double clicked it, it would erase all my IE history ect. to cleanup room on my HD. (I am too lazy to go delete history ect
) Is there an easy way i could do this? Im not asking anyone to wright it for me, however, i am sure icould understand the code if you did But all i am really asking is some help to get me off on the right foot. Thanks for any help that i can get.-Optix ![]() |
|
#2
|
||||
|
||||
|
There are a number of functions you have to play with, depending on what you want. For starters, I would suggest studying the SHxxx group of functions, such as:
SHEmptyRecycleBin() SHDeleteKey() SHGetSpecialFolderPath() There is a lot of info about this group of functions on MSDN, and reading the documentation ought to be a good starting point. |
|
#3
|
|||
|
|||
|
Aight cool! Thanks!
|
|
#4
|
|||
|
|||
|
Aight, I tried doing the empty recycle bin thing, but i get a bunch of errors on compilation. here is the code i have.
Code:
#include <iostream>
using namespace std;
#include <shellapi.h>
#include <conio.h>
HRESULT SHEmptyRecycleBin(HWND hwnd,
LPCTSTR pszRootPath,
DWORD dwFlags
);
int main()
{
cout << "Deleting..\n";
SHEmptyRecycleBin(NULL,NULL,SHERB_NOPROGRESSUI);
cout << "Done";
getch();
return 0;
}
I get errors like, c:\program files\microsoft visual studio\vc98\include\shellapi.h(53) : error C2065: 'HDROP' : undeclared identifier c:\program files\microsoft visual studio\vc98\include\shellapi.h(53) : error C2501: 'DECLARE_HANDLE' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : error C2146: syntax error : missing ';' before identifier 'UINT' c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : error C2501: 'DECLSPEC_IMPORT' : missing storage-class or type specifiers c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : fatal error C1004: unexpected end of file found Anyone know why i am getting these errors? I have tried it in VC++ .NET and VC++ 6.0 in 6.0 i get 5 errors and in .NET i get past a 100. (c:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShellAPI.h(75): fatal error C1003: error count exceeds 100; stopping compilation ) thanks. |
|
#5
|
||||
|
||||
|
did you #include "stdafx.h"
|
|
#6
|
|||
|
|||
|
Nope, didnt have that
But still when it compiles, it has the same errors ![]() |
|
#7
|
||||
|
||||
|
You probably have to include <windows.h> or something similar then. Just out of curiosity, why don't you use the wizard to create you a skeleton project, so that you have some of the includes, compile options and paths already set up correctly for you. That way, you can avoid a lot of these compile and link errors.
|
|
#8
|
|||
|
|||
|
Sweet using windows.h fixed it! Thanks for the tip on the skeleton project, i never thought of that lol. Thanks a lot for your help Scorpian.
-Optix edit: lol making something that actually does something is cool! ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > C Programming > Erase junk prog |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|