Skip to content

Support Statement: fixtype for type=VBS class in a #include

Q.

We have an ASP include containing a VBS class. In this case, the declaration of the class follows its implicit use as a variable type. The tool is unable to infer the variable type due to the sequence of code.

We want to supply a fixtype to help the tool infer the variable type as the VBS class.

A.

There are lots of games being played with names here, but I can look at the symbol dump and I see these two entries.

2 | 355949 | 343377 | Vb_Name | [\ABC\src\ReportServer_Web\include\CLogWriter.asp].CLogWriter
1 | 343456 | 0 | Vb_Name | _CLogWriter

Now the complicated identifier ”[…include\CLogWriter.asp].CLogWriter” is the class defined within the “CLogWriter.asp” file that I am looking for and the VB_Name “_CLogWriter” is the name used to refer to the file itself. I admit that there is so much name mangling going on that I have to resort to the symbol dumps to get these names. At any rate, I now
add this RefactorFile entry to the GlobalSettings file.

<Registry type="RefactorFile" Source="(%=VirtualRoot%)\include\clogwriter.asp">
<Refactor>
<FixType identifier="Logit.MyLogWriter" type="_CLogWriter.CLogWriter" />
</Refactor>
</Registry>

The answer to the question “What is the name to use for a VBS Class as the target in a registry-fixtype or the type in a refactor/fixtype?” is “_CLogWriter.CLogWriter”. I cannot infer this FixType, but this FixType is all that is needed.