Ok.. Im a litte 'wigged' out here. I finally found time to get working on COM's (which i have been putting off for a while). I get all the needed stuff together and start off only to learn that i cant build anything anymore.. As i have debuged the system, the new windows.inc i downloadied of Iczelion's board is in direct conflict with Ernie's 'oaidl.inc' and 'shlobj.inc' which came in the masm upgrade. I first (very slowly) commented out the overlappin definitions in Ernie's files, siding with the newer windows.inc and still wasn't able to compile the short-cut example because the definitions in windows.inc are 'more basic' than Ernie's macro-defined Ixxxx's, so Ernies examples would then need to re-edited (witch really kills the learning process there). Realizing this, I went for plan B. I reloaded the backed up windows.inc to start over and instead commented out the overlaps in Windows.inc (since i nieavely didnt backup the origional windows when i upgraded it). Once this was done it compile fine. But with one hitch.. I get this error:
I tested the exe and nothing happens, just some messge boxes, so the COM calls never happened. (which would make sence from the warning). I researched this and found that maybe i need to modify my link to include /OPT:NOREF to allow the shell32.dll to link. Again, same results, which has left me confused why there is such a major overlap between COM and WINDOWS.INC.... Im at my witts end here as i dont know how shell32.dll is not being properly referenced. Ernie's shlobj.inc makes a valid includelib to shell32.lib.. Could someone who can actively compiles COM's in thier exe's without hastle please E-Mail me copies of both windows.inc and their com directory (zipped, whatever). I will simply re-place what i have todate and start over. Please mail it to: firstname.lastname@example.org THANK YOU very much in advance.... NaN This message was edited by NaN, on 3/11/2001 1:37:08 PM
LINK : warning LNK4089: all references to "SHELL32.dll" discarded by /OPT:REF MAKELI~1 BAK 6,494 03-10-01 12:41p MakeLink.asm.bak MAKELINK ASM 6,460 03-10-01 12:46p MakeLink.asm MAKELINK OBJ 5,411 03-10-01 12:58p MakeLink.obj MAKELINK EXE 5,632 03-10-01 12:58p MakeLink.exe 4 file(s) 23,997 bytes 0 dir(s) 6,115.89 MB free
Nan, Unfortunately, windows.inc 1.23 was a complete disaster in terms of stepping on defines I had made. When I first built the COM libs and incs, windows.inc 1.19 was the current version, I used that all along without trouble. While Icz has not posted it yet, windows.inc version 1.25 IS out, part of the MASM32 service pack 2. I assisted in the editing of this file, and by and large it is compatible. SP2 also included CoLib 1.1, with some much needed improvements in the original lib (i.e., I found a few bugs). I also added the scripter tut. I'm currently building my current project with windows.inc version 1.25, and only found TWO lines that may cause trouble. If you don't comment out lines 26756 and 26757 of version 1.25, your COM app MUST include a ClassMap. It may be NULL, but the symbol must be defined. This applies to any app that includelib CoLib.lib. It seems these two lines (DllGetClassObject and DllCanUnloadNow proto's) force the linker to add the modules for these procedures even if nothing else references them, and DllGetClassObject needs a ClassMap. That behavior of the linker is quite unexpected from me, and needs further search (it may be bloating all our apps with extraneous lib code). I hope this helps you.
Thanx Ernie for your help and explainations.. I most certainly helps :) As well, thanx for the heads-up on working combinations and problems to expect.. NaN
It WORKS!!!!!!!!!!!! Thanx again.... BTW: I also think the upgrade is awesome. The Prostart2, additional helps, and more examples is awesome!.. Hutch, Ernie, Iczelion, Alexander Yackubtchik, and NOVATRIX: Thanx for the hard work! :D NaN