Check License in with ArcObjects

2412
1
Jump to solution
06-24-2017 09:01 AM
JaredGasco
New Contributor II

Hello All,

I created a standalone .NET WPF application that's been in use for several months now. All along I thought it was checking desktop licenses back in after invoking Shutdown() on an IAoInitialize object but apparently the licenses aren't getting checked back in until the application closes. I even made a much simpler test application with two buttons to test this (see code below). Clicking btnCheckIn does not check the license back in. Is it possible to check a license back in before the application closes? I should probably also mention that the license that is getting initialized in this example is a concurrent license.

0 Kudos
1 Solution

Accepted Solutions
JaredGasco
New Contributor II

Apparently this isn't possible since the license "attaches" itself to the process the executable is running in. Therefore, the license doesn't get checked back in until the process terminates. A potential workaround would be to create another executable with the ArcObjects code that the "main" application calls in another process and then terminates. Obviously, some form of interprocess communication would need to be implemented in order to exchange data between the two executables.

View solution in original post

0 Kudos
1 Reply
JaredGasco
New Contributor II

Apparently this isn't possible since the license "attaches" itself to the process the executable is running in. Therefore, the license doesn't get checked back in until the process terminates. A potential workaround would be to create another executable with the ArcObjects code that the "main" application calls in another process and then terminates. Obviously, some form of interprocess communication would need to be implemented in order to exchange data between the two executables.

0 Kudos