We help IT Professionals succeed at work.

Embedding a C# dll into a Python script

cshore12
cshore12 asked
on
3,283 Views
Last Modified: 2012-06-21
This question concerns an alternate approach to my currently open question.

I have a C# dll that consists of a number of classes, plus a user form.  I'm embedding the dll into a Python script that starts as follows:

from ctypes import *
y = cdll.LoadLibrary("c:\\Projects\\Front Counter\\fc_main\\FC_Main\\bin\\Debug\\FC_Main.dll")

I'm not sure where to go from here.  Basically, I can't call a method directly (e.g., y.<some method>) because all the methods are contained within classes in the dll.

How can I implement the Python script so that I can access the methods, properties, etc. of the dll?

Thanks in advance...
Comment
Watch Question

Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
jdavistx provided a link that I was already familiar with, and which was difficult to follow.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.