Closed Thread Icon

Topic awaiting preservation: who understands binary or c++ ? Pages that link to <a href="https://ozoneasylum.com/backlink?for=13127" title="Pages that link to Topic awaiting preservation: who understands binary or c++ ?" rel="nofollow" >Topic awaiting preservation: who understands binary or c++ ?\

 
Author Thread
smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 04-09-2004 12:07

Ok I have this problem,

Basically I need to get icons out of exes or dlls (winnt/xp) using c++ IconExtractEx() method and then DrawIcon() to create an actual bmp file, however whilst I can read about it and understand the basic principle I can't write c++ code for shit.

I think since the functions are essentially built in functions the code would be tiny, but I can't get my head around it.

The reason for doing this is that I need to create an activex control that is accessible with JScript or VBScript. Basically the arguments that the JScript would pass would be:
icon location (path to file),
icon location (icon index within file),
location to save generated bmp,
bitmap name

So it really is a simple script/piece of code - it is just the writing it I can't do
And I am still unsure about how it gets made into an activex control, if anyone has any ideas on this let me know please since documentaion is either primitive or complex.

--------------------------------

The binary reference in the thread title is because I have potentially another way (completely diffferent and seperate from the last one) to retrieve the icon, but it involves parsing a binary string (of the exe or dll) and extracting the section of binary code that represents the icon, plus tweaking the header of it so that the binary can then be saved back with a .bmp extension as a workable bitmap image. It is possible, but I don't get binary or how to read it or what to look for lol. I am so not a natural born programmer.

Thanks guys for any input, advice, or assistance you can lend.

P.S. I know there are apps that retrieve icons easily, but I need a specific code based method. Whilst the c++ might have limited use it remains a useful bit of code for other projects too and as an activex it can be embedded in loads of different windows based apps as a simple icon retrieval system so it does have a benefit.

<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 04-09-2004 13:00

indeed - this is fairly basic.
ActiveX isn't anything but COM in disguise - though making COM object's isn't that easy in the first part (but MSVC has a wizzard for such simple needs).

Post what you've done so far, for I doubt anybody is willing to write all of it for you.
And where do you get ExtractIconEx() from - neither my (oldish) win32api doc, nor google found anything about it...

smonkey
Paranoid (IV) Inmate

From: Northumberland, England
Insane since: Apr 2003

posted posted 04-09-2004 15:23

Ok,

Well to sound really pathetic, I actually haven't written any C++ code yet at all, I didn't even know how to start it and how to run it or how to know what is broken or not - I'm a complete n00b except for what I have read on sites like MSDN.


MSDN ExtractIconEx()
MSDN Icon Functions
An Example Script

The trouble is even with looking at those I am having a hrad time understanding the variable/function naming methods and procedures for c++ and everything seems to have odd names, no nice simple standard variable or function names like with Javascript or PHP

If someone doesn't want to write the code for me (and I wouldn't blame them), then I am perfectly happy with a few pointers to get me going from which I might be able to post an example should I have anything that remotely comes close to working.

But I'm just on level 0 here, I don't even know how I should structure the code or functions in order that it will work properly and be able to wrapped up as an activex control. When I say activex controls I mean clientside activex rather than serverside - I dunno whether that makes a difference to anything.

Thanks guys,

Jon

<A HREF="http://www.cryokinesis.co.uk" TARGET=_blank>visit

« BackwardsOnwards »

Show Forum Drop Down Menu