Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to use dlportio.dll?

Status
Not open for further replies.

hmsheng

Full Member level 4
Joined
Dec 17, 2003
Messages
219
Helped
26
Reputation
52
Reaction score
10
Trophy points
1,298
Location
China
Activity points
1,556
dlportio

Can anyone tell me how to use dlportio.dll in vc++ progrem?

I use it in this way:
----------------------------------------------
#include "stdafx.h"
#include "Parallel.h"
#include "ParallelDlg.h"
#include "dlportio.h"
...
void CParallelDlg::OnSend()
{
DlPortWritePortUchar(0x768, 0x00);
}
------------------------------------------------

But error occurs when linking:
------------------------------------------------
Linking...
ParallelDlg.obj : error LNK2001: unresolved external symbol _DlPortWritePortUchar@8
Debug/Parallel.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
----------------------------------------------------------
Who can tell me why? and how to use dlportio.dll?

Thanks.
 

dlportio.dll

You must use dll helpers to get access to hw ports on W2K or XP, take a look at this page, there you can find examples about using dlportio.

**broken link removed**
 

dlportio.dll download

ok..this might sound stupid and so on but...i never programed using vc++,, and i dont really know wat to do...the page u posted doesnt help me at all...i might not b seing something i should....
anyways im having d same problem...LNK1120...and cant figure out wat 2 do...
#include "stdafx.h"
#include "dlportio.h"

void main(){
DlPortWritePortUchar(0x378, 0x00);
}
if i cant do this simple operation i cant do anything....
i dont even know if i got the libraries right...ii installed dlportio and then just copied the header file and the lib file to where i was working....this looks like a newbie kuestion but...it is...
i already managed to do all i want in linux but now i need to do it in winxp...some help please...
 

dlportio.h

I've never used dlportio, but I assume it includes an import library, perhaps named dlportio.lib. Did you tell your linker to include it?
 

dlportwriteportuchar

you have to include dlportio.lib to your project library modules, if you are using MS C++ add this file following this ...

Top Menu
Project Settings (Alt-F7)
-- go to "link" tab
-- on the "object/library modules" field append the .lib filename "dlportio.lib"
-- select "OK"

You must do this for "debug" and "release" settings.

If you are running on a different environment include the .lib filename to your liker statement.

You may now run your code
 

dlportio

humm...let try to say this in a manner dat anyone who sis this thread can understand.....U GUYS RULE!!!!!!!!!!!!!! DANKS A LOT!!!!!!!!!!!!!!

am having a litle problem inverting a bit....ive implemted a fucntio not but...isnt ther one in c already?

humm....would it be 2 mutx 4 u to givme a little intro on how to use inpout32....i got the dll in the system folder but i cant find any tut to work with it in vc++....if this is to mutx trouble dont bother kause i already got one way to do it...else.....U RULE....danks a lot....
 

how to use dlportio

I don't know inpout32, sorry.

You want to learn the bitwise operators AND, OR, XOR, NOT, and SHIFT: &, |, ^, ~, <<, >>.

For example, two ways to toggle bits 4, 3, and 2 of integer foo:
foo = foo ^ 0x001C;
foo ^= 0x001C;

You may like this book:
 

dlportio.dll vista

humm...u know....that kind of made my job a lot easier...i took a look at the book danks...B))))
 

dlportio xp

you must create the link between DLL files and VC program. Generally speaking, you can copy the following method. of course, DLL files should be located in the same directory.

extern "C" __declspec(dllimport)void writefunction(short PortAddress, short data);
extern "C" __declspec(dllimport)short readfunction(short PortAddress);
 

dlportio java

hi,
the problem may be due to linkage i,e u may not have a proper lib file or u may not have a lib at all,
since u have the dll, do this
1) load the dll library in ur process by using the
loadlibrary api
2) find the address of the function u want to call, using the getprocaddress api
3) call the respective function.
u will find help on this api's in MSDN.
 

dlportio.dll c++

also, u dont need to have a lib file in this case, i,e u dont have to include the lib file in the project.
 

using dlportio

the inpoute its easy used on VB my friend, just download the DLLS here for your OS:
http://www.lvr.com/ <--- theres a lot of info of HOW to make work with COMM,LPT,USB,etc and The DLL to download( Inpout32.dll , just copy and paste on folder of System of your OS)
heres an example of how to use these simple DLL:(Jus create a Form and a Command and paste these on the form)



Private Declare Function Inp Lib "inpout32.dll" _
Alias "Inp32" (ByVal PortAddress As Integer) As Integer

Private Declare Sub Out Lib "inpout32.dll" _
Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)

Dim port As String

Private Sub Command1_Click()
Out port, 255 'heres the d0-d7 bits(1 or 0) to Recive or transmit
End Sub

Private Sub Form_Load()
Port = &H378 <-- your port
End Sub


Also, You can see the easy way to send or receive info to the(in this case) printer ports
Just remember that the info its going on port 378(d0-d7) theres too the status(379) and the controll (37A)ports for other things...
Heres more info about LPT:
**broken link removed** .
Regards
 

dlportio example

Does the dlportio.h work well in Win XP ? I've ever used inpout32.dll but it can work in Win XP only when use with VB or other Microsoft compiler
 

dlportio c++

Hmmm I use dlportio on WinXP with Borland Builder 4 with no issues.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top