LabRat
LabRat

Reputation: 2014

extract my.setting.whatever from another exe

Ussing vb.net I extract an image from another exe using the following code.

My question is, is it also possible to extract a setting value from another exe using a simular method?

Try
Dim ExternalAssembly As Assembly = Assembly.LoadFile(Application.StartupPath & "/" & PluginPath)
Dim TargetPlugin As String = IO.Path.GetFileNameWithoutExtension(Application.StartupPath & "/" & PluginPath)
Dim ExternalResourceManager As Resources.ResourceManager

ExternalResourceManager = New Resources.ResourceManager(TargetPlugin & ".resources", ExternalAssembly)

If ExternalResourceManager.GetObject("MyStringRefrenceName") = Nothing Then
.Image = My.Resources.ResourceManager.GetString("MyStringRefrenceName").testing 'or is it value?

Msgbox(MyStringRefrenceName)

End If

 Catch ex As Exception

Msgbox("failed")

End Try

Upvotes: 0

Views: 48

Answers (0)

Related Questions