🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #15044

Re: How to Define "extern" keyword in C++ Builder(Here is Complete Code)

#15044
From: Umar Kazi
Date: Tue, 22 Jul 2003 23:12
37 lines
2504 bytes
Actually I am trying to access input port while using windows XP. This keyword "extern" has been given in the example provided by hardware provider's DLL file.The complete code is as follows.

#include <stdio.h>
#include <iostream.h>
#include "BytioXP.h" (which is manufacturer's provided header file)

void main()
extern "C"
{
short __import __stdcall InpVal(378h);
}

I admitt that i am not a expert programmer in C++ builder so i am very much confused that is this the right code to access the input port.Actually i have to interface encoder and ultrasonic sensor with PC via external interface card using C++ Builder (Parallel port of PC will be used).I have to read these signals and then have to generate graphical display.Right now my problem is how to read the input port.
PLEASE HELP
regards 
Umar Kazi
 
             ************************************
"Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> wrote:
>
>"Umar" <umarkazi@yahoo.com> wrote in message
>news:3f1db2db$1@newsgroups.borland.com...
>
>>                   Extern "C"
>>                     {
>>                      all the commands to read input written in  this area
>>                     }
>
>What exactly are you trying to accomplish?  That cnippet does not make any
>sense.  You cannot extern a block of code, only entire functions.  Please
>copy-paste your actual code as-is so we can see what you are actually doing.
>
>
>Gambit
>
>
Technical Details
Message-ID: <3f1dc4d5$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f1db2db$1@newsgroups.borland.com> <3f1dbea7$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,6fe63ea9ffe8bf86
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-22 16:40:37 PST
From: "Umar Kazi" <umarkazi@yahoo.com>
Sender: "Umar Kazi" <umarkazi@yahoo.com>
Reply-To: "Umar Kazi" <umarkazi@yahoo.com>
Subject: Re: How to Define "extern" keyword in C++ Builder(Here is Complete Code)
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 82.36.18.181 82.36.18.181    
References: <3f1db2db$1@newsgroups.borland.com> <3f1dbea7$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.65
Message-ID: <3f1dc4d5$1@newsgroups.borland.com>
Date: 22 Jul 2003 16:12:21 -0700
X-Trace: newsgroups.borland.com 1058915541 207.105.83.65 (22 Jul 2003 16:12:21 -0700)
Lines: 38
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!news.tele.dk!news.tele.dk!small.news.tele.dk!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail