// TestKernelDrvProcedures.cpp : Defines the entry point for the console application. // #include "stdafx.h" extern "C" { #include #include } //#include typedef ULONG (fReadPort)(PVOID Port); ULONG xRP(IN PVOID Port) { return 1; }; ULONG bxRP(IN ULONG Port) { return 1; }; ULONG xxRP( IN fReadPort *ReadF, IN PVOID Port) { return ReadF(Port); }; int __cdecl main(int argc, char* argv[]) { UNREFERENCED_PARAMETER(argc); UNREFERENCED_PARAMETER(argv); int i; LONG j; ULONG ul; tInitialPortRange r1; tInitialPortInfoArray ra; ul = xxRP(&xRP, &j); // r1.PortCount = 0; ra.Info.RangeCount = 0; InitInitialPortInfo(&ra.Info, cMaxRangeNumber); j=AddInitialPortInfoAscending(&ra.Info,1,100); j=AddInitialPortInfoAscending(&ra.Info,2,100); j=AddInitialPortInfoAscending(&ra.Info,2,10); j=CompareInitialPortInfoAndPort(&ra.Info, 3); j=CompareInitialPortInfoAndPort(&ra.Info, 20); j=CompareInitialPortInfoAndPort(&ra.Info, 300); printf("Hello World!\n"); printf("Press any key..."); i = getchar(); return 0; } /* /Zel - недопустимая директива -> "error LNK2001: unresolved external symbol __chkesp" "error LNK2001: unresolved external symbol _printf" "error LNK2001: unresolved external symbol _mainCRTStartup". _DLL=1 - недопустимая директива -> "error LNK2001: unresolved external symbol __imp__printf". Библиотеки приводящие к EXCEPTION при запуске приложения d:\NTDDK\libfre\i386\ntoskrnl.lib d:\NTDDK\libfre\i386\hal.lib d:\NTDDK\libfre\i386\wmilib.lib Стандартные библиотеки приводящие к EXCEPTION при запуске приложения kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -STACK:262144,4096 -не устанавливается -MERGE:_PAGE=PAGE -MERGE:_TEXT=.text -SECTION:INIT,d -> "warning LNK4039: section "INIT" specified with /SECTION option does not exist" -OPT:REF -OPT:ICF -IGNORE:4001,4037,4039,4044,4065,4070,4078,4087,4089,4198 -INCREMENTAL:NO -FULLBUILD -FORCE:MULTIPLE -NOCOMMENT /release -NODEFAULTLIB -debug:FULL -debugtype:cv -version:5.00 -osversion:5.00 -optidata -driver -align:0x20 -subsystem:native,5.00 -base:0x10000 -entry:DriverEntry@8 -out:objfre\i386\mi1201.sys objfre\i386\mi1201.res objfre\i386\mi1201.obj d:\NTDDK\libfre\i386\ntoskrnl.lib d:\NTDDK\libfre\i386\hal.lib d:\NTDDK\libfre\i386\wmilib.lib */