Voici le code :
Code : Tout sélectionner
Procedure.s ReadMessageTable(DLLPath.s, MessageId.l, LanguageID.l = 0)
Protected Message.s
hDLL = LoadLibrary_(DLLPath)
If hDLL
FormatMessage_(#FORMAT_MESSAGE_ALLOCATE_BUFFER|#FORMAT_MESSAGE_FROM_SYSTEM|#FORMAT_MESSAGE_FROM_HMODULE,hDLL.l,MessageId,LanguageID,@Buffer.l,0,#Null)
FreeLibrary_(hDLL)
If Buffer
Message =PeekS(Buffer)
LocalFree_(Buffer)
ProcedureReturn Message
EndIf
EndIf
EndProcedure
Debug ReadMessageTable("ntdll.dll",259)
; L'opération demandée est en attente d'achèvement.
Debug ReadMessageTable("AvastTest.dll",36721264,1029)
; Signature verified, skipping.
Debug ReadMessageTable("AvastTest.dll",36721264,1033)
; Signature verified, skipping.