Click here to Skip to main content
15,911,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: creating common memory Pin
Adam Roderick J6-Jul-09 19:29
Adam Roderick J6-Jul-09 19:29 
Questionproblem in deleting dll class object.(scalar deleting destructor) Pin
Member 4048136-Jul-09 16:26
Member 4048136-Jul-09 16:26 
HI, i am having problem with converting my c++ class to dll. The problem is the following.
i have a class that i want to export, there are two private variables in the class, one of them is
a struct. the variables are initialized in the constructor. In my ap, i created a object of my class and then delete it. Looks pretty straight forward, however, when deleting the object i get a error message "Debug Error". If i don't initialize the variables, delete is ok. if i memset the struct variable,i get a "scaler deleting destructor" error. Anyone got any idea why the dll behaves like this?

----------------------------------------AP------------------------------------
CIPCamDll *a = new CIPCamDll();
delete a;


---------------------------------------.h--------------------------------------
#ifdef IPCAMDLL_EXPORTS
#define IPCAMDLL_API __declspec(dllexport)
#else
#define IPCAMDLL_API __declspec(dllimport)
#endif

typedef struct s
{
int abcd;
}s;
class IPCAMDLL_API CIPCamDll {
public:
CIPCamDll(void);
CIPCamDll(char* para_address);
~CIPCamDll(void);

private:
int session_id;
s m_t;
};
--------------------------------------------------------------------------------

--------------------------.cpp---------------------------------------------------
CIPCamDll::CIPCamDll()
{
session_id = 13;
return;
}
CIPCamDll::CIPCamDll(char* para_address)
{
return;
}
CIPCamDll::~CIPCamDll()
{
return;
}
------------------------------------------------.cpp-------------------------------
QuestionRe: problem in deleting dll class object.(scalar deleting destructor) Pin
CPallini6-Jul-09 20:58
mveCPallini6-Jul-09 20:58 
AnswerRe: problem in deleting dll class object.(scalar deleting destructor) Pin
Member 4048136-Jul-09 21:23
Member 4048136-Jul-09 21:23 
AnswerRe: problem in deleting dll class object.(scalar deleting destructor) Pin
Stuart Dootson6-Jul-09 21:19
professionalStuart Dootson6-Jul-09 21:19 
QuestionTurbo C 3.0 OS dev Pin
tuan11116-Jul-09 16:18
tuan11116-Jul-09 16:18 
AnswerRe: Turbo C 3.0 and bmp > 256 color & OS dev Pin
Adam Roderick J6-Jul-09 20:36
Adam Roderick J6-Jul-09 20:36 
QuestionWhat does this mean? Pin
FISH7866-Jul-09 15:16
FISH7866-Jul-09 15:16 
AnswerRe: What does this mean? Pin
messages6-Jul-09 18:20
messages6-Jul-09 18:20 
GeneralRe: What does this mean? Pin
FISH7866-Jul-09 19:20
FISH7866-Jul-09 19:20 
AnswerRe: What does this mean? Pin
Adam Roderick J6-Jul-09 19:46
Adam Roderick J6-Jul-09 19:46 
GeneralRe: What does this mean? Pin
FISH7866-Jul-09 20:10
FISH7866-Jul-09 20:10 
GeneralRe: What does this mean? Pin
Adam Roderick J6-Jul-09 20:32
Adam Roderick J6-Jul-09 20:32 
AnswerRe: What does this mean? Pin
Cedric Moonen6-Jul-09 20:25
Cedric Moonen6-Jul-09 20:25 
Questionconvert BYTE array to BITMAPFILEHEADER Pin
transoft6-Jul-09 12:57
transoft6-Jul-09 12:57 
AnswerRe: convert BYTE array to BITMAPFILEHEADER Pin
«_Superman_»6-Jul-09 17:01
professional«_Superman_»6-Jul-09 17:01 
AnswerRe: convert BYTE array to BITMAPFILEHEADER Pin
CPallini6-Jul-09 20:55
mveCPallini6-Jul-09 20:55 
QuestionUse of TStringList problems Pin
MrKBA6-Jul-09 11:06
MrKBA6-Jul-09 11:06 
AnswerRe: Use of TStringList problems Pin
CPallini6-Jul-09 21:00
mveCPallini6-Jul-09 21:00 
GeneralRe: Use of TStringList problems Pin
MrKBA6-Jul-09 21:06
MrKBA6-Jul-09 21:06 
GeneralRe: Use of TStringList problems Pin
CPallini6-Jul-09 21:52
mveCPallini6-Jul-09 21:52 
GeneralRe: Use of TStringList problems Pin
MrKBA6-Jul-09 22:14
MrKBA6-Jul-09 22:14 
Questionpop up like windows media player minibar(when miniised). Pin
samvaidy6-Jul-09 10:02
samvaidy6-Jul-09 10:02 
AnswerRe: pop up like windows media player minibar(when miniised). Pin
«_Superman_»6-Jul-09 17:05
professional«_Superman_»6-Jul-09 17:05 
QuestionHow To Set TextColor of a Text Control on a Modeless Dialogbox MFC Pin
CodeMacDaddy6-Jul-09 7:59
CodeMacDaddy6-Jul-09 7: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.