Retirer l'encryption d'une base

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

Retirer l'encryption d'une base

Messagepar Michael DELIQUE » 03 Juil 2012 à 08:32

Bon ben tout est dans le titre

j'ai besoin de pouvoir retirer l'encryption d'une base et bien sur je dois automatiser la tache...
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

Re: Retirer l'encryption d'une base

Messagepar Michael DELIQUE » 03 Juil 2012 à 11:09

la seule maniere de faire c'est par une copy de la base via des apis

Code : Tout sélectionner
Declare Function W32_NSFDbOpen Lib "nnotes.dll" Alias "NSFDbOpen" (   ByVal dbName As String,   hdb As Long) As Integer
   Declare Function W32_NSFDbClose Lib "nnotes.dll" Alias "NSFDbClose" (ByVal hdb As Long ) As Integer
   Declare Function W32_DesignRefresh Lib "nnotes.dll" Alias "DesignRefresh" (   ByVal Server As String,ByVal hdb As Long,ByVal dwFlags As Long,   ByVal null0 As Long,ByVal null1 As Long) As Integer
   Declare   Function W32_NSFDbCreateAndCopy Lib "nnotes.dll" Alias "NSFDbCreateAndCopy" (ByVal srcDb As String,ByVal dstDb As String,ByVal NoteClass As Integer, ByVal limit As Integer,   ByVal flags As Integer,   RetHandle As Long) As Integer
   Const NOTE_CLASS_ALL = &H7FFF&
   Const NOTE_CLASS_NONE = &H0000&
   Const NOTE_CLASS_ALLNONDATA = &H7FFE&
   Const DBCOPY_ENCRYPT_STRONG = &H100& ' ==Click
   Const DBCOPY_REPLICA = &H0001&

   'Creating a new copy of the server db on a local workstation
   Dim hDB As Long
   Dim ret As Integer
   Dim SourceDb As String
   Dim DestinationDb As String
   SourceDb = "toto\encrypted.nsf"
   DestinationDb = "toto\Notencrypted.nsf"
   Call W32_NSFDbCreateAndCopy(SourceDb, DestinationDb, NOTE_CLASS_ALL, 0, DBCOPY_REPLICA, 0)
   Call W32_NSFDbOpen(DestinationDb, hDb)
   Call W32_NSFDbClose(hDb) 'Changing the title of the db and opening it for the user
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 Développement