1
Visual Basic 6 / Re:Advancevb Codes
« en: Julio 10, 2016, 11:09:22 am »
Hi cobein,
The lfFaceName() field of Type LOGFONT that you're using in your mCaptioner.bas module in your nccaption project has a wrong size. It should be declared as
While your declaration works in this particular case for the nccaption project's purposes because the lfFaceName comes the last among the UDT member fields, many other derivative UDTs use the entire LOGFONT UDT to describe their own individual member fields. If the LOGFONT UDT has at least one byte extra or missing, the alignment in such derivative UDTs is going to be badly broken which is likely, in its turn, to make your VB calls broken and/or incompatible with the APIs you're calling.
Please see Leandro's ClsSkinner.cls module for many examples of user defined types that are derived from (i.e. are using) the LOGFONT UDT and are misaligned for use in (i.e. are incompatible with) other languages, libraries, and WinAPI. See also my notification of this bug addressed to Leandro here.
The lfFaceName() field of Type LOGFONT that you're using in your mCaptioner.bas module in your nccaption project has a wrong size. It should be declared as
Código: [Seleccionar]
lfFaceName(31) As Byteor betterCódigo: [Seleccionar]
lfFaceName(0 To 31) As Bytei.e. it should be exactly 32 bytes long.While your declaration works in this particular case for the nccaption project's purposes because the lfFaceName comes the last among the UDT member fields, many other derivative UDTs use the entire LOGFONT UDT to describe their own individual member fields. If the LOGFONT UDT has at least one byte extra or missing, the alignment in such derivative UDTs is going to be badly broken which is likely, in its turn, to make your VB calls broken and/or incompatible with the APIs you're calling.
Please see Leandro's ClsSkinner.cls module for many examples of user defined types that are derived from (i.e. are using) the LOGFONT UDT and are misaligned for use in (i.e. are incompatible with) other languages, libraries, and WinAPI. See also my notification of this bug addressed to Leandro here.
)

