I have a tape driver based on 4mmdat.c sample src (includes minitape.h) and
I am attempting to add the PsGetVerion function.
When I add the funciton with out ntddk.h I am getting this error:
C:\WINDDK\2600~1.110\src\storage\tape\s32ait>build -cZ
BUILD: Adding /Y to COPYCMD so xcopy ops won’t hang.
BUILD: Object root set to: ==> objfre_wxp_x86
BUILD: Compile and Link for i386
BUILD: Examining c:\winddk\2600~1.110\src\storage\tape\s32ait directory for
file
s to compile.
BUILD: Compiling c:\winddk\2600~1.110\src\storage\tape\s32ait directory
Compiling - s32ait.rc for i386
Compiling - s32ait.c for i386
c:\winddk\2600.1106\src\storage\tape\s32ait\s32ait.c(3422) : error C4013:
‘PsGet
Version’ undefined; assuming extern returning int
Compiling - wmi.c for i386
Compiling - generating code… for i386
BUILD: Compile errors: not linking
c:\winddk\2600~1.110\src\storage\tape\s32ait
directory
BUILD: Done
4 files compiled - 1 Error
If I include ntddk.h along wit ntddk.h I get the following:
C:\WINDDK\2600~1.110\src\storage\tape\s32ait>build -cZ
BUILD: Adding /Y to COPYCMD so xcopy ops won’t hang.
BUILD: Object root set to: ==> objfre_wxp_x86
BUILD: Compile and Link for i386
BUILD: Examining c:\winddk\2600~1.110\src\storage\tape\s32ait directory for
file
s to compile.
BUILD: Compiling c:\winddk\2600~1.110\src\storage\tape\s32ait directory
Compiling - s32ait.rc for i386
Compiling - s32ait.c for i386
c:\winddk\2600.1106\inc\wxp\ntdef.h(388) : error C2011: ‘_QUAD’ : ‘struct’
type
redefinition
c:\winddk\2600.1106\inc\wxp\ntdef.h(704) : error C2011: ‘_LARGE_INTEGER’ :
‘unio
n’ type redefinition
c:\winddk\2600.1106\inc\wxp\ntdef.h(722) : error C2011: ‘_ULARGE_INTEGER’ :
‘uni
on’ type redefinition
c:\winddk\2600.1106\inc\ddk\wxp\ntddk.h(1971) : error C4005: ‘ASSERT’ :
macro re
definition
c:\winddk\2600.1106\src\storage\tape\s32ait\s32ait.c(12) : error C2157:
‘DriverE
ntry’ : must be declared before use in pragma list
Compiling - wmi.c for i386
Compiling - generating code… for i386
BUILD: Compile errors: not linking
c:\winddk\2600~1.110\src\storage\tape\s32ait
directory
BUILD: Done
4 files compiled - 5 Errors
C:\WINDDK\2600~1.110\src\storage\tape\s32ait>
Doesn’t seem to have problems with PsGetVersion but the inclusion of ntddk.h
causes these other compile errors. If I clear up these errors (by editing
other header files) I get a LNK2019 error: unresolved external symbol
_PsGetVerions@16.
This is how I a call PsGetVersion:
ULONG osMajor, osMinor, osBuild;
PsGetVersion(&osMajor, &osMinor, &osBuild, NULL);
Any direction on how to go with this would be greatly appreciated.
Thanks!