PDA

View Full Version : VB6 DLL project: binary compatibility and missing DLL


Alexey
02-22-2006, 10:16 AM
E.g. I have a "Make VB6" step. Field "Filename" points to VBP-file of the DLL project. This VBP has Component Compatibility set to "Binary", but the corresponding binary (DLL-file) is missing. Is there a chance to automatically rebuild DLL in such situation? Currently I must explicitly set "No compatibility" on the "Compatibility" tab. And I'm thinking of setting "Don't change" there, but (!) with the ability to automatically switch to "No compatibility" and build the DLL - instead of just falling with error.

kinook
02-22-2006, 02:08 PM
No, but one option would be to use two Make VB6 steps (the first set to not change compatibility and continue on failure, and the second to set to no compatibility and build only if %LASTSTEP_STATUS% is not equal to 0). You could encapsulate these in a subroutine if needed multiple times.

Alexey
02-23-2006, 04:34 AM
Thanx - that's a workaround!

Alexey
02-26-2006, 03:23 AM
Well, it's not as simple as it seemed to me first.

Imagine I got a VBP-project (Standard EXE) with references to 10 self-made COM-components. The source code of these components is often updated by the developers, so to make building of the EXE-project more intelligent, I followed your advice (given in another forum thread) and created group of projects (VBG), with totally 11 projects inside (10 of them - ActiveX DLLs or controls, and 1 - main EXE-project set as "start-up"). Now imagine, that only one of the ten components failed to be built (because of missing binary, for example). As far as I understand, this will rezult in the following (if using your workaround suggested above): ALL components being built at the next step will be set to "No compatibility" before building, although it would be enough to do that only for one component (for the one being the source of the problem). I think it's not very good. Of course, if the build failure occurs at the 10th (last) component (when 9 are already built successfully), then the next step will change compatibility type only for the "problematic" component. But if failure occurs at component number N, then (10 - N) other components will be set (at the next step) to "No compatibility" before building!

Can you give any recommendations?

kinook
02-27-2006, 11:17 AM
1) Don't break compability
2) Always build with no compatibility
3) http://www.yukondude.com/html/tame_vb_with_idl.php

Alexey
02-28-2006, 09:01 AM
Originally posted by kinook
1) Don't break compabilityNot always this is possible. But we try to do out best :)

Originally posted by kinook
2) Always build with no compatibilityAre you sure this is the right choice?!
And, besides, OCX-references are not properly fixed in FRM- and VBP-files, as I described in another thread (http://www.kinook.com/Forum/showthread.php?s=&threadid=1576).

Originally posted by kinook
3) http://www.yukondude.com/html/tame_vb_with_idl.php I know, thank you. It's quite normal for C-developers. But we got a team of VB-developers... very experienced developers - but only in VB... well, you understand the problem, I think :)