Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error: 'class not licensed for use'
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00791929
Message ID:
00792320
Vues:
130
Well, it was a wild stab. Try the below - it uses the method Sergey pointed out to you in MSKB#192693. You must use the NEWOBJECT vs ADDOBJECT method on a subclass of the Winsock control to get the licensing right. I just tested this with ISE and installed the below (in EXE form) and the VFP7 runtimes on a clean WIN2k Pro box. No licensing complaints. YMMV with your installer.
#DEFINE sckclosed                0
#DEFINE sckopen                  1
#DEFINE scklistening             2
#DEFINE sckconnectionpending     3
#DEFINE sckresolvinghost         4
#DEFINE sckhostresolved          5
#DEFINE sckconnecting            6
#DEFINE sckconnected             7
#DEFINE sckclosing               8
#DEFINE sckerror                 9

ON SHUTDOWN quit

FUNC pingstate
  LPARAM tnstate
  LOCAL lcstate
  DO CASE
    CASE tnstate = sckclosed
      lcstate = "Closed"
    CASE tnstate = sckopen
      lcstate = "Open"
    CASE tnstate = scklistening
      lcstate = "Listening"
    CASE tnstate = sckconnectionpending
      lcstate = "Waiting"
    CASE tnstate = sckresolvinghost
      lcstate = "Resolving"
    CASE tnstate = sckconnecting
      lcstate = "Connecting"
    CASE tnstate = sckconnected
      lcstate = "Connected"
    CASE tnstate = sckclosing
      lcstate = "Closing"
    CASE tnstate = sckerror
      lcstate = "Error"
    OTHERWISE
      lcstate = "Unknown"
  ENDCASE
  RETURN lcstate

FUNC pingy
  LPARAM tcserver, tnport
  LOCAL lnstate, loping, lnlast
  loping=CREA("WinSock")
  loping.NEWOBJECT("olesock","ws1")
  DEBUGOUT("Pingx inited")
  WITH loping.olesock
    .remoteport=tnport
    .remotehost = tcserver
    .CONNECT()
    lnlast = -1
    DO WHILE .state < sckconnected
      IF lnlast # .state
        lnlast = .state
      ENDIF
    ENDDO
    lnstate = .state
    .CLOSE()
  ENDWITH
  RETURN lnstate#9
ENDFUNC

DEFINE CLASS winsock AS FORM
ENDDEFINE

DEFINE CLASS ws1 AS OLECONTROL
  OLECLASS = "MSWinsock.winsock"
ENDDEFINE
>>Josh,
>>
>>Try changing your "OLECLASS = "MSWinsock.winsock.1" to "OLECLASS = "MSWinsock.winsock" in pingy and see if it helps in the clients.
>
>same results...
>
>:(
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform