Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Steps to enter plugin serial into License Server

    Scheduled Pinned Locked Moved SDK Help
    18 Posts 0 Posters 2.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 02/05/2012 at 13:33, xxxxxxxx wrote:

      ...just to clarify a bit more on the first part of your question...

      If you look at the 5th post in that thread, where I start listing the example code, what I basically do is:

      * Set up a couple strings that I need to validate the license key (the C4D serial number and they license key that I sent them).

      * If it's R11 or later, I then check to see if it's being called from a License Server environment...

      * If it IS, then I fix up/adjust the 2 strings before moving on.

      ...basically, after that point in the code, my plugins don't need to know (or care) whether it's License Server or stand-alone (the exception to this statement is that the DEMO mode of my plugins do not work in a License Server environment, so I do check for that just below there in the DEMO parsing code).

      In the case of the License Server, the license key is generated based on the 11 digits from the "Multi-License" serial number, which includes the (total) seat-count. My validation process also uses those same 11 digits, so from the plugin's perspective as long as the validation passes, it doesn't matter if it's a single or multi-seat license.

      Just note that I left out my validation code (of course), as well as even some of the DEMO parsing code in the example that I posted.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 03/05/2012 at 01:04, xxxxxxxx wrote:

        Thank you very much for this, it's very helpful and makes it clear how to handle this issue. The only thing I'm left thinking is that it's a pity there's no way of telling from a C4D serial that this is a licence server serial. Then you'd avoid the non-working plugin serial problem because you would know that a single serial wouldn't work from the start, before you issued the serial to the user.

        I've had several instances of the 'serial not working' email from users but there's always been a reason other than licence server, so I've yet to see this happen. Which is why I'm (perhaps belatedly) trying to make sure that I can handle it correctly when it does 🙂

        Thanks again,

        Steve

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 03/05/2012 at 06:01, xxxxxxxx wrote:

          Yeah, the problem is that they send you the wrong serial digits (the ones from the CINEMA 4D entry (starting with a '1') instead of the Multi-License entry (starting with a '2')), so it looks like any other stand-alone serial digits.

          I really should get some better info on my site about multi-user licensing... not everyone would see/read it, but it should still help eliminate some of the problems.

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            On 05/03/2015 at 07:58, xxxxxxxx wrote:

            I don't have a license server to test on so could someone clarify something?

            The instructions given to the plugin purchaser are:

            Riptide Pro [11-0-1022532] <<RipProAAAAA-XXXXXXXXXXXXXXXX>>
              
            ...you'll need to make that line above available / accessible to the machine running the License Server software (ie. forward this e-mail there, or save it out to a text file that can be accessed from there).
              
            
              
            1. Click the "Add Serials" button at the top of the License Server screen.
              
            2. Copy/Paste that line into the text-entry/dialog box that opens and click OK.
              
            3. The plugin license should then show up listed under that Serial Package (with last 5 digits mathing the "AAAAA" digits above) and any machines using that Serial Package should have access to the plugin.
              
            
              
            The plugin itself will need to be installed on any machine that needs to use it, but doesn't need to be installed on the License Server machine (unless it's used as one of the clients).  You will also need to re-start Cinema 4D on the client machines for the plugin/license to show up.
            

            How does the license show up in the client machine?

            If I do:

            multi = c4d.GeGetSerialInfo(c4d.SERIALINFO_MULTILICENSE)['nr']
            

            do I get back the 11 digit C4D serial number, or am I getting back the 11 digit serial plus the 'XXXX...'
            portion of the code:

            Riptide Pro [11-0-1022532] <<RipProAAAAA-XXXXXXXXXXXXXXXX>>
            

            pasted into the license server?

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              On 05/03/2015 at 14:18, xxxxxxxx wrote:

              Hi terrachild,

              I think my best answer is to direct you to my other thread where I walk through the process/implementation here: https://developers.maxon.net/forum/topic/4411/4045_r11-license-server--snhookclass.

              The short answer is that what would be returned to you - based on my example - is "RipProAAAAA-XXXXXXXXXXXXXXXX" (without the quotes).  Since I use a '-' as a marker, I just search for that and grab everything after that as the plugin's serial number for comparison.  In the code, it's the part that looks like so:

                          //--------------------------------------------------------------------------------  
                        // Note that we also need to skip over the extra data added to the front of the  
                        // plugin's license key (11 digits/characters and a dash)...  
                        //--------------------------------------------------------------------------------  
                        LONG dashPos;  
                        if(sn.FindFirst("-", &dashPos,0))  
                        {  
                            plug_sn = sn.SubStr(dashPos+1, sn.GetLength()-dashPos-1);  
                        }
              

              ...at that point, the 'plugin_sn' variable contains the plugin's serial number.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                On 05/03/2015 at 16:34, xxxxxxxx wrote:

                Okay, that makes more sense.
                So the server knows which plugin is calling:

                multi = c4d.GeGetSerialInfo(c4d.SERIALINFO_MULTILICENSE)['nr']
                

                and only sends back the appropriate code for that plugin?

                Ex.

                One called RipPro1, and another called RipPro2, each with a different plugin id, will get back different results from that call.?

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  On 05/03/2015 at 19:29, xxxxxxxx wrote:

                  Yes, though it has more to do with the unique plugin IDs (that is part of the string that you register the plugin with) than the name - that name part ('RipPro' in this example) is basically ignored by C4D - it's just 6 filler characters before the (important part) 5 digits ('AAAAA' in this example) that match the last 5 digits of the Serial Package that it's being registered to.

                  Of course in my implementation, all the plugin cares about is the serial text that follows that (after the dash).

                  EDIT:

                  Just to clarify, in the string that is used to register the plugin on the License Server:

                  _<_t_>_

                  Riptide Pro [11-0- **1022532** ] <<RipProAAAAA-XXXXXXXXXXXXXXXX>>
                  

                  <_<_t_>_

                  ...the " 1022532" digits are my (Riptide Pro) unique plugin ID - replace that with your own plugin ID.

                  That other thread that I linked goes over each part of the string and it's importance/usage.

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Helper
                    last edited by

                    On 05/03/2015 at 21:21, xxxxxxxx wrote:

                    I read over your other post before asking here, but I needed a little clarification to get my head around the concept.

                    Thanks.

                    PS Could you chime in over at this post? 
                    https://developers.maxon.net/forum/topic/8561/11178_plugin-pricing-for-license-server

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

                      On 06/03/2015 at 05:55, xxxxxxxx wrote:

                      Thanks, one last thing: If the user is on a license server and they haven't put my plugin's code into their server, then what do I get back when I call:

                      multi = c4d.GeGetSerialInfo(c4d.SERIALINFO_MULTILICENSE)['nr']
                      

                      from my plugin.

                      An empty string?
                      Or just the multi-license code for C4D?

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        Helper
                        last edited by

                        On 06/03/2015 at 11:27, xxxxxxxx wrote:

                        You seem to have a somewhat different implementation than me, because at the point where that question would be relevant in my code, I'd be looking at the 'sn' variable passed into the SNCheck() hook to verify the plugin's license and then validating that (with conditional fall-through coding) - which would either be blank or wrong (if they used a license generated for a stand-alone setup), so I'm not exactly sure how to answer your question, but my guess would be blank, yes.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post