<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:sans-serif;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p
        {mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman";}
tt
        {font-family:"Courier New";}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I’m still using MS Visual C++  6.0. 
It’s strange that everything seems to work fine except this one
routine.  <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> shapelib-bounces@lists.maptools.org
[mailto:shapelib-bounces@lists.maptools.org] <b><span style='font-weight:bold'>On
Behalf Of </span></b>David.Gancarz@ci.orlando.fl.us<br>
<b><span style='font-weight:bold'>Sent:</span></b> Friday, June 16, 2006 12:04
PM<br>
<b><span style='font-weight:bold'>To:</span></b> Shapelib Development<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Shapelib] help with
SHPWriteObject</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
</span></font><font size=2 face=sans-serif><span style='font-size:10.0pt;
font-family:sans-serif'>Jeff:  Are you using the .NET bindings?  If
so, there is a newer version that resolves some errors in the binding.</span></font>
<br>
<br>
<font size=2 face=sans-serif><span style='font-size:10.0pt;font-family:sans-serif'>David
Gancarz</span></font> <br>
<br>
<o:p></o:p></p>

<table class=MsoNormalTable border=0 cellpadding=0 width="100%"
 style='width:100.0%'>
 <tr>
  <td width="40%" valign=top style='width:40.0%;padding:.75pt .75pt .75pt .75pt'>
  <p class=MsoNormal><b><font size=1 face=sans-serif><span style='font-size:
  7.5pt;font-family:sans-serif;font-weight:bold'>"Jeff Mosch"
  <Jeff.Mosch@dtn.com></span></font></b><font size=1 face=sans-serif><span
  style='font-size:7.5pt;font-family:sans-serif'> </span></font><br>
  <font size=1 face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Sent
  by: shapelib-bounces@lists.maptools.org</span></font> <o:p></o:p></p>
  <p><font size=1 face=sans-serif><span style='font-size:7.5pt;font-family:
  sans-serif'>06/16/2006 12:53 PM</span></font> <o:p></o:p></p>
  <table class=MsoNormalTable border=1 cellpadding=0>
   <tr>
    <td valign=top bgcolor=white style='background:white;padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=center style='text-align:center'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Please
    respond to<br>
    Shapelib Development <shapelib@lists.maptools.org></span></font><o:p></o:p></p>
    </td>
   </tr>
  </table>
  <p><font size=3 face="Times New Roman"><span style='font-size:12.0pt'><o:p></o:p></span></font></p>
  </td>
  <td width="59%" valign=top style='width:59.0%;padding:.75pt .75pt .75pt .75pt'>
  <table class=MsoNormalTable border=0 cellpadding=0 width="100%"
   style='width:100.0%'>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>To</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face=sans-serif><span style='font-size:
    7.5pt;font-family:sans-serif'><shapelib@lists.maptools.org></span></font>
    <o:p></o:p></p>
    </td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>cc</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
   </tr>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal align=right style='text-align:right'><font size=1
    face=sans-serif><span style='font-size:7.5pt;font-family:sans-serif'>Subject</span></font><o:p></o:p></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=1 face=sans-serif><span style='font-size:
    7.5pt;font-family:sans-serif'>[Shapelib] help with SHPWriteObject</span></font><o:p></o:p></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p> </o:p></span></font></p>
  <table class=MsoNormalTable border=0 cellpadding=0>
   <tr>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
    <td valign=top style='padding:.75pt .75pt .75pt .75pt'>
    <p class=MsoNormal><font size=3 face="Times New Roman"><span
    style='font-size:12.0pt'><o:p> </o:p></span></font></p>
    </td>
   </tr>
  </table>
  <p class=MsoNormal><font size=3 face="Times New Roman"><span
  style='font-size:12.0pt'><o:p></o:p></span></font></p>
  </td>
 </tr>
</table>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><br>
<br>
<br>
</span></font><font size=2 face=Arial><span style='font-size:10.0pt;font-family:
Arial'>I am having problems whenever I call the SHPWriteObject routine.  I’m
able call all of the other routines that I need.  I get an ‘Access
Violation’ when making the call to SHPWriteObject.  Are there any
common mistakes that I could check?  Any guidance would be greatly
appreciated.  Thanks…  Jeff</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
          hShape = SHPCreate( szRemotePath,
SHPT_POLYGON );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
          hDBF = DBFCreate( szRemotePath );</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
          vPolygonNum.vt = VT_I4;</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
          vPolygonNum.iVal = 0;</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
          KSHAPEFILES_AddFieldsToDBFNoConnection(
hDBF, nTypeInteger, vPolygonNum, nPrecision1, nNumericScale0, strPolygonNumber
);</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
                     
    phObject = SHPCreateSimpleObject( SHPT_POLYGON, knotCounter,
dXPos, dYPos, dZPos );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>//
                     
           nObject = SHPWriteObject( hShape,
knotCounter, phObject );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
                 
SHPDestroyObject( phObject );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>//
Polygon Number</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
                     
            vPolygonNum.iVal = nThisPolygonNum;</span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> 
                     
            KSHAPEFILES_WriteAttributeToDBF(
hDBF, knotCounter, 0, nTypeInteger, vPolygonNum.iVal );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>DBFClose(
hDBF );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>SHPClose(
hShape );</span></font> <br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'> </span></font>
<br>
 <tt><font size=2 face="Courier New"><span style='font-size:10.0pt'>_______________________________________________</span></font></tt><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<tt><font face="Courier New">Shapelib mailing list</font></tt><br>
<tt><font face="Courier New">Shapelib@lists.maptools.org</font></tt><br>
<tt><font face="Courier New">http://lists.maptools.org/mailman/listinfo/shapelib</font></tt></span></font><o:p></o:p></p>

</div>

</body>

</html>