Hi,
I'm really very new on this, but I'd like to write a COM-DLL with MASM32 to use it in ASP.
I already made the API-DLL version.

How do I make this work?

Thanks! :alright:
Posted on 2001-09-03 14:22:02 by Butch77
Try looking at the MyCom2 program and tut in SP2 or my page.
Posted on 2001-09-04 06:32:16 by Ernie
Thanks for the tutorials and Samples on your page! :)

But when trying to execute the MyCom2 Example I get an Error:
"ActiveX component can't create object"
The first MyCom Example works fine!
But the sourcecode is much longer.

Is there something I did wrong?
(I did the regsvr32 thing with success.)

Can I use the "NaN's Object Creator" to create my DLL? I couldn't find any example where the "NaN's Object Creator"-generated code is used for a dll...

Thanks
Posted on 2001-09-20 04:48:35 by Butch77
No.. The tool will only generate an empty class by your tailoring. You can specify Methods and Variables.. and then let the program do the rest. I will build "proc" statements for every methods, all set and ready for your specific code to be between the PROC and ENDP statements. As well the class structure is built for you (variables & methods). All this is needed for our MASM32 Objects design, and its based about Ernie's COM model (and expanded), but it definitely has nothing to do will making DLL's.

All tho i can see how the "template" could look like a basic DLL layout. :) Sorry for the confusion.

NaN
Posted on 2001-09-20 06:17:04 by NaN
I don't see any fundamental reason why Nan's classes can't be used as COM classes. After all, if you just look at his METHOD macro, it's identical to the coinvoke macro as to what code gets called to run an object's method.

Since it follows the binary layout of COM, it can generate COM objects.

A COM dll needs it's 5 basic export functions (which CoLib will supply for you), so using Nan's work means you need do these yourself. But you can cheat and forget register and unregister and do these other ways (for init testing, don't release THAT please). GetClassObject would be interesting to re-impliment dealing out NanObjects.

Such objects (if all STDCALL) would work quite nicely with COM. After all, COM is grafted on top of C++'s ability and layout of making objects, the form of such is almost a given.

(I didn't forget Thomas's contribution here, it's just Nan is the blabbermouth here. Both you guys did great work here)
Posted on 2001-09-20 07:07:08 by Ernie
Bla Bla Bla Bla


Blab...



Heehehehehe...


Thanx you Ernie... glad we can impress. (Like i said eons ago, it was your start that inspired me on this road to begin with...)

Thomas had a big part in fine-tunning the code.. he was much more experienced in seeing waste full code than i am. As well he contributed to some of the really fundemental macros to keep it simple. Just wanted to pass credit where its due before ol' blabber mouth here gets people all confused :) As well, BitRake helped streamline the METHOD macro into not requiring any LOCALS at all.. And since this is the most used macro this is a definite advantage in compiling time.


COM:

I understand com to a user's extense (instanciating COM's). But i don't know *how* to create a com object. I never researched this area, or if our model has any overlap. I look forward to seeing what you can do this the layout. If you get a basic template going (using our object model) please post it, i would like to give it a study...

Anywho.. All, Keep asking questions... I will help when i can... the Objects.inc documentation is specific to the macro so you may wonder how macro's interact at compile time, or then again, maybe not :)


NaN
Posted on 2001-09-20 10:27:20 by NaN
Butch77,

Because of a little bug in colib, you need to modify GetCachedTypeInfo.asm in order to use the Dispatch Interface of your component (if you want to use it with asp or vbscript for example)
Posted on 2001-09-20 13:14:46 by Amokila