Python Forum
Integration of Python and C using .dll files
Thread Rating:
  • 2 Vote(s) - 2.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Integration of Python and C using .dll files
#10
Larz60+,

Yeah, I some comments on the top because I figured it would help make the code more clear.  I forgot that it gave line numbers.  Sorry about that.  All I removed was:


# -*- coding: utf-8 -*-
"""
Created on Sun Mar  5 10:42:35 2017

@author: Zach
"""
So, starting with the first error (the Null), there isn't a line error with that because that is an error that is returned from the .dll file.  All the .dll file returns is error codes (or a 0 if it executes without an error).  So that would be an error with the cbTIn() function at that line.  Unfortunately, I don't know what variable is considered "NULL" as all of them should have been defined using c_int or c_float.

As far as the second set of errors, it is the testVal variable that is causing the errors.  That is the value that I am trying to read once the cbTIn() function is done executing.  That is really where my question is, how do I get that value?  I can't simply give the function an undefined variable and then call it later, then I get an error that says that the variable is undefined.  It would be a ton easier if the cbTIn() function just returned the value, but it doesn't.  And, I am limited by the fact that it is the coding provided by Omega and I cannot seem to access the file such that I can see exactly what it is doing.

Thanks again for all of your help,

Zach
Reply


Messages In This Thread
RE: Integration of Python and C using .dll files - by zbiegler - Mar-15-2017, 12:41 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to run this triple integration in python Safinazsalem 1 314 May-20-2024, 11:43 AM
Last Post: Axel_Erfurt

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020