Click here to Skip to main content
16,019,055 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CDBException while accessing slq server database using CDatabase class Pin
Cyber Friend23-Feb-07 0:09
Cyber Friend23-Feb-07 0:09 
Questionwindows keyboard hook / postmessage / sendmessage Pin
viral_umang@hotmail.com22-Feb-07 3:25
viral_umang@hotmail.com22-Feb-07 3:25 
AnswerRe: windows keyboard hook / postmessage / sendmessage Pin
Cedric Moonen22-Feb-07 3:32
Cedric Moonen22-Feb-07 3:32 
GeneralRe: windows keyboard hook / postmessage / sendmessage Pin
viral_umang@hotmail.com22-Feb-07 4:07
viral_umang@hotmail.com22-Feb-07 4:07 
GeneralRe: windows keyboard hook / postmessage / sendmessage Pin
Cedric Moonen22-Feb-07 4:17
Cedric Moonen22-Feb-07 4:17 
AnswerRe: windows keyboard hook / postmessage / sendmessage Pin
AprNgp22-Feb-07 6:26
AprNgp22-Feb-07 6:26 
QuestionReading text file.. Code works but how to include with rest program ? Pin
Software_Specialist22-Feb-07 3:00
Software_Specialist22-Feb-07 3:00 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Programm3r22-Feb-07 3:41
Programm3r22-Feb-07 3:41 
Why not use the ReadFile function instead?
BOOL ReadFile(
  HANDLE hFile,                // handle of file to read
  LPVOID lpBuffer,             // pointer to buffer that receives data
  DWORD nNumberOfBytesToRead,  // number of bytes to read
  LPDWORD lpNumberOfBytesRead, // pointer to number of bytes read
  LPOVERLAPPED lpOverlapped    // pointer to structure for data
);

I.E.

HANDLE hFile;
char buffer[BUFSIZE];
DWORD dwBytesWritten;
BOOL fSuccess;

hFile = CreateFile(TEXT("C:\\test.txt"),	
		GENERIC_WRITE,					
		0,						
		NULL,						
		CREATE_ALWAYS,					
		FILE_ATTRIBUTE_NORMAL,				
		NULL);						
	
// file(test.txt) should have text in it						

fSuccess = ReadFile(hFile,
                buffer,
                strlen(buffer)+1,
                &dwBytesWritten,
                NULL);


http://msdn2.microsoft.com/en-us/library/aa365467.aspx[^]

When you have all the data in the lpBuffer you can add it to each structure variable.
This is just a suggestion ....
Regards,

The only programmers that are better than C programmers are those who code in 1's and 0's..... Smile | :)

Smile | :) Programm3r

QuestionRe: Reading text file.. Code works but how to include with rest program ? Pin
David Crow22-Feb-07 5:56
David Crow22-Feb-07 5:56 
GeneralRe: Reading text file.. Code works but how to include with rest program ? Pin
Mark Salsbery22-Feb-07 7:09
Mark Salsbery22-Feb-07 7:09 
QuestionDetection of USB device Pin
Vjys22-Feb-07 2:18
Vjys22-Feb-07 2:18 
QuestionExact Difference between an Abstract Class and Interface in COM. Pin
uday kiran janaswamy22-Feb-07 1:11
uday kiran janaswamy22-Feb-07 1:11 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
Cedric Moonen22-Feb-07 1:21
Cedric Moonen22-Feb-07 1:21 
GeneralRe: Exact Difference between an Abstract Class and Interface in COM. Pin
uday kiran janaswamy22-Feb-07 1:34
uday kiran janaswamy22-Feb-07 1:34 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
prasad_som22-Feb-07 1:35
prasad_som22-Feb-07 1:35 
GeneralRe: Exact Difference between an Abstract Class and Interface in COM. Pin
Cedric Moonen22-Feb-07 1:49
Cedric Moonen22-Feb-07 1:49 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM. Pin
prasad_som22-Feb-07 1:54
prasad_som22-Feb-07 1:54 
AnswerRe: Exact Difference between an Abstract Class and Interface in COM [modified]. Pin
CPallini22-Feb-07 1:59
mveCPallini22-Feb-07 1:59 
QuestionVc++ pore toolkit Pin
Satheeshkumar_Balakrishnan21-Feb-07 23:51
Satheeshkumar_Balakrishnan21-Feb-07 23:51 
AnswerRe: Vc++ pore toolkit Pin
Cedric Moonen21-Feb-07 23:55
Cedric Moonen21-Feb-07 23:55 
GeneralRe: Vc++ pore toolkit Pin
Reagan Conservative22-Feb-07 3:16
Reagan Conservative22-Feb-07 3:16 
GeneralRe: Vc++ pore toolkit Pin
Cedric Moonen22-Feb-07 3:30
Cedric Moonen22-Feb-07 3:30 
AnswerRe: Vc++ pore toolkit Pin
Hamid Taebi22-Feb-07 0:47
professionalHamid Taebi22-Feb-07 0:47 
QuestionDrag and Drop Pin
Try21-Feb-07 22:19
Try21-Feb-07 22:19 
AnswerRe: Drag and Drop Pin
prasad_som22-Feb-07 3:00
prasad_som22-Feb-07 3:00 

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.