My application makes use of a special dll. This dll has a function:
Function ReaderType(Byref Par1 as Uint32) as Uint32
Soft Declare Function GetReaderType Lib "uFCoder1x.dll" (byref get_reader_type As Uint32) As UInt32
Return GetReaderType(Par1)
The function GetReaderType of the Lib “uFCoder1x.dll” return 2 value: a normalu Return Value Uint32 and also it write another Uint32 in the parameter that i pass it!(Par1)
And it work: if i put a breakpoint in Return GetReaderType(Par1) in Par1 there is the information that i need.
But when i call Function ReaderType(xyz) in xyz there is 0 (zero).
I would “assume” from what you have indicated that that is in fact the correct value…
But to “prove” it… here is what I’d do…(because your code looks ok).
add a line BEFORE the return… that says Parl=12345
if the function STILL returns Zero… then that is what it should be…
if it returns 12345 then the Declare is not altering the byref value at all, and returns what was passed.
Along Dave’s line of reasoning, you can also “intercept” the value.
Function ReaderType(Byref Par1 as Uint32) as Uint32
Soft Declare Function GetReaderType Lib "uFCoder1x.dll" (byref get_reader_type As Uint32) As UInt32
dim r as UInt32
dim myPar1 as UInt32 = Par1
r = GetReaderType(myPar1)
Par1 = myPar1 // Break here to compare the values before this assignment
return r
End Function