Passolo SDK Enumerate source assembly (exe, dll)

I am using Passolo Pro 2018 and the Passolo .NET SDK. I am creating an export add-in.

I can’t figure out how to enumerate the assemblies (exe, dll) and resource dlls using the SDK like Passolo does.

In Passolo, I could see the folder path and file name of the assemblies. (see screen shot)

How could I do this using the SDK?

I would like to get this information for all the sources so I could read some custom binary data without creating another add-in.

Screenshot of Passolo Pro 2018 showing the 'Assemblies' tab with a list of .exe and .dll files, including their folder paths and file names highlighted.

Screenshot of Passolo Pro 2018 with the 'Assemblies' tab active, displaying a list of .exe and .dll files with folder paths and file names, similar to the first image.

Can help here?



Generated Image Alt-Text
[edited by: RWS Community AI at 12:14 PM (GMT 0) on 14 Nov 2024]
Parents
  • I need to reference my previous answer posted yesterday.

    https://community.sdl.com/developers-more/developers/language-developers/f/sdk_qa/31070/reading-binary-resources-with-passolo-export-addin

    Even if you would be able to programmatically access the source and target files and read the custom binary data you are looking for, you never will be able to insert this data into the Passolo project for translation. The Export Add-in interface simply doesn’t have such methods.

    As already mentioned implementing a Custom Resource Add-in is the only way to solve this issue.

  • Ok, I understand I need to create a custom resource add-in to read the binary data. For my information could you tell me how to programmatically access the source and target files from an export add-in. I may need the source and target file names for other information.

  • Your initial request that talks about Export Add-Ins and custom binary resource in one single post confused me. At least I can answer the basic questions:

    In the Write() function of an Export Add-In you can get the source file name by

    string sourcefile = (string)stringlist.GetFileOptions().GetProperty(CustFileProperty.SourceFile);

    and the target file name by

    string targetfile = (string)stringlist.GetFileOptions().GetProperty(CustFileProperty.TargetFile);

    The stringlist.GetResFile(CPAIAddIn addin, enmResFileStoreType type, string name) function retrieves the path of a file that has been stored to the project with SLStoreResFile(). The path is in the temporary folder that is created by Passolo to unpack the project files.

    To use this function you first must be sure that the corresposnding parser has used SLStoreResFile(). You must excatly know the file name that was used by SLStoreResFile() and pass it in the name parameter, otherwise the result of stringlist.GetResFile() will be an empty string. 

    Hope that helps.

Reply
  • Your initial request that talks about Export Add-Ins and custom binary resource in one single post confused me. At least I can answer the basic questions:

    In the Write() function of an Export Add-In you can get the source file name by

    string sourcefile = (string)stringlist.GetFileOptions().GetProperty(CustFileProperty.SourceFile);

    and the target file name by

    string targetfile = (string)stringlist.GetFileOptions().GetProperty(CustFileProperty.TargetFile);

    The stringlist.GetResFile(CPAIAddIn addin, enmResFileStoreType type, string name) function retrieves the path of a file that has been stored to the project with SLStoreResFile(). The path is in the temporary folder that is created by Passolo to unpack the project files.

    To use this function you first must be sure that the corresposnding parser has used SLStoreResFile(). You must excatly know the file name that was used by SLStoreResFile() and pass it in the name parameter, otherwise the result of stringlist.GetResFile() will be an empty string. 

    Hope that helps.

Children