C#C
C#3y ago
Cience

❔ not all code paths return a value

this code

im like 99% sure i need a return statement and without
Mouse Hook says "not all code paths return a value"
but when i add the return statement the error goes away with a new one on the "return;"

an object of type convertible to "IntPtr" is required, can someone show me how to fix this?


public IntPtr MouseHook(int left, int top)
{
SetCursorPos(left, top);
hookId = Hook(process);
return;
}
Was this page helpful?