|
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.
|
|
|
|
|
Hi,Everyone:
i'm running a program as form-based, Doc/view struct. i create a thread in the initialization of the
program, and in thread, we use while(1) circulation.
it runs well usually, but we'll get unexpected error dialog, (and program shut down), this is following error
infomation:
"access violation at 0x00000000: read of address 0x00000000". Process Stopped.
Can any one of you give me some suggestions? Thanks!
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
In My CvcydcjDoc Class, i have such kind of memory to store data.
<br />
class CvcydcjDoc : public CDocument<br />
{<br />
protected:
CvcydcjDoc();<br />
DECLARE_DYNCREATE(CvcydcjDoc)<br />
<br />
public:<br />
struct MEM_MEMORY{<br />
int State;
<br />
char szBz[100];
int nCjzcs;
int nSbzcg;
int nZdcjcs;
char szZje[12];
int nCjcgcs;
int nZdcjcgcs;
int nCjymcs;
int nZdcjsbcs;
char szRowid[20];<br />
char szCjzt[2];
<br />
...<br />
<br />
};<br />
<br />
MEM_MEMORY memRead[2000];<br />
and in my thread, i access data using this way:
1. First i get the Doc pointer:
CMainFrame* pMainFrmWnd = (CMainFrame*)AfxGetMainWnd();<br />
ASSERT(pMainFrmWnd != NULL);<br />
CvcydcjView* pMyView = NULL;<br />
CWnd* pchildWnd = pMainFrmWnd->GetWindow(GW_CHILD);<br />
ASSERT(pchildWnd->GetSafeHwnd() != NULL);<br />
pMyView = (CvcydcjView*)pchildWnd;<br />
ASSERT(pMyView != NULL);<br />
CListCtrl* pList = (CListCtrl*)pMyView->getItem(IDC_LIST_DIAL);<br />
CListCtrl* pListMsg = (CListCtrl*)pMyView->getItem(IDC_LIST_MESSAGE);<br />
CStatic* pCjcount = (CStatic*)pMyView->getItem(IDC_CJCOUNT);<br />
CStatic* pCjymcount = (CStatic*)pMyView->getItem(IDC_CJYMCOUNT);<br />
CStatic* pCjcgcount = (CStatic*)pMyView->getItem(IDC_CJCGCOUNT);<br />
CStatic* pCjcscount = (CStatic*)pMyView->getItem(IDC_CJCSCOUNT); <br />
CvcydcjDoc* pMydoc = (CvcydcjDoc*)lp;<br />
then i manipulate that data in this way:
<br />
...<br />
strcpy(pMydoc->memRead[nRecNumber].szCjzjhm,str);<br />
...<br />
i don't know whether it's the problem or not...
Hope someone can help me,,, Thx!
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|