Click here to Skip to main content
15,895,084 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: abstract base class Pin
S. Senthil Kumar15-Oct-05 0:52
S. Senthil Kumar15-Oct-05 0:52 
GeneralRe: abstract base class Pin
toxcct15-Oct-05 1:23
toxcct15-Oct-05 1:23 
QuestionRe: abstract base class Pin
toxcct15-Oct-05 1:42
toxcct15-Oct-05 1:42 
AnswerRe: abstract base class Pin
S. Senthil Kumar15-Oct-05 1:47
S. Senthil Kumar15-Oct-05 1:47 
GeneralRe: abstract base class Pin
toxcct15-Oct-05 1:55
toxcct15-Oct-05 1:55 
AnswerRe: abstract base class Pin
karmendra_js15-Oct-05 0:56
karmendra_js15-Oct-05 0:56 
QuestionCan any one help me to understand IOCP Pin
Member 168985514-Oct-05 23:49
Member 168985514-Oct-05 23:49 
Questionplea for assistance with CByteArray Pin
brian scott14-Oct-05 23:03
brian scott14-Oct-05 23:03 
Hi! I would be most grateful for assistance. I wish to read data from a file into a CByteArray and return the array. So most simplistically, I have tried variants on:
_____

void MyClass::GetData(CString Pathname, int filesize)
{
// get pathname
// get size of file
BYTE* myarray;
myarray=ReadData(Pathname,filesize);
}
//
/////
//
BYTE* MyClass::ReadData(CString Pathname,int filesize)
{
CByteArray array;
array.SetSize(filesize,-1);

FILE* ifile=fopen(Pathname,"rb");
array.SetSize(size);

BYTE *Array = array.GetData();
ZeroMemory(Array,size);

fread(Array,sizeof(BYTE),size,ifile);
//
return Array;
}
//
_______________

I am evidently doing something totally stupid, so would be indebted to anyone who can gently point out what it is and perhaps provide the requisite correction.

Thanks in advance!

Brian

Smile | :) D'Oh! | :doh: Confused | :confused: Smile | :)
AnswerRe: plea for assistance with CByteArray Pin
khan++14-Oct-05 23:21
khan++14-Oct-05 23:21 
GeneralRe: plea for assistance with CByteArray Pin
S. Senthil Kumar15-Oct-05 0:54
S. Senthil Kumar15-Oct-05 0:54 
AnswerRe: plea for assistance with CByteArray Pin
S. Senthil Kumar15-Oct-05 1:00
S. Senthil Kumar15-Oct-05 1:00 
GeneralRe: plea for assistance with CByteArray - compiler errors Pin
brian scott15-Oct-05 1:43
brian scott15-Oct-05 1:43 
Questionhow to import 3D SMax file in VC++? Pin
Anonymous14-Oct-05 22:34
Anonymous14-Oct-05 22:34 
AnswerRe: how to import 3D SMax file in VC++? Pin
The NULL Developer14-Oct-05 22:49
professionalThe NULL Developer14-Oct-05 22:49 
GeneralRe: how to import 3D SMax file in VC++? Pin
Anonymous14-Oct-05 23:41
Anonymous14-Oct-05 23:41 
QuestionListBox Control problem with code Pin
Rahul U Kate14-Oct-05 22:05
Rahul U Kate14-Oct-05 22:05 
Question840723 - overriding an MFC function Pin
ilostmyid214-Oct-05 21:56
professionalilostmyid214-Oct-05 21:56 
AnswerRe: 840723 - overriding an MFC function Pin
khan++14-Oct-05 22:25
khan++14-Oct-05 22:25 
QuestionRe: 840723 - overriding an MFC function Pin
ilostmyid215-Oct-05 2:00
professionalilostmyid215-Oct-05 2:00 
Questionconvert cstring to int Pin
cell5114-Oct-05 21:01
cell5114-Oct-05 21:01 
AnswerRe: convert cstring to int Pin
Prakash Nadar14-Oct-05 21:09
Prakash Nadar14-Oct-05 21:09 
AnswerRe: convert cstring to int Pin
The NULL Developer14-Oct-05 21:17
professionalThe NULL Developer14-Oct-05 21:17 
AnswerRe: convert cstring to int Pin
John R. Shaw14-Oct-05 21:18
John R. Shaw14-Oct-05 21:18 
AnswerRe: convert cstring to int Pin
khan++14-Oct-05 21:19
khan++14-Oct-05 21:19 
QuestionFile Handle(very urgent) Pin
swaapu14-Oct-05 20:59
swaapu14-Oct-05 20:59 

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.