API : Short, Integer and Long ByAddress
Posted: Sat Aug 11, 2012 8:35 am
Bonjour/Hello
when I declare string variable in a function of DLL, that works well. but not with numric data.
ex :
declare SQLRowCount as "SQLRowCount" of "odbc32.dll"
SQLstmt as long
rowcount as short byaddress
result as short
end declare
in program :
SQLRowcount.execute, and SQLRowCount.rowcount give wrong result
but if I declare and pass the adresse it is good
ex :
declare SQLRowCount as "SQLRowCount" of "odbc32.dll"
SQLstmt as long
rowcount as long
result as short
end declare
SQLRowcount.rowcount = Varptr(short_var)
SQLRowcount. execute
short_var have the good value.
What is wrong with the first form?
Merci/Thanks.
Bruno
when I declare string variable in a function of DLL, that works well. but not with numric data.
ex :
declare SQLRowCount as "SQLRowCount" of "odbc32.dll"
SQLstmt as long
rowcount as short byaddress
result as short
end declare
in program :
SQLRowcount.execute, and SQLRowCount.rowcount give wrong result
but if I declare and pass the adresse it is good
ex :
declare SQLRowCount as "SQLRowCount" of "odbc32.dll"
SQLstmt as long
rowcount as long
result as short
end declare
SQLRowcount.rowcount = Varptr(short_var)
SQLRowcount. execute
short_var have the good value.
What is wrong with the first form?
Merci/Thanks.
Bruno