Customer Script Invoke DLL

Hi,

I am trying to invoke a class from a DLL in a customer script. I have loaded this DLL into the database and it is deployed onto the host I am working off.

I have attempted to look through the forums and guides, although the best I have managed to find is suggestions to call DLLs from scripts without a how to.

I have tried to just call an Imports command although after going through the system debugger I can see this is in a class which explains why it didn't take effect.

Long story short, is it possible to call a DLL from a script eg:

Sub CCC_Test

    Dim MyObj as New DLLClass

End Sub

Any pointers will be of interest.

Parents
  • OneIdentity.8.1.5.zip: Modules\QBM\dvd\AddOn\SDK\ScriptSamples\07 Expert knowledge

    '*************************************************************************
    '*
    '* This sample references OracleClient.dll into the script environment.
    '* The contained classes can then be used in scripts.
    '*
    '************************************************************************
    #If Not SCRIPTDEBUGGER Then
    References System.Data.OracleClient.dll
    #End If
    
    
    '*************************************************************************
    '*
    '* This sample imports the System.Data.OracleClient namespace. This 
    '* allows the usage of classes without specifying the fully qualified 
    '* name.
    '*
    '************************************************************************
    #If Not SCRIPTDEBUGGER Then
    Imports System.Data.OracleClient
    #End If
    

Reply
  • OneIdentity.8.1.5.zip: Modules\QBM\dvd\AddOn\SDK\ScriptSamples\07 Expert knowledge

    '*************************************************************************
    '*
    '* This sample references OracleClient.dll into the script environment.
    '* The contained classes can then be used in scripts.
    '*
    '************************************************************************
    #If Not SCRIPTDEBUGGER Then
    References System.Data.OracleClient.dll
    #End If
    
    
    '*************************************************************************
    '*
    '* This sample imports the System.Data.OracleClient namespace. This 
    '* allows the usage of classes without specifying the fully qualified 
    '* name.
    '*
    '************************************************************************
    #If Not SCRIPTDEBUGGER Then
    Imports System.Data.OracleClient
    #End If
    

Children
  • That's it. Taking that very same example, we're using references to Devart dll to handle Oracle calls:

    (...)

    #If Not SCRIPTDEBUGGER Then
    References Devart.Data.Oracle.dll
    Imports Devart.Data.Oracle

    (...)

    Dim cs As New Devart.Data.Oracle.OracleConnectionStringBuilder()

    Try

    cs.ConnectMode = Devart.Data.Oracle.OracleConnectMode.Default

    HtH!