Click here to Skip to main content
15,914,016 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need advise on getting back to the newly added record using AddNew Pin
ramki kicha12-Mar-03 19:28
sussramki kicha12-Mar-03 19:28 
QuestionAnyone explain why this causes a BSOD? Pin
Ray Cassick11-Mar-03 10:40
Ray Cassick11-Mar-03 10:40 
AnswerRe: Anyone explain why this causes a BSOD? Pin
Christian Graus11-Mar-03 10:47
protectorChristian Graus11-Mar-03 10:47 
AnswerRe: Anyone explain why this causes a BSOD? Pin
David Wulff11-Mar-03 11:03
David Wulff11-Mar-03 11:03 
GeneralRe: Anyone explain why this causes a BSOD? Pin
Ray Cassick11-Mar-03 11:10
Ray Cassick11-Mar-03 11:10 
GeneralRe: Anyone explain why this causes a BSOD? Pin
David Wulff11-Mar-03 11:20
David Wulff11-Mar-03 11:20 
GeneralRe: Anyone explain why this causes a BSOD? Pin
Ray Cassick11-Mar-03 11:29
Ray Cassick11-Mar-03 11:29 
Generalaccess violation when trying to use fwrite() Pin
Kuniva11-Mar-03 9:36
Kuniva11-Mar-03 9:36 
I wrote a function to write an integer to a file (i also wrote a function to write a string to a file, which works almost exactly the same way) but windows gives me an access violation error on it or something (the string function works fine btw, so its not the file mode etc.).
Here's the code:
int WriteInt(int Int, long pos)
{
    if(fseek(npf, pos, SEEK_SET))
    {
        return -1;
    }
    int numwritten = fwrite((void*)Int, sizeof(int), 1, npf);
    if(numwritten!=1)
    {
        return -1;
    }
    return 1;
}


npf is a valid open file stream to which i CAN write strings etc.
Any ideas why this wont work?

Kuniva
--------------------------------------------
GeneralRe: access violation when trying to use fwrite() Pin
Dave Bryant11-Mar-03 9:41
Dave Bryant11-Mar-03 9:41 
GeneralRe: access violation when trying to use fwrite() Pin
Kuniva11-Mar-03 9:50
Kuniva11-Mar-03 9:50 
GeneralCF_HTML (HTML Format) Pin
Kant11-Mar-03 9:34
Kant11-Mar-03 9:34 
GeneralRe: CF_HTML (HTML Format) Pin
Brian Shifrin11-Mar-03 16:40
Brian Shifrin11-Mar-03 16:40 
GeneralDecimal Symbol Pin
Haakon S.11-Mar-03 9:12
Haakon S.11-Mar-03 9:12 
GeneralRe: Decimal Symbol Pin
brianwelsch12-Mar-03 9:47
brianwelsch12-Mar-03 9:47 
GeneralRe: Decimal Symbol Pin
Haakon S.12-Mar-03 11:09
Haakon S.12-Mar-03 11:09 
GeneralRe: Decimal Symbol Pin
PJ Arends12-Mar-03 10:08
professionalPJ Arends12-Mar-03 10:08 
GeneralRe: Decimal Symbol Pin
Haakon S.12-Mar-03 10:59
Haakon S.12-Mar-03 10:59 
Generalmfc ActiveX control install issue Pin
work_to_live11-Mar-03 9:04
work_to_live11-Mar-03 9:04 
GeneralRe: mfc ActiveX control install issue Pin
Dave Bryant11-Mar-03 9:38
Dave Bryant11-Mar-03 9:38 
GeneralRe: mfc ActiveX control install issue Pin
work_to_live11-Mar-03 11:59
work_to_live11-Mar-03 11:59 
GeneralPassing Variables from Macromedia Director to C++ Pin
moojuice11-Mar-03 9:03
moojuice11-Mar-03 9:03 
GeneralRe: Passing Variables from Macromedia Director to C++ Pin
moojuice13-Mar-03 7:24
moojuice13-Mar-03 7:24 
QuestionDoes this code leaks memory? Pin
Joan M11-Mar-03 8:49
professionalJoan M11-Mar-03 8:49 
AnswerRe: Does this code leaks memory? Pin
Tim Smith11-Mar-03 8:56
Tim Smith11-Mar-03 8:56 
GeneralRe: Does this code leaks memory? Pin
Daniel Turini11-Mar-03 9:00
Daniel Turini11-Mar-03 9: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.