Miha Markic
03-13-2000, 04:27 AM
> > My guess is that it'll only be possible for static methods of the
> > class, or Shared methods ad they are called on the NextGen pages.
> >
> > That's the way it works in Delphi and C++ if I've understood it
> > correctly, and the only way that makes sense.
>
> You can get pointers to non-static members and pass them to, say, a
> SHBrowseForFolder callback. Some of them work OK, some of them crash
merrily
> (in my experience, this is true of a lot of the other Win32 callbacks).
>
> The one problem I see the VB team having with these jewels is that in
normal
> C++ static members you basically loose the ability to communicate with the
> rest of the class. So you have no 'this' pointer (i.e., no 'Me'), no
access
> to non-static members, etc.
>
> It'll be interesting to see how they solve *that* one, if in fact their
> "shared" procedures are equivalent to C++'s static ones.
>
Delphi solved this with function MakeObjectInstance which takes as argument
the object's function and output you can pass to an API function. Then your
object funcion is called. No need for static functions.
Probably VB will have something like that.
Miha
> > class, or Shared methods ad they are called on the NextGen pages.
> >
> > That's the way it works in Delphi and C++ if I've understood it
> > correctly, and the only way that makes sense.
>
> You can get pointers to non-static members and pass them to, say, a
> SHBrowseForFolder callback. Some of them work OK, some of them crash
merrily
> (in my experience, this is true of a lot of the other Win32 callbacks).
>
> The one problem I see the VB team having with these jewels is that in
normal
> C++ static members you basically loose the ability to communicate with the
> rest of the class. So you have no 'this' pointer (i.e., no 'Me'), no
access
> to non-static members, etc.
>
> It'll be interesting to see how they solve *that* one, if in fact their
> "shared" procedures are equivalent to C++'s static ones.
>
Delphi solved this with function MakeObjectInstance which takes as argument
the object's function and output you can pass to an API function. Then your
object funcion is called. No need for static functions.
Probably VB will have something like that.
Miha