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.

[SOLVED] Error:Unhandled exception while compiling the program

Status
Not open for further replies.

hari516

Newbie level 6
Joined
Feb 22, 2012
Messages
13
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Mumbai
Activity points
1,394
hi,

here in this below simple program am trying to compile and which giving an unhandled exception.want to know whether the _outp(),_inp() functions will work for windowsxp operating system.If so,then why am getting the unhandled exception.I would like to check the low and high on the particular pins of parallel port from C program.could u please give me an example to do this way of interfacing with the parallel port in C.


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
include "stdafx.h"
#define PORT1 0x378
 
int _inp(unsigned short port);
int _outp( unsigned short port, int databyte );
 
int main () {
 
 
 int val = 0;
 short result;
 
 while ( val < 256) {
 
   printf("Enter a value in decimal (256 to quit)>");
   scanf("%d", &val);
 
 
   //_outp(PORT1, val);
   result=_inp(PORT1);
   printf("the result value:%d",result);
 
 }
 
 _outp(PORT1, 0);
 
 
return 0;
}




I checked the outportb(); function which doesnot allow at all.compiler am using is visual studio 2008.kindly suggest any tutorial links to learn the complete parallel port interfacing in C or C++
 
Last edited by a moderator:

Sorry, no.
If it's obvious that the poster hasn't even googled I think it's appropriate to provide a list instead of picking one of the articles.
 

I could find the solution to this unhandled exception..because the inpout32.dll file was corrupted.So was able to get such unhandled exception..I asked ur help or ur advise because am novice in parallel port usage and other things...
 

Good you found the solution. Happy programming!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top