|
-
Aug 29th, 2000, 08:09 PM
#1
Thread Starter
Member
If I read a VB-produced .exe file into a byte array, how and where would I find the bytes for that executable's icon(s)? I'm developing an application that will allow users to substitute their icons and data into the .exe file for a specific second application without modifying the executable code in that .exe file. Windows obviously has no trouble finding the icon data in a VB (or any other) executable, as such icons are displayed in Windows Explorer, My Computer, etc. Once again I reveal my ignorance on operating system basics.
John Fritch
-
Aug 29th, 2000, 10:03 PM
#2
Guru
Do you want to read the icon from the EXE, or write an icon to an EXE.
If you want to just read the icon, use the ExtractAssociatedIcon API. I'll give you the declaration, since the one in the API viewer is wrong. 
Code:
Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long
Add Private to the beginning if you need to.
If you need to write an icon to an EXE, you need to learn and understand the EXE format. (Easy to say )
-
Aug 30th, 2000, 01:49 AM
#3
Thread Starter
Member
Thanks, but I need to write (actually, replace) the icon data in the .exe file.
John Fritch
-
Aug 30th, 2000, 02:00 AM
#4
Guru
You can check this site for file formats: http://wotsit.org/
However, that site is currently (at the time of posting) down.
Random crash? Conspiracy? BLAME CANADA! (No offense to Canadians, I just watch South Park too much)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|