Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting file type for a Flash file
Message
De
13/12/2005 23:24:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Detecting file type for a Flash file
Divers
Thread ID:
01077743
Message ID:
01077743
Vues:
59
I have this function to detect the file type of an image:
* Returne the file type
FUNCTION FileType
PARAMETER tcData
LOCAL lcReturn,lcString
lcString=FILETOSTR(tcData)
DO CASE 
   CASE LEN(lcString)<4
      lcReturn=''
   CASE LEFT(lcString,3)=CHR(0xFF)+CHR(0xD8)+CHR(0xFF)
      lcReturn='JPG'
   CASE LEFT(lcString,3)='GIF'
      lcReturn='GIF'
   CASE SUBSTR(lcString,42,3)='EMF'
      lcReturn='EMF'
   CASE LEFT(lcString,4)=CHR(0xD7)+CHR(0xCD)+CHR(0xC6)+CHR(0x9A)
      lcReturn='WMF'
   CASE LEFT(lcString,4)=CHR(0x4D)+CHR(0x4D)+CHR(0x00)+CHR(0x2A)
      lcReturn='TIF'
   CASE LEFT(lcString,4)=CHR(0x89)+'PNG'
      lcReturn='PNG'
   CASE LEFT(lcString,2)='BM'
      lcReturn='BMP'
   OTHERWISE 
      lcReturn=''
ENDCASE 
RETURN lcReturn
Anyone would know what I could add in there to detect the file type for a Flash file? They have the extension SWF.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform