Sample of a Visual Basic interface |
'************************************************************************ '* Sample of a Visual Basic interface for Microsoft Visual Studio * '* for some functions of the 32 bit Dynamic Link Library GeoDLL * '* The interface must be extended for other functions if necessary. * '* The interface can be included in the VB source code directly. * '* * '* Author: unknown. * '* * '* In the calling directory of GeoDLL the files geodll32.dll * '* and geodllbn.bin must be present. * '* * '* A lot of changes were accomplished. Unfortunately we did not have * '* the possibility to compile the interface. If there are contained any * '* syntax bugs in the source code, the author asks for report! * '************************************************************************
'Declare function Private Declare Function coordtrans3 Lib "GeoDLL32" ( _ ByVal nKoordXQ As Double, _ '8 Byte ByVal nKoordYQ As Double, _ '8 Byte ByVal nKoordSysQ As UShort, _ '2 Byte ByVal nRefSysQ As UShort, _ '2 Byte ByVal nNotationQ As UShort, _ '2 Byte ByRef nKoordXZ As Double, _ '4 Byte (Pointer) ByRef nKoordYZ As Double, _ '4 Byte (Pointer) ByVal nKoordSysZ As UShort, _ '2 Byte ByVal nRefSysZ As UShort, _ '2 Byte ByVal nNotationZ As UShort, _ '2 Byte ByVal nStreifenZ As UShort) _ '2 Byte As UInteger '4 Byte
Private Declare Function setunlockcode Lib "GeoDLL32" ( _ ByVal pszcode As String, ByVal pszliznehm As String) As UInteger
Private Sub Command1_Click()
'Declare variables Dim nKoordXQ As Double Dim nKoordYQ As Double Dim nKoordSysQ As UShort Dim nRefSysQ As UShort Dim nNotationQ As UShort Dim nKoordXZ As Double Dim nKoordYZ As Double Dim nKoordSysZ As UShort Dim nRefSysZ As UShort Dim nNotationZ As UShort Dim nStreifenZ As UShort Dim rc As UInteger
'Parameter values nKoordXQ = 10.466365 nKoordYQ = 48.540948 nKoordSysQ = 1 nRefSysQ = 1 nNotationQ = 0 nKoordXZ = 0 nKoordYZ = 0 nKoordSysZ = 2 nRefSysZ = 1 nNotationZ = 0 nStreifenZ = 3
'Function call 'rc = setunlockcode("12345-67890","MicroModia GmbH") 'This unlock parameters do not work! 'The originals must be acquired from Killet GeoSoftware Ing.-GbR! 'Full version: Unlock parameters must be correct at the first input! 'Test version: Function may not be called! 'The test version without unlocking works per program run a short time only!
rc = coordtrans3(nKoordXQ, nKoordYQ, nKoordSysQ, nRefSysQ, nNotationQ, _ nKoordXZ, nKoordYZ, nKoordSysZ, nRefSysZ, nNotationZ, nStreifenZ)
End Sub
|