Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OS(1)
Message
 
À
14/06/2000 10:11:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: OS(1)
Divers
Thread ID:
00380189
Message ID:
00380202
Vues:
15
>>>>I don't have Win2K currently installed. What does OS(1) return under that operating system?
>>>
>>>VFP 6.0 sp3 running on Windows 2000 build 2195 returns:
>>>
>>>Windows 5.00
>>
>>Stephen,
>>
>>Thanks for the info.
>>
>>Here's a heads up for anyone using the Registry.vcx file. You need to modify the Init method of the registry class so that it will properly recognize the operating system. As it's currently written, it will assume that the version of Windows is 9x.
>>
>>The reason that this came up was that I'm re-writing the class now and thought that this might be the case. I'll be happy to post my Init method if anyone likes.
>
>
>Thanks. I had not realized the change in format. I don't use the file mentioned, but my group does have a small routine that checks OS versions.

Not terribly complicated. I've removed the code checking for DOS or Unix (anyone think we still need that?)
lcOS = OS(1)
lcwindows = "Windows "
WITH This
  DO CASE
    CASE ATC(lcwindows + "NT", lcOS) # 0
      * NT 3.51/4.00
      .nCurrentOS = OS_NT
      .cRegDLLFile = DLL_ADVAPI_NT
      .cINIDLLFile = DLL_KERNEL_NT
      .cODBCDLLFile = DLL_ODBC_NT
    CASE ATC(lcwindows + "5.", lcOS)  # 0
      * Win2K
      .nCurrentOS = OS_NT
      .cRegDLLFile = DLL_ADVAPI_NT
      .cINIDLLFile = DLL_KERNEL_NT
      .cODBCDLLFile = DLL_ODBC_NT
    OTHERWISE
      * Windows 95/98
      .nCurrentOS = OS_WIN95
      .cRegDLLFile = DLL_ADVAPI_WIN95
      .cINIDLLFile = DLL_KERNEL_WIN95
      .cODBCDLLFile = DLL_ODBC_WIN95
  ENDCASE
ENDWITH
>BTW, I'd like to see the other 11 things overheard by a klingon programmer!< grin >

Watch the parser, Stephen (the grin didn't appear in the original message)< s >. Well, stick around, I'm going through them again.:-) Actually, I posted this sometime ago. Let me do a search and I'll give you the date and section (Chatter I think).
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform