Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hypertext link in about dialog in mfc ? (open new window) Pin
Anonymous22-Sep-02 1:26
Anonymous22-Sep-02 1:26 
GeneralYou and C++ .NET ! Pin
Hadi Rezaee21-Sep-02 9:39
Hadi Rezaee21-Sep-02 9:39 
GeneralRe: You and C++ .NET ! Pin
Mike Nordell21-Sep-02 10:56
Mike Nordell21-Sep-02 10:56 
GeneralRe: You and C++ .NET ! Pin
Michael P Butler21-Sep-02 12:23
Michael P Butler21-Sep-02 12:23 
GeneralI Need help with Reading a binary file Pin
Licensed2Code21-Sep-02 9:31
sussLicensed2Code21-Sep-02 9:31 
GeneralRe: I Need help with Reading a binary file Pin
Todd Smith21-Sep-02 11:53
Todd Smith21-Sep-02 11:53 
GeneralRe: I Need help with Reading a binary file Pin
Licensed2Code21-Sep-02 16:38
sussLicensed2Code21-Sep-02 16:38 
GeneralRe: I Need help with Reading a binary file Pin
Todd Smith23-Sep-02 5:52
Todd Smith23-Sep-02 5:52 
First off you should probably change that to

if (iReadSize <= 0)
    break;


Don't forget to call delete on pBuf when you're done

delete [] pBuf;


You might try adding the share flag

CFile pFile(sFilename, CFile::modeRead | CFile::shareDenyWrite);


If you're getting ASSERT(lpBuf != NULL) then that means that you're doing something to pBuf in your processing stage. If you step through your code you might see that the first Read is successful and that the second Read is where your code is failing because pBuf is now 0.

BYTE is fine. It's the same as

char* pBuf = new char[4096];

Todd Smith
Generalrefereced classes Pin
xai21-Sep-02 6:26
xai21-Sep-02 6:26 
GeneralDoubt in Radiobuttons Pin
arthivjii21-Sep-02 5:07
arthivjii21-Sep-02 5:07 
GeneralRe: Doubt in Radiobuttons Pin
Pavel Klocek21-Sep-02 5:19
Pavel Klocek21-Sep-02 5:19 
GeneralRe: Doubt in Radiobuttons Pin
Brian Delahunty21-Sep-02 6:22
Brian Delahunty21-Sep-02 6:22 
GeneralReplacing chars in CString (hex) Pin
User 665821-Sep-02 4:04
User 665821-Sep-02 4:04 
GeneralRe: Replacing chars in CString (hex) Pin
Pavel Klocek21-Sep-02 4:19
Pavel Klocek21-Sep-02 4:19 
GeneralRe: Replacing chars in CString (hex) Pin
User 665821-Sep-02 4:33
User 665821-Sep-02 4:33 
GeneralRe: Replacing chars in CString (hex) Pin
Pavel Klocek21-Sep-02 4:44
Pavel Klocek21-Sep-02 4:44 
GeneralRe: Replacing chars in CString (hex) Pin
User 665821-Sep-02 5:29
User 665821-Sep-02 5:29 
GeneralRe: Replacing chars in CString (hex) Pin
Pavel Klocek21-Sep-02 5:47
Pavel Klocek21-Sep-02 5:47 
GeneralRe: Replacing chars in CString (hex) Pin
User 665821-Sep-02 5:51
User 665821-Sep-02 5:51 
GeneralRe: Replacing chars in CString (hex) Pin
Pavel Klocek21-Sep-02 6:02
Pavel Klocek21-Sep-02 6:02 
GeneralRe: Replacing chars in CString (hex) Pin
User 665821-Sep-02 6:06
User 665821-Sep-02 6:06 
GeneralRe: Replacing chars in CString (hex) Pin
Pavel Klocek21-Sep-02 6:13
Pavel Klocek21-Sep-02 6:13 
GeneralThank you very much Pin
User 665821-Sep-02 6:15
User 665821-Sep-02 6:15 
GeneralRe: Thank you very much Pin
Pavel Klocek21-Sep-02 6:19
Pavel Klocek21-Sep-02 6:19 
GeneralRe: Replacing chars in CString (hex) Pin
Michael Dunn21-Sep-02 5:53
sitebuilderMichael Dunn21-Sep-02 5:53 

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.