Hi Jim,<div>Well, the code&#39;s rather official, so i won&#39;t be able to give the exact details, but here&#39;s the code simplified:</div><div><br></div><div>CFunctionRequest( pData, (DWORD*)&amp;ucmmReq.len)</div><div>
 where pData is BYTE    pData[512];</div><div>and</div><div> typedef struct<div>{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int len;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>char* data;</div>
<div>} Data;</div>with Data    ucmmReq</div><div><br></div><div>The definition for the CFunctionRequest is CFunctionRequest(BYTE* pRequest, DWORD* pLength)</div><div>This is where the problem occurs. Above this, it works fine. </div>
<div>Do let me know if some more info is needed.</div><div>Thanks.</div><div><br><div class="gmail_quote">On Fri, Mar 19, 2010 at 2:50 PM, Jim Bosch <span dir="ltr">&lt;<a href="mailto:talljimbo@gmail.com">talljimbo@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On Fri, 2010-03-19 at 14:45 +0800, hitesh dhiman wrote:<br>
&gt; Hi all,<br>
&gt; I&#39;m  trying to gain access to functions that use pointers as<br>
&gt; arguments. I have written the wrapper file that converts the arguments<br>
&gt; into pointers. The compilation works successfully, but when i try to<br>
&gt; run the code from python, it gives an assertion error:<br>
&gt; Debug Assertion Failed!<br>
&gt; Expression: Vector subscript out of range<br>
&gt;<br>
&gt;<br>
&gt; Surprisingly, this error only occurs when a particular function is<br>
&gt; called, Until that point, the code works perfectly.<br>
&gt;<br>
&gt;<br>
&gt; Could someone guide me what to do??<br>
<br>
</div>You&#39;ll need to provide some more information.  Could you post a<br>
simplified version of your code that demonstrates the problem?<br>
<br>
Jim<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org">Cplusplus-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Regards,<br>Hitesh Dhiman<br>Electrical Engineering<br>National University of Singapore<br>
</div>