Screen Saver

Screen Saver

Messagepar Michael DELIQUE » 06 Nov 2007 à 09:05

Code : Tout sélectionner
Public Function ScreenSaver_API As String
   
%REM
'Variables API pour la fonction
Declare Function GetPrivateProfileString Lib "Kernel32" Alias "GetPrivateProfileStringA" (Byval lpApplicationName As String, Byval lpKeyName As Any, Byval lpDefault As String, Byval lpReturnedString As String, Byval nSize As Long, Byval lpFileName As String) As Long
%END REM
   
   'Déclaration Variable
   Dim ScreenSaver As String *128   
   Dim i As Integer   
   
   On Error Goto ErreurScreenSaver_API   
   
   i = GetPrivateProfileString  ("BOOT","scrnsave.exe","", ScreenSaver,127,"c:\windows\system.ini")
   If i = 0 Then
      ScreenSaver_API= ""
   Else
      ScreenSaver_API=  Left(ScreenSaver,i)
   End If
   
   ScreenSaver = ""
   i=0
   
   Exit Function
ErreurScreenSaver_API:
   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 !"
   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
Avatar de l’utilisateur
Michael DELIQUE
Administrateur
Administrateur
 
Message(s) : 12183
Inscrit(e) le : 16 Déc 2004 à 10:36
Localisation : Paris/Cergy

Retour vers API