I am developping a driver for SDCard using WM5.0,
I find the OS will load sdmemory.dll to drive the SDCard
but in the source-file it defines like this

TARGETDEFNAME=SDMemory
DEFFILE=$(TARGETDEFNAME).def

TARGETNAME=$(TARGETDEFNAME)_LIB
TARGETTYPE=LIBRARY
WINCETARGETFILE0=$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\$(DEFFILE)

SOURCES = SDMemMain.cpp \
SDMemDiskIO.cpp \
SDMemCardIO.cpp \

it only make a LIB file but not a dll,
so why does build-tools finnally make a sdmemory.dll?

Re: how can the build-tool build a dll when source file says "TARGETTY by Zhongwei

Zhongwei
Mon May 15 11:32:40 CDT 2006

As the SOURCES shows, building the files will create sdmemory.lib, not
sdmemory.dll. The end target file sdmemory.dll is created during the
sysgen process. Among other libs, coredll is linked implictly to the end
target sdmemory.dll. One of the reasons for this approach is COREDLL is
componentized, you know what COREDLL APIs are available on the system only
after the sysgen is done.

If you want to build dll from the source files, you can change the SOURCES
TARGETTYPE to DYNLINK, then you will need to find out what libs it
implicitly links besides coredll and add them explicitly, which is
troublesome sometimes. You can look up sysgen_capture, a very useful tool
to rebuild public drivers.

--
Zhongwei Wang
Applied Data Systems
www.applieddata.net


"simon" <simon@discussions.microsoft.com> wrote in message
news:2AA0353A-45EF-46A8-92A1-D0321B2A3C7C@microsoft.com...