AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Win32/Win64 API (native code) Delphi openlibsys.org Open source driver
Thema durchsuchen
Ansicht
Themen-Optionen

openlibsys.org Open source driver

Ein Thema von Razor · begonnen am 5. Mai 2008 · letzter Beitrag vom 14. Aug 2009
Antwort Antwort
Seite 2 von 4     12 34      
Muetze1
(Gast)

n/a Beiträge
 
#11

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 00:47
Zitat von Razor:
Delphi-Quellcode:
  ho := ExtractFilePath(application.ExeName) + 'WinRing0x64.DLL';

  if FileExists(ho) then
  begin
    RING0 := LoadLibrary(PChar(Pfad)); // build "ho" and use "Pfad"? Copy&Paste error

    if RING0 > 0 then // why > 0? see MSDN documentation: it states != NULL
      showmessage('loaded');
  end;
end;
Be more accurate on the basics! This is fundamental for such applications as you want to build...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#12

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 08: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
Muetze1
(Gast)

n/a Beiträge
 
#13

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 09:48
I am frightened, that you have not learned some basics. Learn the basics!

What is the difference between function and procedure? If there is none, we do not need two identifiers in the Delphi language...
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#14

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 10:01
Ofcourse theres a difrence
Delphi-Quellcode:
var
  Form1: TForm1;
  ring: THandle;


implementation

{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
load;
end;

procedure tform1.Load;
VAR
Pfad: AnsiString;

  Intalize: procedure(InitializeDll: Pointer); stdcall;
begin
Pfad := ExtractFilePath(application.ExeName) + 'WinRing0x64.DLL';


if FileExists(Pfad) then
begin

form1.Color:=clgreen;

ring := LoadLibrary(PChar(Pfad));

if ring = 0 then
Intalize:= GetProcAddress(ring,'InitializeDll');
if Assigned(Intalize) then
showmessage('intalized');
showmessage('loaded');

end;
end;
Like this?
  Mit Zitat antworten Zitat
Assertor

Registriert seit: 4. Feb 2006
Ort: Hamburg
1.296 Beiträge
 
Turbo C++
 
#15

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 10:45
Hi Razor,

Zitat von Razor:
Remember who told you about this first .
Yes: I told the bcdedit fixes availability first See thread here. By the way: I wrote about bcdedit in November 2006...

Zitat von Razor:
type “bcdedit /set loadoptions DDISABLE_INTEGRITY_CHECKS” without the quotes (and no the DD is not a typo).
Reboot and enjoy being able to use unsigned drivers in Vista x64.
And just for your interest: AFAIK has Microsoft released an security update (released long time before Vista SP1) disabling the possibility to circumvent this protection in x64...

So, no go for your x64 Driver without Digital Signature or F8 on boot...

Cheers Assertor
Frederik
  Mit Zitat antworten Zitat
DevidEspenschied

Registriert seit: 7. Sep 2006
Ort: Berlin
439 Beiträge
 
Delphi 12 Athens
 
#16

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 10:52
As far as I know does the driver within WinRing0 have a Verisign certification and is runable under Vista x64 even without the BCDEdit option.

That option was originally a way for developers to test their X64 drivers, as long as the Verisign certification process is running.
Devid
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#17

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 11:03
Zitat von Razor:
Like this?
Does it work as aspected?

What about all the warnings and hints of your source? Why do you access the global Form1 variable in a method of TForm1? What about a basic source code formating?
  Mit Zitat antworten Zitat
Razor
(Gast)

n/a Beiträge
 
#18

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 11:08
This what ive done so far,error comes up i uploaded the image..

http://img504.imageshack.us/img504/3955/captureke1.jpg

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure load;
    procedure Button1Click(Sender: TObject);

     
  private
    { Private declarations }
  public
    { Public declarations }

  end;




var
  Form1: TForm1;
  ring: THandle;
   procedure InitializeDll(); stdcall; external 'WinRing0x64.dll';
 
implementation

{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
load;
end;


procedure tform1.Load;
VAR
  Pfad: AnsiString;
begin
Pfad := ExtractFilePath(application.ExeName) + 'WinRing0x64.dll';


if FileExists(Pfad) then
begin


ring := LoadLibrary(PChar(Pfad));

if ring = 0 then
form1.Color:=clgreen;
 showmessage('loaded');
  end;
 InitializeDll();
end;

end.
  Mit Zitat antworten Zitat
Muetze1
(Gast)

n/a Beiträge
 
#19

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 13:00
So the imports of the WinRing0x64.dll could not be resolved by the module loader.
  Mit Zitat antworten Zitat
DevidEspenschied

Registriert seit: 7. Sep 2006
Ort: Berlin
439 Beiträge
 
Delphi 12 Athens
 
#20

Re: openlibsys.org Open source driver

  Alt 6. Mai 2008, 13:44
Set a debug breakpoint before the line:

ring := LoadLibrary(PChar(Pfad)); and check the content of the Pfad variable. Maybe some backslash is missing.
Devid
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 4     12 34      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 14:45 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz