Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unusual Behaviour of .Exe Application
Message
De
20/08/2013 14:12:26
 
 
À
20/08/2013 12:06:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01580814
Message ID:
01580841
Vues:
55
No its not so. The Pirated or Not Pirated is decided early in my program. While the List Box is on Form and Form runs throgh a Menu.
So first the LOCK.PRG is run which decides whether the Program is Pirated or Not ? Than Main.MPR is run.
Also, had it been the case than why the software runs properly at the second instance when the entire application is Quited and restarted ?





>Sounds like the ListBox is being populated for the first time *before* you have set the 'pirated' variable. Where is that code located?
>
>>I have made a .Exe Application and given to a client. In order to avoid Unlicensed use of it I have locked the application with the Hardware components of the system,
>>
>>Further, I have given condition as if the software is Pirated only two Items will be displayed in the List Box and if it is not pirated , all the 13 items will be displayed. For this have put the following code in the INT() of List Box on various Form.
>>
>>The Unusual Behavior
>>
>>The User is complaining that when on the first instance he is running the application only two items are populated and when he exits or quits and run again i.e the second time all 13 items gets populated. I am wondering that when the PC and its hardware components what is the reason for such unusual behaviour.
>>
>>
>>Here is the code which I have used to Have Lock
>>
>>
>>M=0
>>*CPUID Type-I*
>>LOCAL lcComputerName, loWMI, lowmiWin32Objects, lowmiWin32Object
>>lcComputerName = GETWORDNUM(SYS(0),1)
>>loWMI = GETOBJECT("WinMgmts://" + lcComputerName)
>>lowmiWin32Objects = loWMI.InstancesOf("Win32_Processor")
>>FOR EACH lowmiWin32Object IN lowmiWin32Objects
>>    WITH lowmiWin32Object
>>        cIDTYPEONE= TRANSFORM(.ProcessorId)
>>    ENDWITH
>>ENDFOR
>>
>>*CPUID Type-II*
>>declare string CpuID IN utility.dll
>>cIDTYPETWO= CPUID()
>>
>>
>>***Get MAC Number*********
>>
>>LOCAL lcComputerName, loWMIService, loItems, loItem, lcMACAddress
>>lcComputerName = "."
>>loWMIService = GETOBJECT("winmgmts:\\" + lcComputerName + "\root\cimv2")
>>loItems = loWMIService.ExecQuery("Select * from Win32_NetworkAdapter",,48)
>>FOR EACH loItem IN loItems
>>
>>lcMACAddress = loItem.MACAddress
>>IF !ISNULL(lcMACAddress)
>>M=M+1
>>
>>IF M=1
>>MA1=loItem.MACAddress
>>ELSE
>>MA1='XXXX'
>>ENDIF
>>
>>
>>IF M=2
>>MA2=loItem.MACAddress
>>ELSE
>>MA2='XXXX'
>>ENDIF
>>
>>IF M=3
>>MA3=loItem.MACAddress
>>ELSE
>>MA3='XXXX'
>>ENDIF
>>
>>IF M=4
>>MA4=loItem.MACAddress
>>ELSE
>>MA4='XXXX'
>>ENDIF
>>
>>IF M=5
>>MA5=loItem.MACAddress
>>ELSE
>>MA5='XXXX'
>>ENDIF
>>
>>ENDIF
>>ENDFOR
>>
>>*******GET mother Board Number**********
>>loWMI = GETOBJECT("WinMgmts://./root/cimv2")
>>BaseBoards = loWMI.InstancesOf("Win32_BaseBoard")
>>FOR EACH MotherBoard IN BaseBoards
>>MB_product=MotherBoard.Product
>>MB_serial=MotherBoard.SerialNumber
>>MBP=MB_product
>>MBS=MB_serial
>>NEXT
>>Slighthaze = NULL
>>
>>LOCK=ALLTRIM(cIDTYPEONE)+;
>>ALLTRIM(cIDTYPETWO)+;
>>ALLTRIM(RIGHT(MA1,4))+;
>>ALLTRIM(RIGHT(MA2,4))+;
>>ALLTRIM(RIGHT(MA3,4))+;
>>ALLTRIM(RIGHT(MA4,4))+;
>>ALLTRIM(RIGHT(MA5,4))+;
>>ALLTRIM(RIGHT(MBP,4))+;
>>ALLTRIM(RIGHT(+MBS,4))
>>
>>IF UPPER(ALLTRIM(LOCK))=='BFEBFBFF000006FD00E39D10208006FDXXXXXXXXXXXXXXXX6:4D7383E.M.'
>>Pirated=.F.
>>Unit="O/o TDM, BSNL,Chhindwara"
>>Circle="Madhya Pradesh Telecom Circle"
>>ELSE
>>Unit="O/o TDM, BSNL,Chhindwara"
>>Circle="Madhya Pradesh Telecom Circle"
>>Pirated=.T.
>>ENDIF
>>
>>
>>
>>Here is the code which I am using for Populating List Box
>>
>>
>>IF Pirated=.F.
>>This.rowsource = 'April,May,June,July,August,September,October,November,December,January,February,March,March ST-I,March ST-II'
>>Mmonth=4
>>ELSE
>>IF ldemoversion=.T.
>>This.rowsource = 'April,May,June'
>>Mmonth=4
>>ELSE
>>This.rowsource = 'March ST-I,March ST-II'
>>Mmonth=13
>>ENDIF
>>ENDIF
>>This.value = 1
>>
>>
>>
>>
>>Kinldy Guide
>>Regards
Harsh
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform