DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 47

Thread: Registering DLL by code

  1. #16
    Michael Culley Guest

    Re: Registering DLL by code


    René,

    >I also stated that I can't remember where I got the function to call a
    >pointer


    Search for "Byt(0) = &H58". My original post will pop up first in the list.

    >I'd be
    >glad to add a "Special Thanks to ..." mentioning you writing this function


    I think that I deserve at least equal billing. All the code in the module
    is run of the mill, except for the function that I wrote. This function was
    not modified at all, except to add a variable that was not referenced (?).

    >You must understand though that I can't act as long as you didn't answer

    my
    >eMail reply.


    I only got your email now and have replied immediately.

    Michael Culley




    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >Michael,
    >
    >as in the reply to your eMail, the module WAS developed by me.
    >I also stated that I can't remember where I got the function to call a
    >pointer, and that if you are the original author of this function, I'd be
    >glad to add a "Special Thanks to ..." mentioning you writing this function
    >(just like I did in our Fonts.bas).
    >The "Developed by" still stands for the module, which actually existed long
    >before I put the function_to_call_a_pointer in (initially it used
    >RegSvr32.exe, and I do remember me posting a couple of questions hereto

    in
    >microsoft.public.vb.winapi).
    >I also stated that I'll have to test the changes you made to the function
    >before putting them in (for which I then also add a line with your name

    to
    >the "Changes").
    >You must understand though that I can't act as long as you didn't answer

    my
    >eMail reply.
    >And again, if you are the author of the function, take my appologies for

    not
    >mentioning you in the first place.
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    >news:3928f71d$1@news.devx.com...
    >>
    >> René,
    >>
    >> '*************************************************************
    >> 'Developed by : R. Whitworth
    >> 'Date : 04/27/2000
    >> '*************************************************************
    >>
    >> This was developed by me!
    >>
    >> '*************************************************************
    >> 'Feel free to send us your wishes and enhancements to this
    >> 'module (or anything else you got from our pages).
    >> 'Any usefull enhancement will be added, and your name will
    >> 'be mentioned (see list below).
    >> 'Send enhancements to: R.Whitworth@w-s-s.de
    >> 'Send wishes to: Service@w-s-s.de
    >> '*************************************************************
    >>
    >> You didn't even put my name in there and I wrote it!
    >>
    >> Oh well, I do like the enhancements you have made.
    >>
    >> I'll take it as a compliment
    >>
    >> Michael Culley
    >>
    >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >> >On our site we have a file called InstallOCX.bas which should also work

    >> on
    >> >ActiveX DLLs.
    >> >
    >> >--
    >> >Hope this helps ...
    >> >
    >> >Rene Whitworth
    >> >Whitworth Software Solutions - Germany
    >> >http://www.w-s-s.de
    >> >Please reply to the newsgroup :-)
    >> >
    >> >
    >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    >> >> I doubt it will change.
    >> >>
    >> >> --
    >> >> MichKa
    >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    >> >>
    >> >> random junk of dubious value, at the multilingual,
    >> >> no scripts required, http://www.trigeminal.com/
    >> >>
    >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    >> >> news:3928b624@news.devx.com...
    >> >> > Hi Ron,
    >> >> >
    >> >> > We still have to use regsvr to register DLL files unfortunately.

    >Maybe
    >> >> that
    >> >> > will change in next VB 7!
    >> >> >
    >> >> > Sincerely
    >> >> >
    >> >> > Phil N.
    >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    >> >> > news:3928b292$1@news.devx.com...
    >> >> > >
    >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    >> >shelling
    >> >> > regsvr
    >> >> > > to accomplish this, any hint? Thanks in advance.
    >> >> > >
    >> >> > >
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >
    >
    >



  2. #17
    Michael Culley Guest

    Re: Registering DLL by code


    René,

    >I also stated that I can't remember where I got the function to call a
    >pointer


    Search for "Byt(0) = &H58". My original post will pop up first in the list.

    >I'd be
    >glad to add a "Special Thanks to ..." mentioning you writing this function


    I think that I deserve at least equal billing. All the code in the module
    is run of the mill, except for the function that I wrote. This function was
    not modified at all, except to add a variable that was not referenced (?).

    >You must understand though that I can't act as long as you didn't answer

    my
    >eMail reply.


    I only got your email now and have replied immediately.

    Michael Culley




    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >Michael,
    >
    >as in the reply to your eMail, the module WAS developed by me.
    >I also stated that I can't remember where I got the function to call a
    >pointer, and that if you are the original author of this function, I'd be
    >glad to add a "Special Thanks to ..." mentioning you writing this function
    >(just like I did in our Fonts.bas).
    >The "Developed by" still stands for the module, which actually existed long
    >before I put the function_to_call_a_pointer in (initially it used
    >RegSvr32.exe, and I do remember me posting a couple of questions hereto

    in
    >microsoft.public.vb.winapi).
    >I also stated that I'll have to test the changes you made to the function
    >before putting them in (for which I then also add a line with your name

    to
    >the "Changes").
    >You must understand though that I can't act as long as you didn't answer

    my
    >eMail reply.
    >And again, if you are the author of the function, take my appologies for

    not
    >mentioning you in the first place.
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    >news:3928f71d$1@news.devx.com...
    >>
    >> René,
    >>
    >> '*************************************************************
    >> 'Developed by : R. Whitworth
    >> 'Date : 04/27/2000
    >> '*************************************************************
    >>
    >> This was developed by me!
    >>
    >> '*************************************************************
    >> 'Feel free to send us your wishes and enhancements to this
    >> 'module (or anything else you got from our pages).
    >> 'Any usefull enhancement will be added, and your name will
    >> 'be mentioned (see list below).
    >> 'Send enhancements to: R.Whitworth@w-s-s.de
    >> 'Send wishes to: Service@w-s-s.de
    >> '*************************************************************
    >>
    >> You didn't even put my name in there and I wrote it!
    >>
    >> Oh well, I do like the enhancements you have made.
    >>
    >> I'll take it as a compliment
    >>
    >> Michael Culley
    >>
    >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >> >On our site we have a file called InstallOCX.bas which should also work

    >> on
    >> >ActiveX DLLs.
    >> >
    >> >--
    >> >Hope this helps ...
    >> >
    >> >Rene Whitworth
    >> >Whitworth Software Solutions - Germany
    >> >http://www.w-s-s.de
    >> >Please reply to the newsgroup :-)
    >> >
    >> >
    >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    >> >> I doubt it will change.
    >> >>
    >> >> --
    >> >> MichKa
    >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    >> >>
    >> >> random junk of dubious value, at the multilingual,
    >> >> no scripts required, http://www.trigeminal.com/
    >> >>
    >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    >> >> news:3928b624@news.devx.com...
    >> >> > Hi Ron,
    >> >> >
    >> >> > We still have to use regsvr to register DLL files unfortunately.

    >Maybe
    >> >> that
    >> >> > will change in next VB 7!
    >> >> >
    >> >> > Sincerely
    >> >> >
    >> >> > Phil N.
    >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    >> >> > news:3928b292$1@news.devx.com...
    >> >> > >
    >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    >> >shelling
    >> >> > regsvr
    >> >> > > to accomplish this, any hint? Thanks in advance.
    >> >> > >
    >> >> > >
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >
    >
    >



  3. #18
    Michael \(michka\) Kaplan Guest

    Re: Registering DLL by code

    M aybe it s just me, but I don't see the function as all that special
    either.

    Maybe you too could take this to private e-mail rather than airing it all
    out here in the open? It is not making ANYONE look good.

    --
    MichKa
    "Cause it's a bittersweet symphony, thats life..." -- The Verve

    random junk of dubious value, at the multilingual,
    no scripts required, http://www.trigeminal.com/

    "Michael Culley" <m_culley@one.net.au> wrote in message
    news:392a87b0$1@news.devx.com...
    >
    > René,
    >
    > >I also stated that I can't remember where I got the function to call a
    > >pointer

    >
    > Search for "Byt(0) = &H58". My original post will pop up first in the

    list.
    >
    > >I'd be
    > >glad to add a "Special Thanks to ..." mentioning you writing this

    function
    >
    > I think that I deserve at least equal billing. All the code in the module
    > is run of the mill, except for the function that I wrote. This function

    was
    > not modified at all, except to add a variable that was not referenced (?).
    >
    > >You must understand though that I can't act as long as you didn't answer

    > my
    > >eMail reply.

    >
    > I only got your email now and have replied immediately.
    >
    > Michael Culley
    >
    >
    >
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >Michael,
    > >
    > >as in the reply to your eMail, the module WAS developed by me.
    > >I also stated that I can't remember where I got the function to call a
    > >pointer, and that if you are the original author of this function, I'd be
    > >glad to add a "Special Thanks to ..." mentioning you writing this

    function
    > >(just like I did in our Fonts.bas).
    > >The "Developed by" still stands for the module, which actually existed

    long
    > >before I put the function_to_call_a_pointer in (initially it used
    > >RegSvr32.exe, and I do remember me posting a couple of questions hereto

    > in
    > >microsoft.public.vb.winapi).
    > >I also stated that I'll have to test the changes you made to the function
    > >before putting them in (for which I then also add a line with your name

    > to
    > >the "Changes").
    > >You must understand though that I can't act as long as you didn't answer

    > my
    > >eMail reply.
    > >And again, if you are the author of the function, take my appologies for

    > not
    > >mentioning you in the first place.
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    > >news:3928f71d$1@news.devx.com...
    > >>
    > >> René,
    > >>
    > >> '*************************************************************
    > >> 'Developed by : R. Whitworth
    > >> 'Date : 04/27/2000
    > >> '*************************************************************
    > >>
    > >> This was developed by me!
    > >>
    > >> '*************************************************************
    > >> 'Feel free to send us your wishes and enhancements to this
    > >> 'module (or anything else you got from our pages).
    > >> 'Any usefull enhancement will be added, and your name will
    > >> 'be mentioned (see list below).
    > >> 'Send enhancements to: R.Whitworth@w-s-s.de
    > >> 'Send wishes to: Service@w-s-s.de
    > >> '*************************************************************
    > >>
    > >> You didn't even put my name in there and I wrote it!
    > >>
    > >> Oh well, I do like the enhancements you have made.
    > >>
    > >> I'll take it as a compliment
    > >>
    > >> Michael Culley
    > >>
    > >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >> >On our site we have a file called InstallOCX.bas which should also

    work
    > >> on
    > >> >ActiveX DLLs.
    > >> >
    > >> >--
    > >> >Hope this helps ...
    > >> >
    > >> >Rene Whitworth
    > >> >Whitworth Software Solutions - Germany
    > >> >http://www.w-s-s.de
    > >> >Please reply to the newsgroup :-)
    > >> >
    > >> >
    > >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    > >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    > >> >> I doubt it will change.
    > >> >>
    > >> >> --
    > >> >> MichKa
    > >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    > >> >>
    > >> >> random junk of dubious value, at the multilingual,
    > >> >> no scripts required, http://www.trigeminal.com/
    > >> >>
    > >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    > >> >> news:3928b624@news.devx.com...
    > >> >> > Hi Ron,
    > >> >> >
    > >> >> > We still have to use regsvr to register DLL files unfortunately.

    > >Maybe
    > >> >> that
    > >> >> > will change in next VB 7!
    > >> >> >
    > >> >> > Sincerely
    > >> >> >
    > >> >> > Phil N.
    > >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    > >> >> > news:3928b292$1@news.devx.com...
    > >> >> > >
    > >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    > >> >shelling
    > >> >> > regsvr
    > >> >> > > to accomplish this, any hint? Thanks in advance.
    > >> >> > >
    > >> >> > >
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>

    > >
    > >
    > >
    > >

    >




  4. #19
    Michael \(michka\) Kaplan Guest

    Re: Registering DLL by code

    M aybe it s just me, but I don't see the function as all that special
    either.

    Maybe you too could take this to private e-mail rather than airing it all
    out here in the open? It is not making ANYONE look good.

    --
    MichKa
    "Cause it's a bittersweet symphony, thats life..." -- The Verve

    random junk of dubious value, at the multilingual,
    no scripts required, http://www.trigeminal.com/

    "Michael Culley" <m_culley@one.net.au> wrote in message
    news:392a87b0$1@news.devx.com...
    >
    > René,
    >
    > >I also stated that I can't remember where I got the function to call a
    > >pointer

    >
    > Search for "Byt(0) = &H58". My original post will pop up first in the

    list.
    >
    > >I'd be
    > >glad to add a "Special Thanks to ..." mentioning you writing this

    function
    >
    > I think that I deserve at least equal billing. All the code in the module
    > is run of the mill, except for the function that I wrote. This function

    was
    > not modified at all, except to add a variable that was not referenced (?).
    >
    > >You must understand though that I can't act as long as you didn't answer

    > my
    > >eMail reply.

    >
    > I only got your email now and have replied immediately.
    >
    > Michael Culley
    >
    >
    >
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >Michael,
    > >
    > >as in the reply to your eMail, the module WAS developed by me.
    > >I also stated that I can't remember where I got the function to call a
    > >pointer, and that if you are the original author of this function, I'd be
    > >glad to add a "Special Thanks to ..." mentioning you writing this

    function
    > >(just like I did in our Fonts.bas).
    > >The "Developed by" still stands for the module, which actually existed

    long
    > >before I put the function_to_call_a_pointer in (initially it used
    > >RegSvr32.exe, and I do remember me posting a couple of questions hereto

    > in
    > >microsoft.public.vb.winapi).
    > >I also stated that I'll have to test the changes you made to the function
    > >before putting them in (for which I then also add a line with your name

    > to
    > >the "Changes").
    > >You must understand though that I can't act as long as you didn't answer

    > my
    > >eMail reply.
    > >And again, if you are the author of the function, take my appologies for

    > not
    > >mentioning you in the first place.
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    > >news:3928f71d$1@news.devx.com...
    > >>
    > >> René,
    > >>
    > >> '*************************************************************
    > >> 'Developed by : R. Whitworth
    > >> 'Date : 04/27/2000
    > >> '*************************************************************
    > >>
    > >> This was developed by me!
    > >>
    > >> '*************************************************************
    > >> 'Feel free to send us your wishes and enhancements to this
    > >> 'module (or anything else you got from our pages).
    > >> 'Any usefull enhancement will be added, and your name will
    > >> 'be mentioned (see list below).
    > >> 'Send enhancements to: R.Whitworth@w-s-s.de
    > >> 'Send wishes to: Service@w-s-s.de
    > >> '*************************************************************
    > >>
    > >> You didn't even put my name in there and I wrote it!
    > >>
    > >> Oh well, I do like the enhancements you have made.
    > >>
    > >> I'll take it as a compliment
    > >>
    > >> Michael Culley
    > >>
    > >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >> >On our site we have a file called InstallOCX.bas which should also

    work
    > >> on
    > >> >ActiveX DLLs.
    > >> >
    > >> >--
    > >> >Hope this helps ...
    > >> >
    > >> >Rene Whitworth
    > >> >Whitworth Software Solutions - Germany
    > >> >http://www.w-s-s.de
    > >> >Please reply to the newsgroup :-)
    > >> >
    > >> >
    > >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    > >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    > >> >> I doubt it will change.
    > >> >>
    > >> >> --
    > >> >> MichKa
    > >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    > >> >>
    > >> >> random junk of dubious value, at the multilingual,
    > >> >> no scripts required, http://www.trigeminal.com/
    > >> >>
    > >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    > >> >> news:3928b624@news.devx.com...
    > >> >> > Hi Ron,
    > >> >> >
    > >> >> > We still have to use regsvr to register DLL files unfortunately.

    > >Maybe
    > >> >> that
    > >> >> > will change in next VB 7!
    > >> >> >
    > >> >> > Sincerely
    > >> >> >
    > >> >> > Phil N.
    > >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    > >> >> > news:3928b292$1@news.devx.com...
    > >> >> > >
    > >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    > >> >shelling
    > >> >> > regsvr
    > >> >> > > to accomplish this, any hint? Thanks in advance.
    > >> >> > >
    > >> >> > >
    > >> >> >
    > >> >> >
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>

    > >
    > >
    > >
    > >

    >




  5. #20
    René Whitworth Guest

    Re: Registering DLL by code

    To anyone interested, this is a copy of the eMail messages sent between
    Michael Culley and me (Rene Whitworth) regarding the module InstallOCX.bas
    available on our site:

    -- begin of eMail copy --

    Michael,

    I found your message (in vb.winapi on devx) where you posted the function
    (you called yourself "Mike" then).
    The original question (by Véronique, 04/07/00) was on how to call a function
    using a pointer (she mentioned DllRegisterServer).
    Your first answer (04/09/00) was to use CallWindowProc, on which I answered
    (04/09/00) you can't do this on DllRegisterServer in a DLL or OCX.
    Then (04/09/00) you replied to my message posting the function (again as
    "Mike", not mentioning your full name).
    At this moment the module already existed as I stated in my reply on
    04/10/00:
    [snip]
    > You're right, it works !
    > I recently spent a couple of days on it but couldn't get it done.
    > I needed this functionallity to register some controls on auto updating
    > an app.
    > I ended up shelling out to RegSvr32 to run in silent mode.
    > Thanks for the code ...

    [snip]

    Actually this solution was suggested by Mattias Sjögren in a reply to Lee
    Wallen in ccrp.talk.winapi on news.mvps.org on 09/13/99 without a sample.
    Another suggestion to the question Véronique posted in
    microsoft.public.vb.winapi (multiposted) mentioned by Michael Kaplan was to
    pick up Matt Curland's February 2000 VBPJ article "Call Function Pointers".
    BTW: in vb.winapi on devx there was a thread named "dynamically calling a
    DLL and function" mid june 99 in which exactly this technique was
    introduced, and as Klaus H. Probst stated, "it was posted by Brad Martinez
    in one of the MS newsgroups as an adaptation of some else's code.", and Karl
    Peterson said:
    [snip]
    > Never needed to resort to it, myself, no. But I have seen it work, and

    tried busting
    > it as best I could. Francesco did an article some time back that made use

    of the
    > technique. I think it had to do with writing plug-in sorting classes, or

    something.
    >
    > What's most interesting is that you don't have to be calling "foreign"

    DLLs, either!
    > You can just as easily pass AddressOf some routine within your own app.
    > Possibilities, huh? <g>

    [snip]

    Now, after we put this straight, do you still think it was YOU who actually
    wrote the module?
    I'll put your name in the "Special Thanks to ..." mentioning you supplying
    me with the working code on how to call a DLL function using it's pointer
    (which I think is fair).

    I usually don't put the text in a module when I write it for my own use, so
    when I decided to put it on our site (as a result of seeing this
    functionallity being asked for very often), I couldn't remember when I
    actually started writing it and where I got the function from, and I then
    put in the date of when I put the text in (this is why the date is AFTER
    your message supplying me with the function).

    Rene Whitworth
    R.Whitworth@w-s-s.de
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de


    ----- Original Message -----
    From: "Michael" <m_culley@one.net.au>
    To: "'Rene Whitworth'" <R.Whitworth@w-s-s.de>
    Sent: Tuesday, May 23, 2000 3:08 PM
    Subject: RE: modInstallOCX


    > Rene,
    >
    > Yes it was me that developed this function. To find the original post just
    > search for "Byt(0) = &H58".
    >
    > In my opinion, you should put my name in where it says developed by. The
    > original idea was mine.
    >
    > Michael Culley
    >
    > -----Original Message-----
    > From: Rene Whitworth [mailto:R.Whitworth@w-s-s.de]
    > Sent: Monday, 22 May 2000 20:17
    > To: m_culley@one.net.au
    > Subject: Re: modInstallOCX
    >
    >
    > Michael,
    >
    > are you the initial designer of this function (I know I got it from

    someone,
    > but I can't find out who wrote it) ?
    > If so, I'd be glad to add you to the "Special Thanks to" mentioning you
    > writing the function, if not, I could add you to the "Changes".
    > The "Developed by" indicates the development of the module (as does the
    > "Changes").
    > For an example of these three sections in the file header have a look at

    our
    > Fonts.bas available on our site.
    >
    > Please let me know if this suits your wishes, and if you are the initial
    > autor of the function, please take my appologies for not mentioning you in
    > the first place.
    >
    > BTW: I'll have to test your changes before I can put them on our site :-)
    >
    > Rene Whitworth
    > R.Whitworth@w-s-s.de
    > Whitworth Software Solutions - Germany
    > http://www.w-s-s.de
    >
    >
    > ----- Original Message -----
    > From: "Michael" <m_culley@one.net.au>
    > To: <Service@w-s-s.de>
    > Sent: Monday, May 22, 2000 11:31 AM
    > Subject: Re: modInstallOCX
    >
    >
    > > Rene,
    > >
    > > Can you add my details to this? They are:
    > >
    > > Michael Culley
    > > email: m_culley@one.net.au
    > > web site: VBDotCom.Com
    > >
    > > My site it probably still not available, but will be as soon as the ISP

    > gets
    > > their act into gear. grrrr
    > >
    > > '*************************************************************
    > > 'Developed by : R. Whitworth & Michael Culley
    > > 'Date : 04/27/2000
    > > '*************************************************************
    > >
    > >
    > > By the way, here is an enhancement that makes it a bit simpler. I have

    not
    > > tested this, but it
    > >
    > > Private Function CallPointer(ByVal lngPointer As Long) As Long
    > > Dim Byt(11) As Byte
    > >
    > > Byt(0) = &H58 'pop eax 'get return address
    > > Byt(1) = &H59 'pop ecx 'kill hWnd
    > > Byt(2) = &H59 'pop ecx 'kill Msg
    > > Byt(3) = &H59 'pop ecx 'kill wParam
    > > Byt(4) = &H59 'pop ecx 'kill lParam
    > > Byt(5) = &H50 'push eax 'put return address back
    > > Byt(6) = &HE9 'jump relative
    > > lngPointer = lngPointer - VarPtr(Byt(11)) 'convert absolute address

    to
    > > relative address
    > > CopyMemory Byt(7), lngPointer, 4
    > > CallPointer = CallWindowProc(VarPtr(Byt(0)), 0&, 0&, 0&, 0&) 'call

    > code
    > > in byt array
    > > End Function
    > >
    > >

    >
    >

    -- end of eMail copy --

    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    news:3928f71d$1@news.devx.com...
    >
    > René,
    >
    > '*************************************************************
    > 'Developed by : R. Whitworth
    > 'Date : 04/27/2000
    > '*************************************************************
    >
    > This was developed by me!
    >
    > '*************************************************************
    > 'Feel free to send us your wishes and enhancements to this
    > 'module (or anything else you got from our pages).
    > 'Any usefull enhancement will be added, and your name will
    > 'be mentioned (see list below).
    > 'Send enhancements to: R.Whitworth@w-s-s.de
    > 'Send wishes to: Service@w-s-s.de
    > '*************************************************************
    >
    > You didn't even put my name in there and I wrote it!
    >
    > Oh well, I do like the enhancements you have made.
    >
    > I'll take it as a compliment
    >
    > Michael Culley
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >On our site we have a file called InstallOCX.bas which should also work

    > on
    > >ActiveX DLLs.
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    > >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    > >> I doubt it will change.
    > >>
    > >> --
    > >> MichKa
    > >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    > >>
    > >> random junk of dubious value, at the multilingual,
    > >> no scripts required, http://www.trigeminal.com/
    > >>
    > >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    > >> news:3928b624@news.devx.com...
    > >> > Hi Ron,
    > >> >
    > >> > We still have to use regsvr to register DLL files unfortunately.

    Maybe
    > >> that
    > >> > will change in next VB 7!
    > >> >
    > >> > Sincerely
    > >> >
    > >> > Phil N.
    > >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    > >> > news:3928b292$1@news.devx.com...
    > >> > >
    > >> > > Did I miss this in my VB class? It seems that I'm stucked with

    > >shelling
    > >> > regsvr
    > >> > > to accomplish this, any hint? Thanks in advance.
    > >> > >
    > >> > >
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >




  6. #21
    René Whitworth Guest

    Re: Registering DLL by code

    To anyone interested, this is a copy of the eMail messages sent between
    Michael Culley and me (Rene Whitworth) regarding the module InstallOCX.bas
    available on our site:

    -- begin of eMail copy --

    Michael,

    I found your message (in vb.winapi on devx) where you posted the function
    (you called yourself "Mike" then).
    The original question (by Véronique, 04/07/00) was on how to call a function
    using a pointer (she mentioned DllRegisterServer).
    Your first answer (04/09/00) was to use CallWindowProc, on which I answered
    (04/09/00) you can't do this on DllRegisterServer in a DLL or OCX.
    Then (04/09/00) you replied to my message posting the function (again as
    "Mike", not mentioning your full name).
    At this moment the module already existed as I stated in my reply on
    04/10/00:
    [snip]
    > You're right, it works !
    > I recently spent a couple of days on it but couldn't get it done.
    > I needed this functionallity to register some controls on auto updating
    > an app.
    > I ended up shelling out to RegSvr32 to run in silent mode.
    > Thanks for the code ...

    [snip]

    Actually this solution was suggested by Mattias Sjögren in a reply to Lee
    Wallen in ccrp.talk.winapi on news.mvps.org on 09/13/99 without a sample.
    Another suggestion to the question Véronique posted in
    microsoft.public.vb.winapi (multiposted) mentioned by Michael Kaplan was to
    pick up Matt Curland's February 2000 VBPJ article "Call Function Pointers".
    BTW: in vb.winapi on devx there was a thread named "dynamically calling a
    DLL and function" mid june 99 in which exactly this technique was
    introduced, and as Klaus H. Probst stated, "it was posted by Brad Martinez
    in one of the MS newsgroups as an adaptation of some else's code.", and Karl
    Peterson said:
    [snip]
    > Never needed to resort to it, myself, no. But I have seen it work, and

    tried busting
    > it as best I could. Francesco did an article some time back that made use

    of the
    > technique. I think it had to do with writing plug-in sorting classes, or

    something.
    >
    > What's most interesting is that you don't have to be calling "foreign"

    DLLs, either!
    > You can just as easily pass AddressOf some routine within your own app.
    > Possibilities, huh? <g>

    [snip]

    Now, after we put this straight, do you still think it was YOU who actually
    wrote the module?
    I'll put your name in the "Special Thanks to ..." mentioning you supplying
    me with the working code on how to call a DLL function using it's pointer
    (which I think is fair).

    I usually don't put the text in a module when I write it for my own use, so
    when I decided to put it on our site (as a result of seeing this
    functionallity being asked for very often), I couldn't remember when I
    actually started writing it and where I got the function from, and I then
    put in the date of when I put the text in (this is why the date is AFTER
    your message supplying me with the function).

    Rene Whitworth
    R.Whitworth@w-s-s.de
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de


    ----- Original Message -----
    From: "Michael" <m_culley@one.net.au>
    To: "'Rene Whitworth'" <R.Whitworth@w-s-s.de>
    Sent: Tuesday, May 23, 2000 3:08 PM
    Subject: RE: modInstallOCX


    > Rene,
    >
    > Yes it was me that developed this function. To find the original post just
    > search for "Byt(0) = &H58".
    >
    > In my opinion, you should put my name in where it says developed by. The
    > original idea was mine.
    >
    > Michael Culley
    >
    > -----Original Message-----
    > From: Rene Whitworth [mailto:R.Whitworth@w-s-s.de]
    > Sent: Monday, 22 May 2000 20:17
    > To: m_culley@one.net.au
    > Subject: Re: modInstallOCX
    >
    >
    > Michael,
    >
    > are you the initial designer of this function (I know I got it from

    someone,
    > but I can't find out who wrote it) ?
    > If so, I'd be glad to add you to the "Special Thanks to" mentioning you
    > writing the function, if not, I could add you to the "Changes".
    > The "Developed by" indicates the development of the module (as does the
    > "Changes").
    > For an example of these three sections in the file header have a look at

    our
    > Fonts.bas available on our site.
    >
    > Please let me know if this suits your wishes, and if you are the initial
    > autor of the function, please take my appologies for not mentioning you in
    > the first place.
    >
    > BTW: I'll have to test your changes before I can put them on our site :-)
    >
    > Rene Whitworth
    > R.Whitworth@w-s-s.de
    > Whitworth Software Solutions - Germany
    > http://www.w-s-s.de
    >
    >
    > ----- Original Message -----
    > From: "Michael" <m_culley@one.net.au>
    > To: <Service@w-s-s.de>
    > Sent: Monday, May 22, 2000 11:31 AM
    > Subject: Re: modInstallOCX
    >
    >
    > > Rene,
    > >
    > > Can you add my details to this? They are:
    > >
    > > Michael Culley
    > > email: m_culley@one.net.au
    > > web site: VBDotCom.Com
    > >
    > > My site it probably still not available, but will be as soon as the ISP

    > gets
    > > their act into gear. grrrr
    > >
    > > '*************************************************************
    > > 'Developed by : R. Whitworth & Michael Culley
    > > 'Date : 04/27/2000
    > > '*************************************************************
    > >
    > >
    > > By the way, here is an enhancement that makes it a bit simpler. I have

    not
    > > tested this, but it
    > >
    > > Private Function CallPointer(ByVal lngPointer As Long) As Long
    > > Dim Byt(11) As Byte
    > >
    > > Byt(0) = &H58 'pop eax 'get return address
    > > Byt(1) = &H59 'pop ecx 'kill hWnd
    > > Byt(2) = &H59 'pop ecx 'kill Msg
    > > Byt(3) = &H59 'pop ecx 'kill wParam
    > > Byt(4) = &H59 'pop ecx 'kill lParam
    > > Byt(5) = &H50 'push eax 'put return address back
    > > Byt(6) = &HE9 'jump relative
    > > lngPointer = lngPointer - VarPtr(Byt(11)) 'convert absolute address

    to
    > > relative address
    > > CopyMemory Byt(7), lngPointer, 4
    > > CallPointer = CallWindowProc(VarPtr(Byt(0)), 0&, 0&, 0&, 0&) 'call

    > code
    > > in byt array
    > > End Function
    > >
    > >

    >
    >

    -- end of eMail copy --

    --
    Hope this helps ...

    Rene Whitworth
    Whitworth Software Solutions - Germany
    http://www.w-s-s.de
    Please reply to the newsgroup :-)


    "Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    news:3928f71d$1@news.devx.com...
    >
    > René,
    >
    > '*************************************************************
    > 'Developed by : R. Whitworth
    > 'Date : 04/27/2000
    > '*************************************************************
    >
    > This was developed by me!
    >
    > '*************************************************************
    > 'Feel free to send us your wishes and enhancements to this
    > 'module (or anything else you got from our pages).
    > 'Any usefull enhancement will be added, and your name will
    > 'be mentioned (see list below).
    > 'Send enhancements to: R.Whitworth@w-s-s.de
    > 'Send wishes to: Service@w-s-s.de
    > '*************************************************************
    >
    > You didn't even put my name in there and I wrote it!
    >
    > Oh well, I do like the enhancements you have made.
    >
    > I'll take it as a compliment
    >
    > Michael Culley
    >
    > "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    > >On our site we have a file called InstallOCX.bas which should also work

    > on
    > >ActiveX DLLs.
    > >
    > >--
    > >Hope this helps ...
    > >
    > >Rene Whitworth
    > >Whitworth Software Solutions - Germany
    > >http://www.w-s-s.de
    > >Please reply to the newsgroup :-)
    > >
    > >
    > >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    > >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    > >> I doubt it will change.
    > >>
    > >> --
    > >> MichKa
    > >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    > >>
    > >> random junk of dubious value, at the multilingual,
    > >> no scripts required, http://www.trigeminal.com/
    > >>
    > >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    > >> news:3928b624@news.devx.com...
    > >> > Hi Ron,
    > >> >
    > >> > We still have to use regsvr to register DLL files unfortunately.

    Maybe
    > >> that
    > >> > will change in next VB 7!
    > >> >
    > >> > Sincerely
    > >> >
    > >> > Phil N.
    > >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    > >> > news:3928b292$1@news.devx.com...
    > >> > >
    > >> > > Did I miss this in my VB class? It seems that I'm stucked with

    > >shelling
    > >> > regsvr
    > >> > > to accomplish this, any hint? Thanks in advance.
    > >> > >
    > >> > >
    > >> >
    > >> >
    > >>
    > >>

    > >
    > >

    >




  7. #22
    Mike Culley Guest

    Re: Registering DLL by code


    René,

    All other solutions I have seen to this problem have been extremely complex.
    I think it was Matt Curland who suggested a solution, but it involved - modifying
    a VTable, writing and implementing a TypeLib, creating functions to replicate
    a VTable and writing some assembler.

    You say that many other people have suggested a similar solution, but the
    module still contained my code line for line - not someone elses. I have
    never seen a similar solution. You did not even fix the bug I suggested could
    arise.

    Also, I wrote more than this function. The code I posted did register a dll/ocx.
    It seams all you have done is put it in a module and put your name on it.

    I will not post again regarding this topic. I have made my point.


    Michael Culley

    >"Mike", not mentioning your full name).


    My email address was there in full.



    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >To anyone interested, this is a copy of the eMail messages sent between
    >Michael Culley and me (Rene Whitworth) regarding the module InstallOCX.bas
    >available on our site:
    >
    >-- begin of eMail copy --
    >
    >Michael,
    >
    >I found your message (in vb.winapi on devx) where you posted the function
    >(you called yourself "Mike" then).
    >The original question (by Véronique, 04/07/00) was on how to call a function
    >using a pointer (she mentioned DllRegisterServer).
    >Your first answer (04/09/00) was to use CallWindowProc, on which I answered
    >(04/09/00) you can't do this on DllRegisterServer in a DLL or OCX.
    >Then (04/09/00) you replied to my message posting the function (again as
    >"Mike", not mentioning your full name).
    >At this moment the module already existed as I stated in my reply on
    >04/10/00:
    >[snip]
    >> You're right, it works !
    >> I recently spent a couple of days on it but couldn't get it done.
    >> I needed this functionallity to register some controls on auto updating
    >> an app.
    >> I ended up shelling out to RegSvr32 to run in silent mode.
    >> Thanks for the code ...

    >[snip]
    >
    >Actually this solution was suggested by Mattias Sjögren in a reply to Lee
    >Wallen in ccrp.talk.winapi on news.mvps.org on 09/13/99 without a sample.
    >Another suggestion to the question Véronique posted in
    >microsoft.public.vb.winapi (multiposted) mentioned by Michael Kaplan was

    to
    >pick up Matt Curland's February 2000 VBPJ article "Call Function Pointers".
    >BTW: in vb.winapi on devx there was a thread named "dynamically calling

    a
    >DLL and function" mid june 99 in which exactly this technique was
    >introduced, and as Klaus H. Probst stated, "it was posted by Brad Martinez
    >in one of the MS newsgroups as an adaptation of some else's code.", and

    Karl
    >Peterson said:
    >[snip]
    >> Never needed to resort to it, myself, no. But I have seen it work, and

    >tried busting
    >> it as best I could. Francesco did an article some time back that made

    use
    >of the
    >> technique. I think it had to do with writing plug-in sorting classes,

    or
    >something.
    >>
    >> What's most interesting is that you don't have to be calling "foreign"

    >DLLs, either!
    >> You can just as easily pass AddressOf some routine within your own app.
    >> Possibilities, huh? <g>

    >[snip]
    >
    >Now, after we put this straight, do you still think it was YOU who actually
    >wrote the module?
    >I'll put your name in the "Special Thanks to ..." mentioning you supplying
    >me with the working code on how to call a DLL function using it's pointer
    >(which I think is fair).
    >
    >I usually don't put the text in a module when I write it for my own use,

    so
    >when I decided to put it on our site (as a result of seeing this
    >functionallity being asked for very often), I couldn't remember when I
    >actually started writing it and where I got the function from, and I then
    >put in the date of when I put the text in (this is why the date is AFTER
    >your message supplying me with the function).
    >
    >Rene Whitworth
    >R.Whitworth@w-s-s.de
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >
    >
    >----- Original Message -----
    >From: "Michael" <m_culley@one.net.au>
    >To: "'Rene Whitworth'" <R.Whitworth@w-s-s.de>
    >Sent: Tuesday, May 23, 2000 3:08 PM
    >Subject: RE: modInstallOCX
    >
    >
    >> Rene,
    >>
    >> Yes it was me that developed this function. To find the original post

    just
    >> search for "Byt(0) = &H58".
    >>
    >> In my opinion, you should put my name in where it says developed by. The
    >> original idea was mine.
    >>
    >> Michael Culley
    >>
    >> -----Original Message-----
    >> From: Rene Whitworth [mailto:R.Whitworth@w-s-s.de]
    >> Sent: Monday, 22 May 2000 20:17
    >> To: m_culley@one.net.au
    >> Subject: Re: modInstallOCX
    >>
    >>
    >> Michael,
    >>
    >> are you the initial designer of this function (I know I got it from

    >someone,
    >> but I can't find out who wrote it) ?
    >> If so, I'd be glad to add you to the "Special Thanks to" mentioning you
    >> writing the function, if not, I could add you to the "Changes".
    >> The "Developed by" indicates the development of the module (as does the
    >> "Changes").
    >> For an example of these three sections in the file header have a look

    at
    >our
    >> Fonts.bas available on our site.
    >>
    >> Please let me know if this suits your wishes, and if you are the initial
    >> autor of the function, please take my appologies for not mentioning you

    in
    >> the first place.
    >>
    >> BTW: I'll have to test your changes before I can put them on our site

    :-)
    >>
    >> Rene Whitworth
    >> R.Whitworth@w-s-s.de
    >> Whitworth Software Solutions - Germany
    >> http://www.w-s-s.de
    >>
    >>
    >> ----- Original Message -----
    >> From: "Michael" <m_culley@one.net.au>
    >> To: <Service@w-s-s.de>
    >> Sent: Monday, May 22, 2000 11:31 AM
    >> Subject: Re: modInstallOCX
    >>
    >>
    >> > Rene,
    >> >
    >> > Can you add my details to this? They are:
    >> >
    >> > Michael Culley
    >> > email: m_culley@one.net.au
    >> > web site: VBDotCom.Com
    >> >
    >> > My site it probably still not available, but will be as soon as the

    ISP
    >> gets
    >> > their act into gear. grrrr
    >> >
    >> > '*************************************************************
    >> > 'Developed by : R. Whitworth & Michael Culley
    >> > 'Date : 04/27/2000
    >> > '*************************************************************
    >> >
    >> >
    >> > By the way, here is an enhancement that makes it a bit simpler. I have

    >not
    >> > tested this, but it
    >> >
    >> > Private Function CallPointer(ByVal lngPointer As Long) As Long
    >> > Dim Byt(11) As Byte
    >> >
    >> > Byt(0) = &H58 'pop eax 'get return address
    >> > Byt(1) = &H59 'pop ecx 'kill hWnd
    >> > Byt(2) = &H59 'pop ecx 'kill Msg
    >> > Byt(3) = &H59 'pop ecx 'kill wParam
    >> > Byt(4) = &H59 'pop ecx 'kill lParam
    >> > Byt(5) = &H50 'push eax 'put return address back
    >> > Byt(6) = &HE9 'jump relative
    >> > lngPointer = lngPointer - VarPtr(Byt(11)) 'convert absolute address

    >to
    >> > relative address
    >> > CopyMemory Byt(7), lngPointer, 4
    >> > CallPointer = CallWindowProc(VarPtr(Byt(0)), 0&, 0&, 0&, 0&) 'call

    >> code
    >> > in byt array
    >> > End Function
    >> >
    >> >

    >>
    >>

    >-- end of eMail copy --
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    >news:3928f71d$1@news.devx.com...
    >>
    >> René,
    >>
    >> '*************************************************************
    >> 'Developed by : R. Whitworth
    >> 'Date : 04/27/2000
    >> '*************************************************************
    >>
    >> This was developed by me!
    >>
    >> '*************************************************************
    >> 'Feel free to send us your wishes and enhancements to this
    >> 'module (or anything else you got from our pages).
    >> 'Any usefull enhancement will be added, and your name will
    >> 'be mentioned (see list below).
    >> 'Send enhancements to: R.Whitworth@w-s-s.de
    >> 'Send wishes to: Service@w-s-s.de
    >> '*************************************************************
    >>
    >> You didn't even put my name in there and I wrote it!
    >>
    >> Oh well, I do like the enhancements you have made.
    >>
    >> I'll take it as a compliment
    >>
    >> Michael Culley
    >>
    >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >> >On our site we have a file called InstallOCX.bas which should also work

    >> on
    >> >ActiveX DLLs.
    >> >
    >> >--
    >> >Hope this helps ...
    >> >
    >> >Rene Whitworth
    >> >Whitworth Software Solutions - Germany
    >> >http://www.w-s-s.de
    >> >Please reply to the newsgroup :-)
    >> >
    >> >
    >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    >> >> I doubt it will change.
    >> >>
    >> >> --
    >> >> MichKa
    >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    >> >>
    >> >> random junk of dubious value, at the multilingual,
    >> >> no scripts required, http://www.trigeminal.com/
    >> >>
    >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    >> >> news:3928b624@news.devx.com...
    >> >> > Hi Ron,
    >> >> >
    >> >> > We still have to use regsvr to register DLL files unfortunately.

    >Maybe
    >> >> that
    >> >> > will change in next VB 7!
    >> >> >
    >> >> > Sincerely
    >> >> >
    >> >> > Phil N.
    >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    >> >> > news:3928b292$1@news.devx.com...
    >> >> > >
    >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    >> >shelling
    >> >> > regsvr
    >> >> > > to accomplish this, any hint? Thanks in advance.
    >> >> > >
    >> >> > >
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >



  8. #23
    Mike Culley Guest

    Re: Registering DLL by code


    René,

    All other solutions I have seen to this problem have been extremely complex.
    I think it was Matt Curland who suggested a solution, but it involved - modifying
    a VTable, writing and implementing a TypeLib, creating functions to replicate
    a VTable and writing some assembler.

    You say that many other people have suggested a similar solution, but the
    module still contained my code line for line - not someone elses. I have
    never seen a similar solution. You did not even fix the bug I suggested could
    arise.

    Also, I wrote more than this function. The code I posted did register a dll/ocx.
    It seams all you have done is put it in a module and put your name on it.

    I will not post again regarding this topic. I have made my point.


    Michael Culley

    >"Mike", not mentioning your full name).


    My email address was there in full.



    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >To anyone interested, this is a copy of the eMail messages sent between
    >Michael Culley and me (Rene Whitworth) regarding the module InstallOCX.bas
    >available on our site:
    >
    >-- begin of eMail copy --
    >
    >Michael,
    >
    >I found your message (in vb.winapi on devx) where you posted the function
    >(you called yourself "Mike" then).
    >The original question (by Véronique, 04/07/00) was on how to call a function
    >using a pointer (she mentioned DllRegisterServer).
    >Your first answer (04/09/00) was to use CallWindowProc, on which I answered
    >(04/09/00) you can't do this on DllRegisterServer in a DLL or OCX.
    >Then (04/09/00) you replied to my message posting the function (again as
    >"Mike", not mentioning your full name).
    >At this moment the module already existed as I stated in my reply on
    >04/10/00:
    >[snip]
    >> You're right, it works !
    >> I recently spent a couple of days on it but couldn't get it done.
    >> I needed this functionallity to register some controls on auto updating
    >> an app.
    >> I ended up shelling out to RegSvr32 to run in silent mode.
    >> Thanks for the code ...

    >[snip]
    >
    >Actually this solution was suggested by Mattias Sjögren in a reply to Lee
    >Wallen in ccrp.talk.winapi on news.mvps.org on 09/13/99 without a sample.
    >Another suggestion to the question Véronique posted in
    >microsoft.public.vb.winapi (multiposted) mentioned by Michael Kaplan was

    to
    >pick up Matt Curland's February 2000 VBPJ article "Call Function Pointers".
    >BTW: in vb.winapi on devx there was a thread named "dynamically calling

    a
    >DLL and function" mid june 99 in which exactly this technique was
    >introduced, and as Klaus H. Probst stated, "it was posted by Brad Martinez
    >in one of the MS newsgroups as an adaptation of some else's code.", and

    Karl
    >Peterson said:
    >[snip]
    >> Never needed to resort to it, myself, no. But I have seen it work, and

    >tried busting
    >> it as best I could. Francesco did an article some time back that made

    use
    >of the
    >> technique. I think it had to do with writing plug-in sorting classes,

    or
    >something.
    >>
    >> What's most interesting is that you don't have to be calling "foreign"

    >DLLs, either!
    >> You can just as easily pass AddressOf some routine within your own app.
    >> Possibilities, huh? <g>

    >[snip]
    >
    >Now, after we put this straight, do you still think it was YOU who actually
    >wrote the module?
    >I'll put your name in the "Special Thanks to ..." mentioning you supplying
    >me with the working code on how to call a DLL function using it's pointer
    >(which I think is fair).
    >
    >I usually don't put the text in a module when I write it for my own use,

    so
    >when I decided to put it on our site (as a result of seeing this
    >functionallity being asked for very often), I couldn't remember when I
    >actually started writing it and where I got the function from, and I then
    >put in the date of when I put the text in (this is why the date is AFTER
    >your message supplying me with the function).
    >
    >Rene Whitworth
    >R.Whitworth@w-s-s.de
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >
    >
    >----- Original Message -----
    >From: "Michael" <m_culley@one.net.au>
    >To: "'Rene Whitworth'" <R.Whitworth@w-s-s.de>
    >Sent: Tuesday, May 23, 2000 3:08 PM
    >Subject: RE: modInstallOCX
    >
    >
    >> Rene,
    >>
    >> Yes it was me that developed this function. To find the original post

    just
    >> search for "Byt(0) = &H58".
    >>
    >> In my opinion, you should put my name in where it says developed by. The
    >> original idea was mine.
    >>
    >> Michael Culley
    >>
    >> -----Original Message-----
    >> From: Rene Whitworth [mailto:R.Whitworth@w-s-s.de]
    >> Sent: Monday, 22 May 2000 20:17
    >> To: m_culley@one.net.au
    >> Subject: Re: modInstallOCX
    >>
    >>
    >> Michael,
    >>
    >> are you the initial designer of this function (I know I got it from

    >someone,
    >> but I can't find out who wrote it) ?
    >> If so, I'd be glad to add you to the "Special Thanks to" mentioning you
    >> writing the function, if not, I could add you to the "Changes".
    >> The "Developed by" indicates the development of the module (as does the
    >> "Changes").
    >> For an example of these three sections in the file header have a look

    at
    >our
    >> Fonts.bas available on our site.
    >>
    >> Please let me know if this suits your wishes, and if you are the initial
    >> autor of the function, please take my appologies for not mentioning you

    in
    >> the first place.
    >>
    >> BTW: I'll have to test your changes before I can put them on our site

    :-)
    >>
    >> Rene Whitworth
    >> R.Whitworth@w-s-s.de
    >> Whitworth Software Solutions - Germany
    >> http://www.w-s-s.de
    >>
    >>
    >> ----- Original Message -----
    >> From: "Michael" <m_culley@one.net.au>
    >> To: <Service@w-s-s.de>
    >> Sent: Monday, May 22, 2000 11:31 AM
    >> Subject: Re: modInstallOCX
    >>
    >>
    >> > Rene,
    >> >
    >> > Can you add my details to this? They are:
    >> >
    >> > Michael Culley
    >> > email: m_culley@one.net.au
    >> > web site: VBDotCom.Com
    >> >
    >> > My site it probably still not available, but will be as soon as the

    ISP
    >> gets
    >> > their act into gear. grrrr
    >> >
    >> > '*************************************************************
    >> > 'Developed by : R. Whitworth & Michael Culley
    >> > 'Date : 04/27/2000
    >> > '*************************************************************
    >> >
    >> >
    >> > By the way, here is an enhancement that makes it a bit simpler. I have

    >not
    >> > tested this, but it
    >> >
    >> > Private Function CallPointer(ByVal lngPointer As Long) As Long
    >> > Dim Byt(11) As Byte
    >> >
    >> > Byt(0) = &H58 'pop eax 'get return address
    >> > Byt(1) = &H59 'pop ecx 'kill hWnd
    >> > Byt(2) = &H59 'pop ecx 'kill Msg
    >> > Byt(3) = &H59 'pop ecx 'kill wParam
    >> > Byt(4) = &H59 'pop ecx 'kill lParam
    >> > Byt(5) = &H50 'push eax 'put return address back
    >> > Byt(6) = &HE9 'jump relative
    >> > lngPointer = lngPointer - VarPtr(Byt(11)) 'convert absolute address

    >to
    >> > relative address
    >> > CopyMemory Byt(7), lngPointer, 4
    >> > CallPointer = CallWindowProc(VarPtr(Byt(0)), 0&, 0&, 0&, 0&) 'call

    >> code
    >> > in byt array
    >> > End Function
    >> >
    >> >

    >>
    >>

    >-- end of eMail copy --
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Michael Culley" <m_culley@one.net.au> schrieb im Newsbeitrag
    >news:3928f71d$1@news.devx.com...
    >>
    >> René,
    >>
    >> '*************************************************************
    >> 'Developed by : R. Whitworth
    >> 'Date : 04/27/2000
    >> '*************************************************************
    >>
    >> This was developed by me!
    >>
    >> '*************************************************************
    >> 'Feel free to send us your wishes and enhancements to this
    >> 'module (or anything else you got from our pages).
    >> 'Any usefull enhancement will be added, and your name will
    >> 'be mentioned (see list below).
    >> 'Send enhancements to: R.Whitworth@w-s-s.de
    >> 'Send wishes to: Service@w-s-s.de
    >> '*************************************************************
    >>
    >> You didn't even put my name in there and I wrote it!
    >>
    >> Oh well, I do like the enhancements you have made.
    >>
    >> I'll take it as a compliment
    >>
    >> Michael Culley
    >>
    >> "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >> >On our site we have a file called InstallOCX.bas which should also work

    >> on
    >> >ActiveX DLLs.
    >> >
    >> >--
    >> >Hope this helps ...
    >> >
    >> >Rene Whitworth
    >> >Whitworth Software Solutions - Germany
    >> >http://www.w-s-s.de
    >> >Please reply to the newsgroup :-)
    >> >
    >> >
    >> >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    >> >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    >> >> I doubt it will change.
    >> >>
    >> >> --
    >> >> MichKa
    >> >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    >> >>
    >> >> random junk of dubious value, at the multilingual,
    >> >> no scripts required, http://www.trigeminal.com/
    >> >>
    >> >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    >> >> news:3928b624@news.devx.com...
    >> >> > Hi Ron,
    >> >> >
    >> >> > We still have to use regsvr to register DLL files unfortunately.

    >Maybe
    >> >> that
    >> >> > will change in next VB 7!
    >> >> >
    >> >> > Sincerely
    >> >> >
    >> >> > Phil N.
    >> >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    >> >> > news:3928b292$1@news.devx.com...
    >> >> > >
    >> >> > > Did I miss this in my VB class? It seems that I'm stucked with
    >> >shelling
    >> >> > regsvr
    >> >> > > to accomplish this, any hint? Thanks in advance.
    >> >> > >
    >> >> > >
    >> >> >
    >> >> >
    >> >>
    >> >>
    >> >
    >> >

    >>

    >
    >



  9. #24
    Ron Paredes Guest

    Re: Registering DLL by code


    Tony,

    No prob, thanks a lot, I have read an article regarding these functions
    but can't seem to find the declaration code, I tried looking at it on API
    viewer first, but no luck, then the MSDN, all I got are topics to COM SDK
    and cluster server SDK.
    Am I missing something again here?

    As for the DLLs, yes they are custom dlls, that I intend to plug automatically
    into an .EXE at run-time, so the .EXE has to read somewhere regarding this
    new DLL and automatically register it, by code.

    Thanks in advance again.

    Ron



    "Tony McIntyre" <bearman@pobox.com> wrote:
    >I incorrectly stated run-time 452. What I meant was run-time 429. Boy is

    my
    >face red :-)
    >
    >Sorry about that.
    >
    >Tony
    >"Tony McIntyre" <bearman@pobox.com> wrote in message
    >news:3929f690@news.devx.com...



  10. #25
    Ron Paredes Guest

    Re: Registering DLL by code


    Tony,

    No prob, thanks a lot, I have read an article regarding these functions
    but can't seem to find the declaration code, I tried looking at it on API
    viewer first, but no luck, then the MSDN, all I got are topics to COM SDK
    and cluster server SDK.
    Am I missing something again here?

    As for the DLLs, yes they are custom dlls, that I intend to plug automatically
    into an .EXE at run-time, so the .EXE has to read somewhere regarding this
    new DLL and automatically register it, by code.

    Thanks in advance again.

    Ron



    "Tony McIntyre" <bearman@pobox.com> wrote:
    >I incorrectly stated run-time 452. What I meant was run-time 429. Boy is

    my
    >face red :-)
    >
    >Sorry about that.
    >
    >Tony
    >"Tony McIntyre" <bearman@pobox.com> wrote in message
    >news:3929f690@news.devx.com...



  11. #26
    Tony McIntyre Guest

    Re: Registering DLL by code

    Ron,
    Here is a snippet that should help. When you are developing the dll, in this
    case TestReg, it will be registered for you. On your target machine it will
    not be registered. In the error handler you will need to add code to
    determine if you are attempting to register multiple times. The dll must be
    in the path somewhere so that the loader can find it.

    Hope it helps.
    Tony
    -------------------------------------------------
    Declare Function DllRegisterServer Lib "Testreg" () As Long
    Declare Function DllUnregisterServer Lib "Testreg" () As Long
    Dim minsTest As New Class1

    Public Sub testit()

    On Error GoTo Eh_x
    minsTest.DisplayMsg "testing"
    Exit Sub
    Eh_x:
    Debug.Print CStr(Err.Number) + Err.Description
    if err.number =429 then
    Debug.Print DllRegisterServer
    end if
    Resume
    End Sub
    -------------------------------------------------
    testreg.dll
    ----
    Public Sub DisplayMsg(strMsg As String)
    MsgBox strMsg
    End Sub
    -----------------------------------------------------

    "Ron Paredes" <ronparedes@priconmicro.com.p> wrote in message
    news:392b70e4$1@news.devx.com...
    >
    > Tony,
    >
    > No prob, thanks a lot, I have read an article regarding these

    functions
    > but can't seem to find the declaration code, I tried looking at it on API
    > viewer first, but no luck, then the MSDN, all I got are topics to COM SDK
    > and cluster server SDK.
    > Am I missing something again here?
    >
    > As for the DLLs, yes they are custom dlls, that I intend to plug

    automatically
    > into an .EXE at run-time, so the .EXE has to read somewhere regarding this
    > new DLL and automatically register it, by code.
    >
    > Thanks in advance again.
    >
    > Ron
    >
    >
    >
    > "Tony McIntyre" <bearman@pobox.com> wrote:
    > >I incorrectly stated run-time 452. What I meant was run-time 429. Boy is

    > my
    > >face red :-)
    > >
    > >Sorry about that.
    > >
    > >Tony
    > >"Tony McIntyre" <bearman@pobox.com> wrote in message
    > >news:3929f690@news.devx.com...

    >




  12. #27
    Tony McIntyre Guest

    Re: Registering DLL by code

    Ron,
    Here is a snippet that should help. When you are developing the dll, in this
    case TestReg, it will be registered for you. On your target machine it will
    not be registered. In the error handler you will need to add code to
    determine if you are attempting to register multiple times. The dll must be
    in the path somewhere so that the loader can find it.

    Hope it helps.
    Tony
    -------------------------------------------------
    Declare Function DllRegisterServer Lib "Testreg" () As Long
    Declare Function DllUnregisterServer Lib "Testreg" () As Long
    Dim minsTest As New Class1

    Public Sub testit()

    On Error GoTo Eh_x
    minsTest.DisplayMsg "testing"
    Exit Sub
    Eh_x:
    Debug.Print CStr(Err.Number) + Err.Description
    if err.number =429 then
    Debug.Print DllRegisterServer
    end if
    Resume
    End Sub
    -------------------------------------------------
    testreg.dll
    ----
    Public Sub DisplayMsg(strMsg As String)
    MsgBox strMsg
    End Sub
    -----------------------------------------------------

    "Ron Paredes" <ronparedes@priconmicro.com.p> wrote in message
    news:392b70e4$1@news.devx.com...
    >
    > Tony,
    >
    > No prob, thanks a lot, I have read an article regarding these

    functions
    > but can't seem to find the declaration code, I tried looking at it on API
    > viewer first, but no luck, then the MSDN, all I got are topics to COM SDK
    > and cluster server SDK.
    > Am I missing something again here?
    >
    > As for the DLLs, yes they are custom dlls, that I intend to plug

    automatically
    > into an .EXE at run-time, so the .EXE has to read somewhere regarding this
    > new DLL and automatically register it, by code.
    >
    > Thanks in advance again.
    >
    > Ron
    >
    >
    >
    > "Tony McIntyre" <bearman@pobox.com> wrote:
    > >I incorrectly stated run-time 452. What I meant was run-time 429. Boy is

    > my
    > >face red :-)
    > >
    > >Sorry about that.
    > >
    > >Tony
    > >"Tony McIntyre" <bearman@pobox.com> wrote in message
    > >news:3929f690@news.devx.com...

    >




  13. #28
    Ron Paredes Guest

    Re: Registering DLL by code


    Tony,
    All this time, it was right under my nose? Grrrr!!! Well, anyway, thanks
    for all the help and for the sample code, I'll pick it from there.


    Ron

    "Tony McIntyre" <bearman@pobox.com> wrote:
    >Ron,
    >Here is a snippet that should help. When you are developing the dll, in

    this
    >case TestReg, it will be registered for you. On your target machine it will
    >not be registered. In the error handler you will need to add code to
    >determine if you are attempting to register multiple times. The dll must

    be
    >in the path somewhere so that the loader can find it.
    >
    >Hope it helps.
    >Tony
    >-------------------------------------------------
    >Declare Function DllRegisterServer Lib "Testreg" () As Long
    >Declare Function DllUnregisterServer Lib "Testreg" () As Long
    >Dim minsTest As New Class1
    >
    >Public Sub testit()
    >
    >On Error GoTo Eh_x
    > minsTest.DisplayMsg "testing"
    > Exit Sub
    >Eh_x:
    > Debug.Print CStr(Err.Number) + Err.Description
    > if err.number =429 then
    > Debug.Print DllRegisterServer
    > end if
    > Resume
    >End Sub
    >-------------------------------------------------
    >testreg.dll
    >----
    >Public Sub DisplayMsg(strMsg As String)
    > MsgBox strMsg
    >End Sub
    >-----------------------------------------------------
    >



  14. #29
    Ron Paredes Guest

    Re: Registering DLL by code


    Tony,
    All this time, it was right under my nose? Grrrr!!! Well, anyway, thanks
    for all the help and for the sample code, I'll pick it from there.


    Ron

    "Tony McIntyre" <bearman@pobox.com> wrote:
    >Ron,
    >Here is a snippet that should help. When you are developing the dll, in

    this
    >case TestReg, it will be registered for you. On your target machine it will
    >not be registered. In the error handler you will need to add code to
    >determine if you are attempting to register multiple times. The dll must

    be
    >in the path somewhere so that the loader can find it.
    >
    >Hope it helps.
    >Tony
    >-------------------------------------------------
    >Declare Function DllRegisterServer Lib "Testreg" () As Long
    >Declare Function DllUnregisterServer Lib "Testreg" () As Long
    >Dim minsTest As New Class1
    >
    >Public Sub testit()
    >
    >On Error GoTo Eh_x
    > minsTest.DisplayMsg "testing"
    > Exit Sub
    >Eh_x:
    > Debug.Print CStr(Err.Number) + Err.Description
    > if err.number =429 then
    > Debug.Print DllRegisterServer
    > end if
    > Resume
    >End Sub
    >-------------------------------------------------
    >testreg.dll
    >----
    >Public Sub DisplayMsg(strMsg As String)
    > MsgBox strMsg
    >End Sub
    >-----------------------------------------------------
    >



  15. #30
    Ron Paredes Guest

    Re: Registering DLL by code


    Rene,

    Thanks for the info. Nice site, nice theme, If only I can figure out
    where to click to get the file. :-) Do I have to use Netscape for the site?

    Again, thanks in advance. Guten Tag

    Ron

    "René Whitworth" <R.Whitworth@w-s-s.de> wrote:
    >On our site we have a file called InstallOCX.bas which should also work

    on
    >ActiveX DLLs.
    >
    >--
    >Hope this helps ...
    >
    >Rene Whitworth
    >Whitworth Software Solutions - Germany
    >http://www.w-s-s.de
    >Please reply to the newsgroup :-)
    >
    >
    >"Michael (michka) Kaplan" <former_mvp@spamfree.trigeminal.nospam.com>
    >schrieb im Newsbeitrag news:3928c7ea@news.devx.com...
    >> I doubt it will change.
    >>
    >> --
    >> MichKa
    >> "Cause it's a bittersweet symphony, thats life..." -- The Verve
    >>
    >> random junk of dubious value, at the multilingual,
    >> no scripts required, http://www.trigeminal.com/
    >>
    >> "Phil N." <phil.normand@sympatico.ca> wrote in message
    >> news:3928b624@news.devx.com...
    >> > Hi Ron,
    >> >
    >> > We still have to use regsvr to register DLL files unfortunately. Maybe

    >> that
    >> > will change in next VB 7!
    >> >
    >> > Sincerely
    >> >
    >> > Phil N.
    >> > "Ron Paredes" <ronparedes@priconmicro.com.ph> wrote in message
    >> > news:3928b292$1@news.devx.com...
    >> > >
    >> > > Did I miss this in my VB class? It seems that I'm stucked with

    >shelling
    >> > regsvr
    >> > > to accomplish this, any hint? Thanks in advance.
    >> > >
    >> > >
    >> >
    >> >

    >>
    >>

    >
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center