// Declare a BarTender application variable 
                
                BarTender.Application btApp; 
                
                // Create a new instance of BarTender 
                
                btApp = new BarTender.Application();
                
                // Set the BarTender application visible
                
                btApp.Visible = true;
                
                // Return the maximum number of users that 
                
                // can be connected to the BarTender Licensing Service
                
                MessageBox.Show(btApp.LicenseServer.MaxAllowedUsers.ToString());
                
                // End the BarTender process 
                
                btApp.Quit(BarTender.BtSaveOptions.btDoNotSaveChanges);