It's a free option.

A Day in the Life of the Win32 Loader

(Originally, A Day in the Life of the Image Activator
as recounted to Stanley Rabinowitz on 7-Jan-1985 )
(Translated to Win32 by Matt Pietrek, August 2001)

CMD Prompt: Good morning sir! I am your command prompt today That was a
flawlessly executed logon. How may I help you today?

USER: Good morning to you too computer. I
think today I want to do some data retrieving.

CMD Prompt: A wonderful choice sir! A finer day it couldn’t be for looking over your data. How will
you have it today? Sunny side up? Once over lightly?

USER: I think I’ll use Microsoft Access. Would you kindly load Access please?

CMD Prompt: Most certainly sir! An excellent choice! One moment while I load it.

CMD Prompt: Oh, Win32 loader? Would you please load that ACCESS.EXE file that I notice in the Office directory? My
user desires to
play with it a bit now.

LOADER: No problem. Shouldn’t take but a jiff.


CMD Prompt: Any problems?

LOADER: No sir, not a one. It’s just that I’m surprised to see that ACCESS.EXE uses 21 DLLs. Quite an
unusual number for a Win32 program. Most EXEs only use 3 or 4 DLLs. This one really sets a record!
But no problem – I just love to map in all these DLLs. After all – that’s my primary
purpose in life.


LOADER: Well, that should do it. They’re all mapped in.

CMD Prompt: Then we can start her up now?

LOADER: Well not quite. I just noticed that these DLLs invokes some other DLLs. Oh well, I guess I’ll
have to go load them too. At least we’ll only have to load those DLLs that this program
really needs.

CMD Prompt: How many DLLs does it require?

LOADER: Oh my gosh! It references 1477 DLLs! Another record! I can’t believe it! Oh well, here goes…

LOADER: The first one it wants is MSO9.DLL. That should be an easy one.


LOADER: Oh no! Not more! MSO9.DLL just called LoadLibrary on another 20 DLLs!

CMD Prompt: Have you enough room for them all?

LOADER: No sweat. This is a virtual memory machine. And this disk I/O is real fast. I’ll have it in a minute.


LOADER: There. Now on to the other DLLs. Next comes USER32.DLL. Guess it’s important that we be able to use all this data.

CMD Prompt: Yup. What next?

LOADER: Now we’ll need a database manager, so I guess we’ll just have to go off and load ODBC32,
the database management system.

CMD Prompt: Sounds reasonable.

USER: How’s it coming there computer?

CMD Prompt: No sweat. It’ll be just another moment.

LOADER: And now we’ll load ODBCCU32.DLL.

CMD Prompt: But I thought you just brought in your database manager?

LOADER: Yes, but this one is the relational database system. It’s a whole different ballgame.

CMD Prompt: Well, hurry it along.

LOADER: Okay. Next comes ODBCJT32.DLL, the relational database manager.

CMD Prompt: But how does that differ from ODBC32.DLL?

LOADER: I don’t know. I just load’em. They tell me to load and I load.

CMD Prompt: Well, I hope that’s it for database managers.

LOADER: Not quite. There’s still MSJET40.DLL. This company specializes in its excellent collection of managers.

CMD Prompt: Great! I guess that’s it then.

LOADER: Not on your life! Do you think our user merely wants to query his data? What if he wants
a chart using his data?

CMD Prompt: Oh.

LOADER: Didn’t think of that did you? I guess we’ll just have to go load MSCHART20.OCX.

CMD Prompt: I guess so.

USER: But I don’t plan to do any charting today. I just wanted to prepare a short report.

LOADER: Sorry. MSCHART20.OCX comes with this program. It’s a free option.

CMD Prompt: What next?

LOADER: Hmm. Looks like a request to bring in VBAR332.DLL, the VBA run-time library.

CMD Prompt: Why would they want that? Is Access written in VBA?

LOADER: No, but the VBA run time library has many precious gems of useful routines that one might wish to call…
Guess, I’ll just go load it now.

CMD Prompt: Good thing you don’t also need the Java run-time library too.

