Support Statement: What happened to my filenames?

 

Q1: Where does the name Logon come from ? We don't fine any file called Logon in the VB6 source code.    

A. Good question.

The tool does not use source code file names in its output. It uses the internal identifiers of the files as they are guaranteed to be unique within a VBP and they are more suited to the requirements of the upgraded code.
In many cases the file names and internal names are the same, so one may not even notice this critical distinction.

Searching APP.VBP for Logon reveals this record. 

Begin VB.Form Logon
Source Name = C:\gmClients\APP\src\vb_lot_0\APP\APP.vbp
Run Date = 2018/04/10 17:03
Record Type = SRC
Member Name = Logon
Member Class = Logon
Member Library = ULBatch0
Member Type = DECL
Location Number = 2
Location Text = Begin VB.Form Logon
Location Member = GENERAL
Location File = C:\gmClients\APP\src\vb_lot_0\APP\GEF2.frm
Location Name = Logon
Location Type = Form
 


This declares a XAML Form named Logon and is used in several places in the C#, for example:

\gmClients\APP\proj\deploy\ULBatch0\ULBatch0.csproj <Page Include="Logon.xaml">
\gmClients\APP\proj\deploy\ULBatch0\ULBatch0.csproj <Compile Include="Logon.xaml.cs">
\gmClients\APP\proj\deploy\ULBatch0\ULBatch0.csproj <DependentUpon>Logon.xaml</DependentUpon>

\gmClients\APP\proj\log\Batch0-ULBatch0-upg-csh.bnd cat >\gmClients\APP\proj\deploy\ULBatch0\Logon.xaml <<'!)(!'

\gmClients\APP\proj\deploy\ULBatch0\Logon.xaml xmlns:my="clr-namespace:MigrationSupport.WPF;assembly=MigrationSupport.WPF" x:Class="ULBatch0.Logon"

\gmClients\APP\proj\log\Batch0-ULBatch0-upg-csh.bnd cat >\gmClients\APP\proj\deploy\ULBatch0\Logon.xaml.cs <<'!)(!'

\gmClients\APP\proj\deploy\ULBatch0\Logon.xaml.cs public partial class Logon : Window
 

 

Q2: Do you not even record the name as a comment?


Generally speaking we do not author our own comments. The question is who is going to read the commend and why? Presumably to help them compare code. Normally I use the side-by-side viewer to help me setup and look at VB6 and C# or I use the source and target search for the same terms to compare code. Those tools know now to get the old name in context of using it... BUT, I will mention that I just found the side-by-side viewer does not work for VB6 forms rewritten as xaml, but I think fix that oversight pretty easily.

Also, using the IL search, I find the information model does contain a node in the hierarchy for each file. For example, the FormFile object contains the control nodes (including the Form itself) and also Code nodes for fields, methods, and events. See listing below.
Since the information is in the model, you could modify the metalang to author the source filename or filepath as a comment. You could even attempt a rename back to the filename if you wanted. Not recommended.

Detailed Description of FormFile GEF2.frm with root address 93685:
Property | Content
-------- | -------
Migrate Status | Referenced
Migrate Flags | none
Additional Flags | HasExtensions
Status Flags | none
VB_Name | Logon:93778
TextBase | 93766
TranBase | 1769078
Object type defined | Form
Compiled Code offset:size | 1412053:139
Actual csh Codeblock Associated with C:\gmClients\APP\src\vb_lot_0\APP\GEF2.frm:
Offset | Sl.Start | Ql.Start | Quantity type | Opcode | Operation support information
------ | -------- | -------- | ------------- | ------ | -----------------------------
0 | 1.0 | 1.0 | String | LSP | 4:5.00
5 | | | | FRM | Version
7 | | | | DCL | Form:Logon:760414
12 | 1.12 | 1.12 | String | LSP | 5:Logon
17 | | | | ATT | VB_Name
19 | 1.19 | 1.19 | Boolean | LBC | False
21 | | | | ATT | VB_GlobalNameSpace
23 | 1.23 | 1.23 | Boolean | LBC | False
25 | | | | ATT | VB_Creatable
27 | 1.27 | 1.27 | Boolean | LBC | True
29 | | | | ATT | VB_PredeclaredId
31 | 1.31 | 1.31 | Boolean | LBC | False
33 | | | | ATT | VB_Exposed
35 | | | | OPT | Explicit
37 | | | | NEW | 218 Private Const SW_SHOWNORMAL As Long = 1
40 | | | | DCL | Constant:SW_SHOWNORMAL:761633
45 | | | | DCL | Declaration:ShellExecute:761666
50 | | | | DCL | Declaration:GetTempPath:761904
55 | | | | NEW | 226 Private mblnDblClick As Boolean
58 | | | | DCL | Variable:mblnDblClick:762033
63 | | 1.63 | Void | CMD | Private
65 | | | | NEW | 228 Public urlSecure As String
68 | | | | DCL | Variable:urlSecure:762086
73 | | | | NEW | 230 Public strCicsName As String
76 | | | | DCL | Variable:strCicsName:762139
81 | | | | NEW | 232 Public http As New ServerXMLHTTP30 'Pour appel GEF2
84 | | | | DCL | Variable:http:762190
89 | | | | ILC | 15:Pour appel GEF2
94 | | | | DCL | Subprogram:Form_Activate:762236
99 | | | | DCL | Subprogram:mTxtUtilisateur_DblClick:762276
104 | | | | DCL | Subprogram:ok_Click:762399
109 | | | | DCL | Subprogram:Form_Load:762955
114 | | | | DCL | Subprogram:LoginGEF2:763104
119 | | | | DCL | Subprogram:RechercherValeurBaliseXml:763483
124 | | | | DCL | Subprogram:LoginGEF2B:763813
129 | | | | DCL | Subprogram:sortie_Click:764722
134 | | | | DCL | Subprogram:gestionErreurAuthentification:764783
Controls contained within C:\gmClients\APP\src\vb_lot_0\APP\GEF2.frm:
Lev | Root | Parent | Count | Status | Role | Object Type | Object Identifier
--- | ---- | ------ | ----- | ------ | ---- | ----------- | -----------------
1 | 760414 | 93685 | 0 | Ok | Control | Form | Logon
2 | 760482 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse3
2 | 760608 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse2
2 | 760696 | 760414 | 0 | Ok | Control | CommandButton | sortie
2 | 760784 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse
2 | 760875 | 760414 | 0 | Ok | Control | TextBox | mTxtUtilisateur
2 | 760962 | 760414 | 0 | Ok | Control | CommandButton | ok
2 | 761049 | 760414 | 0 | Ok | Control | Label | mLblMotPasse3
2 | 761139 | 760414 | 0 | Ok | Control | Label | mLblMotPasse2
2 | 761228 | 760414 | 0 | Ok | Control | Label | mLbCICS
2 | 761316 | 760414 | 0 | Ok | Control | Label | mLblMotPasse
2 | 761407 | 760414 | 1 | Ok | Control | Label | mLblUtilisateur
2 | 761546 | 760414 | 0 | Ok | Control | Label | _mLblUtilisateur_0


 

 

 

Â