|
Thanks for answering to my problem, but I have a simple task and I can`t find documentation on T13 Secure Erase
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
I had a look at the t13.org website and they allow you download documents if you register and login.
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
That's what machines are for.
Got a problem?
Sleep on it.
|
|
|
|
|
Thanks again. I searched the site before. Actually I need something like an API or SDK.
VII. 36. When you surround an army, leave an outlet free. Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
|
Thanks a lot
VII. 36. When you surround an army, leave an outlet free. Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
David's pointing you to the spec is an excellent answer.
A few things I will add to the mix:
* You will need multiple commands ( SECURITY ERASE PREPARE, SECURITY ERASE UNIT, and possibly other SECURITY commands ) from the spec in order to accomplish a secure erase.
* Sending (single-sector) ATA passthru commands from uesr mode applications is possible on Windows (XP SP2 and newer, IIRC), assuming you have Admin privileges on the system. You will need do some Googling on IOCTL_ATA_PASSTHRU_DIRECT in order to find relevant information.
* That being said, you will still be at the mercy of the system BIOS and possibly the O/S. Once a SECURITY FREEZE LOCK is sent to the drive, it is *generally* difficult or impossible to send SECURITY ERASE to the drive. Some motherboard BIOSs send the SECURITY FREEZE LOCK prior to start of boot just to ensure a drive is not accidentally or maliciously erased.
All of this is from my memory, which is several years old at this point.
|
|
|
|
|
Hello All,
I have a MFC app thats being developed in VS 6.0
If the app is idle for more than 5 mins it should lock automatically.
i.e., the next time when user tries to click anywhere on app, it should ask for user name and password.
Is there any good examples for that?
The closest example i can think of is the screen saver lock in Windows operating system.
Any sample code will help.
Thanks in advance.
|
|
|
|
|
Have a look at this article HOWTO track a user's idle time[^]; it seems to have a good implementation on how to detect the idle time.
When the idle time (five minutes) has been reached you could show a modal dialog that requires the user to specify his/her user name and password.
0100000101101110011001000111001011101001
|
|
|
|
|
|
I have an application that can also run as a service via srvany. It performs a monitoring task and uses the PlaySound method defined in mmsystem.h to play a .wav notification on certain events. It runs fine under XP as an app or as a service.
Under Win7, the app runs fine. But when running as a service under Win7, I get no sound. The "allow service to interact with desktop" option is available but ignored under Win7 as part of Session 0 isolation. I expect this is somehow related.
I'm looking for verification or alternate approaches.
Thanks.
modified 5-Apr-13 13:28pm.
|
|
|
|
|
You are most likely right in your conclusion. I think the session 0 isolation prevents such interactions.
A possible work-around is to have your Service start or interact with a non-service component that runs in the user session.
|
|
|
|
|
I have weird bug: in a MDI aplication, if I mapped OnFileOpen in follow way:
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
after the document file has opened, the application crashes with follow message:
(KERNELBASE.DLL): 0xC0000005: Access Violation.
but only in Release mode ... in Debug mode, everything is going well ...
if I mapped OnFileOpen in follow way:
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
again, everything is going well ... did you meet with this behaviour ? Perhaps you give some hint ... Thank you.
|
|
|
|
|
In a Debug build the compiler performs additional tasks, for instance it zeroes variables you haven't initialized (e.g. WinAPI structs) (in Release build the unitialized data contains garbage).
Have a look at the following CodeProject article: "Surviving the Release Version"[^].
Veni, vidi, vici.
|
|
|
|
|
Check your CMyApp::OnFileOpen() code and the functions that are called from there. Comment all lines in that function except the base class CWinApp::OnFileOpen() call and uncomment step by step until the violation occurs. Then you should know which part of your code is responsible.
|
|
|
|
|
Inside of CMyApp::OnFileOpen I didn't call CWinApp:OnFileOpen .. here is the buggy code:
void CMyApp::OnFileOpen(void)
{
CFileDialog dlgFile(TRUE);
dlgFile.DoModal();
return;
}
and in release mode, the application crashes ...
|
|
|
|
|
Even if I used:
void CMyApp::OnFileOpen(void)
{
CFileDialog dlgFile(TRUE);
return;
}
and the application is crashing down ...
|
|
|
|
|
Crashes it in this function or later?
If you did not call CWinApp::OnFileOpen() , no document is created. So the reason for the crash is probably somewhere in your document creation. Did you call OnFileNew() or use ProcessShellCommands() to create a document?
|
|
|
|
|
No, I didn't call CWinApp::OnFileOpen , but I call OpenDocumentFile(...) , something like that:
void CMyApp::OnFileOpen(void)
{
CFileDialog dlg(TRUE);
if(IDOK == dlg.DoModal())
{
POSITION pos = dlg.GetStartPosition();
while(pos)OpenDocumentFile(dlg.GetNextPathName(pos));
}
AfxMessageBox("By here, everything it's OK.");
}
after all, I think that the problem it's in another place ... I really don't know ...
And this is weird, because if I open the same file from MRU, everything is OK ...
modified 5-Apr-13 5:54am.
|
|
|
|
|
It's difficult to find such errors in release versions. Using a message box is a good idea to check where the violation occurs. Because it occurs when not calling OpenDocumentFile() , I assumed that it is somewhere in the document handling (e.g. trying to access non-existing documents).
But when it is OK using ProcessShellCommands() (MRU)
At the moment I have only two ideas:
- Call
OpenDocumentFile() with a fixed file name to see what happens (no other calls from within OnFileOpen() ). - Perform a complete rebuild if you have changed something in your project.
|
|
|
|
|
This is became strange: if I call only:
OpenDocumentFile(_T("D:\\Flaviu\\SampleImages5\\Test.xxx"));
, everything is OK, but when I go through normal way:
CString strFile;
if (dlgFile.DoModal()==IDOK)
{
pos=dlgFile.GetStartPosition();
while (pos!=NULL)
{
strFile=dlgFile.GetNextPathName(pos);
AfxMessageBox(strFile);
OpenDocumentFile(strFile);
}
}
is crashing down ... in Release mode only ...
I have to digg in ...
|
|
|
|
|
So the problematic code is at least isolated even when it looks OK. As next step you may assign the fixed file name to strFile ignoring the selection from the dialog.
|
|
|
|
|
Another trial:
CString strFile;
if (dlgFile.DoModal()==IDOK)
{
pos=dlgFile.GetStartPosition();
while (pos!=NULL)
{
strFile=dlgFile.GetNextPathName(pos);
AfxMessageBox(strFile);
OpenDocumentFile(strFile);
}
}
AfxMessageBox("Second chance");
OpenDocumentFile(_T("D:\\Flaviu\\SampleImages5\\Test.xxx"));
AfxMessageBox("Final ...");
the crashes is occur only after the "final" message box ...
|
|
|
|
|
Did you try doing a Rebuild All like Jochen suggested?
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
Of course I did ... something weird is happend ... because if I use only CFileDialog dlgFile(TRUE); in CMyApp::OnFileOpen and the application is crashing down .. I wonder if CFileDialog doesn't have some bug ...
|
|
|
|
|
Sorry, I did not mean to insult you, but when something really weird is going on, Rebuild All is a good thing to do. I wanted to make sure you had tried that because just last week, I had a weird string related problem that I was trying to chase down. Rebuild All was not my first thought, so I ended up spending at least an hour trying to make sense of it before I finally did the rebuild, which fixed the problem.
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|