Click here to Skip to main content
15,906,333 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog :o) Pin
Nitron14-May-03 14:28
Nitron14-May-03 14:28 
GeneralPlacing a control in an edit control's NC area Pin
Diarrhio14-May-03 9:15
Diarrhio14-May-03 9:15 
GeneralRe: Placing a control in an edit control's NC area Pin
John R. Shaw14-May-03 13:36
John R. Shaw14-May-03 13:36 
Questionget hardware info ? Pin
_skidrow_vn_14-May-03 8:17
_skidrow_vn_14-May-03 8:17 
AnswerRe: get hardware info ? Pin
David Crow14-May-03 9:22
David Crow14-May-03 9:22 
QuestionHow to secure delete files Pin
gmlnd14-May-03 7:51
gmlnd14-May-03 7:51 
AnswerRe: How to secure delete files Pin
David Crow14-May-03 8:05
David Crow14-May-03 8:05 
GeneralRe: How to secure delete files Pin
gmlnd14-May-03 8:53
gmlnd14-May-03 8:53 
I use the following class to delete files.
void CFileDeleter::Initialize()
{
m_nDeleteType = 0;
LoadDeleteType();
}

void CFileDeleter::LoadDeleteType()
{
HKEY hKey;
long lRet;
int nType = 0;
DWORD dw = sizeof(int);
DWORD dwType = REG_DWORD;
lRet = RegOpenKeyEx(HKEY_CURRENT_USER,"Software\\iISoftware\\iIWiper",0,KEY_ALL_ACCESS,&hKey);
if(lRet == ERROR_SUCCESS)
{
lRet = RegQueryValueEx(hKey,"DeleteType",0,&dwType,(LPBYTE)&nType,&dw);
if(lRet == ERROR_SUCCESS)
{
m_nDeleteType = nType;
}
}

}

BOOL CFileDeleter::FileDeleteOperation(LPTSTR lpszFile)
{
DWORD dwAttrib;
dwAttrib = GetFileAttributes(lpszFile);
if (dwAttrib == 0xFFFFFFFF)
{
return FALSE;
}
switch(m_nDeleteType)
{
case DELETE_RECYCLE:
{
SHFILEOPSTRUCT f;
ZeroMemory(&f, sizeof(SHFILEOPSTRUCT));
f.wFunc = FO_DELETE;
f.fFlags = FOF_ALLOWUNDO | FOF_NOCONFIRMATION;
lpszFile[lstrlen(lpszFile)+1] = 0;
f.pFrom = lpszFile;
SHFileOperation(&f);
break;
}

case DELETE_DELETE:
DeleteFile(lpszFile);
break;

default:
{
SHFILEOPSTRUCT f;
ZeroMemory(&f, sizeof(SHFILEOPSTRUCT));
f.wFunc = FO_DELETE;
f.fFlags = FOF_ALLOWUNDO;
f.pFrom = lpszFile;
SHFileOperation(&f);
break;
}

}


return TRUE;
}
GeneralRe: How to secure delete files Pin
David Crow14-May-03 9:07
David Crow14-May-03 9:07 
GeneralRe: How to secure delete files Pin
gmlnd14-May-03 9:17
gmlnd14-May-03 9:17 
GeneralRe: How to secure delete files Pin
David Crow14-May-03 9:25
David Crow14-May-03 9:25 
GeneralRe: How to secure delete files Pin
gmlnd14-May-03 9:34
gmlnd14-May-03 9:34 
GeneralAPI alternative to HOSTS file modification Pin
Phil Speller14-May-03 7:16
Phil Speller14-May-03 7:16 
GeneralRe: API alternative to HOSTS file modification Pin
David Crow14-May-03 8:11
David Crow14-May-03 8:11 
QuestionSTL for CE.NET (CE 4.0)? Pin
cgreathouse14-May-03 6:32
cgreathouse14-May-03 6:32 
GeneralDriver Info Pin
Marcus Spitzmiller14-May-03 5:24
Marcus Spitzmiller14-May-03 5:24 
GeneralFree the memory!!! Pin
keb14-May-03 5:16
keb14-May-03 5:16 
GeneralRe: Free the memory!!! Pin
David Crow14-May-03 6:08
David Crow14-May-03 6:08 
GeneralRe: Free the memory!!! Pin
keb14-May-03 6:55
keb14-May-03 6:55 
GeneralRe: Free the memory!!! Pin
keb14-May-03 7:02
keb14-May-03 7:02 
GeneralRe: Free the memory!!! Pin
David Crow14-May-03 7:08
David Crow14-May-03 7:08 
GeneralRe: Free the memory!!! Pin
Nitron14-May-03 14:31
Nitron14-May-03 14:31 
QuestionKeyboard Input ? Pin
_skidrow_vn_14-May-03 5:10
_skidrow_vn_14-May-03 5:10 
AnswerRe: Keyboard Input ? Pin
Chris Richardson14-May-03 7:54
Chris Richardson14-May-03 7:54 
GeneralRe: Keyboard Input ? Pin
_skidrow_vn_14-May-03 8:11
_skidrow_vn_14-May-03 8:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.