Ah yes, ClassMap will haunt me for the rest of my days.

A ClassMap is a pointer to a list of classes contained inside a dll. CoLib was orgionally written to enable making such, but I soon found other uses for it.

However, CoLib 1.0 DEMANDS a ClassMap. Version 1.1 (in Sp2) fixes this problem. I just downloaded a fresh copy to check this, and my LoadPic.asm compiled fine with it.

If you keep having trouble, just define:

ClassMap DWORD 0 ; dummy value

This will make the linker happy. You'll have a small bit of never executed code in your .exe, but it will work.

(Seems this is a heavy week for people emailing having build problems with this, so I hope I spare people some debug time. GET THE NEWEST VERION, willyas? Thank you.)
Posted on 2001-09-04 18:02:28 by Ernie
I realize I've talked about this in another Thread.. but for those who might pull this Thread up in a search under "ClassMap" etc.

I discovered a major key to the error is compiling with Windows.inc 1.25, regardless if you gotten the most recient package!.

Solution: Compile on an earlier version of windows, or do what Ernie sugested.

NaN
Posted on 2001-09-05 22:58:23 by NaN
Dang it, I forgot all about windows.inc. Yeah, it can cause some serious problems.

Personally, I still use version 1.19. That's why I don't have these problems.

Icz and I tried to eliminate this stuff for 1.25, I had a perliminary copy and I cut tons of stuff out. But from what Nan describes, I didn't cut far enough.

Nan, see if windows.inc is declaring the protos for the 5 basic COM dll exports My guess is he's defined DllGetClassObject's proto, so the linker adds that out of CoLib, and that proc needs the (defined elsewhere) ClassMap. Bingo, build fails.

My best advice is we handle this as a bug report for Icz (he's very accomodating with these things) and comment out of the current windows.inc. Hopefully,m the next revision of that inc file will be nicer to us.

The other thing to try is use windows.inc version 1.19, it's available on my site (link above on button).
Posted on 2001-09-06 06:41:18 by Ernie
Im not sure what you want me to coment out here.. or all of it...? but this is the com stuff at the end of windows 1.25:


; Object API Prototypes
;----------------------------------------------------------------------------

CoBuildVersion PROTO

CoInitialize PROTO :DWORD
CoUninitialize PROTO
CoGetMalloc PROTO :DWORD, :DWORD
CoGetCurrentProcess PROTO
CoRegisterMallocSpy PROTO :DWORD
CoRevokeMallocSpy PROTO
CoCreateStandardMalloc PROTO :DWORD, :DWORD

DebugCoGetRpcFault PROTO
DebugCoSetRpcFault PROTO :DWORD

CoGetClassObject PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
CoRegisterClassObject PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
CoRevokeClassObject PROTO :DWORD

CoGetMarshalSizeMax PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
CoMarshalInterface PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
CoUnmarshalInterface PROTO :DWORD, :DWORD, :DWORD
CoMarshalHresult PROTO :DWORD, :DWORD
CoUnmarshalHresult PROTO :DWORD, :DWORD
CoReleaseMarshalData PROTO :DWORD
CoDisconnectObject PROTO :DWORD, :DWORD
CoLockObjectExternal PROTO :DWORD, :DWORD, :DWORD
CoGetStandardMarshal PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD

CoIsHandlerConnected PROTO :DWORD
CoHasStrongExternalConnections PROTO :DWORD
CoMarshalInterThreadInterfaceInStream PROTO :DWORD, :DWORD, :DWORD
CoGetInterfaceAndReleaseStream PROTO :DWORD, :DWORD, :DWORD
CoCreateFreeThreadedMarshaler PROTO :DWORD, :DWORD

CoLoadLibrary PROTO :DWORD, :DWORD
CoFreeLibrary PROTO :DWORD
CoFreeAllLibraries PROTO
CoFreeUnusedLibraries PROTO

CoCreateInstance PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD

StringFromCLSID PROTO :DWORD, :DWORD
CLSIDFromString PROTO :DWORD, :DWORD
StringFromIID PROTO :DWORD, :DWORD
IIDFromString PROTO :DWORD, :DWORD
CoIsOle1Class PROTO :DWORD
ProgIDFromCLSID PROTO :DWORD, :DWORD
CLSIDFromProgID PROTO :DWORD, :DWORD
StringFromGUID2 PROTO :DWORD, :DWORD, :DWORD

CoCreateGuid PROTO :DWORD
CoFileTimeToDosDateTime PROTO :DWORD, :DWORD, :DWORD
CoDosDateTimeToFileTime PROTO :DWORD, :DWORD, :DWORD
CoFileTimeNow PROTO :DWORD

CoRegisterMessageFilter PROTO :DWORD, :DWORD
CoGetTreatAsClass PROTO :DWORD, :DWORD
CoTreatAsClass PROTO :DWORD, :DWORD

DllGetClassObject PROTO :DWORD, :DWORD, :DWORD
DllCanUnloadNow PROTO

CoTaskMemAlloc PROTO :DWORD
CoTaskMemRealloc PROTO :DWORD, :DWORD
CoTaskMemFree PROTO :DWORD

;CreateDataAdviseHolder PROTO :DWORD, :DWORD
CreateDataCache PROTO :DWORD, :DWORD, :DWORD, :DWORD


StgCreateDocfile PROTO :DWORD, :DWORD, :DWORD, :DWORD
StgCreateDocfileOnILockBytes PROTO :DWORD, :DWORD, :DWORD, :DWORD

StgOpenStorage PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
StgOpenStorageOnILockBytes PROTO :DWORD, :DWORD, :DWORD, :DWORD, :DWORD, :DWORD
StgIsStorageFile PROTO :DWORD
StgIsStorageILockBytes PROTO :DWORD

StgSetTimes PROTO :DWORD, :DWORD, :DWORD, :DWORD

BindMoniker PROTO :DWORD, :DWORD, :DWORD, :DWORD
MkParseDisplayName PROTO :DWORD, :DWORD, :DWORD, :DWORD
MonikerRelativePathTo PROTO :DWORD, :DWORD, :DWORD, :DWORD
MonikerCommonPrefixWith PROTO :DWORD, :DWORD, :DWORD
CreateBindCtx PROTO :DWORD, :DWORD
CreateGenericComposite PROTO :DWORD, :DWORD, :DWORD
GetClassFile PROTO :DWORD, :DWORD

CreateFileMoniker PROTO :DWORD, :DWORD
CreateItemMoniker PROTO :DWORD, :DWORD, :DWORD
CreateAntiMoniker PROTO :DWORD
CreatePointerMoniker PROTO :DWORD, :DWORD
GetRunningObjectTable PROTO :DWORD, :DWORD

IID STRUCT DWORD
Data1 dd ?
Data2 dw ?
Data3 dw ?
Data4 db 8 dup(?)
IID ENDS


but "DllGetClassObject PROTO :DWORD, :DWORD, :DWORD" is in here... and when this alown is commented out it compiles fine... thanx Ernie... I was still stumped on the reasons until you posted your reply.. I peviously searched both for a "ClassMap" but was dissapointed to learn neither version had one...

NaN
Posted on 2001-09-06 12:45:09 by NaN