Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to pass a date to a DLL?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00065737
Message ID:
00065846
Vues:
47
I've not yet been able to solve the date problem. Here is what I am trying to achieve:

************************************************************
* PROCEDURE DPICreateMvt()
************************************************************
* Author............: José Constant
* Project...........: AutoSoft
* Created...........: 13/12/97 13:51:01
* Copyright.........: (c) CSS, jose@club.innet.be, 1997
*) Description.......: Création d'un mouvement dans le fichier temporaire
* Calling Samples...:
* Parameter List....: nHandle, le handle de la société
* : cJournal C(3), le journal comptable
* : la date de l'écriture (as a string of 6 bytes)
* : cNumPiece C(12), le numéro de pièce
* : cLibelle C25), le libellé de l'opération
* Returns...........: le handle du mouvement créé ou 0 en cas derreur
* Major change list.:

DECLARE INTEGER DPICreateMvt IN DPID32 ;
INTEGER nHandle, ;
STRING @cJournal, ;
STRING @cDate, ;
STRING @cNumPiece, ;
STRING @cLibelle


LOCAL nHandle
nHandle = 0

nHandle = DPIOpenSociete("JCM", "LIPEZB", "BIDON" )

*-- so far I get a handle

cJournal = "VEN"
lnJour = 14
lnMois = 12
lnAnnee = 97

lcJour = CHR(lnJour % 256) + CHR(INT(lnJour/256))
lcMois = CHR(lnMois % 256) + CHR(INT(lnMois/256))
lcAnnee = CHR(lnAnnee % 256) + CHR(INT(lnAnnee/256))

cDate = lcJour+lcMois+lcAnnee
cNumPiece = "999 "
cLibelle = "TEST "

nMvtHandle = DPICreateMvt( ;
nHandle, ;
cJournal, ;
cDate, ;
cNumPiece, ;
cLibelle )

? nMvtHandle
nMvtHandle always returns 0, so I still have an error...

José
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform