COM
in ASM Code
(and
other things good)
UPDATED January 8, 2002
In the COM section, see how to use connection
points to both receive events and emit them from server objects.
The docking toolbar is kinda on permanent
hold. I've begun a new job and just cannot devote the time necessary for
this. Anyone dissapointed by this news should email me directly.
WARNING !!!
If you are attempting to build any
of the COM examples from MASM32 Service Pack 1, be advised they are not
compatable with certain versions of windows.inc.
The samples were built against version
1.19. The current version 1.25 is much more uncompatable. Iczelion and
I worked this out together, there are just a few minor issues you should
be able work through.
Personally, I still use windows.inc
version 1.19 most of the time.
- - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
My personal interest is the Component
Object Model (COM) for programmable objects. My personal project of late
is coding COM interfaces and objects. I started by writing an article for
the Assembly Programming
Journal, and after a very long wait my article is finally in print,
complete with all the original bugs and none of the later additions.
I also do things that don't use COM
at all. So you don't miss those, here they are:
OF
General ASM Interest:
Here are a few things I've figured out that
the general ASM Win32 programmer will appreciate:
-
A four
part tutorial on Splitter Bars in ASM.
| Part
I |
How to create this useful yet undefined
control in your project |
| Part
II |
How to create a custom control class Splitter
Bar dll
as a reusable windows component. |
| Part
III |
How you can use a custom control class dll
in your own projects. |
| Part
IV |
A complete horizontal and vertical Splitter
Bar custom control class dll. Includes supports any number of side windows.
Also includes a sample app. |
-
Custom window captions
and shapes too!
-
Trying to make a shortcut icon? Go down
to the COM section and read the Accessing COM Objects
from Assembly tutorial. That's just what it shows you how to do.
-
Extracting WORDs from DWORDs.
Oh go ahead, check it out. More of a philosophy of how to code then
all that much info, and guaranteed to take at least two instructions
from your programs!
-
Using the registry.
Wrapper functions for the registry in an asm code.
-
Debugging Windows ASM
applications, no Ice, just code.
Application(s)
I have made in asm
-
The Timer Program simulates
a kitchen timer on your screen. Allows you to cook in safety while coding.
THE
COM STUFF
COM may be approached from two directions,
either from a client seeking to use an already established API or constructing
your own objects and interfaces to export functions.
My basic files for making or using COM objects has just been included in
the current MASM32 service pack. Hey Mom, I made the big times!
While getting together what I should
include there, I took a long look at the tutorials as written, and chose
to re-write many as MSWord .doc format files (simply the easiest way to
control fontography). Thus, many of the web pages that were here are no
longer being supported. Any further tutorials will be exclusively be produced
in MSWord .doc format.
The tutorials below were written independently
of each other. However, if you are new to COM low level programming, you
may wish to read them in this order.
Those wishing the source code and test
apps are directed to the MASM32
download page. Get the Service Pack 2 v6sp2.zip.
I am no longer directly supplying the basic COM files now that they are
part of MASM32.
Links:
We all need good links. These are my best
picks:
-
Hutch's
Home Page. Hutch is the man who made Win32 practicable from ASM. Also
check his MASM32
page.
-
Iczelion's
Example Code. Simple the best tutorials on Win32 in ASM available on
the web or anywhere. Also visit his discussion
Forum.
-
Microsoft
Developers Network (MSDN). OK, so you hate them. Too bad. Here's the
info you need.
-
Assembly
Programming Journal. Mentioned earlier, a reader contribution e-mag.
Some real gems here.
-
Art
of Assembly. The Art of Assembly Language Programming is a textbook
on assembly language programming developed by Randall L Hyde. Useful if
you have no other source material on the MASM assembler.
-
Programmer's
Guide to Microsoft MASM. Nothing beats a bound printed reference book.
I got mine with my copy of MASM. MASM is however not directly available
in stores. It was recently offered as a fulfillment option to developers
who have purchased any edition of Visual C++ 6.0 for $19.95 (includes shipping
and handling) by contacting Microsoft Order Desk. This link still works,
but there is no "standard pricing" anymore, suggesting MS has dropped this
product. Call MS direct if interested.
I may
be contacted here
Copyright ©
2000, 2001 Ernest Murphy
|