Im test InitializeOls() in cpp, it work well. When i loading winring0x64.dll using python it was successfully, but then use InitializeOls(), it failed, No clue why.
dllname = "WinRing0x64.dll"
dll_path = os.path.join(current_dir, "lib", dllname)
ols = ctypes.WinDLL(dll_path)
ols.InitializeOls.argtypes = []
ols.InitializeOls.restype = wintypes.BOOL
...
def initialize(self):
if not ols.InitializeOls():
print("Failed to initialize WinRing0")
raise RuntimeError("Driver initialization failed")
....