Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / "OUT" command

Author
Message
Takeshii
20
Years of Service
User Offline
Joined: 15th Feb 2004
Location:
Posted: 10th Dec 2005 23:17 Edited at: 11th Dec 2005 06:20
Is there a way to bring the QBASIC command OUT into DBP, thru .dll??
I have never messed with .dll's so i really dont know what im getting into.

in qbasic the out command is called in the following format

OUT [port],[number]

EX:

'set port to 00010000
OUT 888, 8

-

Reason i ask is with the following function i can use the parallel port as a switch to turn power on/off to lights/appliances/anything else! I have several uses for this and would like to know if this can be done and if so how?

And some of you may ask....why not just do it in QBASIC? well, i would really like to have this functionality included with the ease of DBP, do i can easily make GUI'd to control lets say lights outside, ex; christmas lights, or if im lazy, just turn things on/off with the touch of a button and not have to get up!

thanks in advance

Dark
TDK I Love you...... And yes, you should be scared
Torrey
19
Years of Service
User Offline
Joined: 20th Aug 2004
Location: New Jersey
Posted: 10th Dec 2005 23:36
You can use the API called CreateFile to achieve communication with serial ports. Try googling it and see what you find for resources.

new programmer
18
Years of Service
User Offline
Joined: 20th Dec 2005
Location: right behind you.
Posted: 1st Jan 2006 21:21
Quote: "why not just do it in QBASIC?"


dunno. QBSC owns DBC...

Three Score
19
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 7th Jan 2006 03:14
one question.
is the out command like the system ports(which can screw up you pc if you play with them) or like ports as in serial/parrellel ports

I know how to do the first one but not the second one
problems with ssytem ports though is that to use them you must have administrative powers under 2k/xp and like i said if you dont know what you doing you can crash your pc or worse screw up your hardware

(this applies to both)
are you sure you shouldnt use some api because windows might keep track of those values and changihg them might screw up windows

I didnt fail, I just found 10,000 ways that don't work
-Thomas Edison
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jan 2006 23:09 Edited at: 14th Jan 2006 23:28
you can shut your machine down with the proper OUT parameters, I got the code somewhere for shutting down in QB4.5

I found this page, a link at the top contains source to a parallel port class. Doesn't seem too complex, but I know java and not C++ and so it'd take me a few hours to figure it all out on my own and create a DLL. Maybe someone can write a dll for it.
http://www.naughter.com/parallelport.html


Deadly Night Assassins

Login to post a reply

Server time is: 2024-05-18 19:49:02
Your offset time is: 2024-05-18 19:49:02