This code looks to be a potential massive help for me. I am building a C# executable and cannot register the AutoIt dll on the target machine.
I was doing some testing of this technique versus the use of the registered DLL and I was surprised to find out that the two techniques gave different results. An example of this is when I called WinGetPosX and WinGetPosY. If I call using the registered DLL and a C# standard reference I get correct coordinates for the window. If I call using
AutoItX3Declarations.AU3_WinGetPosX
AutoItX3Declarations.AU3_WinGetPosY
I get a value of 1 returned by both of these functions.
Anybody got a guess as to what I might be missing or how I am shooting myself in the foot?
Oh, and BTW, I don't think that this odd result has anything to do with the code provided for AutoItX3Declarations in this thread. The reason I say that is because I was getting coordination of 1,1 for my window even before I switched from my own DLLImports to using the class provided here.