コード例 #1
0
        public uint SFNTGetServerInfo(SentinelKey.ServerInfo serverInfo)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTGetServerInfo(this.licHandle, serverInfo.bInfoBuffer);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #2
0
        public uint SFNTVerify(byte[] publicKey, byte[] signBuffer, uint length, byte[] signResult)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTVerify(this.licHandle, publicKey, signBuffer, length, signResult);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #3
0
        public uint SFNTSetHeartbeat(uint heartbeatValue)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTSetHeartbeat(this.licHandle, heartbeatValue);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #4
0
        public uint SFNTWriteRawData(uint featureID, byte[] rawDataBuffer, uint offset, uint length, uint writePassword)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTWriteRawData(this.licHandle, featureID, rawDataBuffer, offset, length, writePassword);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #5
0
        public uint SFNTDecrypt(uint featureID, byte[] cipherBuffer, byte[] plainBuffer)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTDecrypt(this.licHandle, featureID, cipherBuffer, plainBuffer);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #6
0
        public uint SFNTWriteString(uint featureID, byte[] stringBuffer, uint writePassword)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTWriteString(this.licHandle, featureID, stringBuffer, writePassword);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #7
0
        public uint SFNTWriteInteger(uint featureID, uint featureValue, uint writePassword)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTWriteInteger(this.licHandle, featureID, featureValue, writePassword);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #8
0
        public uint SFNTQueryFeature(uint featureID, uint flag, byte[] query, uint queryLength, byte[] response, uint responseLength)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTQueryFeature(this.licHandle, featureID, flag, query, queryLength, response, responseLength);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #9
0
        public uint SFNTCounterDecrement(uint featureID, uint decrementValue)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTCounterDecrement(this.licHandle, featureID, decrementValue);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #10
0
        public uint SFNTReleaseLicense()
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTReleaseLicense(this.licHandle);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #11
0
        public uint SFNTGetLicense(uint devID, byte[] softwareKey, uint licID, uint flags)
        {
            uint status = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTGetLicense(devID, softwareKey, licID, flags, out this.licHandle);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }
コード例 #12
0
        public uint SFNTReadInteger(uint featureID, out uint featureValue)
        {
            uint status = 0;

            featureValue = 0;

            try
            {
                status = SentinelKeyNativeAPI.SFNTReadInteger(this.licHandle, featureID, out featureValue);
            }
            catch (System.DllNotFoundException)
            {
                throw new System.DllNotFoundException(strError);
            }
            catch
            {
                // Anything else
            }

            return(status);
        }