Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 184553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T15:18:45+00:00 2026-05-11T15:18:45+00:00

How do I get the general File type description based on extension like Explorer

  • 0

How do I get the general File type description based on extension like Explorer does it? So not MIME but the information that the end-user sees, like.

.doc = Microsoft Office Word 97 – 2003 Document .zip = ZIP File .avi = Video File.

And how can I get the ‘secondary’ information that seems to be available, which I guess it not extension based. Like on ‘Video Files’ it can give you the ‘Length’ of the movie or on doc files how many pages it has.. etc etc..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T15:18:46+00:00Added an answer on May 11, 2026 at 3:18 pm

    Thanks Dan, Alright.. This answers the first question I had. Sadly not the second. Note: Not everything prints.. Credits to PInvoke.net

    using System; using System.Runtime.InteropServices; using System.Text; using System.Diagnostics;   namespace WindowsFormsApplication1 {     static class Program     {         [DllImport('Shlwapi.dll', SetLastError = true, CharSet = CharSet.Auto)]         static extern uint AssocQueryString(AssocF flags, AssocStr str, string pszAssoc, string pszExtra, [Out] StringBuilder pszOut, [In][Out] ref uint pcchOut);          /// <summary>         /// The main entry point for the application.         /// </summary>         [STAThread]         static void Main()         {             Debug.WriteLine(FileExtentionInfo(AssocStr.Command, '.doc'), 'Command');             Debug.WriteLine(FileExtentionInfo(AssocStr.DDEApplication, '.doc'), 'DDEApplication');             Debug.WriteLine(FileExtentionInfo(AssocStr.DDEIfExec, '.doc'), 'DDEIfExec');             Debug.WriteLine(FileExtentionInfo(AssocStr.DDETopic, '.doc'), 'DDETopic');             Debug.WriteLine(FileExtentionInfo(AssocStr.Executable, '.doc'), 'Executable');             Debug.WriteLine(FileExtentionInfo(AssocStr.FriendlyAppName, '.doc'), 'FriendlyAppName');             Debug.WriteLine(FileExtentionInfo(AssocStr.FriendlyDocName, '.doc'), 'FriendlyDocName');             Debug.WriteLine(FileExtentionInfo(AssocStr.NoOpen, '.doc'), 'NoOpen');             Debug.WriteLine(FileExtentionInfo(AssocStr.ShellNewValue, '.doc'), 'ShellNewValue');              //  DDEApplication: WinWord             //DDEIfExec: Ñﻴ߾             //  DDETopic: System             //  Executable: C:\Program Files (x86)\Microsoft Office\Office12\WINWORD.EXE             //  FriendlyAppName: Microsoft Office Word             //  FriendlyDocName: Microsoft Office Word 97 - 2003 Document           }          public static string FileExtentionInfo(AssocStr assocStr, string doctype)         {             uint pcchOut = 0;             AssocQueryString(AssocF.Verify, assocStr, doctype, null, null, ref pcchOut);              StringBuilder pszOut = new StringBuilder((int)pcchOut);             AssocQueryString(AssocF.Verify, assocStr, doctype, null, pszOut, ref pcchOut);             return pszOut.ToString();         }          [Flags]         public enum AssocF         {             Init_NoRemapCLSID = 0x1,             Init_ByExeName = 0x2,             Open_ByExeName = 0x2,             Init_DefaultToStar = 0x4,             Init_DefaultToFolder = 0x8,             NoUserSettings = 0x10,             NoTruncate = 0x20,             Verify = 0x40,             RemapRunDll = 0x80,             NoFixUps = 0x100,             IgnoreBaseClass = 0x200         }          public enum AssocStr         {             Command = 1,             Executable,             FriendlyDocName,             FriendlyAppName,             NoOpen,             ShellNewValue,             DDECommand,             DDEIfExec,             DDEApplication,             DDETopic         }      } } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 176k
  • Answers 176k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer On a "broken link" message, you could follow the GitFaq… May 12, 2026 at 3:15 pm
  • Editorial Team
    Editorial Team added an answer How about this: SELECT Table1.Name, Table2.Rating FROM table1 INNER JOIN… May 12, 2026 at 3:15 pm
  • Editorial Team
    Editorial Team added an answer If I understand your question correctly, you want to soft-code… May 12, 2026 at 3:15 pm

Related Questions

The business I work for is an on-line retailer, I'm currently working on a
I was originally going to frame this question around TextMate, which is by all
I'm rewriting our NAnt build scripts to make them cleaner and simpler, as well
In response to a question I asked a few days ago, I'm attempting to

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.