[Proj] Re: PROJ.4 VB Wrappers
Bart
barta at xs4all.nl
Mon Jul 10 14:51:59 PDT 2006
Here's the wrapper i use from VB(6)
------ wrapper ------
' proj.dll projection info
Private Type ProjCoordSys
ProjPointer As Long
ProjPar() As String
isValid As Boolean
IsLL As Boolean
End Type
' proj.dll declarations
Private Declare Function pj_init Lib "Proj.dll" (ByVal argc As Long, ByRef
argv As Long) As Long
Private Declare Sub pj_free Lib "Proj.dll" (ByVal pointer As Long)
Private Declare Function pj_transform Lib "Proj" (ByVal SrcPrj As Long,
ByVal DestPrj As Long, ByVal nPoints As Long, ByVal Offset As Long, ByRef x
As Double, ByRef y As Double, ByRef z As Double) As Long
------ /wrapper -----
Now to make this work, you do need to recompile proj.dll using MAKEFILE.VC
after editing the source files a bit adding the __stdcall attribute for the
functions you need to use from VB,
in pj_transform.c
int __stdcall pj_transform( PJ *srcdefn, PJ *dstdefn, long point_count, int
point_offset,
double *x, double *y, double *z )
same (ad __stdcall) for pj_init, pj_free functions in pj_init.c
same for all three functions in proj_api.h
Then run NMAKE MAKEFILE.VC (command line) and voila...
I hope that helps, it's not really a wrapper, its just a calling convention
;-)
Bart
"Piotr Synowiec" <psynowiec at gmail.com> wrote in message
news:44B2C0A1.5080908 at gmail.com...
>
> link to the proj4 wrappers is not working any more.
> PROJ.4 VB Wrappers
> <http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip> from Eric G.
> Miller.
> http://ftp.dfg.ca.gov/Outgoing/Nafwb/proj4/proj_api.zip
>
> Could anybody send me this file by email ?
>
> Cheers
> Piotr
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
More information about the Proj
mailing list