Using custom c++ dll in Sikulix
Hello,
I've written a small c++ dll to crypt and decrypt strings, I have to use it from .net and from Sikulix; it works if called from .net code.
The two functions have these prototypes:
int encrypt( char str2Encrypt[]);
void decript(unsigned char strDecrypt[]);
Checking in the Jython source I've found c:\jython2.
import ctypes
from ctypes import *
libc = ctypes.
And this works (at least no runtime error), the output of the
print libc
line is:
<ctypes.
My problem is that then I'm stuck since the line:
libc.LoadLibrar
outputs these errors:
[error] script [ testScript ] stopped with error in line 17
[error] TypeError ( 'str' object is not callable )
[error] --- Traceback --- error source first
line: module ( function ) statement
289: __init__ ( LoadLibrary ) return self._dlltype(name)
17: main ( <module> ) libc.LoadLibrar
[error] --- Traceback --- end --------------
I'm not an expert of python, so the problem could be that I'm simply ignoring the way it should be, does anyone has an example to follow?
Thanks in advance
My config is as follows:
sikulix 2.0.5, java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask matteoa for more information if necessary.