Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: C++ Help Needed Pin
Joaquín M López Muñoz7-Nov-02 9:25
Joaquín M López Muñoz7-Nov-02 9:25 
GeneralRe: C++ Help Needed Pin
Anonymous7-Nov-02 9:34
Anonymous7-Nov-02 9:34 
GeneralRe: C++ Help Needed ( more info on it) Pin
Anonymous7-Nov-02 9:41
Anonymous7-Nov-02 9:41 
GeneralRe: C++ Help Needed ( more info on it) Pin
Tim Smith7-Nov-02 9:59
Tim Smith7-Nov-02 9:59 
GeneralRe: C++ Help Needed ( more info on it) Pin
Anatari7-Nov-02 10:38
Anatari7-Nov-02 10:38 
GeneralRe: C++ Help Needed ( more info on it) Pin
Anonymous7-Nov-02 11:05
Anonymous7-Nov-02 11:05 
GeneralRe: C++ Help Needed ( more info on it) Pin
Christian Graus7-Nov-02 12:04
protectorChristian Graus7-Nov-02 12:04 
GeneralRe: C++ Help Needed Pin
nde_plume7-Nov-02 13:23
nde_plume7-Nov-02 13:23 
Either you or the API is mistaken. I suspect what
has happened is that you are misreading the API
and rather than taking a char it takes a char*,
but that is only a guess, it is hard to determine
without seeing it.

If that is the case you need to read the file
into a malloced (or new-ed) block of memory,
and pass that block to the API:

char * block;
CFile file;
file.Open("filename.txt", CFile::modeRead);
size_t size = file.GetFileSize();
block = new char[size];
file.Read(block, size);
file.Close();
API_FUNCTION(block); // Call your API function here
delete[] block;

Is roughly correct off the top of my head
(I could have got some of the parameters wrong
or the function names wrong.)

However, if something like that doesn't work
you'll have to tell us more about the API before
we can help you.

Generaldialog Pin
Anonymous7-Nov-02 9:20
Anonymous7-Nov-02 9:20 
GeneralRe: dialog Pin
Anonymous7-Nov-02 9:24
Anonymous7-Nov-02 9:24 
GeneralRe: dialog Pin
Joaquín M López Muñoz7-Nov-02 9:24
Joaquín M López Muñoz7-Nov-02 9:24 
GeneralRe: dialog Pin
pnpfriend7-Nov-02 12:00
pnpfriend7-Nov-02 12:00 
GeneralRe: dialog Pin
Joaquín M López Muñoz7-Nov-02 12:05
Joaquín M López Muñoz7-Nov-02 12:05 
GeneralRe: dialog Pin
pnpfriend8-Nov-02 3:28
pnpfriend8-Nov-02 3:28 
GeneralC++ Help Needed Pin
Anonymous7-Nov-02 9:19
Anonymous7-Nov-02 9:19 
GeneralRe: C++ Help Needed Pin
Marc Clifton7-Nov-02 9:23
mvaMarc Clifton7-Nov-02 9:23 
QuestionMulti-View Single Doc example? Pin
Nick Jacobs7-Nov-02 9:10
Nick Jacobs7-Nov-02 9:10 
GeneralSAPI Pin
Anonymous7-Nov-02 9:14
Anonymous7-Nov-02 9:14 
Generalvirtual function confusion VTABLE Pin
ns7-Nov-02 8:47
ns7-Nov-02 8:47 
GeneralRe: virtual function confusion VTABLE Pin
Tim Smith7-Nov-02 8:51
Tim Smith7-Nov-02 8:51 
GeneralRe: virtual function confusion VTABLE Pin
ns7-Nov-02 8:59
ns7-Nov-02 8:59 
GeneralRe: virtual function confusion VTABLE Pin
Tim Smith7-Nov-02 10:03
Tim Smith7-Nov-02 10:03 
GeneralRe: virtual function confusion VTABLE Pin
Joaquín M López Muñoz7-Nov-02 8:48
Joaquín M López Muñoz7-Nov-02 8:48 
GeneralRe: virtual function confusion VTABLE Pin
ns7-Nov-02 9:02
ns7-Nov-02 9:02 
GeneralRe: virtual function confusion VTABLE Pin
Joaquín M López Muñoz7-Nov-02 9:04
Joaquín M López Muñoz7-Nov-02 9:04 

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.