
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

Thanks buddy , I got the point path was not proper for that dll Can u thorugh some light on the problem which is coming 1)my_dll_name = Assembly.LoadWithPartialName('C:\\986tool\\vpci) 2)my_dll_name = Assembly.LoadWithPartialName('vpci') In case 1 my_dll_name is coming none while in case 2 works fine any clue Thanks -----Original Message----- From: pythondotnet-bounces@python.org [mailto:pythondotnet-bounces@python.org] On Behalf Of mtraudt@quantifisolutions.com Sent: Thursday, March 30, 2006 4:04 PM To: pythondotnet@python.org Subject: Re: [Python.NET] C# .net dll used in python
While gpci.dll is defined in my .net application as [DllImport("gpcifunc.dll")] unsafe public static extern Int32 gpciOpen (Int32 dReserved) ;
Is gpcifunc.dll in your Windows %PATH% environment variable? _________________________________________________ Python.NET mailing list - PythonDotNet@python.org http://mail.python.org/mailman/listinfo/pythondotnet
participants (2)
-
Lalit DIGARI
-
mtraudt@quantifisolutions.com