Results 1 to 2 of 2

Thread: internet washer question

  1. #1
    Junior Member
    Join Date
    Jul 2003

    Question internet washer question

    Hi Guys,

    I am designing a history cleaner using VC++.
    I use registry functions to clear it.

    Problem 1: I clear document history by locating at HCU/software/ms/windows/current version/explorer/recdocs...
    But in start /documents-> i see the files even after deleting from registry.
    when I restart the machine , it clears. But I want it working without restarting the machine.
    HOw is it posiible?

    Problem 2: Deleting from recycle bin, doesnt actually deletes the file.
    It only removes the association.
    how to delete it, what function should I use for it?
    ANy location in Registry can do this?
    I read about shred files . HOw can it help in this..can anyone help me out in deleting the files

  2. #2
    Senior Member
    Join Date
    Feb 2003
    There is a nice function that will clear the documents history from the start menu.


    Here is an example I copyed from http://www.winprog.org/faq/#3.4.3. Thanks to Winprog for that.

    Action: Clears all items on the Windows MRU list

    void ClearMRU()

    To empty the recycle bin, there is a function SHEmptyRecycleBin() Now this I am not sure if is included In VC++ however if its not you can always load it from Shell32.dll

    The function exists inside C:\Windows\System\Shell32.dll

    It is a dynamic link library and contains an export list of functions, Inside is the function SHEmptyRecycleBinW and SHEmptyRecycleBinA, they are both the same but one is unicode and the other is ASCII. You can use the functions LoadLibrary() in VC++ to load shell32 into memory. then you can use GetProcAddress to retrieve a pointer to the function in memory. I can give you an example of how to do this in VC++ if you want.

    EDIT: Ok did some research for you, SHEmptyRecycleBin will work, you need to #include "stdafx.h" atop your source code. Along with the windows.h headder of cource. Heres and example:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts