-
hi, i have very big (for me) problem. i want to write dll in c++ which i can use to acces to hardware in win2000.
in W95/98 i used two functions in delphi - GetPort and SetPort for writing and reading from address. But if i want run this prog in win2000, it appears "Privileg instruction".
function GetPort( P : WORD ) : Byte; assembler;
asm
MOV DX, P;
IN AL, DX;
end;
procedure SetPort( P : WORD; Value : Byte ); assembler;
asm
MOV DX, P;
MOV AL, Value;
OUT DX, AL;
end;
please, do you know how to let my program run correctly ??????
Thanks in advance. Standa
-
Win2000 is designed for stability, so direct hardware access is forbidden. You'll need to use the API -- see MSDN for details.
-
Access to hardware....
Yes i know about Win2000 stability. But, can yuo say me something more concretly ???
-
You're using port access, so obviously you need specific hardware access. What hardware is it? NT provides APIs for all the different hardware devices.
-
thank you, but API ??
i need only to send one byte to hardware port and receive very small value. It is old ISA card. Where can i find it in MSDN???
-
I really can't help much further than point you at MSDN :( You might want to look at the driver development kit for NT, since drivers are allowed direct hardware access (obviously :p). If you wrote a driver for your card then you'd be able to use it. What card is it?
-
hardware
it is very simple A/D convertor.....
-
Supplier? Manufacturer? Model number?