DLL recompile causes Client to fail 
Author Message
 DLL recompile causes Client to fail

I have written an in-process DLL with methods that I call from a Visual Basic
client (an exe). When I recompile the DLL (without changing the interfaces)
the client fails. I then have to go to the "tools|references" menu, uncheck
the DLL reference (which is now MISSING), exit, and then add the reference
again. I wrote a client in Excel to use the same DLL. When I recompile the
DLL I do not have any problems with the Excel client which still sees the
reference to the DLL. How do I get Visual Basic to act like Excel in this
regard?

If Visual Basic requires a recompile every time a DLL changes then this is a
major flaw. It would require us to update hundreds of installations everytime
we change a comment in a DLL! Say it ain't so!

- Henry



Fri, 11 Sep 1998 03:00:00 GMT  
 DLL recompile causes Client to fail

Quote:

> I have written an in-process DLL with methods that I call from a Visual Basic
> client (an exe). When I recompile the DLL (without changing the interfaces)
> the client fails. I then have to go to the "tools|references" menu, uncheck
> the DLL reference (which is now MISSING), exit, and then add the reference
> again. I wrote a client in Excel to use the same DLL. When I recompile the
> DLL I do not have any problems with the Excel client which still sees the
> reference to the DLL. How do I get Visual Basic to act like Excel in this
> regard?
> If Visual Basic requires a recompile every time a DLL changes then this is a
> major flaw. It would require us to update hundreds of installations everytime
> we change a comment in a DLL! Say it ain't so!

It ain't so...

Make sure you have set the Tools/Options/Project/Compatible OLE Server
to point to the dll file once compiled (I mean for the dll project now,
you don't need to do anything to the .exe project). That way it registers
itself when recompiled with the same class id etc., making it look to the
system exactly the same OLE server as the older version.

-Juha



Sat, 12 Sep 1998 03:00:00 GMT  
 DLL recompile causes Client to fail

Quote:

> I have written an in-process DLL with methods that I call from a Visual Basic
> client (an exe). When I recompile the DLL (without changing the interfaces)
> the client fails. I then have to go to the "tools|references" menu, uncheck
> the DLL reference (which is now MISSING), exit, and then add the reference
> again. I wrote a client in Excel to use the same DLL. When I recompile the
> DLL I do not have any problems with the Excel client which still sees the
> reference to the DLL. How do I get Visual Basic to act like Excel in this
> regard?

> If Visual Basic requires a recompile every time a DLL changes then this is a
> major flaw. It would require us to update hundreds of installations everytime
> we change a comment in a DLL! Say it ain't so!

> - Henry

This is what Microsoft says, please let me know if it really works (grin!)

Under the tools options menu item, project tab, there is a little know field titled OLE compatible
server, use it to point to your previous DLL (BTW, put the last DLL that you compiled the EXE with
somewhere safe).  This is SUPPOSED to truly keep the interface the same.  Hope this helps!



Sat, 12 Sep 1998 03:00:00 GMT  
 DLL recompile causes Client to fail

Quote:
> Under the tools options menu item, project tab, there is a little know field titled OLE compatible
> server, use it to point to your previous DLL (BTW, put the last DLL that you compiled the EXE with
> somewhere safe).  This is SUPPOSED to truly keep the interface the same.  Hope this helps!

Good reply.  However, it should be noted that this will keep the clsid,
not the interface, for each class in your server the same.  YOU are
responsible for keeping the 'interface' (ie public methods & variables)
the same.  You can add methods, for example, that have new names, but you
can't change the parameter list of an existing method.  See the Creating
OLE servers guide or Brockschmidt's Inside OLE for an explanation of this
is necessary.  VB should stop you if you try to compile an EXE or DLL that
will break compatibility.

Andrew

----------------------------------------------------------------------------
Andrew Enfield
Senior, Computer Engineering     University of Washington

----------------------------------------------------------------------------



Sun, 13 Sep 1998 03:00:00 GMT  
 DLL recompile causes Client to fail

Quote:

> It ain't so...

> ...

> -Juha

It works! This is the way it's supposed to be. I don't know why I didn't see this in the
Visual Basic Help.

Thanks, Henry



Sun, 13 Sep 1998 03:00:00 GMT  
 DLL recompile causes Client to fail

Quote:

> You can add methods, for example, that have new names, but you
> can't change the parameter list of an existing method.

I can understand why you have to keep the interfaces the same. I didn't know that
you could add to the interface without breaking existing clients. Thanks for the
help.

Henry



Sun, 13 Sep 1998 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Complied DLL causes createobject to fail

2. URGNET, PLEASE HELP - VBAJET32.DLL FAILED IN CLIENT'S PC

3. Replacing COM+ component without having to recompile clients

4. Recompiling ASP DLL's (Locked File Error -- Please Help)

5. Problem with ReCompiling an ActiveX,DLL

6. "Permission denied" when recompiling ActiveX dll

7. ActiveX dll - recompile - Help Please!

8. Recompiling when creating a new ActiveX DLL

9. ActiveX dll recompile

10. Recompiling dll

11. permission denied when recompiling DLL.

12. Recompile dll

 

 
Powered by phpBB® Forum Software