Re: Dll



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.


.



Relevant Pages

  • Re: STA cannot prevent multiple client calls accessing at the same time??
    ... making a cross-apartment call from an STA. ... DLL object runs on. ... As for the suddenly changing call stack - that's a debugger quirk - ... And maybe I am not an Appz ...
    (microsoft.public.vc.atl)
  • Re: AD+ crash logs and .dmps Part II
    ... This a .dll provided by an online payment verification ... The Debugger docs have some basic info but overall, understanding ... details the formation and usage of the stack. ...
    (microsoft.public.inetserver.iis.security)
  • Re: tracking down error in MFC42.dll
    ... (I used WinDbg to do that, but the same can be done ... The same could be done for your dll if it would be built with debug ... If you put symbols of your dll on the target system (in the same ... what the call stack shows. ...
    (microsoft.public.vc.mfc)
  • Win32 DLL project randomly crashes after moving to VS2005
    ... the first step was to take care of the compilation ... The problem is that when I run my DLL it crashes in apparently random places ... I had a crash within a dialog's window procedure and another ... image library were generating a "stack overflow" message. ...
    (microsoft.public.vc.ide_general)
  • Win32 DLL project randomly crashes after moving to VS2005
    ... the first step was to take care of the compilation ... The problem is that when I run my DLL it crashes in apparently random places ... I had a crash within a dialog's window procedure and another ... image library were generating a "stack overflow" message. ...
    (microsoft.public.vstudio.general)