Delphi-PRAXiS
Seite 2 von 9     12 34     Letzte »    

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi Comparing functions (https://www.delphipraxis.net/98537-comparing-functions.html)

Razor 29. Aug 2007 17:07

Re: Comparing functions
 
Maybe someone can write an example how to use PortIO (getpcrd,setpcrd) with omcdrv (GetPCIRDWord,SetPCIRDWord).

I dont understand what Muetze ment.

Phoenix 29. Aug 2007 17:20

Re: Comparing functions
 
What did we say about double-posting?
You're doing it again, so take this (again) as a warning to NOT double post.

Muetze confused a word. He did not mean device but decide.
You have to decide what driver is needed to be called and then you have to call the function of the correct driver.

Razor 29. Aug 2007 17:22

Re: Comparing functions
 
He said both offer same functionality so i have to decide wich one to use but its impossible to use 2 becouse i get BSOD(BLUE SCREEN OF DEATH)if i use it,get it? :zwinker:


As i said an example would be perfect just how to make this compilable


omcdrv.GetPCIRDWord(0,24,$03,$E4,pdata);

Muetze1 29. Aug 2007 17:31

Re: Comparing functions
 
Zitat:

Zitat von Phoenix
Muetze confused a word. He did not mean device but decide.
You have to decide what driver is needed to be called and then you have to call the function of the correct driver.

Ups, sorry. Phoenix is right - the word was wrong - decide is what i mean.

Zitat:

Zitat von Razor
He said both offer same functionality so i have to decide wich one to use but its impossible to use 2 becouse i get BSOD(BLUE SCREEN OF DEATH)if i use it,get it? :zwinker:

Yes, we all understand this. And I said you have to decide which one you want to use and then transform all your code using the other driver to use the new selected one. So, do you get it? :zwinker:

That you can't use both is completly logical and so you have to decide which one to use. So decide and then change the sources to use onyl the selected one...

Razor 29. Aug 2007 17:34

Re: Comparing functions
 
[delphi]Alright alright and thanks buuut


[pre]procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: Cardinal);
procedure SetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; pdata: Cardinal);


omcdrv.GetPCIRDWord(0,24,$03,$E4,pdata); [/pre]



[pre]var
dwresult:dword;

function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword);


dwResult:=GetPCRD(0,24,$03,$E4); [/pre]


Now how in heaven can i change this this arent theh same functions...

Muetze1 29. Aug 2007 17:39

Re: Comparing functions
 
Delphi-Quellcode:
procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: Cardinal);
function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
dwBus = Bus
dwDev = Dev
dwFunc = Func
offs = Reg div 4
pData = result

Delphi-Quellcode:
procedure SetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; pdata: Cardinal);
procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword);
dwBus = Bus
dwDev = Dev
dwFunc = Func
offs = Reg div 4
pData = value

Razor 29. Aug 2007 18:02

Re: Comparing functions
 
Zitat:

Zitat von Muetze1
Delphi-Quellcode:
procedure GetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; var pdata: Cardinal);
function GetPCRD(Bus, Dev, Func, Reg : byte): dword;
dwBus = Bus
dwDev = Dev
dwFunc = Func
offs = Reg div 4
pData = result

Delphi-Quellcode:
procedure SetPCIRDWord(dwBus, dwDev, dwFunc, offs: byte; pdata: Cardinal);
procedure SetPCRD(Bus, Dev, Func, Reg : byte; value : dword);
dwBus = Bus
dwDev = Dev
dwFunc = Func
offs = Reg div 4
pData = value

Well so it goes like this then

Delphi-Quellcode:
var
pdata:cardinal;
begin
GetPCIRDWord(0,24,$03,$E4,pdata)
form1.caption:=pdata //???

Muetze1 29. Aug 2007 18:44

Re: Comparing functions
 
Basicly it is ok so, but I think you have to divide the given offset by four. The code is ok, but the line with the question-marks are Delphi basics and not hw specific.

Razor 29. Aug 2007 19:50

Re: Comparing functions
 
I don't know what i am doing wrong :wall:

http://img172.imagevenue.com/img.php..._122_419lo.JPG

Muetze1 29. Aug 2007 20:46

Re: Comparing functions
 
http://www.elists.org/pipermail/delp...il/026837.html

other search result says clear all DCU's and build again


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:40 Uhr.
Seite 2 von 9     12 34     Letzte »    

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz