WalmartCart Posted March 5, 2014 Share Posted March 5, 2014 (edited) Hello, we use ImageSearchDLL.dll in AutoIT. Recently, I want to build a project using ImageSearchDLL.dll, but this time using C#. However, I couldn't get ImageSearch function working. I searched online for 2 days and I saw many people had the same problem and it is still not resolved. For example, >Thread in this forum and in other forum too. "As soon as it tried to call ImageSearch, the program crashes without any exception." Tried "try...catch" and it does not show any error message. But in the output box I got this: The program '[7344] Project.vshost.exe: Managed (v4.0.30319)' has exited with code 1073741855 (0x4000001f). Other people I found online had the same message when they try to use ImageSearchDLL.dll in C#. Is it true that ImageSearchDLL.dll can only to be utilized in AutoIT? Or there is something else I need to add from AutoIT so I can use ImageSearchDLL.dll in C# without adding AutoItx3.dll. This is how I provoke the dll. And I am sure I used it right as I have provoked other DLL and they worked. [DllImport("ImageSearchDLL.dll")] static extern string ImageSearch(int aLeft, int aTop, int aRight, int aBottom, string aImageFile); Thanks. Edited March 5, 2014 by WalmartCart Link to comment Share on other sites More sharing options...
Richard Robertson Posted March 6, 2014 Share Posted March 6, 2014 Functions in native dlls don't return strings. That's never going to happen. The problem is that you are either corrupting shared memory or trying to access something invalid. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now