October 20th, 2002, 01:49 AM
Erase junk prog
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 :D :D :D
October 20th, 2002, 08:41 PM
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:
There is a lot of info about this group of functions on MSDN, and reading the documentation ought to be a good starting point.
October 20th, 2002, 10:22 PM
October 20th, 2002, 10:37 PM
Aight, I tried doing the empty recycle bin thing, but i get a bunch of errors on compilation. here is the code i have.
I get errors like,
using namespace std;
HRESULT SHEmptyRecycleBin(HWND hwnd,
cout << "Deleting..\n";
cout << "Done";
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
October 20th, 2002, 10:39 PM
did you #include "stdafx.h"
October 20th, 2002, 10:45 PM
Nope, didnt have that :p But still when it compiles, it has the same errors :(
October 21st, 2002, 04:42 PM
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.
October 21st, 2002, 09:38 PM
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.
edit: lol making something that actually does something is cool! :D