This function has been superseded by the function
SendInput
:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646310%28v=vs.85%29.aspx[
^].
I don't say it will solve your problem, but with this function I never had any problems.
Your problem sounds rather strange. I would rather believe that you have miscalculated the click location or some other detail, but you did not provide enough information to pinpoint the problem. You can generate something based on exact coordinates, use your method and run target test application (not the one simulating the click) under the debugger, to check the coordinate.
I also must note, just in case: if, by any chance, you are using the simulation to write regular UI, it would be great abuse. However, there are cases where the user input simulation is important, for example, playing keyboard/mouse macro, creation of UI testing systems, etc.
—SA