Extract icon from exe, dll, or ico file
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.