Skip to content

Commit

Permalink
Add support for surrogate value of file name
Browse files Browse the repository at this point in the history
  • Loading branch information
wqweto committed Jun 24, 2020
1 parent d42f8b1 commit 77c7e07
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -75,11 +75,12 @@ Appends `dependency` tag for referencing dependent assemblies like Common Contro

Appends `file` tag and collects information about coclasses and interfaces exposed by the referenced COM component typelib.

Parameters <file_name> [interfaces] [classes_filter]
Parameters <file_name> [interfaces] [classes_filter] [target_name]
file_name file containing typelib. Can be relative to base path
interfaces (optional) pipe (|) separated interfaces with or w/o leading
underscore
classes_filter (optional) pipe (|) separated filter for coclasses in file
target_name (optional) surrogate file location in output manifest

#### Interface

Expand Down
1 change: 1 addition & 0 deletions Sample.ini
Expand Up @@ -34,6 +34,7 @@
# interfaces (optional) pipe (|) separated interfaces with or w/o leading
# underscore
# classes_filter (optional) pipe (|) separated filter for coclasses in file
# target_name (optional) surrogate file location in output manifest
#
# Command: Interface
#
Expand Down
10 changes: 5 additions & 5 deletions Src/mdUmmm.bas
Expand Up @@ -131,10 +131,10 @@ Private Function pvProcess(sFile As String) As String
'--- lib_name in { comctl, vc90crt, vc90mfc }
pvDumpDependency At(vRow, 1), At(vRow, 2), cOutput
Case "file"
'--- file <file_name> [interfaces] [classes]
'--- file <file_name> [interfaces] [classes] [target_name]
'--- file_name can be relative to base path from exe_file
'--- interfaces are | separated, with or w/o leading underscore
pvDumpClasses At(vRow, 1), At(vRow, 3), cOutput
pvDumpClasses At(vRow, 1), At(vRow, 3), At(vRow, 4), cOutput
pvDumpInterfaces At(vRow, 1), At(vRow, 2), cOutput
Case "interface"
'--- interface <file_name> <interfaces>
Expand Down Expand Up @@ -167,7 +167,7 @@ Private Function pvProcess(sFile As String) As String
Case 0
'--- native (COM) dll
pvDumpIdentity pvCanonicalPath(sFile), vbNullString, vbNullString, cOutput
pvDumpClasses pvCanonicalPath(sFile), vbNullString, cOutput
pvDumpClasses pvCanonicalPath(sFile), vbNullString, vbNullString, cOutput
pvDumpInterfaces pvCanonicalPath(sFile), "*", cOutput
Case Else
'--- .net assembly
Expand Down Expand Up @@ -272,7 +272,7 @@ EH:
Resume Next
End Function

Private Function pvDumpClasses(sFile As String, sClasses As String, cOutput As Collection) As Boolean
Private Function pvDumpClasses(sFile As String, sClasses As String, sTargetName As String, cOutput As Collection) As Boolean
Const FUNC_NAME As String = "pvDumpClasses"
Const STR_MISCSTATUS As String = " miscStatusContent=""recomposeonresize,cantlinkinside,insideout,activatewhenvisible,setclientsitefirst"""
Dim oTLI As TypeLibInfo
Expand All @@ -293,7 +293,7 @@ Private Function pvDumpClasses(sFile As String, sClasses As String, cOutput As C
ConsolePrint "error: file %1 not found" & vbCrLf, sFile
GoTo QH
End If
cOutput.Add Printf(" <file name=""%1"">", pvPathDifference(m_sBasePath, sFile))
cOutput.Add Printf(" <file name=""%1"">", Zn(sTargetName, pvPathDifference(m_sBasePath, sFile)))
'--- note: TypeLibInfoFromFile is corrupting registry by partially registering
'--- typelib if relative filename is used!!!
On Error Resume Next
Expand Down

0 comments on commit 77c7e07

Please sign in to comment.