Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to write code to call Cryptor
Message
De
12/06/2007 05:47:51
 
 
À
11/06/2007 18:11:08
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Divers
Thread ID:
01231867
Message ID:
01232188
Vues:
14
Thank you for the help, Daniel. I was able to get the program to compile without errors :) but have run into a permissions problem at oXitechCryptor = New XitechCryptor.Cryptor() I clicked on "Add Permision to the project" as suggested by debugger, but that did not solve problem. Any suggestions?

Sorry for the very basic questions. Thanks.

Alex
Imports XitechCryptor

Module Module1
    Public oXitechCryptor As XitechCryptor.Cryptor
    Sub Main()
        ' Instantiate Cryptor and tell it to watch disk access by oledb32.dll
        oXitechCryptor = New XitechCryptor.Cryptor()
        oXitechCryptor.WatchDLL("oledb32.dll")

        ' Register table plemp.dbf with Cryptor as encrypted
        MyCryptor("plemp.dbf")

        ' Access plemp.dbf via vfpoledb
        Dim oConn As ADODB.Connection
        Dim oRS As ADODB.Recordset
        oConn = New ADODB.Connection
        oRS = New ADODB.Recordset
        Dim cConnString = "Provider=vfpoledb;Data Source=" + "z:\VPay950\Contab\sosa"
        oConn.Open(cConnString)
        oRS = oConn.Execute("SELECT * FROM plemp")
        Console.Write(oRS.Fields("ccodemp").Value)
        oRS.Close()
        oConn.Close()
    End Sub

    Sub MyCryptor(ByVal tcFile As String)
        Dim nCryptAlgo As UInteger
        Dim cCryptPW As String
        nCryptAlgo = 1
        cCryptPW = "Password"
        oXitechCryptor.Register(tcFile, cCryptPW, nCryptAlgo)
    End Sub

End Module
>Hey Alejandro,
>
>The best thing for you to do is add a reference to the xitechCryptor in your project. Then analyze the object in the object browser and figure out what you need to call.
>
>Then your code for the XitecCryptor will be something like this
>
>Imports XitecCryptor 'Note, don't use XitecCryptor, the correct term is
> ' the object browser
>
>Then in whatever program or event you are using.. add something like this.
>
>Dim oXitecCryptor As New XitecCryptor()
>oXitecCryptor.WatchDLL('oledb32.dll')
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform