par Michael DELIQUE » 10 Jan 2008 à 13:07
- Code : Tout sélectionner
Function getOSTime_API As String
%REM
'variableAPI pour la fonction getOSTime_API
Type TIMEDATE
innards(0 To 1) As Long
End Type
Declare Sub OSCurrentTIMEDATE Lib "nnotes.dll" (retTimeDate As TIMEDATE)
Declare Function ConvertTIMEDATEToText Lib "nnotes.dll" (Byval IntlFormat As Integer, Byval TimeFormat As Integer, InputTime As TIMEDATE, Byval retTextBuffer As String, Byval TextBufferLength As Integer, retTextLength As Integer) As Integer
%END REM
'Déclaration Variables
Dim apiTime As TIMEDATE
Dim nbReturnValue As Integer
Dim returnString As String*256
Dim nbReturned As Integer
Dim ret As Integer
On Error Goto ErreurHandle
getOSTime_API = ""
Call OSCurrentTIMEDATE(apiTime)
nbReturnValue = ConvertTIMEDATEToText(0, 0, apiTime, returnString, Len(returnString) - 1, nbReturned)
getOSTime_API= Left$(returnString, Instr(returnString, Chr(0)) - 1)
Exit Function
ErreurHandle:
Msgbox "("+Cstr(Getthreadinfo (1))+" Call by "+Cstr(Getthreadinfo(10))+")"+Chr(10)+"Erreur " + Str(Err) + " : "+Chr(10) + Cstr(Error)+". "+Chr(10)+"Ligne N° "+Cstr(Erl),16," ERREUR !"
getOSTime_API = ""
Exit Function
End Function
Cordialement
Michael (SMS-Phobique)
----------------------------
"La théorie, c'est quand on sait tout et que rien ne fonctionne. La pratique, c'est quand tout fonctionne et que personne ne sait pourquoi."
Albert EINSTEIN