News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

COM dll for outlook add-in

Started by CodeButcher, January 19, 2005, 06:35:49 PM

Previous topic - Next topic

CodeButcher

I am interested in writing a COM dll for an outlook add-in and am interested in finding input regarding how I might be able to do such a thing, Educated opinions on my level of sanity for thinking of trying such, and/or things I should know going in if I attempt to do this.  I do not ask that anyone give me free code but a "stripped down" version of a dll source that could be the bare bones beginnings of such a thing would really be nice.

Am I just nuts?

Robert Collins

Quote from: CodeButcher on January 19, 2005, 06:35:49 PM
..."stripped down" version of a dll source....

Are you asking for a stripped version of any dll source code or a stripped down version of a dll that is what you are trying to do? 

CodeButcher

I have written a DLL so I know the basics of how to build one. However in the little bit of info I have been able to find on Outlook Add-in's I note that the add-in needs to be a COM dll .... What the differences are between a COM dll and a dll that is not COM would be is part of my lerning curve on this one.

Would it be something definedwithin the DLL that makes it a COM, or a certain way it is to be compiled? Or, is it just a matter of the DLL having certain characteristics coded into what it does ?

Do I use standard API's, or is there a Lib that I can use to build an interface to outlook, and where might I find documentation on the lib if it is not standard API's?

If it is standard API's ..... A couple hints on which ones would be great.

I certainly am not asking for someone to hand me a working program that does what I want to do. And, as a proffessional mainframe applications programmer of 17+ years would not do so for anyone else. I am willing to teach any new folks that come on board anything and everything I know but I aint going to do their work for them. I can appreciate anyone else feeling the same way. I am realatively new to MASM and I find it challenging as well as rewarding, and I do enjoy finding new ways to solve old problems. Just to be pointed in the right direction is all I am asking.

Any takers ????

Robert Collins

Well, I think you are talking about Component Object Modeling (COM) as opposed to a .COM application.

I won't be much help to you but I can tell you this. Asking how to build a COM dll is like asking how
to build an OOP application.

COM is a specification. It specifies how to build components that can be dynamically interchanged.
COM provides the standards that components and clients follow to ensure that they can operate together.

A COM dll, as you indicated, is nothing more than a regular type DLL. I cannot define how to build your
dll any more than I can tell you how to build an OOP application. It's more involved than that.

The best I can do for you is to direct you to an excellent book on the subject.

Title: "Inside COM Microsoft's Component Model"   
Author: Dale Rogerson
Publisher: Microsoft Press
Date: 1997

If you can, try to get this book. It is one of the best sources of information about building COM objects
and components. In this book it will tell you exactly what you need to do to build your 'COM DLL'.

pbrennick

CodeButcher,
In \masm32\com  you will find MyCom or MyCom2, both are examples on how to create com DLLs.

Hope this helps,
Paul

Robert Collins

Quote from: pbrennick on January 20, 2005, 04:42:25 PM
CodeButcher,
In \masm32\com  you will find MyCom or MyCom2, both are examples on how to create com DLLs.

Hope this helps,
Paul


That is exactly what he is looking for. I had no idea that it was there. Maybe he won't even need the book.

Robert Collins

BTW, it just dawned on me that if you have VB6 you can build a COM DLL. It is the same as an ActiveX DLL (well, not exactly the same but the same end results).

CodeButcher

Many thanks to both of you. I have written one COM object in VB6

CodeButcher

Well, that was smooth.

Many thanks to both of you. I have written a COM in VB6 which was a wrapper for a cobol program being used in a web page but figure with VB6 being of a "gui" flavor there are a lot of things happening there that I am not seeing on my side.

I will check out the examples pointed out above, and keep the book in mind should I hit a dead end.

Thanks
James

pbrennick

CodeButcher,
Try the examples and buy the book.  A book will usually cover more than an example will as I am sure you know from your years of programming the AS-400.  I like your style, By the way.

Paul

Robert Collins

Quote from: CodeButcher on January 19, 2005, 06:35:49 PM
I am interested in writing a COM dll for an outlook add-in and am interested in finding input regarding how I might be able to do such a thing, Educated opinions on my level of sanity for thinking of trying such, and/or things I should know going in if I attempt to do this.  I do not ask that anyone give me free code but a "stripped down" version of a dll source that could be the bare bones beginnings of such a thing would really be nice.

Am I just nuts?

Hi CodeButcher

I was just wondering that if you got anywhere with your COM dll could you post something about your progress? After I read your post I started to get a little interested in it myself so I read alot out of that book that I mentioned to get the 'feel' of COM programming. Although it explained alot to me about how to make COM components and create DLL's there was nothing in it about what you are trying to do. I would like very much to also 'plugin' to Outlook.

Just a thought.

CodeButcher

I will let you know if I get anywhere. I am still just gathering as much info as I can at this point. Perhaps we can do some sort of joint effort and shre what we manage to come up with.

I was hoping to build a simple add-in to perhaps save and reference the servers referenced in email that I identify as junk. Outlook has the ability to filter email from listed senders but given the ease with which spoofing can be done I get hundreds of duplicate garbage, coming form the same server with different "Sender" being listed. Happens all the time. Outlook does not offer the ability to just go ahead and be done with it and mark the originating server as a junk server, and handle all mail from that server as junk.

I have tried products like "Spam Bays" but find that while it is very good at identifying spam, and gets better with each batch of mail that comes in, At least in my case it also causes outlook to take longer to give control back to me each day. A couple weeks ago after it took about 20 minutes to sift through the inbox before I could read anything I took it out and decided I will just deal with the garbage on my one ........ There has to be a better way ...

So ..... Im tinkering.

CodeButcher

I can tell you that at this point it looks more to me like it is going to be a matter of writing a COM dll .... that has the ability to do certain things, and then you more "plug into it, from outlook" .... once the dll is built and registered you go into outlook and add the functions of that dll to your tool bar.

There is a little info on how to do it in VB6 and a lot of infor on doing it with VB.net ....... but Im hard headed and would like to do it in MASM ...

P1

Take a VB6 Outlook addin example and re-code to ASM.  You are going by to many details to start this way. 

Starting here will get you a long ways:

http://www.japheth.de/COMView.html

Japheth has made a lot of this easy to deal with.

Regards,  P1  :8)

pbrennick

Japheth also has a dynamite mail reader that builds its own spam list (he is using parts of Jimmy Clif's SpamKiller).  I use readmail everyday because it has the spam filter and because it will read multiple accounts and you can delete mail directly on the server.

Paul