Home All Groups Group Topic Archive Search About

creating dll's, using in other projects... problem when recompile dll... help please!!!

Author
11 Oct 2005 9:55 PM
spiffo
new to vb, using 'classic' as it is now called I guess...vers 6...

I have one project as activeX dll... it is a work in progress so it needs
re-compile a few times a day...

I have another project (also activeX dll) that has a ref to the first, as it
uses some classes in the first... prob is when I re-compile the first, then
go back into #2 to run it, it will not compile, telling me that it can not
find a ref to the 1st!

I then have to manualy uncheck the ref to the first, save #2, re-add the ref
to #1, then it will work... ugh...

Is this how it works, anytime I recompile I must reset the ref to the dll in
the any project that accesses it?

What about using the dll in VBA in Excel...(which I plan to do)... If I have
some end users accessing the dll from vba code I have set up for them, then
I need to add/edit the dll project and recompile... will I have to not only
copy it to the end users machines, but also reset the ref to it as well???
Surely not... I must be missing something here... any help appreciated.

Thanks

Author
12 Oct 2005 8:50 AM
MP
Show quote Hide quote
"spiffo" <no***@hotmail.com> wrote in message
news:dihbv2$nh7$1@news.isdn.net...
> new to vb, using 'classic' as it is now called I guess...vers 6...
>
> I have one project as activeX dll... it is a work in progress so it needs
> re-compile a few times a day...
>
> I have another project (also activeX dll) that has a ref to the first, as
it
> uses some classes in the first... prob is when I re-compile the first,
then
> go back into #2 to run it, it will not compile, telling me that it can not
> find a ref to the 1st!
>
> I then have to manualy uncheck the ref to the first, save #2, re-add the
ref
> to #1, then it will work... ugh...
>
> Is this how it works, anytime I recompile I must reset the ref to the dll
in
> the any project that accesses it?
>
> What about using the dll in VBA in Excel...(which I plan to do)... If I
have
> some end users accessing the dll from vba code I have set up for them,
then
> I need to add/edit the dll project and recompile... will I have to not
only
> copy it to the end users machines, but also reset the ref to it as well???
> Surely not... I must be missing something here... any help appreciated.
>
> Thanks
>


Till someone knowlegeable comes along with a better explanation, do a search
on binary compatibility versus project compatibility.  Also possibly
consider project groups if you're still debugging both proj1 and proj2 and
they're both referencing the same dll.
hth
Mark
Author
12 Oct 2005 2:34 PM
Ken Halter
"spiffo" <no***@hotmail.com> wrote in message
news:dihbv2$nh7$1@news.isdn.net...
> new to vb, using 'classic' as it is now called I guess...vers 6...
>
> I have one project as activeX dll... it is a work in progress so it needs
> re-compile a few times a day...

FYI, You can debug without recompiling.

> I have another project (also activeX dll) that has a ref to the first, as
> it
> uses some classes in the first... prob is when I re-compile the first,
> then
> go back into #2 to run it, it will not compile, telling me that it can not
> find a ref to the 1st!

When ever possible, build in reverse dependency order... if (EXEa needs
DLLb) and (DLLb needs DLLc) then build DLLc first, DLLb second and EXEa
last.

> I then have to manualy uncheck the ref to the first, save #2, re-add the
> ref
> to #1, then it will work... ugh...
>
> Is this how it works, anytime I recompile I must reset the ref to the dll
> in
> the any project that accesses it?

If you don't maintain compatibility, yes.

> What about using the dll in VBA in Excel...(which I plan to do)... If I
> have
> some end users accessing the dll from vba code I have set up for them,
> then
> I need to add/edit the dll project and recompile... will I have to not
> only
> copy it to the end users machines, but also reset the ref to it as well???
> Surely not... I must be missing something here... any help appreciated.
>
> Thanks

As Mark mentioned, the problem is most likely compatibility settings. If
you're still at the point where you have to compile it several times a day,
you should have a specific test app to debug it with. Keep in mind that you
can't simply change things on a whim. If you create a method called "Frog"
that takes a string, that method must be there and expect a string for the
rest of the DLLs life. If you find that you need a similar method that
expects 2 arguments instead of one, you can add a new method called "FrogEX"
and use that one instead.... at least until you're ready to call it
"done".... at which time, you can settle on which of the 2 (or more) methods
you really need, break compatibility, rebuild and recompile any apps that
need the DLL.

Binary Compatibility
http://www.vbsight.com/BinaryComp.htm

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..
Author
12 Oct 2005 5:13 PM
Someone
In addition to what others said, if your registry is messed up now, see my
post here in how to fix it:

http://groups.google.com/group/microsoft.public.vb.com/browse_thread/thread/ccf3a9c514ec0c98/62460a2dfac8c3e1



Show quoteHide quote
"spiffo" <no***@hotmail.com> wrote in message
news:dihbv2$nh7$1@news.isdn.net...
> new to vb, using 'classic' as it is now called I guess...vers 6...
>
> I have one project as activeX dll... it is a work in progress so it needs
> re-compile a few times a day...
>
> I have another project (also activeX dll) that has a ref to the first, as
> it
> uses some classes in the first... prob is when I re-compile the first,
> then
> go back into #2 to run it, it will not compile, telling me that it can not
> find a ref to the 1st!
>
> I then have to manualy uncheck the ref to the first, save #2, re-add the
> ref
> to #1, then it will work... ugh...
>
> Is this how it works, anytime I recompile I must reset the ref to the dll
> in
> the any project that accesses it?
>
> What about using the dll in VBA in Excel...(which I plan to do)... If I
> have
> some end users accessing the dll from vba code I have set up for them,
> then
> I need to add/edit the dll project and recompile... will I have to not
> only
> copy it to the end users machines, but also reset the ref to it as well???
> Surely not... I must be missing something here... any help appreciated.
>
> Thanks
>
>