|
Hi Mr. Arjun
at what point you are getting the debug assertion i.e. during receiving or parsing.
i think it is at the time of parsing,it ususal programmer break the boundry of MS collection arrays.
as assertion is not applicable in RELEASE MODE, thats why i ask you to Build in relase Mode (though it bad programming habit to test the product in release mode),but it surely tell you where you getting error.
hope yuo understand.
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi Alok,
When I try to run it in release mode then it gives me 462 build errors.Most/all of them look like this.
NewMumsEngine error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall bad_cast::bad_cast(char const *)" (__imp_??0bad_cast@@QAE@PBD@Z)
The debug assertion failure that i get is a run time error...but in the release mode i get so many errors(build/compile),i cannot even get the project to run,can u help me clear these errors then please
Thanks,
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
This error occurs during the parsing pahse of the program. The recieved msg is broken down, and strings are created for every sentence/statement and then these strings are resolved.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
So have you stepped into the GetAt() method to see why the assertion is firing?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
No actually when I run the statement
pVar = (CVarData*) m_arrayVariables.GetAt(iVarIndex);
where CVarData* pVar;
Then suddenly I am thrown this debug assertion failure window. Please read my first qeury in the thread, and help me if you can.
Thanks
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
Yes I did read your post, hence my suggestion. Until you step into the GetAt() method and see which assertion is firing and why, you always be left wondering.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
aj1682 wrote:
pVar = (CVarData*) m_arrayVariables.GetAt(iVarIndex);
I can't be absolutely sure but the times that I have gotten that assertion is whan I was trying to GetAt and element that didn't exist. So. Make sure that iVarIndex is within the bounds of the array.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
I cannot be too sure but as far as I know the iVarindex is correct,because at this particular instance it shows a value of "0",so i guess it cannot be beyond the bounds.
Can anyone tell me what this method GetAt actually does?,What it returns,where it Getsfrom etc.
Thanks,
Arjun.
Arjun Mukherjee
Software Engineer
Hewlett Packard
|
|
|
|
|
aj1682 wrote:
Can anyone tell me what this method GetAt actually does?,What it returns,where it Getsfrom etc.
You are talking about the function CPtrArray::GetAt(), right? Then reading the relevant MSDN entry will help you more than anyone of us possibly could.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
hello,
i want to enum the drivers loaded in the system,and get some information of the drivers,such as the device name etc,i think maybe that is a list?
thanks
|
|
|
|
|
Look for these apis
_getdrive
Once upon a time i created a wrapper for the Drives Enumertaion and for other information, but due to my poor english i am unable to document it enough.I will try to redocument whole article some day.......
may be you be able to use that Wrapper Class Easily,it can be found here[^]
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
He is looking for device drivers, not drives.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
As Usual I am Confuse. Sorry for giving wrong INFO
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
|
I am writing an application in Embedded C++ 4.0 for a PocketPC and have run into a problem. I am retrieving 4 bytes of data from a PLC (Programmable Logic Controller) via a custom written winsock based interface. These 4 bytes (32 bits) are a IEEE real number. I am trying to get these 4 bytes into a C++ float type. they are currently in a buffer array i.e. DataBuff[0],[1],[2],[3]
The PLC is an AutomationDirect DL06.
Greg Keys
|
|
|
|
|
I think you would have more precision if you used a double instead.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
The precision is not the issue. In the PLC there is only one kind of real number; IEEE 32 bit. The problem I have is that I have 4 chars full of bits, in the right format for a type float, but c++ will not let you do bit manipulation of a float. I need to get this bit pattern into a type real.
Greg Keys
|
|
|
|
|
Try this :
float f;
memcpy( &f, DataBuff, sizeof( float ) );
if the byte order is wrong then swap them in DataBuff since it holds the individual bytes.
|
|
|
|
|
OF COURSE!!!!! (slapping self in forhead) That does the trick....
Thanks much
Greg Keys
|
|
|
|
|
how can i emulation available serial com?
can i emulate serial com from my vc++ project?
|
|
|
|
|
www.codeproject.com/useritems/serial_portsenum_fifo.asp
|
|
|
|
|
I want to create a dll which could return several results by parameters, like API function?
Then VB program could visit the function in dll and get multi results.
How to do it?
Thanks!
|
|
|
|
|
Hi,
I suggest to you use COM programming. The COM Technology can use ATL com methods as well as Win32 API Programming. It will returns result can use any programming language(like VB, C, C++).
Regards,
Selvam
|
|
|
|
|
I have not worked with messaging between windows.
If I have a modeless dialog serving as the main window of an app that opens another modeless dialog, how do I notify the main window when the modeless child window has been closed?
|
|
|
|
|
Put the window handle of the parent modeless dialog into a member variable of the child modeless dialog's class.
When the child modeless dialog is closing, capture the events with handlers, such as WM_CLOSE, WM_DESTROY, etc. In those handler,s post a registered window message to the parent window that informs the parent the child is closing.
That should work VERY well.
|
|
|
|