EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Long time deadlock during format procedure

Posted: 12/14/2009 01:56:55
by Eugene Mayevski (Team)

We will surely test this. When the developer has time.

Sincerely yours
Eugene Mayevski
Posted: 12/14/2009 02:23:51
by Volodymyr Zinin (Team)

Actually NTFS does such long time writing. I tried the following code and the WriteFile call lasted about 2 minutes.

int main(....)
    HANDLE h = CreateFile( L"c:\\1.txt",
                           GENERIC_WRITE | GENERIC_READ,
                           FILE_SHARE_READ | FILE_SHARE_WRITE,
                           NULL );

    LARGE_INTEGER distanceToMove;
    distanceToMove.QuadPart= (ULONGLONG)7*1024*1024*1024; //7Gb

    b = SetFilePointerEx(h, distanceToMove, NULL, FILE_BEGIN);

    char buf[512];
    DWORD bytesTransferred;
    b = WriteFile(h, buf, 512, &bytesTransferred, NULL);
Posted: 12/21/2009 23:57:15
by Lemon Yang (Standard support level)
Joined: 11/24/2009
Posts: 48

Now I understand. thank you.



Topic viewed 21849 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!