- detectdriversrc.zip
- DetectDriverSrc
- DetectDriver
- src
- Common
- ddk_build.bat
- DetectDriver
- DetectDriver_vs9.sln
- DetectDriverGUI
- drvCppLib
- build.bat
- cxx.h
- drvCppLib_vs8.vcproj
- drvCppLib_vs9.vcproj
- except.c
- lib_copy
- _memicmp.obj
- _stricmp.obj
- _strnicm.obj
- atlssup.obj
- chkesp.obj
- chkstk.obj
- conv.lib
- eh.lib
- eh3valid.obj
- enable.obj
- exsup.obj
- exsup2.obj
- exsup3.obj
- info.txt
- inp.obj
- lldiv.obj
- lldvrm.obj
- llmul.obj
- llrem.obj
- llshl.obj
- llshr.obj
- longjmp.obj
- matherr.obj
- memccpy.obj
- memchr.obj
- memcmp.obj
- memcpy.obj
- memmove.obj
- memset.obj
- outp.obj
- rtc.lib
- sehprolg.obj
- sehsupp.obj
- setjmp.obj
- setjmp3.obj
- setjmpex.obj
- strcat.obj
- strchr.obj
- strcmp.obj
- strcspn.obj
- strdup.obj
- strlen.obj
- strncat.obj
- strncmp.obj
- strncpy.obj
- strnset.obj
- strpbrk.obj
- strrchr.obj
- strrev.obj
- strset.obj
- strspn.obj
- strstr.obj
- tlssup.obj
- tran.lib
- ulldiv.obj
- ulldvrm.obj
- ullrem.obj
- ullshr.obj
- libcpp.cpp
- libcpp.h
- MAKEFILE
- new.h
- rtti.cpp
- Sources
- drvCppLibTest
- drvSingleModeTest
- drvUtils
- HideDriver
- HideDriverGUI
- info.txt
- STLPort
- Utils
- UtilsPortable
- UtilsPortableUnitTest
- detectdriverbin.zip
- DetectDriverBin
- DetectDriverBin
- DetectDriver.sys
- DetectDriverGUI.exe
- HideDriver.sys
- HideDriverGUI.exe
|
extern "C" {
#define POINTER_64
#include <ntddk.h>
}
#include <exception>
#include "MultiThreadTest.h"
typedef void *HANDLE;
typedef HANDLE *PHANDLE;
void ThreadFunc( void* pArguments );
void MultiThreadTest(size_t threadCount)
{
DbgPrint("MultiThreadTest running\n");
size_t hub = 0;
for(int i=0;i<threadCount;++i)
{
HANDLE hThread = NULL;
NTSTATUS status = PsCreateSystemThread(&hThread,
THREAD_ALL_ACCESS,
NULL,
NULL,
NULL,
&ThreadFunc,
&hub);
if( status != STATUS_SUCCESS)
{
DbgPrint("PsCreateSystemThread fail.\n");
return;
}
ZwClose(hThread);
}
KEVENT event_;
KeInitializeEvent(&event_, NotificationEvent, FALSE);
while(true)
{
if(hub == threadCount)
return;
LARGE_INTEGER timout;
size_t twoSecond = 2000*10;// one wait unit - 100 nanoseconds
timout.QuadPart = (__int64)-1*twoSecond; // negative value specifies an interval relative to the current time
KeWaitForSingleObject(&event_, Executive, KernelMode, FALSE, &timout);
}
}
class Local
{
char member[256];
public:
Local()
{}
};
void ThrowAndReThrow()
{
try
{
Local localClass;
try
{
Local localClass2;
throw std::exception("an exception to re-throw");
}
catch (const std::exception& e)
{
throw;
}
}
catch (const std::exception& ex)
{}
}
void ThrowEx()
{
Local localClass;
throw std::exception("Informative text");
}
void Throw()
{
Local localClass;
ThrowEx();
}
void ThrowAndCatch()
{
try
{
Throw();
ThrowAndReThrow();
}
catch(const std::exception ex)
{}
}
void ThreadFunc( void* pArguments )
{
size_t* hub = (size_t*)pArguments;
for(size_t i = 0 ; i<100; ++i )
{
DbgPrint(".");
ThrowAndCatch();
}
DbgPrint("\n");
InterlockedIncrement((PLONG)hub);
PsTerminateSystemThread( 0 );
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
ApriorIT is a software research and development company specializing in cybersecurity and data management technology engineering. We work for a broad range of clients from Fortune 500 technology leaders to small innovative startups building unique solutions.
As Apriorit offers integrated research&development services for the software projects in such areas as endpoint security, network security, data security, embedded Systems, and virtualization, we have strong kernel and driver development skills, huge system programming expertise, and are reals fans of research projects.
Our specialty is reverse engineering, we apply it for security testing and security-related projects.
A separate department of Apriorit works on large-scale business SaaS solutions, handling tasks from business analysis, data architecture design, and web development to performance optimization and DevOps.
Official site: https://www.apriorit.com
Clutch profile: https://clutch.co/profile/apriorit
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.