Иконка твоего приложения или чужого?
Для своего приложения:Есть такая API функция
EnumResourceNames Она позволяет просмотреть все ресурсы файла данного типа.
The EnumResourceNames function searches a module for each resource of the specified type and passes the name of each resource it locates to an application-defined callback function.
BOOL EnumResourceNames(
HINSTANCE hModule, // resource-module handling
LPCTSTR lpszType, // pointer to resource type
ENUMRESNAMEPROC lpEnumFunc, // pointer to callback function
LONG lParam // application-defined parameter
);
Parameters
hModule
Identifies the module whose executable file contains the resources for which the names are to be enumerated. If this parameter is NULL, the function enumerates the resource names in the module used to create the current process.
lpszType
Points to a null-terminated string specifying the type name of the resource for which the name is being enumerated. For standard resource types, this parameter can be one of the following values:
Value Meaning
RT_ACCELERATOR Accelerator table
RT_ANICURSOR Animated cursor
RT_ANIICON Animated icon
RT_BITMAP Bitmap resource
RT_CURSOR Hardware-dependent cursor resource
RT_DIALOG Dialog box
RT_FONT Font resource
RT_FONTDIR Font directory resource
RT_GROUP_CURSOR Hardware-independent cursor resource
RT_GROUP_ICON Hardware-independent icon resource
RT_ICON Hardware-dependent icon resource
RT_MENU Menu resource
RT_MESSAGETABLE Message-table entry
RT_RCDATA Application-defined resource (raw data)
RT_STRING String-table entry
RT_VERSION Version resource
lpEnumFunc
Points to the callback function to be called for each enumerated resource name. For more information, see the EnumResNameProc function.
lParam
Specifies an application-defined value passed to the callback function. This parameter can be used in error checking.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The EnumResourceNames function continues to enumerate resource names until the callback function returns FALSE or all resource names have been enumerated.
где,
he EnumResNameProc function is an application-defined callback function that receives resource names as a result of a call to the EnumResourceNames function.
BOOL CALLBACK EnumResNameProc(
HANDLE hModule, // resource-module handle
LPCTSTR lpszType, // pointer to resource type
LPTSTR lpszName, // pointer to resource name
LONG lParam // application-defined parameter
);
Parameters
hModule
Identifies the module whose executable file contains the resources for which the names are being enumerated. If this parameter is NULL, the function enumerates the resource names in the module used to create the current process.
lpszType
Points to a null-terminated string specifying the type name of the resource for which the name is being enumerated. For standard resource types, this parameter should be one of the following values:
Value Meaning
RT_ACCELERATOR Accelerator table
RT_ANICURSOR Animated cursor
RT_ANIICON Animated icon
RT_BITMAP Bitmap resource
RT_CURSOR Hardware-dependent cursor resource
RT_DIALOG Dialog box
RT_FONT Font resource
RT_FONTDIR Font directory resource
RT_GROUP_CURSOR Hardware-independent cursor resource
RT_GROUP_ICON Hardware-independent icon resource
RT_ICON Hardware-dependent icon resource
RT_MENU Menu resource
RT_MESSAGETABLE Message-table entry
RT_RCDATA Application-defined resource (raw data)
RT_STRING String-table entry
RT_VERSION Version resource
lpszName
Points to a null-terminated string specifying the name of the resource for which the name is being enumerated.
lParam
Specifies the application-defined parameter passed to the EnumResourceNames function. This parameter can be used in error checking.
Return Values
This callback function should return TRUE to continue enumeration; otherwise, it should return FALSE to stop enumeration.
Remarks
The EnumResNameProc function is a placeholder for the application-defined or library-defined function name.
Чтобы считать иконку, есть функция
he LoadIcon function loads the specified icon resource from the executable (.EXE) file associated with an application instance.
HICON LoadIcon(
HINSTANCE hInstance, // handle of application instance
LPCTSTR lpIconName // icon-name string or icon resource identifier
);
Parameters
hInstance
Identifies an instance of the module whose executable file contains the icon to be loaded. This parameter must be NULL when a standard icon is being loaded.
lpIconName
Points to a null-terminated string that contains the name of the icon resource to be loaded. Alternatively, this parameter can contain the resource identifier in the low-order word and zero in the high-order word. Use the MAKEINTRESOURCE macro to create this value.
To use one of the Windows predefined icons, set the hInstance parameter to NULL and the lpIconName parameter to one of the following values:
Value Description
IDI_APPLICATION Default application icon.
IDI_ASTERISK Asterisk (used in informative messages).
IDI_EXCLAMATION Exclamation point (used in warning messages).
IDI_HAND Hand-shaped icon (used in serious warning messages).
IDI_QUESTION Question mark (used in prompting messages).
IDI_WINLOGO Windows logo.
Return Values
If the function succeeds, the return value is the handle of the newly loaded icon.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
LoadIcon loads the icon resource only if it has not been loaded; otherwise, it retrieves a handle to the existing resource. The function searches the icon resource for the icon most appropriate for the current display. The icon resource can be a color or monochrome bitmap.
LoadIcon can only load an icon whose size conforms to the SM_CXICON and SM_CYICON system metric values. Use the LoadImage function to load icons of other sizes.
Для чужого приложения:Прочитай книгу Рихтера "Windows - для проффессионалов", в частности Главу 4. Там дается исходный код программы, которая дает информацию по запушенным процессам. Там в частности есть возможность узнать имя файла каждого модуля запушенного процесса. Затем просто, считываеш данный модуль в память как библиотеку без запуска, и дальше действуеш, как описано выше.