Re: ByVal

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Karproxid (uce_at_ftc.gov)
Date: 07/15/04


Date: Thu, 15 Jul 2004 14:37:41 GMT

Karproxid <uce@ftc.gov> wrote in article
<01c46a77$6fffe3f0$fc10ba3f@cooper>...
> Bob Butler <tiredofit@nospam.com> wrote in article
> >
> > What do the FreeImage_GetXXX routines return? I'm guessing that they
are
> > returning pointers to the data so in your API call you have to use
ByVal
> to
> > pass that pointer value in the parameter. If you use ByRef you'd be
> sending
> > a pointer to a pointer which would not be valid.
>

> I see. But then why does the cpp version also fail?

Figured it out:
needs to be:
Public Declare Function BMP_From_DIB Lib "that.dll" (ByVal DIB As Long) As
Long

not
Public Declare Function BMP_From_DIB Lib "that.dll" (ByRef DIB As Long) As
Long



Relevant Pages

  • Trying to use GetProcAddress to call a function in a DLL using Visual Basic
    ... I am trying to call a pointer to function that resides in a DLL using ... Lib "kernel32" As Long Declare Function ... Dim hLib As Long ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Memory access in shared object?
    ... pointer to the variable but if I try to override the variable ... The main program loads the library which has the variable that ... gives the function pointer as a parameter to the initialize function. ... // The new instance of ClassName ...
    (comp.os.linux.development.apps)
  • Re: The staggering power of closures
    ... sigurd@12move.de (Karl Pflästerer) writes: ... Thank you for the pointer. ... > cl.el ist an extremly good lib for Emacs. ... There is no worse tyranny than to force a man to pay for what he doesn't ...
    (comp.lang.lisp)
  • Re: what type should I cast?
    ... I'm using a pointer array(by gtk+ lib) to store the function ... As I get the element of the pointer array, ... have no idea how to cast void pointer in to my function pointer!!!! ...
    (comp.unix.programmer)
  • Re: what type should I cast?
    ... I'm using a pointer array(by gtk+ lib) to store the function ... As I get the element of the pointer array, ... have no idea how to cast void pointer in to my function pointer!!!! ...
    (comp.unix.programmer)