[C++-sig] vc++ assertion error upon runtime

hitesh dhiman hitesh.dhiman.1988 at gmail.com
Mon Mar 22 02:44:06 CET 2010


Hi Jim,
Well, the code's rather official, so i won't be able to give the exact
details, but here's the code simplified:

CFunctionRequest( pData, (DWORD*)&ucmmReq.len)
 where pData is BYTE    pData[512];
and
 typedef struct
{
int len;
char* data;
} Data;
with Data    ucmmReq

The definition for the CFunctionRequest is CFunctionRequest(BYTE* pRequest,
DWORD* pLength)
This is where the problem occurs. Above this, it works fine.
Do let me know if some more info is needed.
Thanks.

On Fri, Mar 19, 2010 at 2:50 PM, Jim Bosch <talljimbo at gmail.com> wrote:

> On Fri, 2010-03-19 at 14:45 +0800, hitesh dhiman wrote:
> > Hi all,
> > I'm  trying to gain access to functions that use pointers as
> > arguments. I have written the wrapper file that converts the arguments
> > into pointers. The compilation works successfully, but when i try to
> > run the code from python, it gives an assertion error:
> > Debug Assertion Failed!
> > Expression: Vector subscript out of range
> >
> >
> > Surprisingly, this error only occurs when a particular function is
> > called, Until that point, the code works perfectly.
> >
> >
> > Could someone guide me what to do??
>
> You'll need to provide some more information.  Could you post a
> simplified version of your code that demonstrates the problem?
>
> Jim
>
>
>
>
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>



-- 
Regards,
Hitesh Dhiman
Electrical Engineering
National University of Singapore
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20100322/92229b63/attachment.html>


More information about the Cplusplus-sig mailing list