Click here to Skip to main content
15,921,531 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: WriteFile / CreateThread Pin
Rajesh R Subramanian5-May-10 0:39
professionalRajesh R Subramanian5-May-10 0:39 
GeneralRe: WriteFile / CreateThread Pin
Fareed Rizkalla5-May-10 0:47
Fareed Rizkalla5-May-10 0:47 
GeneralRe: WriteFile / CreateThread Pin
Rajesh R Subramanian5-May-10 0:53
professionalRajesh R Subramanian5-May-10 0:53 
GeneralRe: WriteFile / CreateThread Pin
Fareed Rizkalla5-May-10 1:17
Fareed Rizkalla5-May-10 1:17 
GeneralRe: WriteFile / CreateThread Pin
enhzflep5-May-10 1:20
enhzflep5-May-10 1:20 
GeneralRe: WriteFile / CreateThread Pin
Rajesh R Subramanian5-May-10 1:37
professionalRajesh R Subramanian5-May-10 1:37 
GeneralRe: WriteFile / CreateThread Pin
enhzflep5-May-10 1:57
enhzflep5-May-10 1:57 
AnswerRe: Error 87, ERROR_INVALID_PARAMETER , has to do with the volume's sector size. Pin
Software_Developer5-May-10 1:45
Software_Developer5-May-10 1:45 
File access must be for numbers of bytes that are integer multiples of the volume's sector size.
For example, if the sector size is 512 bytes, an application can request reads
and writes of 512, 1024, or 2048 bytes, but not of 335, 981, or 7171 bytes.

To determine a volume's sector size, call the GetDiskFreeSpace function.
Or try setting the variable Data in WriteFile(File, Data, (DWORD)BytesReceived, NULL, NULL) to be 512, 1024, or 2048 bytes, for debug purposes.


if (!WriteFile(File, 512, (DWORD)BytesReceived, NULL, NULL))
{
	wchar_t Error[100];
	swprintf(Error, L"Write Error: %d", GetLastError());
	Tu(Error);

	//Tu(L"Write Error!");
}


Asynchronous Disk I/O Appears as Synchronous on Windows NT, Windows 2000, and Windows XP

http://support.microsoft.com/kb/156932


Understanding and Using GetDiskFreeSpace and GetDiskFreeSpaceEx

http://support.microsoft.com/kb/231497
GeneralRe: Error 87, ERROR_INVALID_PARAMETER , has to do with the volume's sector size. Pin
Richard MacCutchan5-May-10 3:30
mveRichard MacCutchan5-May-10 3:30 
GeneralRe: Error 87, ERROR_INVALID_PARAMETER , has to do with the volume's sector size. Pin
Joe Woodbury5-May-10 18:52
professionalJoe Woodbury5-May-10 18:52 
GeneralRe: Error 87, ERROR_INVALID_PARAMETER , has to do with the volume's sector size. Pin
Richard MacCutchan5-May-10 21:19
mveRichard MacCutchan5-May-10 21:19 
GeneralRe: Error 87, ERROR_INVALID_PARAMETER , has to do with the volume's sector size. Pin
Fareed Rizkalla5-May-10 9:05
Fareed Rizkalla5-May-10 9:05 
AnswerRe: WriteFile / CreateThread Pin
Joe Woodbury5-May-10 18:43
professionalJoe Woodbury5-May-10 18:43 
QuestionMemory read - write error Pin
İsmail Kurnaz4-May-10 22:33
İsmail Kurnaz4-May-10 22:33 
AnswerRe: Memory read - write error Pin
Code-o-mat4-May-10 22:47
Code-o-mat4-May-10 22:47 
GeneralRe: Memory read - write error Pin
İsmail Kurnaz4-May-10 23:13
İsmail Kurnaz4-May-10 23:13 
GeneralRe: Memory read - write error Pin
Code-o-mat4-May-10 23:18
Code-o-mat4-May-10 23:18 
QuestionIntel Compiler IA-32 11.0.061 installation question Pin
Chesnokov Yuriy4-May-10 20:15
professionalChesnokov Yuriy4-May-10 20:15 
AnswerRe: Intel Compiler IA-32 11.0.061 installation question Pin
CPallini4-May-10 21:17
mveCPallini4-May-10 21:17 
AnswerRe: Intel Compiler IA-32 11.0.061 installation question Pin
Richard MacCutchan4-May-10 21:19
mveRichard MacCutchan4-May-10 21:19 
GeneralRe: Intel Compiler IA-32 11.0.061 installation question Pin
Fareed Rizkalla5-May-10 0:10
Fareed Rizkalla5-May-10 0:10 
GeneralRe: Intel Compiler IA-32 11.0.061 installation question Pin
Richard MacCutchan5-May-10 0:47
mveRichard MacCutchan5-May-10 0:47 
Questionhow to create dialogs in Console application Pin
manoharbalu4-May-10 19:16
manoharbalu4-May-10 19:16 
AnswerRe: how to create dialogs in Console application Pin
Cedric Moonen4-May-10 20:14
Cedric Moonen4-May-10 20:14 
GeneralRe: how to create dialogs in Console application Pin
manoharbalu4-May-10 20:42
manoharbalu4-May-10 20:42 

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.