Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some doubts about your code...
Message
 
To
20/05/2003 10:10:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00757137
Message ID:
00790495
Views:
30
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform