Einzelnen Beitrag anzeigen

Razor
(Gast)

n/a Beiträge
 
#12

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 07:50
Here we this more alike .Works!

Delphi-Quellcode:
Const
ring: THandle;

procedure tform1.Load;
VAR
Pfad: AnsiString;

begin
Pfad := ExtractFilePath(application.ExeName) + 'WinRing0x64.DLL';


if FileExists(Pfad) then
begin

form1.Color:=clgreen;

ring := LoadLibrary(PChar(Pfad));

if ring = 0 then

showmessage('loaded');

end;
end;


Now for the functions,this is wrong i know,but if it says it has no params and return value then i thought why not but this wont work.I have clearly no idea how to call how to call a function off an dll.
Delphi-Quellcode:
type
  TInitializeDll = function(InitializeDll) stdcall;
From the manual

Zitat:
InitializeDll
This function initializes the DLL.

Syntax
VOID InitializeDll();Parameters
None
Return Values
None

Remarks
This function must be called before using any other function in the DLL.

Requirements
WinRing0 1.0.6 or later



Zitat:
bool InitWinRing0()
{
InitializeDll();

DWORD status = GetDllStatus();

switch (status)
{
case 1:
MessageBox(NULL, L"WinRing0 Unsupported platform", L"WinRing0 Error!", MB_OK);
return false;
case 2:
MessageBox(NULL, L"WinRing0 Driver not loaded", L"WinRing0 Error!", MB_OK);
return false;
case 3:
MessageBox(NULL, L"WinRing0 Driver not found", L"WinRing0 Error!", MB_OK);
return false;
case 4:
MessageBox(NULL, L"WinRing0 Driver unloaded by other process", L"WinRing0 Error!", MB_OK);
return false;
case 5:
MessageBox(NULL, L"WinRing0 Driver not loaded because of executing on Network Drive", L"WinRing0 Error!", MB_OK);
return false;
case 6:
MessageBox(NULL, L"WinRing0 Unknown error", L"WinRing0 Error!", MB_OK);
return false;
}

return true;
}
  Mit Zitat antworten Zitat