Hi,<br><br>Are you sure you've set the connection of the layer to a proper value? Seems like the SDE driver doesn't check for the NULL values before passing that to <span style="font-size: 10pt; font-family: "Courier New";">msDecryptStringTokens.<br>
<br>Best regards,<br><br>Tamas<br></span><br><br><br><div class="gmail_quote">2009/3/6 Murty Maganti <span dir="ltr"><<a href="mailto:MMaganti@oriongis.com">MMaganti@oriongis.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="purple" lang="EN-US">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Hi</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">I could compile from the SDK but have a small issue using the compiled
binaries.  Getting the following error while loading SDE layer</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style=""><span style="font-size: 8pt; font-family: "Courier New";">First-chance exception at 0x7855b66c (msvcr90.dll)
in WindowsFormsApplication1.exe: 0xC0000005: Access violation reading location
0x00000001.</span></p>

<p style=""><span style="font-size: 8pt; font-family: "Courier New";">A first chance exception of type
'System.AccessViolationException' occurred in mapscript_csharp.dll</span></p>

<p style=""><span style="font-size: 8pt; font-family: "Courier New";">An unhandled exception of type
'System.AccessViolationException' occurred in mapscript_csharp.dll</span></p>

<p style=""><span style="font-size: 8pt; font-family: "Courier New";"> </span></p>

<p><span style="font-size: 8pt; font-family: "Courier New";">Additional
information: Attempted to read or write protected memory. This is often an
indication that other memory is corrupt.</span></p>

<p><span style="font-size: 8pt; font-family: "Courier New";"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">And it is happening on this line below</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New"; color: blue;">char</span><span style="font-size: 10pt; font-family: "Courier New";"> *msDecryptStringTokens(mapObj *map, <span style="color: blue;">const</span> <span style="color: blue;">char</span> *in)</span></p>


<p style=""><span style="font-size: 10pt; font-family: "Courier New";">{</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">    <span style="color: blue;">char</span>
*outbuf, *out;</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";"> </span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">    <span style="color: blue;">if</span>
(map == NULL)</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">    {</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">       
msSetError(MS_MISCERR, <span style="color: rgb(163, 21, 21);">"NULL MapObj."</span>,
<span style="color: rgb(163, 21, 21);">"msLoadEncryptionKey()"</span>);</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">        <span style="color: blue;">return</span> NULL;</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">    }</span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";"> </span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New";">    <span style="color: green;">/*
Start with a copy of the string. Decryption can only result in </span></span></p>

<p style=""><span style="font-size: 10pt; font-family: "Courier New"; color: green;">     * a string with
the same or shorter length */</span></p>

<p style=""><b><span style="font-size: 10pt; font-family: "Courier New"; color: red;">=></span></b><span style="font-size: 10pt; font-family: "Courier New";">    <span style="color: blue;">if</span>
((outbuf = (<span style="color: blue;">char</span> *)malloc((strlen(in)+1)*<span style="color: blue;">sizeof</span>(<span style="color: blue;">char</span>))) ==
NULL)</span></p>

<p><span style="font-size: 10pt; font-family: "Courier New";">   
{</span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Any clue on what I could be doing wrong here. </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Thanks</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Murty</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Tamas Szekeres
[mailto:<a href="mailto:szekerest@gmail.com" target="_blank">szekerest@gmail.com</a>] <br>
<b>Sent:</b> Thursday, March 05, 2009 7:10 PM<div class="im"><br>
<b>To:</b> Murty Maganti<br>
<b>Cc:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] Vista + map script question</div></span></p>

</div>

<p> </p>

<p style="margin-bottom: 12pt;"><br>
<br>
<br>
</p><div><div></div><div class="h5">

<div>

<p>2009/3/6 Murty Maganti <<a href="mailto:MMaganti@oriongis.com" target="_blank">MMaganti@oriongis.com</a>></p>

<div>

<div>

<p> </p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Just a quick one. How can I
compile only the mapscript_csharp assembly. Is there any VS project file
available.</span></p>

</div>

</div>

<div>

<p><br>
Hi,<br>
<br>
Just download the most sufficient -dev package (<a href="http://vbkto.dyndns.org:1280/sdk/index.html" target="_blank">http://vbkto.dyndns.org:1280/sdk/index.html</a>)
for your compiler version and issue:<br>
<br>
nmake ms<br>
nmake ms-csharp <br>
<br>
in the Visual Studio Command Prompt.<br>
<br>
<br>
Best regards,<br>
<br>
Tamas<br>
<br>
 </p>

</div>

</div>

<p> </p>

</div></div></div>

</div>


</blockquote></div><br>