Effacer les filtres
Effacer les filtres

license for private toolbox

4 vues (au cours des 30 derniers jours)
John
John le 14 Août 2013
I am a software developer who has developed a private toolbox. Is there anyway I can have some kind of license control on the toolbox to prevent a customer from unrestricted distributing the toolbox.
Possible approaches: Piggy-back on the matlab license manager? A mxLicense( ) function to let me check the license number from C code?

Réponse acceptée

Jan
Jan le 15 Août 2013
The license number can be check easily by using the license command in mexCallMATLAB. But this can be replaced easily by a user-defined function, such that this does not have a severe security level.
You find many discussions here and some contributions in the FileExchange for creating a unique machine ID. And internet search engine might be more efficient than the forum search.
  4 commentaires
Jan
Jan le 17 Août 2013
As far as I remember license replies a double. Then:
mexPrintf("License number: %g\n", mxGetScalar(plhs[0]));
John
John le 19 Août 2013
The result is not a double, but a string. The following code gets the matlab license number as a string:
mxArray *plhs[1]; char str2[16];
mexCallMATLAB( 1, plhs, 0, NULL, "license");
mxGetString( plhs[0], str2, 16 );
mexPrintf( " \n str2=%s \n", str2 );

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Manage Products dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by