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 LogonSource Name = C:\gmClients\APP\src\vb_lot_0\APP\APP.vbpRun Date = 2018/04/10 17:03Record Type = SRCMember Name = LogonMember Class = LogonMember Library = ULBatch0Member Type = DECLLocation Number = 2Location Text = Begin VB.Form LogonLocation Member = GENERALLocation File = C:\gmClients\APP\src\vb_lot_0\APP\GEF2.frmLocation Name = LogonLocation Type = FormThis 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 : WindowQ2: 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 | ReferencedMigrate Flags | noneAdditional Flags | HasExtensionsStatus Flags | noneVB_Name | Logon:93778TextBase | 93766TranBase | 1769078Object type defined | FormCompiled Code offset:size | 1412053:139Actual 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.005 | | | | FRM | Version7 | | | | DCL | Form:Logon:76041412 | 1.12 | 1.12 | String | LSP | 5:Logon17 | | | | ATT | VB_Name19 | 1.19 | 1.19 | Boolean | LBC | False21 | | | | ATT | VB_GlobalNameSpace23 | 1.23 | 1.23 | Boolean | LBC | False25 | | | | ATT | VB_Creatable27 | 1.27 | 1.27 | Boolean | LBC | True29 | | | | ATT | VB_PredeclaredId31 | 1.31 | 1.31 | Boolean | LBC | False33 | | | | ATT | VB_Exposed35 | | | | OPT | Explicit37 | | | | NEW | 218 Private Const SW_SHOWNORMAL As Long = 140 | | | | DCL | Constant:SW_SHOWNORMAL:76163345 | | | | DCL | Declaration:ShellExecute:76166650 | | | | DCL | Declaration:GetTempPath:76190455 | | | | NEW | 226 Private mblnDblClick As Boolean58 | | | | DCL | Variable:mblnDblClick:76203363 | | 1.63 | Void | CMD | Private65 | | | | NEW | 228 Public urlSecure As String68 | | | | DCL | Variable:urlSecure:76208673 | | | | NEW | 230 Public strCicsName As String76 | | | | DCL | Variable:strCicsName:76213981 | | | | NEW | 232 Public http As New ServerXMLHTTP30 'Pour appel GEF284 | | | | DCL | Variable:http:76219089 | | | | ILC | 15:Pour appel GEF294 | | | | DCL | Subprogram:Form_Activate:76223699 | | | | DCL | Subprogram:mTxtUtilisateur_DblClick:762276104 | | | | DCL | Subprogram:ok_Click:762399109 | | | | DCL | Subprogram:Form_Load:762955114 | | | | DCL | Subprogram:LoginGEF2:763104119 | | | | DCL | Subprogram:RechercherValeurBaliseXml:763483124 | | | | DCL | Subprogram:LoginGEF2B:763813129 | | | | DCL | Subprogram:sortie_Click:764722134 | | | | DCL | Subprogram:gestionErreurAuthentification:764783Controls 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 | Logon2 | 760482 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse32 | 760608 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse22 | 760696 | 760414 | 0 | Ok | Control | CommandButton | sortie2 | 760784 | 760414 | 0 | Ok | Control | TextBox | mTxtMotPasse2 | 760875 | 760414 | 0 | Ok | Control | TextBox | mTxtUtilisateur2 | 760962 | 760414 | 0 | Ok | Control | CommandButton | ok2 | 761049 | 760414 | 0 | Ok | Control | Label | mLblMotPasse32 | 761139 | 760414 | 0 | Ok | Control | Label | mLblMotPasse22 | 761228 | 760414 | 0 | Ok | Control | Label | mLbCICS2 | 761316 | 760414 | 0 | Ok | Control | Label | mLblMotPasse2 | 761407 | 760414 | 1 | Ok | Control | Label | mLblUtilisateur2 | 761546 | 760414 | 0 | Ok | Control | Label | _mLblUtilisateur_0