Click here to Skip to main content
15,913,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionClosing an application while it is still busy Pin
cv_k3n28-Jul-06 1:51
cv_k3n28-Jul-06 1:51 
AnswerRe: Closing an application while it is still busy Pin
Naveen28-Jul-06 1:58
Naveen28-Jul-06 1:58 
AnswerRe: Closing an application while it is still busy Pin
Cedric Moonen28-Jul-06 2:00
Cedric Moonen28-Jul-06 2:00 
GeneralRe: Closing an application while it is still busy Pin
cv_k3n28-Jul-06 4:21
cv_k3n28-Jul-06 4:21 
GeneralRe: Closing an application while it is still busy Pin
Eytukan28-Jul-06 7:47
Eytukan28-Jul-06 7:47 
GeneralRe: Closing an application while it is still busy Pin
cv_k3n28-Jul-06 17:03
cv_k3n28-Jul-06 17:03 
QuestionRe: Closing an application while it is still busy Pin
David Crow28-Jul-06 5:00
David Crow28-Jul-06 5:00 
Questiondynamically allocted array question Pin
kitty528-Jul-06 1:22
kitty528-Jul-06 1:22 
if I do:
<br />
#DEFINE BUFF_SIZE 0x400; //# of bytes to read<br />
ULONG *buff = null, numBytesRead = 0;<br />
buff = new ULONG[11250000]; //total of 11,250,000 32-bit words<br />
Handle hdl = INVALID_HANDLE_VALUE;<br />
...<br />
while(...){<br />
   ReadFile(hndlPciAlt, buff, BUFF_SIZE, numBytesRead, NULL); //DMA data xfer<br />
   ...<br />
}<br />
<br />
Where:<br />
BOOl ReadFile(<br />
  HANDLE hFile,<br />
  LPVOID lpBuffer,<br />
  DWORD nNumberOfBytesToRead,<br />
  LPDWORD lpNumberOfBytesRead,<br />
  LPOVERLAPPED lpOverlapped<br />
);<br />
is a windows function.<br />


Questions:
1) So, I pass in the *buff. ReadFile() will dump the data there.
If I do another ReadFile() will it append to the end of *buff?
OR, will it overlap the data already in the *buff, if so,
how do I make subsequent writes into *buff append to the end of it?
2) Does ReadFile() automatically stick each 32-bit word out of the 1024 words it reads into each of the individual array slot of buff? So, that there will be a total of 256 array elements after the 1st call to ReadFile().
3) If "DWORD nNumberOfBytesToRead" is the min number of bytes to read, will
ReadFile() read more bytes if they are available? If so, how can you
limit ReadFile to only read the specified number of bytes?

Kitty5

AnswerRe: dynamically allocted array question Pin
Cedric Moonen28-Jul-06 1:31
Cedric Moonen28-Jul-06 1:31 
GeneralRe: dynamically allocted array question Pin
Steen Krogsgaard28-Jul-06 1:39
Steen Krogsgaard28-Jul-06 1:39 
GeneralRe: dynamically allocted array question Pin
kitty528-Jul-06 2:08
kitty528-Jul-06 2:08 
GeneralRe: dynamically allocted array question Pin
Cedric Moonen28-Jul-06 2:15
Cedric Moonen28-Jul-06 2:15 
GeneralRe: dynamically allocted array question Pin
kitty528-Jul-06 2:26
kitty528-Jul-06 2:26 
AnswerRe: dynamically allocted array question Pin
Steen Krogsgaard28-Jul-06 1:39
Steen Krogsgaard28-Jul-06 1:39 
GeneralRe: dynamically allocted array question Pin
Cedric Moonen28-Jul-06 1:44
Cedric Moonen28-Jul-06 1:44 
GeneralRe: dynamically allocted array question Pin
Steen Krogsgaard28-Jul-06 1:52
Steen Krogsgaard28-Jul-06 1:52 
GeneralRe: dynamically allocted array question Pin
Cedric Moonen28-Jul-06 1:55
Cedric Moonen28-Jul-06 1:55 
AnswerRe: dynamically allocted array question Pin
Zac Howland28-Jul-06 4:58
Zac Howland28-Jul-06 4:58 
QuestionList Control Help need it........................................ Pin
konstantinos_100028-Jul-06 1:08
konstantinos_100028-Jul-06 1:08 
AnswerRe: List Control Help need it........................................ Pin
Naveen28-Jul-06 1:29
Naveen28-Jul-06 1:29 
GeneralRe: List Control Help need it........................................ Pin
konstantinos_100028-Jul-06 5:22
konstantinos_100028-Jul-06 5:22 
GeneralRe: List Control Help need it........................................ Pin
Naveen28-Jul-06 18:47
Naveen28-Jul-06 18:47 
QuestionRe: List Control Help need it........................................ Pin
Hamid_RT28-Jul-06 1:50
Hamid_RT28-Jul-06 1:50 
AnswerRe: List Control Help need it........................................ Pin
konstantinos_100028-Jul-06 2:31
konstantinos_100028-Jul-06 2:31 
GeneralRe: List Control Help need it Pin
Hamid_RT28-Jul-06 3:41
Hamid_RT28-Jul-06 3:41 

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.