Kinook Software Forums

Kinook Software Forums (http://www.kinook.com/Forum/index.php)
-   [VBP] Third Party Tools (http://www.kinook.com/Forum/forumdisplay.php?f=3)
-   -   VB6 binary compatibility (http://www.kinook.com/Forum/showthread.php?t=3997)

trailway 04-07-2009 03:21 PM

VB6 binary compatibility
 
I am using Visual Build 6.7 and am building VB6 projects which are built using binary compatibility.

Sometimes binary compatibility is unavoidable. When I build such a project using VB6 itself, I am warned that compatibility will be broken and am able to proceed with the build. In this case, VB6 modifies the major version of the embedded type library which is correct. This is important to me because if I use tlbimp to generate an interop DLL for consumption by .NET, the version of the resulting DLL is the version of the embedded type library. The version of the interop is critical for me because I am doing a patch build (msp) and if the version is not incremented then it will not be recognized as a change by the Windows Installer.

So… is there any way that I can tell Visual Build to build the VB6 DLL even if binary compatibility is broken? In essence, I want the same behavior (sans the dialog) that occurs when using VB6 interactively.

kinook 04-07-2009 04:12 PM

If binary compatibility has been broken, you could build explicitly change to project/no compatibility before (Compatibility tab) and then set back to binary compatibility after building, but the VB6 command-line compiler (vb6.exe, what the Make VB6 action ultimately invokes to compile a VB6 project) doesn't provide a way to break and build with binary compatibility.

saurabh 02-09-2012 12:53 PM

I have the same issue with compiling in binray compatibility. And I'm handling that the same way as mentioned above.
But now I have another a different issue. I need to compile few VB6 projects using command line (from visual build pro).
Can you tell me what is the option to sepcify the compatibility mode in which I need to compile the VB project (binary or no compatibility)

Thanks in advance!

-Saurabh

kinook 02-09-2012 01:10 PM

VB6.exe doesn't have a command-line option for that. You can specify the compatibility settings on the Compatibility tab of the Make VB6 action.
http://www.kinook.com/VisBuildPro/Ma...ibilitytab.htm

saurabh 02-09-2012 01:19 PM

yes I can do that using Make VB6 action in VBP. But I have a compulsion here to compile few projects using command line. And using command line compilation, the default settings in the project .vbp will be picked. We do not have the flexibility of specifying the compat mode if we dont know how to do that. And you just confirmed that there is no option for that using command line. God help me please.

kinook 02-09-2012 01:21 PM

Why not just use the Make VB6 action to build the project file, since it will modify the .vbp file as needed and then call vb6.exe to actually compile the project?

saurabh 02-09-2012 01:29 PM

yeah I have the compulsion of not using Make VB6 to compile VB projects. Thats coz it was found that the DLL/OCX created produced some appln defects (like some icons not showing properly etc). And the same projects when compiled from the IDE or from command line, produced no such defects.
Hence I'm forced to use command line compilation for VB projects alone.

I'm handling binary break scenarios also from the build script. If a project fails to compile, continue the build, check for its error log. If the error matches with what I have stored in 2 macros (binary breaks have typical error messages), then compile the project in NO COMPAT MODE, and then compile in BINARY mode and then go back to the next project in loop and start compiling again.

Note - If the project failed due to some other reason (like compilation error, file missing etc etc and not due to binary break), then stop the build.

So during build, I can not manually change the project settings temporarily. I need to do that using script only.

kinook 02-09-2012 01:33 PM

That's odd, since the Make VB6 action actually calls vb6.exe to compile, so I'm not sure how it could produce different results than calling vb6.exe directly (you can see the command-line it uses to build by checking the 'Log the command-line' option on the Options tab). At any rate, you can use the Make VB6 action to change compatibility setting in the project file but not build (check the 'Don't build the project(s)' option on the Project/Group tab).

saurabh 02-09-2012 01:55 PM

wow! this can help me i guess.
first change the compat settings and dont build it using Make VB6 action.
in next step build it with the settings having been checked in the previous step.

I would need to check now if the change in settings in the first step would save the project file and be available in the next step or not.


All times are GMT -5. The time now is 11:59 PM.


Copyright © 1999-2019 Kinook Software, Inc.