1
votes

When compiling a VB6 project I am getting an error shown in a messagebox:

enter image description here

(Note again, this is not a runtime error, but a compile-time error. When building an EXE).

VBCCR16 is the name of an OCX library, and so it seems apparently some code in the OCX is being run during compilation of the project which references it. I never knew OCX / DLL code was run at compile time.

I have never seen this before and am trying to debug it, but with no success yet. I have tried looking at VB6.exe and its compiler processes in Process Monitor & Process Explorer, but that showed nothing obvious to go on. Nor did Event Viewer (no entries).

Since error zero typically means "no error" in VB6, that doesn't seem to be a useful clue in itself.

What code gets called in an OCX / DLL during compilation? What could possibly cause this?

Any suggestions on how to debug this problem?


Note 1 - this error occurs on our build machine (a Win7 virtual machine) but does not occur on my own PC during compilation. It also does not occur if I just run the code in the IDE.

The build setup has been used for years without ever seeing this before. I don't think it is a memory or disk space issue.


Note 2 - I have also posted a question to the OCX library's author, but I'm not sure if this is really a problem with the library or something else, hence the question here.


Note 3 - I have just seen this other question which describes what code is run during compilation. So that apparently explains the general context of this issue, but not the actual root cause.

1
I didn't think any code from an OCX or DLL is run during compilation. - Brogan
@Brogan I didn't know this either, but in fact some code is run: stackoverflow.com/a/1395762/3195477 - StayOnTarget
This turned out to be a different symptom of the same problem described here: stackoverflow.com/questions/54099150/… - StayOnTarget

1 Answers

0
votes

The issue may be related to the designer. Suggest comparing the designer part with the previous source which compiled in the last time and finds strange changes like font which set to CTX and not to a specific font. For Example:

font            =   "MyControl.ctx":0848
instead of
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
        Name         =   "MS Sans Serif"
        Size            =   9.75
        Charset         =   0
        Weight          =   400
        Underline       =   0   'False
        Italic          =   0   'False
        Strikethrough   =   0   'False
EndProperty