[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] kan man i C spørge systemet om adressen på f.eks dev/lp1?



On Fri, 4 Aug 2000, Søren Lambæk wrote:

> kan man i C spørge systemet om adressen på f.eks /dev/lp1?

Jeg vil tro at det er vanskeligt fra usermode.

> 
> Jeg har lavet et C program som skriver bit's direkte på lp1
> porten, men adressen er hard-codet i mit program.
> 
> Jeg ville gerne kunne køre programmet sådan:
> 
> skrivport /dev/lp1
> 
> og så finder det selv ud af adressen på f.eks lp1, eller hvilken port man
> nu har angivet.

Det er _muligt_ at du fra usermode kan få adgang til at spørge biosen, men
ellers ville jeg checke hvad lpr driveren gør for at få adgang til
porten. Alternativt kunne man finde ud af om der ikke er nogen der har
skrevet en driver der benytter parallelport driveren under Linux, så den
kunne probe for dig.

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
The Microsoft Dictionary

           multi-platform: Works with both Windows NT Workstation and
                           Windows 2000 Professional.



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:08 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *