Click here to Skip to main content
16,006,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How do I read raw data from a HD Pin
Michael Dunn7-Apr-01 9:21
sitebuilderMichael Dunn7-Apr-01 9:21 
GeneralRe: How do I read raw data from a HD Pin
Ben Burnett7-Apr-01 9:40
Ben Burnett7-Apr-01 9:40 
GeneralCFile and my class Pin
Ahmad6-Apr-01 23:39
Ahmad6-Apr-01 23:39 
GeneralRe: CFile and my class Pin
AlexMarbus7-Apr-01 6:16
AlexMarbus7-Apr-01 6:16 
GeneralRe: CFile and my class Pin
Michael Dunn7-Apr-01 9:24
sitebuilderMichael Dunn7-Apr-01 9:24 
QuestionDLL newing objects on process heap? Pin
6-Apr-01 16:19
suss6-Apr-01 16:19 
AnswerRe: DLL newing objects on process heap? Pin
Michael Dunn6-Apr-01 18:48
sitebuilderMichael Dunn6-Apr-01 18:48 
GeneralRe: DLL newing objects on process heap? Pin
7-Apr-01 6:52
suss7-Apr-01 6:52 
I believe you are wrong. I have a very simple DLL with the following two
classes and code:

#ifdef BF_EXPORTS
#define BF_API __declspec(dllexport)
#else
#define BF_API __declspec(dllimport)
#endif

// This class is exported from the BF.dll
class BF_API CBar {
      public:
          CBar( void ) {
              m_bFlag = true;
            }
      private: 
          bool m_bFlag;
  };


class BF_API CFoo {
      public:
          CFoo( void ) {
            }

          CBar * MakeBar( void ) {
              CBar * cResult = new CBar();
              return cResult;
            }
  };

I have a very simple console application that uses these two classes and
then deletes the new'd objects:
#include <stdio.h>
#include "BF.h"

int main(int argc, char* argv[])
  {
    CFoo * foo = new CFoo;
    CBar * bar = foo->MakeBar();

    delete bar;
    delete foo;

    return 0;
  }

When built and run Debug, an assert generated in HeapValidate via
_CrtIsValidHeapPointer when the delete of bar is performed.

Brad
AnswerRe: DLL newing objects on process heap? Pin
Tim Deveaux7-Apr-01 13:37
Tim Deveaux7-Apr-01 13:37 
QuestionDirectDraw in a CView -> possible? Pin
Michael Menne6-Apr-01 14:20
Michael Menne6-Apr-01 14:20 
GeneralConverting Pin
Drake Elsari6-Apr-01 13:16
Drake Elsari6-Apr-01 13:16 
GeneralRe: Converting Pin
Erik Thompson6-Apr-01 13:47
sitebuilderErik Thompson6-Apr-01 13:47 
GeneralRe: Converting Pin
Drake Elsari7-Apr-01 13:11
Drake Elsari7-Apr-01 13:11 
GeneralRe: Converting Pin
Erik Thompson7-Apr-01 14:17
sitebuilderErik Thompson7-Apr-01 14:17 
GeneralRe: Converting Pin
AlexMarbus8-Apr-01 3:41
AlexMarbus8-Apr-01 3:41 
GeneralRe: Converting Pin
Ivan Yap4-Dec-01 21:10
Ivan Yap4-Dec-01 21:10 
GeneralConverting Pin
Drake Elsari6-Apr-01 13:15
Drake Elsari6-Apr-01 13:15 
GeneralRe: Converting Pin
Kannan Kalyanaraman6-Apr-01 20:35
Kannan Kalyanaraman6-Apr-01 20:35 
QuestionSet Font size? Pin
Richard Cheng6-Apr-01 12:53
Richard Cheng6-Apr-01 12:53 
GeneralFaster way to do input Pin
Richard Cheng6-Apr-01 11:30
Richard Cheng6-Apr-01 11:30 
GeneralRe: Faster way to do input Pin
Christian Graus6-Apr-01 12:59
protectorChristian Graus6-Apr-01 12:59 
GeneralRemote Control InterDev Pin
Adam Solesby6-Apr-01 8:40
Adam Solesby6-Apr-01 8:40 
General3d object shadow and highlight colour Pin
6-Apr-01 2:40
suss6-Apr-01 2:40 
GeneralRe: 3d object shadow and highlight colour Pin
6-Apr-01 4:07
suss6-Apr-01 4:07 
GeneralStarting a Program from Command Line Pin
5-Apr-01 23:41
suss5-Apr-01 23:41 

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.