PJRoyle
Member
I have a 3rd-party product (as a .dll) for which I declare the functions in a similar way to the way it is done for the Windows API, eg "declare function Function_name lib "lib_name" (....)
For string variables, it seems to need them passed ByVal - if they are passed ByRef, it causes an error.
I thought if a variable was passed ByVal, the original copy of the variable was not accessible to the called function, so how on earth can it return a value in the variable?
It clearly is doing, because it works, but I cannot understand how it can work.
Can anyone explain this to me, please?
TIA,
Peter Royle
For string variables, it seems to need them passed ByVal - if they are passed ByRef, it causes an error.
I thought if a variable was passed ByVal, the original copy of the variable was not accessible to the called function, so how on earth can it return a value in the variable?
It clearly is doing, because it works, but I cannot understand how it can work.
Can anyone explain this to me, please?
TIA,
Peter Royle