Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determining file types and validity
Message
 
 
À
29/05/2001 05:19:51
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00512062
Message ID:
00512292
Vues:
13
Yves,

Short of being able to actually start each application and have it check the file for validity there is no way to be sure if any particular file is good or not. Some files (.zip and .jpg for example) have binary signatures near the front of the file that can be used for a very basic check. You can use the HexEdit.app to look around in a file.

>David Thanks for your reply.
>This shows some way, but wasn't exactly what I was looking for.
>
>It just wanted to hand over the file to some function, and have the function based on the contents of the file (the header of the file?), determine which type it is.
>
>After some digging around I stumbled onto the FindMimeFromData() function.
>It think this one is the one I was looking for.
>I also found it is available in the URLMON.dll.
>
>The problem now is that I don't succeed in having it working from within VFP.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform