All Projects → sidyhe → dxx

sidyhe / dxx

Licence: other
Windows Kernel Driver with C++ runtime

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to dxx

Driver.NET
Lightweight and flexible library to load and communicate with kernel drivers on Windows.
Stars: ✭ 59 (-53.91%)
Mutual labels:  driver, wdm
windows-camera-class-filter-driver
An example of a camera class (upper) filter driver for Windows.
Stars: ✭ 27 (-78.91%)
Mutual labels:  driver, wdm
vboxpower
VirtualBox Power Driver for MAAS
Stars: ✭ 107 (-16.41%)
Mutual labels:  driver
JqueryDataTablesServerSideDemo
Jquery DataTables with Asp.Net Core server side multi column sorting and searching Demo Project.
Stars: ✭ 43 (-66.41%)
Mutual labels:  runtime
state-farm-distracted-driver-detection
Automatically classification of each driver's behavior given a dataset of 2D dashboard camera images.
Stars: ✭ 32 (-75%)
Mutual labels:  driver
SkotOS
Open Source version of the SkotOS narrative prose library, using the DGD driver.
Stars: ✭ 21 (-83.59%)
Mutual labels:  driver
component-runtime
Talend Component Kit (implementation repository)
Stars: ✭ 22 (-82.81%)
Mutual labels:  runtime
floweret
Runtime type annotations for CoffeeScript (and JavaScript too!)
Stars: ✭ 20 (-84.37%)
Mutual labels:  runtime
OpenDriver2Tools
Driver 1 and Driver 2 tools
Stars: ✭ 25 (-80.47%)
Mutual labels:  driver
phpRedisTimeSeries
📈 Use Redis Time Series in PHP!
Stars: ✭ 23 (-82.03%)
Mutual labels:  driver
CJMethodLog
Objective-C 函数日志监听系统,可监听任意类,任意类的任意方法的调用日志。
Stars: ✭ 26 (-79.69%)
Mutual labels:  runtime
ccxx
This is a cross-platform library software library about c, c ++, unix4, posix. Include gtest, benchmark, cmake, process lock, daemon, libuv, lua, cpython, re2, json, yaml, mysql, redis, opencv, qt, lz4, oci ... https://hub.docker.com/u/oudream
Stars: ✭ 31 (-75.78%)
Mutual labels:  stl
aegis-host
This is the ÆGIS federated application host. Federated components are independently deployable, written by multiple teams in multiple languages, and loaded from multiple repos and network locations at runtime, yet capable of running together in a single process or as distributed components in the ÆGIS application fabric.
Stars: ✭ 197 (+53.91%)
Mutual labels:  runtime
realtek rtwifi
Realtek RTWIFI - RTL8XXXU mod
Stars: ✭ 32 (-75%)
Mutual labels:  driver
cdrs-tokio
High-level async Cassandra client written in 100% Rust.
Stars: ✭ 54 (-57.81%)
Mutual labels:  driver
rql-scala
RethinkDB Scala Driver
Stars: ✭ 13 (-89.84%)
Mutual labels:  driver
linux nvidia jetson
Allied Vision CSI-2 camera driver for NVIDIA Jetson Systems. Currently supporting Nano, TX2, AGX Xavier, and Xavier NX. Support for TX2 NX coming soon.
Stars: ✭ 68 (-46.87%)
Mutual labels:  driver
swoole-postgresql-doctrine-driver
🔌 A Doctrine DBAL Driver implementation on top of Swoole Coroutine PostgreSQL client
Stars: ✭ 15 (-88.28%)
Mutual labels:  driver
rtl88x2BU WiFi linux v5.2.4.1 22719 COEX20170518-4444.20170613
rtl88x2bu driver updated for modern kernels.
Stars: ✭ 26 (-79.69%)
Mutual labels:  driver
nativeble
A fully-fledged cross-platform BLE library for desktop.
Stars: ✭ 15 (-88.28%)
Mutual labels:  driver

Driver Plus Plus

Windows Kernel Driver with C++ runtime

name version url changes for dxx
EASTL v3.10.00 https://github.com/electronicarts/EASTL
msgpack v2.1.5 https://github.com/msgpack/msgpack-c use eastl, throw instead of ExRaiseStatus
apathy - https://github.com/dlecocq/apathy remove code based os
lua v5.3.5 https://www.lua.org/ utf-8 embedded, part of io lib, no os lib
luaffi - https://github.com/jmckaskill/luaffi fit for wdk
luaplus - https://github.com/jjensen/luaplus51-all
pugixml v1.8.1 https://github.com/zeux/pugixml

Build

VS2017 + SDK10.17763 + WDK10.17763

Example

class ThisIsAClass {
public:
	ThisIsAClass() {
		DbgPrint("%s\n", __FUNCTION__);
	}
	virtual ~ThisIsAClass() {
		DbgPrint("%s\n", __FUNCTION__);
	}
public:
	void foo() {
		DbgPrint("%s\n", __FUNCTION__);
	}
};

ThisIsAClass test_global_class;

void DbgPrintS(const char* s) {
	DbgPrint("%s\n", s);
}

struct TestPack
{
	int a;
	char b;
	bool c;
	float d;
	double e;
	eastl::string f;
	eastl::vector<eastl::string> g;

	MSGPACK_DEFINE(a, b, c, d, e, f, g);
};

void stl_test()
{
	eastl::make_unique<DRIVER_OBJECT>();
	eastl::make_shared<UNICODE_STRING>();
	eastl::scoped_ptr<double> dptr(new double(3.6));

	eastl::set<int> set_test;
	set_test.insert(1);
	set_test.insert(3);
	set_test.insert(5);
	set_test.erase(1);

	eastl::map<int, int> map_test;
	map_test[0] = 1;
	map_test[10] = 11;
	map_test[20] = 12;
	map_test.erase(11);

	eastl::vector<int> vec_test;
	vec_test.push_back(2);
	vec_test.push_back(3);
	vec_test.push_back(1);
	eastl::stable_sort(vec_test.begin(), vec_test.end(), eastl::less<int>());
	for (auto e : vec_test) {
		DbgPrint("%d\n", e);
	}

	eastl::string s;
	s = "This a string";
	s.append("any");
	DbgPrint("%s\n", s.c_str());

	eastl::wstring ws;
	ws = L"wide string";
	ws.clear();

	eastl::unordered_set<float> us_test;
	us_test.insert(333);

	eastl::unordered_map<double, eastl::string> um_test;
	um_test.insert(eastl::make_pair(6.6, "9.9"));
}

void lua_test()
{
	LuaPlus::LuaStateAuto ls(LuaPlus::LuaState::Create(true));
	{
		LuaPlus::LuaModule _G(ls->GetGlobals());

		_G.def("foo", &test_global_class, &ThisIsAClass::foo);
		_G.def("DbgPrint", &DbgPrintS);
	}

	if (ls->LoadString("foo();\nDbgPrint([[Hello World]]);") == LUA_OK) {
		ls->PCall(0, 0, 0);
	}

/*
local function main()
    local f, err = io.open("../dxx.log", "w");
    
    if f then
      
      for i = 1, 10, 1 do
        f:write(i .. "\r\n");
      end;
      
      f:close();
    end;
    
    f, err = io.open("../dxx.log", "r");
    
    if f then
      
      for l in f:lines() do
        print(l);
      end;
      
      f:close();
    end;
    
end;

main();
*/
	if (ls->LoadFile("../dxx.lua") == LUA_OK) // equal = C:\\dxx.lua
	{
		ls->PCall(0, 0, 0);
	}
}

void pack_test()
{
	TestPack tp;
	tp.a = 1;
	tp.b = '0';
	tp.c = false;
	tp.d = 666.666f;
	tp.e = 520.1314;
	tp.f = "ansi or utf8 string";
	tp.g.push_back("many strings");

	msgpack::sbuffer sb;
	msgpack::pack(sb, tp);
	TestPack tp2 = msgpack::unpack(sb.data(), sb.size()).get().as<TestPack>();
}

void xml_test()
{
	pugi::xml_document doc;

/*
<?xml version='1.0' encoding='utf-8'?>

<root>
  <dxx a="1" b="2" c="3.3" d="5.6" e="Hello kitty!">
    <text><![CDATA[This is a CDATA String !!!]]></text>
  </dxx>
</root>
*/
	if (doc.load_file("././//System32/../../dxx.xml")) // equal = C:\\dxx.xml
	{
		pugi::xml_node root = doc.first_child();
		pugi::xml_node node = root.child("dxx");

		int a = node.attribute("a").as_int(0);
		__int64 b = node.attribute("b").as_llong(0);
		float c = node.attribute("c").as_float(0.0f);
		double d = node.attribute("d").as_double(0.0);
		eastl::string e = node.attribute("e").as_string("");
		eastl::string cdata = node.child("text").text().as_string("");

		// Driver cannot print float & double, view in WinDBG
		DbgPrintEx(DPFLTR_SYSTEM_ID, DPFLTR_ERROR_LEVEL, "%d %d %s %s\n", a, b, (c, d, e.c_str()), cdata.c_str());
	}
}

NTSTATUS SysMain(PDRIVER_OBJECT DrvObject, PUNICODE_STRING RegPath) {
	UNREFERENCED_PARAMETER(DrvObject);
	UNREFERENCED_PARAMETER(RegPath);

	// NOTE OF PATH:
	// SEPARATOR = '/' !!!
	// BASE PATH = %SystemRoot% !!!

	test_global_class.foo();

	auto p1 = new CLIENT_ID[10];
	delete[] p1;

	stl_test();
	lua_test();
	pack_test();
	xml_test();

	return STATUS_UNSUCCESSFUL;
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].