Jump to content

Recommended Posts

Posted

I have following Powershell. I'm trying to convert it to AutoIt code but not familiar with AutoIt and DLL. How can I create a RdcMan.EncryptionSettings object? And is the DLLCall correct?

Powershell:

# RDCMan.dll renamed from C:\Program Files (x86)\Microsoft\Remote Desktop Connection Manager\RDCMan.exe
Import-Module ".\RDCMan.dll"
[RdcMan.Encryption]::EncryptString($args[0], (New-Object -TypeName RdcMan.EncryptionSettings))

AutoIt:

    Local $RDCManDLLFile = @ScriptDir & "\RDCMan.dll"
    Local $RDCManDLL = DllOpen($RDCManDLLFile)

    ; Create a RdcMan.EncryptionSettings here:

    Local $EncryptionSettings = something
    Local $EncryptedTargetPassword = DllCall($RDCManDLL, "str", "EncryptString", "str", $TargetPassword, "ptr", DllStructGetPtr($EncryptionSettings))

Thx

Posted

Hello, RDCMan.dll is a net library so You can't use it with dllcall. You could probably  use it with AutoIt CLR UDF. 

 

 

Saludos

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...