adi63
adi63

Reputation: 17

RedemptionLoader with Visual Basic

I don't get the RedemptionLoader work with Visual Basic .Net (Visual Studio 2019) at all.

I'm trying to avoid registering Redemption.dll (Redemption64.dll) on users machines. I tried to following instructions from https://www.dimastr.com/redemption/security.htm#redemptionloader to switch my application to the unregistered version with the RedemptionLoader. But I just can't get the version with the RedemptionLoader to work at all.

I'm using Visual Studio 2019, Visual Basic. I added RedemptionLoader.vb to the project. Among the references is reference to the Interop.Redemption.

In the project folder are

The two Redemption DLLs have been deregistered.

In the program I try the following:

Dim RDOSession As Redemption.session
RDOSession = RedemptionLoader.new_RDOSession()

But already:

Dim RDOSession As Redemption.session

-> it does not work (Redemption is underlined).

This would be possible:

Dim RDOSession As Redemption.RedemptionLoader

-> but it is of no use for me.

I'm desperate and very thankful when I get the basics up and running.

Regards

Albert

Upvotes: 0

Views: 357

Answers (4)

Jason Simotas
Jason Simotas

Reputation: 21

adi63 modifications helped me out. One change I had to make was to comment out the Session = CreateObject("Redemption.RDOSession") line. I think the next line with RedemptionLoader.new_RDOSession creates the object.

Upvotes: 0

adi63
adi63

Reputation: 17

Now I've got it running and I'm very happy.

It worked with the following modifications:

I prefixed the program module with:

Imports Redemption

Program changed to:

Dim Session As RDOSession
Session = CreateObject("Redemption.RDOSession")
Session = Redemption.RedemptionLoader.new_RDOSession

I included the two DLL's as project resources and activated 'Copy to Output Directory' in the properties.

It worked for me with these settings. Also in the big program with OOF, E-Mail handling, ....

Many thanks to @Dmitry and @Eugene for your support!

Upvotes: 0

Eugene Astafiev
Eugene Astafiev

Reputation: 49455

You must keep the interop library referenced in the project to be able to use the type definitions in your code base. The redemption loader is not related to the interop library, just make sure that unmanaged assemblies are put to the output folder, so the loader could locate them. That is all.

Sometimes it makes sense to create a brand new project and try to implement a new feature there to make sure everything works correctly. So, I'd recommend doing that to exclude any external factors from the view. I've implemented that scenario many times in VB.NET projects without a problem.

Upvotes: 0

Dmitry Streblechenko
Dmitry Streblechenko

Reputation: 66286

You need to add the included interop dll to your project references in VS.

Upvotes: 0

Related Questions