I'm attempting to use ccall to interface with a Windows function (FindWindowA to be specific), but i'm getting a weird behavior
julia> ccall((:FindWindowA, :user32), Int32, (Ptr{Cvoid},), C_NULL)
855386
julia> foo() = ccall((:FindWindowA, :user32), Int32, (Ptr{Cvoid},), C_NULL)
foo (generic function with 1 method)
julia> foo()
0
julia> @ccall :user32.FindWindowA(C_NULL::Ptr{Cvoid})::Int32
65920
julia> foo() = @ccall :user32.FindWindowA(C_NULL::Ptr{Cvoid})::Int32
foo (generic function with 1 method)
julia> foo()
0
Is there a way to get consistent results from ccall?