on ‎2017 Apr 06 9:37 PM
Hi,
I am trying to call a function located in a DLL that was developed for us. When I try to run the script it is showing me the following error: "Error opening DLL library Encryption.dll for external function at line ....... ".
How I am defining the External functions on PowerBuilder?
Function string EncryptStringAES &
(string plainText, &
string sharedSecret &
) Library "Encryption.dll" Alias For "EncryptStringAES"
Function string DecryptStringAES &
(string cipherText, &
string sharedSecret &
) Library "Encryption.dll" Alias For "DecryptStringAES"
How they are in the DLL ?
The class name is Crypto, and it is in the Encryption namespace.
public static string EncryptStringAES(string plainText, string sharedSecret)
public static string DecryptStringAES(string cipherText, string sharedSecret)
I am using PB 10.2.1 , for now!
Thanks.
Request clarification before answering.
Another way to show my issue:
--------------------------------------------
The dll was built on the .NET 2.0 and 4.0 Framework trying to identify the issue.
---
using System;
using System.Collections.Generic;
using System.Text;
namespace Test
{
publicclassClass1
{
publicstring HelloWorld()
{
return"Hello";
}
publicstring HelloWorld2(string test)
{
return test;
}
publicvoid HelloWorld3(string test1, outstring test2 )
{
test2 = test1;
}
}
}
-----------------------------------------
Local external Function definition:
Function string HelloWorld2 &
(string test &
) Library "Test.dll" Alias For "HelloWorld2;ansi"
-----------------------------------------
Calling the external function:
String ls_value, ls_returned
ls_value = Trim(sle_source.text)
ls_returned = HelloWorld2(ls_value)
IF Not IsNull(ls_returned) THEN
sle_encrypted.text = ls_returned
END IF
-----------------------------------------
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.