Bienvenue! Inscrivez-vous et rejoignez notre communauté :)
  • Login:

Bienvenue sur Forum SIG - Systèmes d'Information Géographique et Géomatique.

Bienvenue sur le forumSIG. S'il s'agit de votre première visite, assurez vous de faire une recherche préalable dans les FAQ SIG. Vous devez vous inscrire avant de pouvoir poster.

Affichage des résultats 1 à 11 sur 11
  1. #1

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut Non Résolu : Appel de librairies sous un autre répertoire

    Bonjour,

    Je cherche à utiliser des fonctions existantes de Vertical Mapper.
    seulement mon installation est faite de tel sorte que les DLL de VM sont sous un répertoire différent de celui de MAPINFO.EXE.

    je pensais lui définir le chemin d'accès au DLL dans un fichier DEF, mais comme cela doit s'adapter à l'installation de l’utilisateur, je voulais rentrer un STRING que l'utilisateur aurait renseigné dans un TXT lors de l'installation avec le MBX.

    je veux ensuite appeler ce chemin comme suit :

    Code:
    Declare chemin As STRING
    
    Declare Function MBDoubleCharPtrToString Lib chemin+"vmAPI.dll" (stringIn As Integer, stringOut As String) As Integer
    St-ce que vous pensez que cela peut fonctionner ??

    Merci par avance de vos réponses

  2. #2

    Date d'inscription
    août 2011
    Localisation
    Paris
    Emploi
    Chargé de mission SIG
    Âge
    29
    Messages
    406

    Par défaut

    Tout à fait, il faudra juste créer un fichier dans le même répertoire que le mbx du type "fichier_contenant_chemin.def"

    avec dans ce fichier :

    Code:
    Dim chemin As String
    chemin = "C:\etc\etc\etc\"
    et dans le programme principal, enlever la déclaration de 'chemin' et faire un :

    Code:
    Include "fichier_contenant_chemin.def"
    au début du code.

  3. #3

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut

    Ok
    alors je créer bien un fichier .DEF contenant:

    Code:
    Dim chemin As String
    Dim chemin_vmAPI As String
    Dim chemin_vmMFI As String
    Dim chemin_vmTIN As String
    Dim chemin_vmContour As String
    Dim chemin_vmNatNeigh As String
    Dim chemin_KrigDll As String
    Dim chemin_vario As String
    
    chemin = "C:\Program Files\MapInfo\Professional\vm\"
    
    chemin_vmAPI = chemin+"vmAPI.dll"
    chemin_vmMFI = chemin+"vmMFI.dll"
    chemin_vmTIN = chemin+"vmTIN.dll"
    chemin_vmContour = chemin+"vmContour.dll"
    chemin_vmNatNeigh = chemin+"vmNatNeigh.dll"
    chemin_KrigDll = chemin+"KrigDll.dll"
    chemin_vario = chemin+"vario.dll"
    mais je suis obligée de créer les variables de chemin pour chaque DLL car lors de l'appel de la librairie il n'aime pas le chemin+"vario.dll" par exemple.

    le problème est que lorsque je compile mon fichier .MB qui fait appel aux fonction dll , il me créer un MBX et Pas un MBO.
    et donc je ne peux plus compile mon MBP global .....

  4. #4

    Date d'inscription
    août 2011
    Localisation
    Paris
    Emploi
    Chargé de mission SIG
    Âge
    29
    Messages
    406

    Par défaut

    Je crois que Mapbasic ne créé un .mbx que si la procédure 'main' est déclarée dedans le .mb, le cas échéant, il créé un .mbo .

    Est-ce que ça règle le souci ?

  5. #5

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut

    Et bien non car dans mon MB je n'ai pas de main ?

    Bon je fais le récap des mes fichiers:

    j'ai un fichier "VM_Util.mb" qui a
    Code:
    INCLUDE "..\mon_chemin.def"
    INCLUDE "VM_Dev.def"
    mon_chemin.def contient :
    Code:
    Dim chemin_Lib As String
    
    chemin_Lib = "C:\Program Files\MapInfo\Professional\vm\"
    VM_Dev.def contient :
    Code:
    Dim chemin_vmAPI As String
    Dim chemin_vmMFI As String
    Dim chemin_vmTIN As String
    Dim chemin_vmContour As String
    Dim chemin_vmNatNeigh As String
    Dim chemin_KrigDll As String
    Dim chemin_vario As String
    
    chemin_vmAPI = chemin_Lib+"vmAPI.dll"
    chemin_vmMFI = chemin_Lib+"vmMFI.dll"
    chemin_vmTIN = chemin_Lib+"vmTIN.dll"
    chemin_vmContour = chemin_Lib+"vmContour.dll"
    chemin_vmNatNeigh = chemin_Lib+"vmNatNeigh.dll"
    chemin_KrigDll = chemin_Lib+"KrigDll.dll"
    chemin_vario = chemin_Lib+"vario.dll"
    Declare Function MBDoubleCharPtrToString Lib chemin_vmApi (stringIn As Integer, stringOut As String) As Integer
    
    Declare Function MBDoubleToSingle Lib chemin_vmApi (ByVal dMBfloat As Float, iMBInt As Integer) As Integer
    Declare Function MBSingleToDouble Lib chemin_vmApi (ByVal fMBInt As Integer, dMBfloat As Float)  As Integer
    .
    .
    .

    VM_Util.mb contient des fonctions que j'ai écrites et qui font appel aux fonctions de VM présentes dans les librairieslistées dans le "VM_Dev.def"

    Ce MB ne contient pas de "Main" car, le MBO qui devrait résulter de sa compilation est appelé par un MBP.

    Donc je ne sais pas pourquoi il me compile un MBX au lieu d'un MBO.

    Une autre question me viens : si la compilation créer directement un MBO et ensuite un MBX complet: l'utilisateur ne pourra pas changer le chemin suivant sa configuration machine ??

  6. #6

    Date d'inscription
    août 2011
    Localisation
    Paris
    Emploi
    Chargé de mission SIG
    Âge
    29
    Messages
    406

    Par défaut

    Oui en effet.

    A ce moment, partir sur une autre méthode.
    Mettre tout le script dans le .mb et, pour la définition de la variable 'chemin', faire un :

    Code:
    Open file ApplicationDirectory$()+"mon_chemin.txt" For input as #1
    Line input #1, chemin
    close file #1

  7. #7

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut

    Bon en faisant comme cela, ca a l'air de fonctionne;

    mais lorsque je test mon MBX, il me cherche la bibliothèque chemin_vmApi alors que c'est ma variable String qui contient le chemin où aller chercher la bibliothèque vmApi.dll

    ma variable vaut bien "C:\Program Files\MapInfo\Professional\vm\vmAPI.dll"

    et j'appelle ma fonction :
    Code:
    Declare Function vmInitProgress Lib chemin_vmApi (pszCaptionText As String, ByVal dwShowIcon As Integer) As Integer
    donc a priori il n'aime pas les variables dans l'appel .

  8. #8

    Date d'inscription
    août 2011
    Localisation
    Paris
    Emploi
    Chargé de mission SIG
    Âge
    29
    Messages
    406

    Par défaut

    A tester :

    Code:
    Dim cmd As String
    
    cmd = "Declare Function vmInitProgress Lib " + chemin_vmApi + " (pszCaptionText As String, ByVal dwShowIcon As Integer) As Integer"
    Run Command Cmd

  9. #9

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut

    mes déclarations de fonctions sont dans un .DEF et il n'aime pas trop

  10. #10

    Date d'inscription
    août 2011
    Localisation
    Paris
    Emploi
    Chargé de mission SIG
    Âge
    29
    Messages
    406

    Par défaut

    Et si elles sont transférées dans le .mb ?

  11. #11

    Date d'inscription
    janvier 2012
    Messages
    16

    Par défaut

    Bonjour,

    Alors j'ai mis les déclarations de fonction issue de VM dans un Sub Declare_Fct_VM

    et je les déclare comme suit :

    Code:
    Dim cmd As STRING
    
    cmd = "Declare Function MBDoubleCharPtrToString Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (stringIn As Integer, stringOut As String) As Integer"
    Run Command cmd
    cmd = "Declare Function MBDoubleToSingle Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal dMBfloat As Float, iMBInt As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function MBSingleToDouble Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal fMBInt As Integer, dMBfloat As Float)  As Integer"
    Run Command cmd
    cmd = "Declare Function MBGetRGBColorForValue Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal dValue As Float, dwColor As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function MBGridCalculator Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ptrOpt() As OPERATIONLIST, ByVal numOperations As Integer, pszNewGridName As String, newGridDesc As String, pszZUnit As String, ByVal bZUnit As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function MBSetInflections Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal usIps As SmallInt, pfZValue() As Float, pdwColor() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function MBUpdateClassColor Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uClassNum As SmallInt, ByVal dwColor As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function MBViewShed Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal wNumberofPoints As SmallInt, pstViewShedInfo() As VIEWSHED_PARAMETERS, ByVal GridID As Integer, pszViewshedTableName, pszZUnitDescription As String, ByVal wEarthCorrection As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    'Here is how you can get Class information from a GRC for VB & MB programmers. 
    cmd = "Declare Function MBGetGRCDict Lib "+chr$(34)+chemin_vmApi +chr$(34)+" (ByVal GridID As Integer, stGRCDict() As MB_GRC_DICT) As Integer"
    Run Command cmd
    cmd = "Declare Function MBGetGridProps Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, stGrid As GRID) As Integer"
    Run Command cmd
    cmd = "Declare Function MBSetGridProps Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, stGrid As GRID) As Integer"
    Run Command cmd
    ' vmAPI.DLL  Entry Points
    cmd = "Declare Function vmAddGRCDictItem Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, iCode As SmallInt, pszItemName As String, ByVal dVal As Float, ByVal iColor As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmAddMetaData Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (szTabFile As String, szKey As String, szVal As String) As Integer"
    Run Command cmd
    cmd = "Declare Function vmAreGridsJoinable Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID1 As Integer, ByVal GridID2 As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCalcSlopeAspect Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, pszSlopeTableName, pszAspectTableName, pszSlopeDescription, pszAspectDescription As String, ByVal dwAdjustAspect As Integer, ByVal dwSlopeAsGrade As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCancelGridCreate Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCheckReprojectParameters Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, pszNewCoordSys As String, pstInfoProj As InfoProj) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCloseGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmColorizeGRD Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal bAskHillShade As SmallInt, ByVal bSaveChanges As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCreateGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (GridIDs As Integer, sTabFile As String, sCoordSys As String, ByVal fXmin As Float, ByVal fXmax As Float, ByVal fYmin As Float, ByVal fYmax As Float, ByVal iGridWidth As Integer, ByVal iGridLength As Integer, ByVal iGridType As Integer, ByVal uGridDataFormat As SmallInt, sZDesc As String) As Integer"
    Run Command cmd
    cmd = "Declare Function vmExportGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal dwExportFormat As Integer, pszExportFileName As String, ByVal dNullValue As Float, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmFinishGridCreate Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Sub vmGetErrorText Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal ErrorNum As Integer, ErrMessage As String)"
    Run Command cmd
    cmd = "Declare Function vmGetGridValue Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal dXCoordinate, ByVal dYcoordinate As Float, ByVal GridID As Integer, plReturnType As Integer, pdGRDValue As Float, ppszGRCValue As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetGRCDictItem Lib "+chr$(34)+chemin_vmApi +chr$(34)+" (ByVal GridID As Integer, ByVal lEntryNum As Integer, stGRCDict As MB_GRC_DICT) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetMappableTable3dPoints  Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTableName,  psz3DPointFile As String, ByVal lZColumnNumber As Integer, ByVal bIgnoreZeros As Integer, pszDataDescription, pszZUnitDescription As String, ByVal lZUnitType As Integer, ByVal ProgressUpdate As Integer ) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetNumGridsOpen Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetOpenGridStructs Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (GridIDs() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetRevision Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Float"
    Run Command cmd
    cmd = "Declare Function vmGetUnmappableTable3dPoints Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTableName, psz3DPointFile, pszCoordSysString As String, ByVal lXColumnNumber, ByVal lYColumnNumber, ByVal lZColumnNumber As Integer, ByVal bIgnoreZeros As SmallInt, pszDataDescription, pszZUnitDescription As String, ByVal lZUnitType As Integer, ByVal ProgressUpdate As Integer ) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGridQuery Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (outputGridName As String, gridDescription As String, ByVal cellSize As Float, ByVal xMin As Float, ByVal xMax As Float, ByVal yMin As Float, ByVal yMax As Float, passedtokensIn() As SmallInt, ByVal numClauses As Integer, clauses() As SELECTCLAUSE, ByVal outputType As SmallInt, ByVal trimNulls As SmallInt, ByVal trueMethod As SmallInt, ByVal trueValue As Float, ByVal trueGrid As Integer, trueClass As String, ByVal trueColour As Integer, ByVal falseMethod As SmallInt, ByVal falseValue As Float, ByVal falseGrid As Integer, falseClass As String, ByVal falseColour As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGridToWorld Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal lRow As Integer, ByVal lColumn As Integer, dXPosWorld As Float, dYPosWorld As Float) As Integer"
    Run Command cmd
    cmd = "Declare Function vmHillShadeGRD Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal SunAzimuthDeg As Float, ByVal SunAngleDeg As Float, ByVal byHsBrt As SmallInt, ByVal byHsCon As SmallInt, ByVal ProgressUpdate As Integer ) As Integer"
    Run Command cmd
    cmd = "Declare Function vmInit Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszCharSet As String, ByVal dwVmReserved As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmInterVisibility Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, pszResultsMIF, pszLineMIF As String, pdFromX, pdFromY, pdFromZAdjust, pdToX, pdToY, pdToZAdjust, pdEarthCurvature As Float, pszZUnitDescription As String , pdwReceiverVisible As Integer, pdObstructionHeight, pdToAdjustment, pdFromAdjustment As Float, pdwNumberofSamples As Integer, pstPointtoPointData As CROSS_SECTION_POINT) As Integer"
    Run Command cmd
    cmd = "Declare Function vmOpenGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTabFileName As String, ByVal dwVmReserved As Integer) As Integer" 
    Run Command cmd
    'this is a pointer to a grid struct but MB can not. Return a struct * 
    cmd = "Declare Function vmPointInspection Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTabFileName As String, pnColumnIDs() As Integer, ByVal wNumberofGrids As SmallInt, pGridIDs() As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmPoly2Pnt Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszInTable As String, pszOutTable As String, ByVal dMaxNodeDist As Float, ByVal bUseMaxNodeDist As Integer, ByVal bDoPolyLine As Integer, ByVal bDoRegion As Integer, ByVal bDoPoint As Integer, plNumPointIn As Integer, plNumRegIn As Integer, plNumPlineIn As Integer, plNumPointOut As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGRCBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uwRowStart As SmallInt, ByVal uwColStart As SmallInt, ByVal uwNumRows As SmallInt, ByVal uwNumCols As SmallInt, iZVals() As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGRCRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal wRowNum As SmallInt, ByVal wStartCell As SmallInt, ByVal wNumCells As SmallInt, iZVals() As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGRDBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uwRowStart As SmallInt, ByVal uwColStart As SmallInt, ByVal uwNumRows As SmallInt, ByVal uwNumCols As SmallInt, iZVals() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGRDRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal wRowNum As SmallInt, ByVal wStartCell As SmallInt, ByVal wNumCells As SmallInt, iZVals() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGridRGBBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal wRowStart As SmallInt, ByVal wColStart As SmallInt, ByVal wNumRows As SmallInt, ByVal wNumCols As SmallInt, ByVal wHillShade As SmallInt, pdwRGBBlock() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReadGridRGBRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal wRowNum As SmallInt, ByVal wStartNode As SmallInt, ByVal wNumNodes As SmallInt, ByVal wHillShade As SmallInt, pdwRGBRow() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmRegionInspection Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTabFileName As String, pnColumnIDs() As Integer, ByVal wNumberofGrids As SmallInt, pGridIDs() As Integer, ByVal wNumberofStats As SmallInt, pwStatistics() As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmRegionStats Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (szTabFileName As String, ByVal lRegionRowID As Integer, ByVal GridID As Integer, stRegStats As REG_STATS, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmRegionToGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTabFileName As String, ByVal lZColumnNumber As Integer , pszOutputGridName As String, ByVal dCellSize As Float, pszDataDescription As String, ByVal lGridType As Integer, ByVal byZUnitType As SmallInt, pszZUnitDescription As String) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReprojectGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, pszGridTableName As String, pszNewCoordSys As String , ByVal dNewCellSize As Float, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmResizeGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal dCellSize As Float, pszPath As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmSpliceGrids Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (GridIDs() As Integer, ByVal numGrids As Integer, ByVal mergeType As Integer, splicedGrid As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmTerm Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmTrimGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszTrimTableName As String, ByVal dwTrimRow As Integer, ByVal GridID As Integer, pszGridTableName As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmUpdateClassString Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uClassNum As SmallInt, pszNewName As String) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWorldToGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal dXPosWorld As Float, ByVal dYPosWorld As Float, lRow As Integer, lColumn As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRCRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal iRowNum As Integer, ByVal iStartNode As Integer, ByVal iNumNodes As Integer, iZVals() As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRCBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uRowStart As SmallInt, ByVal uColStart As SmallInt, ByVal uNumRows As SmallInt, ByVal uNumCols As SmallInt, iZVals() As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRCNullRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal iRowNumber As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRCNullBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uRowStart As SmallInt, ByVal uColStart As SmallInt, ByVal uNumRows As SmallInt, ByVal uNumCols As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRDRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal iRowNum As Integer, ByVal iStartNode As Integer, ByVal iNumNodes As Integer, iZVals() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRDBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uRowStart As SmallInt, ByVal uColStart As SmallInt, ByVal uNumRows As SmallInt, ByVal uNumCols As SmallInt, iZVals() As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRDNullBlock Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal uRowStart As SmallInt, ByVal uColStart As SmallInt, ByVal uNumRows As SmallInt, ByVal uNumCols As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmWriteGRDNullRow Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, ByVal iRowNumber As SmallInt) As Integer"
    Run Command cmd
    cmd = "Declare Function vmXSection Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal GridID As Integer, pdwNumberOfNodes As Integer, pstNodes() As PNT2D, pdwCrossSectionPoints As Integer, pstCrossSectionData() As X_SECT_DATA) As Integer"
    Run Command cmd
    
    ' END OF vmAPI.dll entry points
    
    
    
    ' vmMFI.dll Entry Points
    
    cmd = "Declare Function vmHuffModel Lib "+chr$(34)+chemin_vmMFI+chr$(34)+" (psz3DPointFile, pszTableName As String, ByVal dCellSize, ByVal dSearchRadius, ByVal dDecayCoefficient, ByVal dDisplayRadius As Float, ByVal lCrowFlyOption As Integer, ByVal dAttractiveness As Float, ByVal lReferencePoint As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmInvDistWeighting Lib "+chr$(34)+chemin_vmMFI+chr$(34)+" (psz3DPointFile, pszTableName As String, ByVal dCellSize, ByVal dSearchRadius, ByVal dExponent, ByVal dDisplayRadius, ByVal dOrientation, ByVal dRadiusMultiplier As Float, ByVal lMinimumPoints, ByVal lMaximumPoints, ByVal lNumberofZones As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmLocationProfiler Lib "+chr$(34)+chemin_vmMFI+chr$(34)+" (psz3DPointFile, pszTableName As String, ByVal dCellSize, ByVal dSearchRadius, ByVal dDisplayRadius As Float, ByVal lMinimumPoints, ByVal lMaximumPoints As Integer, ByVal dExclusionRadius As Float, ByVal lVmReserved As Integer, ByVal dXInflection , ByVal dYInflection, ByVal dSlopeInflection, ByVal dExclusionX, ByVal dExclusionY, ByVal dExclusionSlope As Float, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmRectangularInterpolation Lib "+chr$(34)+chemin_vmMFI+chr$(34)+" (szPntFile, outfile As String, ByVal dCellSize, ByVal dSearchRadius As Float, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    
    ' end of vmMFI Entry Points
    
    
    ' vmTIN.dll Entry Points
    
    cmd = "Declare Function vmCellTriAkimaRun Lib "+chr$(34)+chemin_vmTIN+chr$(34)+" (pszTRIName, pszTableName As String, ByVal dCellSize As Float, ByVal dWeightFactor As Float, ByVal dWeightExponent As Float, ByVal lCreateMif As Integer, pszMifFileName As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmCellTriLinearRun  Lib "+chr$(34)+chemin_vmTIN+chr$(34)+" (pszTRIName, pszTableName As String, ByVal dCellSize As Float, ByVal lCreateMif As Integer, pszMifFileName As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetTriangles Lib "+chr$(34)+chemin_vmTIN+chr$(34)+" (psz3DPointFile, pszTRIName As String, ByVal dMaxTriangleSide, ByVal dSamePointDistance As Float, ByVal lSamePointMethod As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmSimpleAggregation  Lib "+chr$(34)+chemin_vmTIN+chr$(34)+" (psz3DPointFile, pszTableName As String, ByVal dCoincidentPointDistance As Float, ByVal lAggregationTechnique As Integer, ByVal lreserved As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmVoronoi Lib "+chr$(34)+chemin_vmTIN+chr$(34)+" (pszTRIFile, pszTableName, psz3DpointsName As String, ByVal lHullMode As Integer, ByVal dHullMargin As Float, ByVal dwFunctionMethod, ByVal lDissolveMode As Integer, ByVal dBoundarySmoothness As Float, pstRegionStyle As REGION_STYLE, pszBoundaryTabName As String, ByVal dwBoundaryRowID As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    
    ' end of vmTIN.dll Entry Points
    
    
    ' vmContour.dll Entry Points
    
    cmd = "Declare Function vmGRCContour Lib "+chr$(34)+chemin_vmContour+chr$(34)+" (ByVal GridID As Integer, pszRegionTabFile As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmPlineContour Lib "+chr$(34)+chemin_vmContour+chr$(34)+" (ByVal GridID As Integer, pszTableName As String, ByVal lNumContours As Integer, pstContours() As  CONTOUR, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmReclass Lib "+chr$(34)+chemin_vmContour+chr$(34)+" (ByVal GridID As Integer, tabFile As String, ByVal dwNewGridType As Integer, ByVal dwNumContours As Integer, pstReclass() As ReclassInfo, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmRegionContour Lib "+chr$(34)+chemin_vmContour+chr$(34)+" (ByVal GridID As Integer, pszTableName As String, ByVal lNumContours As Integer, pstContours() As  CONTOUR, ByVal bExceed32kNodes As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    
    ' end of vmContour.dll Entry Points
    
    
    ' vmNatNeigh.dll Entry Points
    
    cmd = "Declare Function vmComplexAggregation Lib "+chr$(34)+chemin_vmNatNeigh+chr$(34)+" (psz3DPointFile As String, pszBSOFileName As String, ByVal wAggregationType As SmallInt, ByVal dDensityFactor, ByVal dCoincidentPointDist As Float,  ByVal wCoincidentPointMethod As SmallInt, ByVal dAggregationDist As Float, ByVal wAggregationMethod As SmallInt, ByVal dWeightExponent As Float, ByVal uPrintAggPointsTable As SmallInt, ByVal uPrintRegionTable As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmNatNeigh Lib "+chr$(34)+chemin_vmNatNeigh+chr$(34)+" (szAggFileName As String, szTabFile As String, ByVal uHullOption As SmallInt, ByVal dMaxTriangleSide As Float, ByVal dHullMargin As Float, ByVal dMaxDelArc As Float, ByVal uSaveBoundary As SmallInt, ByVal  uStopAfterBoundary As SmallInt, szBoundingRegionTab As String, ByVal lBoundingRegionRowID As Integer , ByVal dCellSize As Float, ByVal uNaturalMethod As SmallInt, ByVal dSkewFactor As Float, ByVal uHermitianOption As SmallInt, ByVal dSlopeWeightFactor As Float, ByVal dSlopeWeightExponent As Float, ByVal uPreventOvershoot As SmallInt, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    
    ' end of vnNatNeigh.dll Entry Points
    
    
    'vmGridMan Entry Points. These functions are now in vmApi.dll
    
    cmd = "Declare Function vmGetCurrentGrid Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetErrorInfo Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal dwErrorNumber As Integer, ByVal dwInfoType As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetProgressCallback Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmGetProgressTextCallback Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmInitProgress Lib "+chr$(34)+vmApi.dll+chr$(34)+" (pszCaptionText As String, ByVal dwShowIcon As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmDestroyProgress Lib "+chr$(34)+chemin_vmApi+chr$(34)+" () As Integer"
    Run Command cmd
    cmd = "Declare Function vmUpdateProgress Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (ByVal dwPercentComplete As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmUpdateProgressText Lib "+chr$(34)+chemin_vmApi+chr$(34)+" (pszCaptionText As String) As Integer"
    Run Command cmd
    
    ' end of vmGridMan Entry Points
    
    
    'KrigDll Entry Points
    
    cmd = "Declare Function vmKriging Lib "+chr$(34)+chemin_KrigDll+chr$(34)+" (szPntFile As String, pszKrigName As String, pszVarName As String, ByVal krigType As SmallInt, ByVal block As SmallInt, ByVal xBlockSize As SmallInt, ByVal yBlockSize As SmallInt, ByVal searchRadius As Float, ByVal meanValue As Float, ByVal minPoints As SmallInt, ByVal maxPoints As SmallInt, trendCoefficents() As SmallInt, ByVal cellSize As Float, varModel As VMD_TRANS, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    
    ' end of KrigDll Entry Points
    
    
    
    'Vario Entry Points
    
    cmd = "Declare Function vmVariogram Lib "+chr$(34)+chemin_vario+chr$(34)+" (szPntFile As String, VCDT As VCD_TRANS, VMDT As VMD_TRANS, VD0() As Integer, VD1() As Integer, VD2() As Integer, VD3() As Integer, VD4() As Integer, VD5() As Integer, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmVariogramModel Lib "+chr$(34)+chemin_vario+chr$(34)+" (pstVCDT As VCD_TRANS, pstVMDT As VMD_TRANS, pfVD0 As Integer, pfVD1 As Integer, pfVD2 As Integer, pfVD3 As Integer, pfVD4 As Integer, pfVD5 As Integer) As Integer"
    Run Command cmd
    
    ' end of Vario Entry Points
    
    
    'vmImp Entry Points
    
    cmd = "Declare Function vmImport  Lib "+chr$(34)+chemin_vmImp+chr$(34)+" (ByVal wMode As SmallInt, pstImportInfo As IMPORTINFO, pszInputFileName As String, pszOutputFileName As String, ByVal ProgressUpdate As Integer) As Integer"
    Run Command cmd
    cmd = "Declare Function vmImportVarA  Lib "+chr$(34)+chemin_vmImp+chr$(34)+" (ByVal wMode As SmallInt, pstImportInfo As IMPORTINFO, pszInputFileName As String, pszOutputFileName As String, ByVal ProgressUpdate As Integer, ByVal ProgressText As Integer) As Integer"
    Run Command cmd
    j'appelle donc dans un premier temps la fonction qui renseigne le chemin d'accès à ces fonctions et ensuite la fonction de déclaration des fonctions.

    le problème se situe donc en ce que lors de la compilation de mon MB (qui contient les 2 Sub précédants et le Sub qui fait appel aux fonctions) il ne reconnait par les fonctions inclues dans la librairie déclarée en "Run Command".

    Donc je ne sais plus comment faire; a part compiler un MB pour chaque configuration de poste: ce qui n'est pas une solution viable pour le suivi . Donc je voudrais l'éviter.

    Une Idée ?
    Dernière modification par GéraldineC ; 09/10/2012 à 08h23.

 

 

Discussions similaires

  1. [PostGreSQL] Impossible de charger les librairies
    Par Kap dans le forum Assistance et Programmation
    Réponses: 2
    Dernier message: 21/03/2012, 12h25
  2. [ArcGIS 9.x] Afficher Différents labels Un sous l'autre
    Par kevinA4 dans le forum Assistance Technique
    Réponses: 6
    Dernier message: 01/03/2011, 21h24
  3. Réponses: 0
    Dernier message: 24/08/2010, 11h05
  4. [PDA] Librairies libres
    Par andal dans le forum Espace GPS et Solutions Nomades
    Réponses: 4
    Dernier message: 05/02/2008, 08h24
  5. [Lien] Librairies pour restitution d'image
    Par Le Docteur dans le forum Ressources
    Réponses: 8
    Dernier message: 27/07/2004, 10h29

Les tags pour cette discussion

Liens sociaux

Règles de messages

  • Vous ne pouvez pas créer de nouvelles discussions
  • Vous ne pouvez pas envoyer des réponses
  • Vous ne pouvez pas envoyer des pièces jointes
  • Vous ne pouvez pas modifier vos messages
  •