[Python.NET] C# .net dll used in python
Mark McMahon
mark.mcmahon at eur.autodesk.com
Thu Mar 30 15:24:58 CEST 2006
Hi,
It would look to me like the gpcifunc.dll is a C dll not a .NET one?
Isn't that what DllImport is for (note I do not know .NET very well - so I could be wrong).
If it is a C Dll - then what you need to access that method is probably ctypes.
Mark
-----Original Message-----
From: pythondotnet-bounces at python.org [mailto:pythondotnet-bounces at python.org] On Behalf Of Lalit DIGARI
Sent: Thursday, March 30, 2006 7:05 AM
To: pythondotnet at python.org
Subject: [Python.NET] C# .net dll used in python
Hello All,
I am trying to use a c# dll in python application I follows the following steps.
import CLR
from CLR.System.Reflection import Assembly
my_dll_name = Assembly.LoadWithPartialName('VPCI')
from CLR.System.Windows.Forms import Form
from CLR.TestWinForm import Form1
VPCI = Form1()// Form1 is a class in my .net dll
but I am getting CLR.system.DllNotFoundException:unalble to laod DLL(gpci.dll)
While gpci.dll is defined in my .net application as
[DllImport("gpcifunc.dll")]
unsafe public static extern Int32 gpciOpen (Int32 dReserved) ;
Form where the exception genrating
Can any one help me out.
2) in case I am using
my_dll_name = Assembly.LoadWithPartialName('path of dll')
Then my_dll_name is getting none while I am keeping the dll in my python root path it is working fine
Anyone has any clue.
Regard's
Lalit
_________________________________________________
Python.NET mailing list - PythonDotNet at python.org
http://mail.python.org/mailman/listinfo/pythondotnet
More information about the PythonDotNet
mailing list