LOADER: Now you’ve done it! You’ve given me the evil eye. Either that or I just got up out of the wrong side
of the bed this morning. Here look at this: this DLL is also requesting MSVBVM60.DLL and MSVCRT.DLL. 
Oh! and now look: It wants OLEAUT32.DLL too!

CMD Prompt: You never know when our user might want to do some scripting. He might need to embed a WinWord document
you know. Better safe than sorry.

USER: What’s taking so long?

CMD Prompt: (still trying to be pleasant) We’re almost there now. Shant be much longer. After all, you want a
user-friendly system don’t you?

LOADER: That’s right. I guess that’s why I’ve been instructed to load HLP95EN.DLL. You never
know when the user might request some on-line help so we’ve got to have our help system ready to answer
his questions.

CMD Prompt: That’s nice. I’m sure our user will appreciate that.

LOADER: And oh yeah – we’ll need GDI32.DLL too, the screen
package. Only the best on this system. Can’t let our user make do without fancy graphics!

CMD Prompt: A wonderful thought. But will GDI32.DLL be enough?

LOADER: No. you’re right of course. We’ll also have to bring in COMCTL32.DLL. GDI32.DLL is only the low level
graphics. COMCTL32.DLL will really let our user edit his data in style.

USER: But I wasn’t planning to change the data today.  Just one simple report…

CMD Prompt: Keep your shirt on. When this program finally comes up, it will really blow your mind.

CMD Prompt: But loader, will COMCTL32.DLL really be enough?
Aren’t web views the big thing these days?

LOADER: Right you are CMD, baby. Guess we’ll need MSHTML.DLL, the HTLML display component. Won’t take
but another moment. (sigh) I think that was the last one.

CMD Prompt: Great! Then I can report back that we’re ready to go?

LOADER: One second. Let me make one last check…

CMD Prompt: Never pays to be hasty.

LOADER: Ah nuts! Some of these new DLLs that we just loaded are requesting further attention.
It looks like they too want to load other DLLs.

CMD Prompt: Don’t we have enough DLLs? That’s been 16 already!

LOADER: Well, security is an important issue too.  Wouldn’t want our
user to lose any data.
Look here: USER32.DLL wants us to bring in ADVAPI32.DLL. Guess I’ll just have to load another one…

USER: (getting impatient) What’s taking so long?

CMD Prompt: We’re putting all the pieces together for you now.  Shouldn’t be much longer.

USER: Putting them together? Doesn’t it come all assembled?

CMD Prompt: Not to worry. There’s no extra charge for installation.

LOADER: There. And now what? Look at this: USER32.DLL also wants us to load MSVCRT.DLL, the common run-time library.

CMD Prompt: But didn’t you already load MSVCRT.DLL?

LOADER: Right on baby! Let me just look around.


LOADER: Oh there it is. We have it mapped into memory already.  I guess I’ll just throw this request away.

CMD Prompt: Do you get many of these redundant requests?

LOADER: Yeah, they happen all the time. Nothing to worry about.  You get used to it. Look here, GDI32.DLL wants MSVCRT.DLL too;
and so does ADVAPI32.DLL, and VBAR332.DLL, and MSVBVM60.DLL, and …

CMD Prompt: Well hurry it along please.

LOADER: … and MSJET40.DLL and ODBCJT32.DLL and … Oh and look at this duplicate request for
USER32.DLL and
OLE32.DLL and OLEAUT32.DLL and SHELL32.DLL and …

CMD Prompt: SHELL32.DLL? I don’t remember seeing that one before.  What is it and who wants it?

LOADER: Oops, you’re right. I almost overlooked this request by
SHELL32.DLL. It’s easy to overlook this one; it’s so
small. Only contains a few wrapper functions.

CMD Prompt: Guess it should be easy to load then?

LOADER: On the contrary. This one attempts to load the entire C++ RTL! Imagine that. Oh well. That’s life.
Fortunately, I’ve already brought in most of the C++ RTL.  Let’s see now, what else will we need? Oh yes,
COMDLG32.DLL. Can’t imagine how we overlooked that one.

CMD Prompt: Is that it then?

