2- When compiling the dll in 64 bits, integer are consider 64 bits with pointer :
Code: Select all
#Include Once "windows.bi"
declare function Scan alias "Scan"(byval struct as integer pointer, byval color as integer, byval length as integer) as integer
function Scan(byval struct as integer pointer, byval iColor as integer, byval length as integer) as integer export
MessageboxEx(0, str(*struct), "Test", MB_OK, 0)
for i as integer = 0 to length - 1
if struct[i] = iColor then
function = i + 1
exit function
end if
next
function = 0
end function