예제 #1
0
extern "C" NTSTATUS DriverEntry (
			IN PDRIVER_OBJECT pDriverObject,
			IN PUNICODE_STRING pRegistryPath	) 
{
	NTSTATUS status = STATUS_SUCCESS;
	KdPrint(("Enter DriverEntry\n"));

	//注册其他驱动调用函数入口
	pDriverObject->DriverUnload = HelloDDKUnload;
	pDriverObject->MajorFunction[IRP_MJ_CREATE] = HelloDDKDispatchRoutine;
	pDriverObject->MajorFunction[IRP_MJ_CLOSE] = HelloDDKDispatchRoutine;
	pDriverObject->MajorFunction[IRP_MJ_WRITE] = HelloDDKDispatchRoutine;
	pDriverObject->MajorFunction[IRP_MJ_READ] = HelloDDKDispatchRoutine;
	
	//创建驱动设备对象
	status = CreateDevice(pDriverObject);

	UNICODE_STRING devName;
	RtlInitUnicodeString(&devName,L"\\Device\\MyDDKDevice");//浅拷贝
	UNICODE_STRING tTestUnicode;
	RtlInitUnicodeString(&tTestUnicode,devName.Buffer);

	PrintInfo(pDriverObject);
	KdPrint(("DriverEntry end\n"));

	TestList();
	TestLookaside();
	return status;
}
예제 #2
0
void main()
{
	TestHeap();
	TestSort();
	TestList();
	TestString();
	//
	printf("End.");
	char c; scanf_s("%c", &c);
}
예제 #3
0
int main( int argc, char * argv[] )
{
	printf("Starting tests\n");	
	printf( "%s\n", __FILE__ );
	MassTestThing(); 
	TestList();
	TestASM();
	TestHash();
	TestFactorial();
	TestFibiter();
	TestStr();	
	return -0;
}
예제 #4
0
void TestWithContainers( const Allocator& a )
{
    TestVector( a );
    TestDeque( a );
    TestList( a );
    TestSet( a );
    TestMultiset( a );
    TestMap( a );
    TestMultimap( a );
    TestString( a );
    TestStack( a );
    TestQueue( a );
    TestPriorityQueue( a );
}
예제 #5
0
파일: main.c 프로젝트: johno4321/SharedCLib
int main(int argc, char* argv[])
{
	TestDatatypeSizes();

	TestMasks();
	
	TestString();

	TestStack();

	TestQueue();

	TestList();

	TestDictionary();
	
 	return 0;
}
예제 #6
0
void TestList( const Allocator& a )
{
    typedef std::list< typename Allocator::value_type, Allocator > List;

    List l1( Policy< Allocator >::template GetDefault< List >( a ) );
    List l2( Policy< Allocator >::template GetCopied< List >( a ) );

    TestList( a, l1 );
    TestList( a, l2 );

    l1.swap( l2 );

    TestList( a, l1 );
    TestList( a, l2 );

    l1.splice( l1.end(), l2 );

    TestList( a, l1 );
    TestList( a, l2 );
}
예제 #7
0
// list 链表操作测试用例
void TestListCase()
{
    TestList();
}