fcts de kernel32.dll sous lotuscript

Forum destiné aux questions sur le développement : Formules, LotusScript, Java ...

fcts de kernel32.dll sous lotuscript

Messagepar Stef » 27 Août 2003 à 14:53

bonjour,j'ai des problemes pour utiliser les fcts : globallock, globalunlock and globalfree de la bibliotheque Kernel32.dll sous lotusscript.quelqu'un les a-t-elles deja utilisées ??Merci par avance
Stef
 

Re: fcts de kernel32.dll sous lotuscript

Messagepar Stephane Maillard » 27 Août 2003 à 17:01

Bonjour,Declare Function GlobalLock Lib "kernel32" Alias "GlobalLock" (Byval hMem As Long) As LongDeclare Function GlobalUnlock Lib "kernel32" Alias "GlobalUnlock" (Byval hMem As Long) As LongDeclare Private Function GlobalFree Lib "kernel32" (Byval hMem As Long) As LongExemple :Public Property Set Contents As String Dim lSize As Long Dim hMem As Long Dim pMemory As Long Dim temp As Variant lSize = Len(Contents)+1 hMem = GlobalAlloc(GMEM_MOVABLE Or GMEM_DDESHARE, lSize) If hMem = 0 Or Isnull(hMem) Then Exit Property pMemory = GlobalLock(hMem) If pMemory = 0 Or Isnull(pMemory) Then GlobalFree(hMem) Exit Property End If Call MoveMemory(pMemory, Contents, lSize) Call GlobalUnlock(hMem) If (OpenClipboard(0&) <> 0) Then If (EmptyClipboard() <> 0) Then temp = SetClipboardData(CF_TEXT, hMem) End If temp = CloseClipboard() End If GlobalFree(hMem) End Property[%sig%]
Cordialement

Stéphane Maillard
Avatar de l’utilisateur
Stephane Maillard
Lord of DominoArea
Lord of DominoArea
 
Message(s) : 8695
Inscrit(e) le : 16 Déc 2004 à 01:10
Localisation : Bretagne


Retour vers Développement

cron