6 Programming Examples
6.1 Function SglAuthent
6.1.1 C/C++
# i n c l u d e
"SGLW32 . h "
u n s i g n e d i n t R e t u r n C o d e ;
/ /
T h i s
i s
t h e DEMO a u t h e n t i c a t i o n c o d e ,
/ /
e v e r y
r e g u l a r SG
−
L o c k u s e r
g e t s
i t s
/ / own u n i q u e
a u t h e n t i c a t i o n c o d e .
u n s i g n e d i n t MyAuthentCode [ 1 2 ] = {
0 xF574D17B , 0 xA94628EE ,
0 xF2857A8F , 0 x69346B4A ,
0 x4136E8F2 , 0x89ADC688 ,
0x80C2C1D4 , 0 xA8C6327C ,
0 x1A72699A , 0 x574B7CA0 ,
0 x1E8D3E98 , 0xD7DEFDC5 } ;
/ / do a u t h e n t i c a t i o n
o f SGLW32 . D l l
R e t u r n C o d e = S g l A u t h e n t ( MyAuthentCode
) ;
i f ( R e t u r n C o d e ! = SGL_SUCCESS ) {
/ /
a u t h e n t i c a t i o n
f a i l e d ! !
p r i n t f ( " S g l A u t h e n t :
E r r o r ! ( c o d e : 0 x%X ) \ n " ,
R e t u r n C o d e
) ;
}
/ /
a u t h e n t i c a t i o n
s u c c e e d e d . . .
do t h e
n e x t
r e g u l a r
t h i n g . . .
6.1.2 Delphi
i n t e r f a c e
u s e s
{ $INCLUDE ’ SGLW32IF . PAS ’ }
i m p l e m e n t a t i o n
{ $INCLUDE ’ SGLW32IP . PAS ’ }
39
Summary of Contents for SG-Lock
Page 2: ......
Page 22: ......
Page 60: ......
Page 62: ...56 Chapter 7 Technical Data Notes ...
Page 63: ...Chapter 7 Technical Data 57 ...