Forums - C# Corner

Forum guidelines

Extract icon from exe, dll, or ico file

Mar 7 2004 1:08 AM
I make an application that is similar to windows explorer. The problem is I don't know how to extract the icon from a file. I learn from a post about the same problem in vb. This is the code that I translate from vb to c#: [DllImport("shell32.dll")] public static extern long ExtractIcon(long lngInst, string strExeFileName, long lngIconIndex); [DllImport("user32.dll")] public static extern long DrawIcon(long lngDC, long lngX, long lngY, long lngIcon); the problem for this codes is, What are the lngInst and lngDC in C#? Please help me to do this. Thanks in advanced.

Answers (1)

Unlimited Flat-Free License


File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!