Jump to content

Extracting icons from exe, ico and dll files

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
10 replies to this topic

#1
ThemePark

ThemePark

    Programmer

  • Members
  • PipPipPipPip
  • 124 posts
Quite simply, how do I extract icons from the mentioned files using C or C++? Or is that even possible using those languages? Will I have to use Visual Basic .NET or C# instead, as mentioned in one of the tutorials in here?

#2
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts
It is possible, but not easy. It's such a long story that it's not even worth going through.

#3
winuser

winuser

    Newbie

  • Members
  • PipPip
  • 26 posts
Use LoadResource -> LoadResource Function ()[/url] first parameter -> GetModuleHandle().. and then FindResource()

#4
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts

winuser said:

Use LoadResource -> LoadResource Function ()[/url] first parameter -> GetModuleHandle().. and then FindResource()
That's specific to windows. I was thinking of a more generic solution.

#5
winuser

winuser

    Newbie

  • Members
  • PipPip
  • 26 posts
More generic solution to extract icon from exe ? There are'nt that solution because it is platform dependent, so on windows use WindowsAPI...

#6
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts

winuser said:

More generic solution to extract icon from exe ? There are'nt that solution because it is platform dependent, so on windows use WindowsAPI...
Because something is platform dependent doesn't mean that there isn't a generic solution - all that the 'generic solution' has to do is compensate for all different platforms that it can. :blink:

#7
winuser

winuser

    Newbie

  • Members
  • PipPip
  • 26 posts

Mathematix said:

That's specific to windows. I was thinking of a more generic solution.

that`s specific for windows.. so find another way to do that . . .

#8
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts

winuser said:

that`s specific for windows.. so find another way to do that . . .
What's your problem, dude? At the end of the day it is possible to have one solution for doing this across platforms and to insist otherwise is pure ignorance. And yes, given the time I could extract bitmaps and whathaveyou from .exes, dlls, etc. if I wished. It isn't that hard.

#9
carly

carly

    Learning Programmer

  • Members
  • PipPipPip
  • 34 posts

Mathematix said:

What's your problem, dude?

What is that you don't understand ?!
a DLL is *specific* to Windows.

#10
Mathematix

Mathematix

    Programmer

  • Members
  • PipPipPipPip
  • 112 posts

carly said:

What is that you don't understand ?!
a DLL is *specific* to Windows.
Nice to meet you too! :mad:

What I don't understand is why it matters so much. Yes, you can wimp out and use LoadResource() and what-have-you, but all I'm saying is that you can be clever and write your own file extraction routines. Do you get me now? :blink:

#11
Brandon W

Brandon W

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 4,828 posts
Why write your own if there is a function already have one there for you. If you are willing too and you want to for experience, be my guest otherwise just use the built-in ones.

Just my say on it.
jQuery Selectors Tutorial - jQuery Striped Table tutorial - jQuery Events - jQuery Validation

Sorry if I don't post as often as I did, I'll try to get here as much as possible! I'm working my bum off to get this scholarship and other stuff!