1

I have a driver which is written in C#, .NET 4.7.0 and build as DLL. I don't have sources from this driver. I want to use this driver in python application.

I wrapped some functionality from driver into method of another C# project. Then I built it into DLL. I used RGiesecke.DllExport to make one method available in python. When i call this method from python using ctypes, I get WinError -532462766 Windows Error 0xe0434352.

If I exclude driver code and keep only wrapper code in exported method everything runs fine.

Could you please give me some advice how to make this working or help me find better sollution? Moving from python to IronPython is no option here.

Thank you.

  • The first problem is debugging the error you're getting. "WinError -532462766" and "Windows Error 0xe0434352" are wildly unhelpful. [This](https://stackoverflow.com/questions/14711633/my-c-sharp-application-is-returning-0xe0434352-to-windows-task-scheduler-but-it) thread might help you debug what the underlying error actually is. – Aaron May 20 '19 at 17:02
  • The problem occurs when I execute code from wrapped library in python app. I tested few things ant it looks like library was not loaded for some reason. Event viewer is empty. I have found no errors there. – Michal Zhradnk Nono3551 May 21 '19 at 07:22

1 Answers1

0

PROBLEM CAUSE: Python didn't run wrapper from directory where it was stored together with driver. That caused problem with loading driver.