[Shapelib] DLL -> access violation

shapelib-admin at lists.maptools.org shapelib-admin at lists.maptools.org
Tue Mar 2 10:35:29 PST 2004


shapelib-admin at lists.maptools.org wrote:
> Hi,
> all times i want to opnen shapefile whit the SHPOpen function, i get this
> error:
> 
> Exception in text.exe(SHAPELIB.DLL):0xC000005: Access Violation
> 
> Dont know why! The name is right and i can open the file whit normal
> functions.
> (VC++: CFile file.
> 	 file.open(...) )
> Or does this funtion only work in C? I thought i can use the DLL in VC++
> programms.
> I include the shapefil.h and under projects i told the linker were he can
> find the
> shapelib.lib. What i have t do jet?
> Thy for any reponse

Michael,

I'm not clear on exactly how you are calling SHPOpen().  It does normally
work from C++ code built with MS VC++.  I use that frequently.  However,
if you have different linkage conventions between your application and the DLL,
or if your filename string is of the wrong type or any number of other situations
you could get a crash.  Try elaborating on the conditions.  Provide a minimal
program that demonstrates your problem.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent




More information about the Shapelib mailing list