LOADER: Yup. That’s it. She’s all here. You can go start her up!

USER: (pounding on keyboard) Where’s my data!

CMD Prompt: Please use voice input sir! Those ctrl-C’s are MOST annoying. They cause the most insidious
interruptions to what I’m trying to do. We’re starting your process now.

USER: It’s about time.

CMD Prompt: There. How’s that? Lovely data isn’t it?

USER: I wouldn’t know. Where’s my window?

CMD Prompt: I don’t know. Let me look into it.

CMD Prompt: CPU, where’s his window?

CPU: We’re executing instructions as fast as we can!  Oh my god! An exception!

CMD Prompt: An exception! Is that serious?

CPU: My mistake; it’s not a hardware exception, it’s merely a software exception. Looks like the program signalled.

CMD Prompt: Why’d it do that?

CPU: Well, this program is naturally user friendly, so it wants to start up by
displaying a splash screen.

CMD Prompt: So why doesn’t it do that?

CPU: Well the dialog template is in a resource, sir.

CMD Prompt: Well get it!

CPU: That’s what we’re trying to do. You’ll have to check with the
system. It takes care of those things.

SYSTEM: Ah, I have the dialog request now. I’ll have it up in a moment.

CMD Prompt: Well, how do you get it?

SYSTEM: No sweat, we’re just searching for the appropriate resource

LOADER: Oh no. I thought I had a deserved rest coming.

SYSTEM: Sorry, just a little bit longer.


CMD Prompt: Keep your pants on. Just be glad you’re not trying to create any threads.

LOADER: Okay, one last time. Which dialog template do you need loaded?

SYSTEM: I’m not sure. Let’s try ACCESS.EXE.

LOADER: (struggling) Okay. There it is. I’ve searched ACCESS.EXE.

SYSTEM: Sorry. It wasn’t in that one. Try MSO9.DLL’s resources. Maybe it’s in there.

LOADER: Okay. (grumble)

SYSTEM: Nope. It wasn’t there either. Try MSOWCW.DLL.

LOADER: Look. I’m getting tired of this. Couldn’t you just give me the complete list of
resource sections to search? I’ll keep searching them until we find that damn
template. Exactly what dialog are we looking for?

SYSTEM: Not sure yet, all I have is a name, but it’s probably something like



SYSTEM: Well what?

LOADER: That dialog?

SYSTEM: Oh yeah. Well ODBC32.DLL has just loaded ODBCCP32.DLL, and not to be
outdone, MSJET40.DLL wants ODBCBCP.DLL, not to be confused with ODBCCP32.DLL, and MSO9.DLL wants MSOTHUNK.DLL, and RPRCRT4.DLL
wants ADVAPI32.DLL, and lots of other guys are asking for ADVAPI32.DLL also – but I’m too smart
for them. I’ll just get it once and no one will ever know the difference.

LOADER: Working…

SYSTEM: And don’t forget MSAEXP30.DLL. The dialog might be in there too.

CMD Prompt: OH NO!

SYSTEM: What is it?

LOADER: Are you all right?

CMD Prompt: An interrupt!

LOADER: An interrupt?

CMD Prompt: That’s what I said, an interrupt.

LOADER: Stop what you’re doing.

LOADER: Why? Just when I was getting the hang of it.

CMD Prompt: The user has typed ctrl-break.

LOADER: Okay, everything has been suspended. Can I go to sleep now?

CMD Prompt: No, you better stick around in case the user wants to continue. And notify the exit routines to stand by. 
Also, I need moral support. Maybe if I flash a ^C in front of his eyes, he’ll stop looking so angry.

USER: Computer, I’m really getting tired of this.

CMD Prompt: But we were so close…

USER: A likely story.

CMD Prompt: Well what can I do for you instead?

USER: I still want my report. Let’s try some other way of retrieving my data.

CMD Prompt: A wonderful idea sir! A finer day it couldn’t be for looking over your data. How will you have it today?
Sunny side up? Once over lightly?


CMD Prompt: No problem sir. Wait one moment while I load OUTLOOK.EXE…

The curtain falls as the dance begins again…

From via Vomit