Skip to main content

All Questions

Tagged with
0 votes
0 answers
51 views

Pyinstaller unable to load a DLL dynamically at runtime

I'm building an application that requires loading a software specific DLL at runtime. The application is built using Pyinstaller, but since the DLL must be loaded at runtime (depending on the user's ...
tomas-silveira's user avatar
0 votes
0 answers
30 views

Python call to DLL via CDLL Results in "STATUS_STACK_BUFFER_OVERRUN" Exception

I'm trying to make a call to an (https://www.autelrobotics.com/doc/609/) via a DLL in Python and the app crashes before the call returns. The Windows error logs show it to be a "...
Charlie Grove's user avatar
0 votes
1 answer
25 views

Why ctypes.CDLL is assuming long result type even though it's actually is long long?

Consider python code below - it seems that calling .dll's function is assuming long time for some reason (system is windows x64 if it's important). Why it's doing this? Is there way to disable it? ...
FamousSnake's user avatar
0 votes
0 answers
31 views

Python ctypes to send "Path" datatype to DLL

I have been learning how to use Python ctypes module to run DLLs created with LabVIEW following the C calling conventions. I've had success with integers and strings, but not with filepaths. The ...
gjacob's user avatar
  • 1
0 votes
1 answer
101 views

How does Python consume DLL files without needing the import file (.lib)?

I just finished a tutorial on building a DLL library. From the tutorial I learnt that a DLL also has an associated lib file, which the linker will use to statically linked in information to the client ...
memelord23's user avatar
0 votes
1 answer
38 views

How can I print the contents of an address after sending the pointer to a c++ dll from Python?

//The function in the dll is where all I am doing is writing a value to that address: BOOL test_sizeKey(unsigned short *sizeKey) { BOOL rc = TRUE; *sizeKey = 150; return rc; } My python ...
engrtech's user avatar
0 votes
0 answers
118 views

Unload a dll using ctypes (or other) in python

I'm struggling to unload a previously loaded fortran compiled dll inside a python loop. One important info : the dll is mine. I’m compiling the dll myself in VS with IFX compiler. Here is the issue : ...
xavfa's user avatar
  • 1
1 vote
1 answer
62 views

Cannot set restype of a function of CDLL: ctypes

Let's say, that I have a c++ dll. I have a function GET_LAST_MESSAGE, which returns char*. I cannot get the message from it, using python, because python suppose that this function returns long int. ...
Victor's user avatar
  • 45
0 votes
1 answer
55 views

Retrieving data via old DLL in python

I try to use an old DLL from 2001 in Python and there is almost no documentation left. After some work I could get some function running. But I cannot receive data. My knowledge of DLL and pointers is ...
nanoteilchen's user avatar
1 vote
0 answers
61 views

I want to import all the functions in C program from Python. I got OSError: [WinError 193] %1 is not a valid Win32 application

c file; Lets say func.c #include <stdio.h> int display(char* str, int age) { printf("Name %s age is %d",str,age); return 0; } In command prompt: gcc -fPIC -shared -o func.so ...
user22872177's user avatar
0 votes
0 answers
35 views

Import DLL | Ctypes

I am trying to import the functions of the DLL comes in the package XFLR5. https://sourceforge.net/projects/xflr5/files/6.59/ I have 2 questions. The function names look very different to what is ...
XYZ's user avatar
  • 354
0 votes
0 answers
57 views

Fail to release the memory after 2D array multiplication with python ctypes

I tried to call functions in DLL with python ctypes module. The functions perform 2D array multiplication successfully and created by C. The following source code would be packaged into "...
Alan Yu's user avatar
0 votes
0 answers
53 views

Access violation with ctypes

I am trying to use a DLL within a python script for a GUI using Tkinter. I get this error: write_flag=dfd.newp_usb_send_ascii(ctypes.c_long(deviceID),ctypes.c_char_p(cmd),ctypes.c_ulong(lengt))) ...
Hew08's user avatar
  • 3
0 votes
1 answer
119 views

how to passing arrays of strings from fortran dll to python with ctype

I want to read a file with a fortran dll using ctype. the structure of my file is: AX BX … . 4.0 5.0 6.9 1.2 8.0 7.0 … … … for read the file , i have PATH to pass to dll fortran and get a ...
didie's user avatar
  • 11
0 votes
0 answers
254 views

Ctypes LoadLibrary gives FileNotFoundError -- do you have to include header files when loading a C++ DLL in Python with ctypes?

I am attempting to load two C++ DLLs in a Python program using ctypes, however, one of the modules throws an error despite the other loading completely fine. Here is the code: import ctypes os....
fault's user avatar
  • 53

15 30 50 per page
1
2 3 4 5
30