Click here to Skip to main content
15,911,786 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Accessing structs in other classes Pin
Steve L.7-May-02 9:00
Steve L.7-May-02 9:00 
GeneralRe: Accessing structs in other classes Pin
Joaquín M López Muñoz7-May-02 9:10
Joaquín M López Muñoz7-May-02 9:10 
GeneralRe: Accessing structs in other classes Pin
Steve L.7-May-02 9:19
Steve L.7-May-02 9:19 
GeneralRe: Accessing structs in other classes Pin
Joaquín M López Muñoz7-May-02 9:21
Joaquín M López Muñoz7-May-02 9:21 
GeneralRe: Accessing structs in other classes Pin
tongc7-May-02 14:11
tongc7-May-02 14:11 
GeneralDetecting Internet access Pin
Neil scsn7-May-02 7:38
Neil scsn7-May-02 7:38 
GeneralRe: Detecting Internet access Pin
Ravi Bhavnani7-May-02 7:43
professionalRavi Bhavnani7-May-02 7:43 
GeneralProblem with opening file... please read. Pin
redeemer7-May-02 7:31
redeemer7-May-02 7:31 
OK. I'm trying to open a file and red the last 128 bytes in it, but if it's the first time i read the file since the computer has been started, it only reads the first three chars. It's strange cause when i then open it right after i have opened it the first time, it works. here's the code:

int GetID3(char *szFile)
{
	HANDLE hFile;
	DWORD dwBytesRead;
	DWORD dwFileSize;
	OVERLAPPED FilePos;
	OVERLAPPED *pFilePos = &FilePos;

	hFile = CreateFile (szFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
	dwFileSize = GetFileSize(hFile, NULL);

	pFilePos->Offset = dwFileSize - 128;
	pFilePos->OffsetHigh = 0;
	pFilePos->hEvent = 0;

	gszID3Tag[0] = '\0';

	ReadFile(hFile, gszID3Tag, 128, &dwBytesRead, pFilePos);

	gszID3Tag[128] = '\0';

	if (dwBytesRead != 128)
		return 0;
	else
		return 1;
}



Can anyone help me?

Thankyou.
GeneralRe: Problem with opening file... please read. Pin
Joaquín M López Muñoz7-May-02 8:03
Joaquín M López Muñoz7-May-02 8:03 
GeneralRe: Problem with opening file... please read. Pin
Paul M Watt7-May-02 8:05
mentorPaul M Watt7-May-02 8:05 
GeneralRe: Problem with opening file... please read. Pin
redeemer7-May-02 8:45
redeemer7-May-02 8:45 
GeneralRe: Problem with opening file... please read. Pin
Joaquín M López Muñoz7-May-02 8:54
Joaquín M López Muñoz7-May-02 8:54 
GeneralRe: Problem with opening file... please read. Pin
redeemer7-May-02 9:18
redeemer7-May-02 9:18 
GeneralRe: Problem with opening file... please read. Pin
Paul M Watt7-May-02 9:07
mentorPaul M Watt7-May-02 9:07 
GeneralRe: Problem with opening file... please read. Pin
Christian Graus7-May-02 11:36
protectorChristian Graus7-May-02 11:36 
QuestionHow do i catch the event when a CheckBox has been clicked? And how do i find out if it's checked or unchecked? Pin
7-May-02 7:20
suss7-May-02 7:20 
AnswerRe: How do i catch the event when a CheckBox has been clicked? And how do i find out if it's checked or unchecked? Pin
Chris Losinger7-May-02 7:30
professionalChris Losinger7-May-02 7:30 
GeneralRe: How do i catch the event when a CheckBox has been clicked? And how do i find out if it's checked or unchecked? Pin
redeemer7-May-02 7:34
redeemer7-May-02 7:34 
GeneralRe: How do i catch the event when a CheckBox has been clicked? And how do i find out if it's checked or unchecked? Pin
Ravi Bhavnani7-May-02 7:39
professionalRavi Bhavnani7-May-02 7:39 
GeneralClipboard notification Pin
User 66587-May-02 7:01
User 66587-May-02 7:01 
GeneralYup Pin
7-May-02 7:22
suss7-May-02 7:22 
Questionwho knows that? Pin
Atilla Selem7-May-02 6:38
Atilla Selem7-May-02 6:38 
AnswerRe: who knows that? Pin
Chris Losinger7-May-02 6:49
professionalChris Losinger7-May-02 6:49 
GeneralDrag and Drop bitmaps !!! Pin
Hadi Rezaee7-May-02 4:56
Hadi Rezaee7-May-02 4:56 
GeneralRe: Drag and Drop bitmaps !!! Pin
Chris Hambleton7-May-02 5:23
Chris Hambleton7-May-02 5:23 

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.