Re: Dll
- From: "Wiebe@CARYA" <wiNOebe.walsSPtra@xxxxxxxxxx>
- Date: Thu, 17 Jan 2008 12:01:14 +0100
And the LONG is an I32.
To explain a bit more (to help you understand the dll a bit better)... The
return value is always a 32 bit value. This value that is returned is always
the processors eax register, and this cannot be anything else (as long as
"C" or "Std" calling convension are used). So basically, you can always set
it to U/I32, even if the return value is a string. This is because a string
pointer is also a U32!
So you never need to worry about the type of the return value. LabVIEW will
never crash if it is wrong, even if you make it void!
For the other parameters the stack is used. The other parameters of the
function can be 8, 16 or 32 bit, since these types can be used with the
stack. So a boolean in any other that the return value will probably be an
u8 (although that might depend on the language the dll is made in, and the
compiler).
The return address (the address from where the function is called) is also
on the stack, so if you configure the dll with the wrong number of
parameters, or the wrong types, LabVIEW will give an error when the code is
executed, or (worse case) it will crash!
Regards,
Wiebe.
.
- Prev by Date: Re: read the raw image file
- Next by Date: Re: Format elapsed time
- Previous by thread: Re: read the raw image file
- Next by thread: Re: Dll
- Index(es):
Relevant Pages
|