<br><font size=2 face="sans-serif">Jeff: &nbsp;Are you using the .NET bindings?
&nbsp;If so, there is a newer version that resolves some errors in the
binding.</font>
<br>
<br><font size=2 face="sans-serif">David Gancarz</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>&quot;Jeff Mosch&quot;
&lt;Jeff.Mosch@dtn.com&gt;</b> </font>
<br><font size=1 face="sans-serif">Sent by: shapelib-bounces@lists.maptools.org</font>
<p><font size=1 face="sans-serif">06/16/2006 12:53 PM</font>
<table border>
<tr valign=top>
<td bgcolor=white>
<div align=center><font size=1 face="sans-serif">Please respond to<br>
Shapelib Development &lt;shapelib@lists.maptools.org&gt;</font></div></table>
<br>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">&lt;shapelib@lists.maptools.org&gt;</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Shapelib] help with SHPWriteObject</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="Arial">I am having problems whenever I call the
SHPWriteObject routine. &nbsp;I&#8217;m able call all of the other routines
that I need. &nbsp;I get an &#8216;Access Violation&#8217; when making the call to
SHPWriteObject. &nbsp;Are there any common mistakes that I could check?
&nbsp;Any guidance would be greatly appreciated. &nbsp;Thanks&#8230; &nbsp;Jeff</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
hShape = SHPCreate( szRemotePath, SHPT_POLYGON );</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
hDBF = DBFCreate( szRemotePath );</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
vPolygonNum.vt = VT_I4;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
vPolygonNum.iVal = 0;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
KSHAPEFILES_AddFieldsToDBFNoConnection( hDBF, nTypeInteger, vPolygonNum,
nPrecision1, nNumericScale0, strPolygonNumber );</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; phObject = SHPCreateSimpleObject(
SHPT_POLYGON, knotCounter, dXPos, dYPos, dZPos );</font>
<br><font size=2 face="Arial">// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nObject
= SHPWriteObject( hShape, knotCounter, phObject );</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; SHPDestroyObject( phObject );</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">// Polygon Number</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; vPolygonNum.iVal = nThisPolygonNum;</font>
<br><font size=2 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; KSHAPEFILES_WriteAttributeToDBF( hDBF, knotCounter, 0, nTypeInteger,
vPolygonNum.iVal );</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">DBFClose( hDBF );</font>
<br><font size=2 face="Arial">SHPClose( hShape );</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=2 face="Arial">&nbsp;</font>
<br><font size=3 face="Times New Roman">&nbsp;</font><font size=2><tt>_______________________________________________<br>
Shapelib mailing list<br>
Shapelib@lists.maptools.org<br>
http://lists.maptools.org/mailman/listinfo/shapelib<br>
</tt></font>
<br>