|
Hi All,
please suggest me how to avoid memory leak ADO.
|
|
|
|
|
voorugonda prashanth wrote: please suggest me how to avoid memory leak ADO.
Free the memory you've allocated?
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
If I voted messages, I'd give you a five. Of course, I'd also like to add that he should consider other employment opportunities after that kind of question...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: Of course, I'd also like to add that he should consider other employment opportunities after that kind of question...
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|
|
I have created a Visual Studio.NET 2003 project using MFC. It's a gaming project. If I execute this project a window opens. After completing all the gaming operations,if I close the window, an exception occurs stating that
'Unhandled exception at 0x7c918fea in Perspective.exe: 0xC0000005: Access violation writing location 0x00000010.'
This exception occurs under both Debug and Release modes.
When I break this exception, it goes to a class free.c which is not created by me.
How to resolve this exception?
|
|
|
|
|
As error says, its due to access violation. And that is due to your code.
Can you post relevent code ?
|
|
|
|
|
Follow the call stack until you find a function that you wrote. And there you will find the cause of the problem.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
When you get a crash when accessing location 0 or something near 0, it means you're dereferencing a null pointer.
|
|
|
|
|
I think your problem is of pointers.
|
|
|
|
|
T.RATHA KRISHNAN wrote: Unhandled exception at 0x7c918fea in Perspective.exe: 0xC0000005: Access violation writing location 0x00000010.'
you tried to called something on NULL pointer without providing it memory
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
Hello,
How do I assign a value to an object of type CDBVariant?Especially if the data type is string.
CDBVariant b;
CString str;
b.m_dwtype = DBVT_STRING;
b.m_pstring = str;
but in the union of CDBVariant m_pstring is pointer to string.so what has to be done?
Thanks
Pritha
|
|
|
|
|
prithaa wrote: b.m_pstring = str
Pass address of string.
CDBVariant b;
CString str;
b.m_dwtype = DBVT_STRING;
b.m_pstring = &str;
|
|
|
|
|
Hello,
So I need to maintain the CString variable so that the pointer has a meaning .I cannot destroy the the CString object or create the object locally ? i.e
Thanks for your reply Prasad
Prithaa
|
|
|
|
|
|
prithaa wrote: b.m_pstring = str;
instead use
b.m_pstring = new CString(str);
the destructor of the CDBVariant will delete this newly created CString.
nave
|
|
|
|
|
Hi,
I am developing a application in which i need to convert the .DWG/.BMP image files into PNG image file format. Can anybody help me to this in VC++ ?
Thanks in Advance !!
Jiteen
|
|
|
|
|
See http://www.wotsit.org[^] for info about graphic files.If you want to save file you can read bmp or png(not dwg)file with CImage class and use of CImage::Save but for dwg I think you need to lot of work.;)
|
|
|
|
|
Thanks a lot sir !!
Jiteen
|
|
|
|
|
You're welcome
|
|
|
|
|
how to add checkboxs for multiple coloumns in listview..
LVS_EX_CHECKBOXES is working for only one coloumn.......
|
|
|
|
|
|
pavan_sw wrote: how to add checkboxs for multiple coloumns in listview..
LVS_EX_CHECKBOXES is working for only one coloumn...
CLIstCtrl::ModifyStyleEx
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and you
|
|
|
|
|
How to make ON_ENCHANGE message Map returning an int or CSize?
I have added this in the header file:
afx_msg int OnEnChangeEditmessage();
The message map I added was :
ON_EN_CHANGE(IDC_EDITMESSAGE, _OnEnChangeEditmessage)
My message handling function is:
int CPreferences::OnEnChangeEditmessage()
{
CPaintDC *pDC;
CSize size;
size = pDC->GetTextExtent(m_strMessage);
return size.cx;
}
ikikhjkhjkhjkhj
|
|
|
|
|
Typecast OnEnChangeEditmessage in ON_EN_CHANGE(IDC_EDITMESSAGE, OnEnChangeEditmessage) to the original prototype.
Come online at:-
jubinc@skype
|
|
|
|
|
Stop! Wrong way.
All message handlers that are put inside the message map have specific declarations.
In your case the prototype shall look like this, the identifier name excepted:
afx_msg void OnEnChangeEditMessage(); You cannot change the return type for message handlers. You have to solve whatever problem you're having in another way. All message handlers in Win32 always return an LRESULT . In MFC this is hidden so MFC message handlers for windows returns void , like above. But if you write a message handler for a user defined message you still have to return an LRESULT , even when using MFC.
Describe your problem if you want suggestions for alternative solutions.
"It's supposed to be hard, otherwise anybody could do it!" - selfquote
|
|
|
|