I’ve never used DLLMain in a native DLL, so I can’t help you with that
one, our sources file is
send debug objects to the objd dir
CHECKED_ALT_DIR=1
USE_NTDLL=1
if required, specify where libcmt can be found
MSVCDIR=E:\DevStudio\VC
TARGETNAME=ntapi
TARGETTYPE=DYNLINK
DLLBASE=0x2000000
TARGETLIBS=$(DDK_LIB_PATH)\kernel32.lib \
$(DDK_LIB_PATH)\ntdll.lib
INCLUDES=…....;…..;$(DDK_INC_PATH)\inc;$(DDK_INC_PATH);…..\inc
SOURCES=…\queryLinks.cpp \
…\createFile.cpp \
…\fsctrl.cpp \
…\queryVol.cpp \
…\resource.rc \
…\mapfile.cpp \
…\event.cpp \
…\devioctrl.cpp \
…\setfile.cpp
C_DEFINES=-DUNICODE $(C_DEFINES) -DNTAPILIBBUILD
NTTARGETFILE0=version
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@gmail.com
Sent: Thursday, August 20, 2009 10:01 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Re: Dll in Native( Boot time ) and Win32 (normal)
mode
I am actually experimenting with native application for one project
requirement. I built a native application with WDK and executed that
with success. I thought to have a dll which implements core
functionality and which I can call from Native app and Win32 App as
well, but than when I try to build (compile/link) WDK linker gives me
following error.
1>errors in directory d:\diskdefregment\applications\testdll
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_dllmain.
obj) : e
rror LNK2019: unresolved external symbol
xxxxx@4 refe
renced in function __DllMainCRTStartupForGS@12
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_support.
obj) : e
rror LNK2019: unresolved external symbol
xxxxx@4 refere
nced in function ___security_init_cookie
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_support.
obj) : e
rror LNK2019: unresolved external symbol __imp__GetTickCount@0
referenced in fun
ction ___security_init_cookie
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_support.
obj) : e
rror LNK2019: unresolved external symbol __imp__GetCurrentThreadId@0
referenced
in function ___security_init_cookie
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_support.
obj) : e
rror LNK2019: unresolved external symbol __imp__GetCurrentProcessId@0
referenced
in function ___security_init_cookie
1>d:\diskdefregment\applications\testdll\bufferoverflowu.lib(gs_support.
obj) : e
rror LNK2019: unresolved external symbol
xxxxx@4 refere
nced in function ___security_init_cookie
1>d:\diskdefregment\applications\testdll\objchk_wxp_x86\i386\commdll.dll
: error
LNK1120: 6 unresolved externals
My source file is
TARGETNAME=CommDll
TARGETTYPE=DYNLINK
TARGETLIBS=$(DDK_LIB_PATH)\ntdll.lib
UMENTRY=DllMain
SOURCES= Test.c
Any suggestions?
Thanks
Anil
NTDEV is sponsored by OSR
For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer