Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting Powerpoint signature
Message
De
16/10/2012 23:15:01
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Getting Powerpoint signature
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01555148
Message ID:
01555148
Vues:
53
On page http://www.garykessler.net/library/file_sigs.html is listed some various signatures for Powerpoint signature (before Microsoft Office 2007).

I double checked the conversion to ASCII multiple times. The recognition of a Microsoft Office document on the first line is seen. However, I cannot get a recognition of the second level to detect which type it is.

I have this:
            ' If this is a Microsoft Office file
            If Left(lcString, 8) = Chr(208) + Chr(207) + Chr(17) + Chr(224) + Chr(161) + Chr(177) + Chr(26) + Chr(225) Then

                ' If this is a Word file
                If Mid(lcString, 513, 4) = Chr(236) + Chr(165) + Chr(193) + Chr(0) Then
                    cExtension = "DOC"
                    nNoFileType = 1
                    Return True
                End If

                ' If this is a Excel file
                If Mid(lcString, 513, 8) = Chr(9) + Chr(8) + Chr(16) + Chr(0) + Chr(0) + Chr(6) + Chr(5) + Chr(0) Then
                    cExtension = "XLS"
                    nNoFileType = 3
                    Return True
                End If

                ' If this is a Powerpoint file
                If Mid(lcString, 513, 4) = Chr(160) + Chr(70) + Chr(29) + Chr(240) Or _
                 Mid(lcString, 513, 8) = Chr(253) + Chr(255) + Chr(255) + Chr(255) + Chr(14) + Chr(0) + Chr(0) + Chr(0) Or _
                 Mid(lcString, 513, 8) = Chr(253) + Chr(255) + Chr(255) + Chr(255) + Chr(28) + Chr(0) + Chr(0) + Chr(0) Or _
                 Mid(lcString, 513, 8) = Chr(253) + Chr(255) + Chr(255) + Chr(255) + Chr(67) + Chr(0) + Chr(0) + Chr(0) Or _
                 Mid(lcString, 513, 4) = Chr(0) + Chr(110) + Chr(30) + Chr(240) Or _
                 Mid(lcString, 513, 4) = Chr(15) + Chr(0) + Chr(232) + Chr(3) Then
                    cExtension = "PPT"
                    nNoFileType = 5
                    Return True
                End If

                cMessage = cUnableToFindTheOfficeDocumentType
                Return False
            End If
It seems there is another signature that Powerpoint is using. Anyone knows what it is? I have a PPT document here dated from the older versions. This is a binary file. But, it doesn't match any of the above signatures.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform