|
It gives a message An unsupported operation was performed.
|
|
|
|
|
I am getting this type of error:
validation failed due to OOM or other resource failure
|
|
|
|
|
When an Assertion failed error occurs, try to debug and see exactly the problem happens using the "call stack". This will give you the line that caused the error.
Regards,
Rane
|
|
|
|
|
Can you just tell me where is the call stack. I am new
|
|
|
|
|
When an Assertion failed error occurs,click on the button "Retry" to debug. You will be able to see the "Call Stack" window aside of the output window.If not,Go to Debug ->Windows ->Call Stack to view the call stack.
Regards,
Rane
|
|
|
|
|
I am gettinh this assertion
validation failed due to OOM or other resource failure
|
|
|
|
|
Actually earlier it was not giving any errors. But as soon as i had added few control on class CMainDlg it is giving the errorrs
"Warning: UpdateData failed during dialog init.\n"
|
|
|
|
|
Can you please post us the complete error message/warnings that you are getting during execution?
Regards,
Rane
|
|
|
|
|
I think its giving assertion failure b'coz i have copied controls from other dilaog box and pasted it in my another although i have copied the member variables
|
|
|
|
|
Did you copy code from DoDataExchange()??
I suggest to to read from some book for MFC Cedric has suggested you a very good book.
Regards,
Sandip.
|
|
|
|
|
Sorry I was not copying DoDataExchange Properly
|
|
|
|
|
I think reinstall your vc or repair may work
A Chinese VC++ programmer
|
|
|
|
|
Dhiraj kumar Saini wrote: My code is giving debiug assertion failure...
What line of what file is asserting?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
GetWindowRect solve it directly, however it's not the value SetWindowRect sets.
--------------
I want to reposition some other controls use this height.
Thanks.
system
modified on Monday, September 1, 2008 7:16 AM
|
|
|
|
|
Use GetWindowRect(hWnd,&rect); to get the details of the coordinates for your window and then you can use the variables of rect to get the height using some basic arithmetic
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Monday, September 1, 2008 5:34 AM
|
|
|
|
|
Hi,
I have the following in my code:
#define SIZE 16384
while(buffer_len = fread(buffer, 1, SIZE, src))
It works fine till the SIZE doesn't exceed 16K, but when i use 131072 for SIZE's value fread returns 0 on the first call, and it isn't eof.
But while I debug it and use:
call fread(buffer, 1, 131072, src)
it returns 131072 and the buffer is OK.
May be I'm missing some compilations flag?
I'm using GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh) on Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
Thanks.
|
|
|
|
|
Evgeni57 wrote: I'm using GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh) on Red Hat Enterprise Linux AS release 4 (Nahant
Why are you posting on the Visual C++ / MFC Forum then?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
fread returns the number of full items actually read, which may be less than count if an error occurs or if the end of the file is encountered before reaching count. Use the feof or ferror function to distinguish a read error from an end-of-file condition. If size or count is 0, fread returns 0 and the buffer contents are unchanged.
|
|
|
|
|
Hi all
I am new in vc++.I hava application which have one dailog box A.And now i am inserting a new dailog B.And i want to show out of A on B list Box .Plz help me
|
|
|
|
|
|
Hi all,
This is my thread below:
static DWORD WINAPI Thread_no_1( LPVOID lpParam )
{
static CUpdateServiceModule *p;
CSiteCode m_CSiteCode;
RMproduct* MPoint = new RMproduct(L"ManagePoint",ManagepointService, ManagepointVersion);
if (p->isPrdInstalled(MPoint))
{
p->GetVersion(MPoint);
MPoint->m_SiteCode = m_CSiteCode.GetMPSiteCode(MPoint->m_SerialNo.c_str());
p->m_pWebServiceSoap = new LSWebServiceSoap;
p->dloadAvailable = p->DoCheckForProductUpdates(MPoint);
if(p->dloadAvailable)
{
p->GetUpdate(MPoint);
}
}
delete MPoint;
delete p->m_pWebServiceSoap;
delete p;
return 0;
}
The bold part is crashing that is declared as private inside the class:
private :
//Webservice
LSWebServiceSoap *m_pWebServiceSoap;
I have tried putting it inside the constructor but it crashes there, what do you guys suggest? I also tried initializing a new instance of the class which causes crashing right away inside the thread so i just made a pointer then initialize the m_pWebServiceSoap however it still crashes when i make an instance of it.
Please help.
Thanks,
Jayjay
|
|
|
|
|
try it again after add the ::CoInitialize(NULL); before "p->m_pWebServiceSoap = new LSWebServiceSoap;"
【成功就是在跌倒之后还能爬起来...】
|
|
|
|
|
Hi McKay
This is what i did:
p->GetVersion(MPoint);
MPoint->m_SiteCode = m_CSiteCode.GetMPSiteCode(MPoint->m_SerialNo.c_str());
::CoInitialize(NULL);
p->m_pWebServiceSoap = new LSWebServiceSoap;
p->dloadAvailable = p->DoCheckForProductUpdates(MPoint);
if(p->dloadAvailable)
{
p->GetUpdate(MPoint);
It still crashes. Any other advise? should i instantiate a new p like
static CUpdateServiceModule *p = new CUpdateServiceModule; ?
Thanks,
Jayjay
|
|
|
|
|
Oh,I known, it crashes because the point "p" is not initalize,
(static CUpdateServiceModule *p;// = new CUpdateServiceModule;)
you should new the class before you user the "if (p->isPrdInstalled(MPoint))",
you should add the line "static CUpdateServiceModule *p = new CUpdateServiceModule; ".
try it again ,pls.
【成功就是在跌倒之后还能爬起来...】
You can run far. You can take your small precautions. But have you really gotten away? Can you ever escape? Or is the truth that you do not have the strength or cunning to hide from destiny. But the world is not small, you are. And fate can find you anywhere.
|
|
|
|
|
Hi Mckay,
Whenever I try making a new instance of the class i get this error:
---------------------------
Microsoft Visual C++ Debug Library
---------------------------
Debug Assertion Failed!
Program: ...
File: c:\program files\microsoft visual studio 8\vc\atlmfc\include\atlbase.h
Line: 2706
Expression: _pAtlModule == 0
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts.
(Press Retry to debug the application)
---------------------------
Abort Retry Ignore
---------------------------
at:
class ATL_NO_VTABLE CAtlModule : public _ATL_MODULE
{
public :
static GUID m_libid;
IGlobalInterfaceTable* m_pGIT;
CAtlModule() throw()
{
ATLASSERT(_pAtlModule == NULL);
Is there a way to counter this or solve this?
Thanks,
Jayjay
|
|
|
|