Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Some doubts about your code...
Message
 
À
20/05/2003 10:10:53
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00757137
Message ID:
00790495
Vues:
23
Cetin,

The "new version"...
Local pGUID,rGUID,lpVersionInfo,lcOldError,llNewVersion,lcReturn
Declare Integer CoCreateGuid In 'OLE32.dll' String @pguid
Declare Integer StringFromGUID2 In 'OLE32.dll' String rguid, String @lpsz, Integer cchMax
Declare Short GetVersionEx In win32API String @ lpVersionInfo
Declare Integer UuidCreateSequential In 'RPCRT4.dll' String @ Uuid
lpVersionInfo = Chr(128+5*4)+Replicate(Chr(0),128+5*4-1)
GetVersionEx(@lpVersionInfo)
pGUID=Replicate(Chr(0),16)
rGUID=Replicate(Chr(0),80)
m.lcOldError = On("Error")
llNewVersion = .T.
On Error llNewVersion = .F.
lcReturn = Substr(Iif(UuidCreateSequential(@pGUID)=0 .and. StringFromGUID2(pGUID,@rGUID,40)#0,Strconv(Left(rGUID,76),6),""),26,12)
If llNewVersion = .F.
	lcReturn = Substr(Iif(CoCreateGuid(@pGUID)=0 .and. StringFromGUID2(pGUID,@rGUID,40)#0,Strconv(Left(rGUID,76),6),""),26,12)
EndIf
On Error &lcOldError
Return lcReturn
I think now it will work great in any system any version any any any... :-)

[]s!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Rodolfo Duarte
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform