Check the handle return value and GetLastError, fixing non working windows apis is usually pretty easy and straight forward (atleast in the usermode world and non native apis)

To fix the loop to set the cursor you should just hook the SetCursor API of acknex itself and ignore everything which was not set by you.
You can use a simple detours but the easiest hooking technique would be an IAT hook imo.

Last edited by Ch40zzC0d3r; 03/12/17 20:02.