It is currently Sat May 18, 2013 1:33 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject:
PostPosted: Tue Mar 11, 2003 12:09 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by teachco.

From a german source:
http://www.bcb-box.de/Informationen/Port/port.html

For a port access under windows 2000 & XP you need a driver. There is a freeware driver : DriverLINX Port I/O Driver for Win95 and WinNT. It's an old one, but it's running without problems under windows 2000 and XP.

You can get the driver from : http://www.driverlinx.com/Software_Products/softwareproducts.htm

Here is a code for the Borland C++ Builder 4.0 to work with the driver above.

***********************************************
* Who can translate this code into PureBasic? *
***********************************************

Code:
1. First you have to declarate the function pointer:
typedef void( __stdcall *pOutPort)(DWORD m_addr, DWORD m_value ); 

2. Then load the dll:
HINSTANCE dllport = LoadLibrary( "dlportio.dll" );
if ( dllport == NULL )     
{Application->MessageBox( "dlportio.dll not found.","DLL - error", MB_OK );
return;     }

3. Now initialize  the pointer :
pOutPort OutPort; 

4. Calculate the funtion address:
OutPort = ( void(__stdcall *)(DWORD m_addr, DWORD m_value))
GetProcAddress( dllport, "DlPortWritePortUchar" );

5. Call function:
OutPort( 0x340, 0x55 );

6. Free DLL:
FreeLibrary( dllport );


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2003 12:55 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by El_Choni.

Like this?

Code:
If OpenLibrary(0, "dlportio.dll")=0
  MessageBox("DLL - error", "dlportio.dll not found.", #MB_OK)
Else
  CallFunction(0, "DlPortWritePortUchar", $340, $55)
  CloseLibrary(0)
EndIf


El_Choni


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 11, 2003 1:55 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by Berikco.

It's not without problems on W2K and XP, i used it many years in my RAIDmonitor app on NT4 servers, and had to rewrite all to use another driver for W2K server.



Regards,

Berikco

http://www.benny.zeb.be/purebasic.htm


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2003 9:50 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by ebs.

You might want to look at http://www.beyondlogic.org/porttalk/porttalk.htm and try his device driver.

Eric

Quote:
Originally posted by Berikco

It's not without problems on W2K and XP, i used it many years in my RAIDmonitor app on NT4 servers, and had to rewrite all to use another driver for W2K server.



Regards,

Berikco

http://www.benny.zeb.be/purebasic.htm


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 13, 2003 10:02 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by Berikco.

I use TvicHW32, works great. I have commercial license for this.


Regards,

Berikco

http://www.benny.zeb.be/purebasic.htm


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 31, 2003 4:30 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777210
Restored from previous forum. Originally posted by teachco.

Thank you all. I will test them.

Andi


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye