How to get the plugin version no?

Hello,

I include version information in my Delphi plugin .dll, but this information does not show up when looking at it in Explorer like it does for normal .exes/dlls. Is there a way to do this?

If not, how can I retrieve the plugin major and minor version, either from the .NET host automatically or from within the plugin?

Thanks,

Rob H

in delphi you can retrieve it as:

    //THYModuleManager.PluginDescriptors holds a list of all plugin descriptors that available to module manager
    //By using plugin descriptor you can get information about plugin such as name, version, description, etc.
    for I := 0 to ModuleManager.PluginDescriptorCount - 1 do begin
      pl :=ModuleManager.PluginDescriptors[i];
//      pl.MajorVersion
//      pl.MinorVersion
    end;

note: it retrieves only versions that are specified in plugin initialization:

initialization
  THYPluginFactory.Create(HInstance, 'VclNonVisualPlugin', Create_VclNonVisualPlugin, TVclNonVisualPlugin, myMajorVersion, myMinorVersion, sRequiredPrivilege, sDescription, sUserData);
end.

Thanks for that. I take it that means I cannot embed version info into the project like normal projects?

Regards,

Rob

you can set up these variables (myMajorVersion/myMinorVersion) in runtime from version of your dll or set up them before creating release version.

Thanks. Just to be clear, there’s no way to get the file (or product) versions to come up inside Windows Explorer property details like below?

Just bumping this

You can set up these variables (myMajorVersion/myMinorVersion) from standard VS_VERSION_INFO struct in runtime.
see this solution how to receive file (product) versions.