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 / was light gun light pen interfacing. ,, Can a DLL run an EXE on W98 ?

Author
Message
Robyn
18
Years of Service
User Offline
Joined: 21st May 2006
Location:
Posted: 21st May 2006 21:30
I had asked in the DARKBASIC forum is there was any light guns or light pens or any other external hardware interfaces available for darkbasic...other than standard joystick control.
I am interested in doing a serial port control and use COM1 and COM2
for external status displays and gaming controls.
I was told that I CAN NOT have serial ports commands like the old
GWBASIC or QBASIC serial port random file commands and that what I needed to do was get the enahancement upgrade which does allow
calls to DLLs.
Then... I could use an external communications DLL ..if I could find one.
OK....
not quite clear as mud but thats what I got so far...
and then I stumble onto THIS ..a DLL section of the forum.
SO now I figure I might be asking the right people...maybe.

Right now I am in the gathering phase.... I ordered the
standard DARKBASIC and beginner book from AMAZON
and they have not arrived yet so I can not RTFM yet.
But as I am waiting I am really curious as to what can be done
with this idea and I figure I can't be the first person who
wanted to use an external toy gun or light pen.... or custom flight yoke to steer.
I am not a C++ or VB programmer so I am not familiar with
and do not have the power toolset to make DLLs.
I do have a QBASIC compiler that does make EXEs and other older
DOS compilers like A86 assembler and turbo C.
All of these DOS languages can read and write to serial ports
so I was wondering if it is possible to run an EXE from
DARKBASIC that will send some text out the serial port during game play.

Can anyone point me to an exmaple DLL that will send text to the serial ports.
I do have Jan Axelsons SERIAL PORT complete and PARALELL port complete so I may already have what I need but no way to know yet.

Can a DLL run an EXE ?
Is it possible to call an older DOS EXE from a new DLL on a windows 98 PC?

So what I am getting at here is that since I don't have the tools to make DLLs then perhaps someone can make a DLL for me and then I
use that DLL to run toys I do have here...like QBASIC compiler.

Any ideas how to interface custom controls without paying for the microsoft suites of tools?

I bought QBASIC compiler before Windows 3.1 was invented.
Then I bought the very first version of Visual Basic when it first came out for $100. It turned out that version...being the first ... did not contain ANY serial port access VB controls so then I went back to using QBASIC for custom interfaces.
Years later I needed a visual display and revisited my VB and
called microsoft and they told me I could now pay $350 for the
comercial version of my VB. WHAT!?!!?? No way.
Then it got really strange.
I found Visual Basic for DOS.
It turned out that as Windows 3.1 was coming down the pipeline....
Microsoft had to induct all those text based programmers into
event driven programming so they made a GUI for QBASIC and a great tutorial to train the QBASIC programmers how to make visual applications. All the commands were they same...they just added
some GUI controls and events.
So then I could make a push buttons on screen applications that did
understand serial port output commands and fit the program on a floppy BOOT diskette. Total standalone projects.. in VBDOS.

So ..back to the here and now....
as I have an idea for something that needs external interfaces..
it just reminds me of how that first version of Visual Basic
was crippled and didn't do COM port I/O.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 21st May 2006 22:28 Edited at: 21st May 2006 22:29
i didnt read your whole post but if you need a com port dll for dbp go to my [href]dbp page[/href] and look for the DBP_VB6LIB link

Robyn
18
Years of Service
User Offline
Joined: 21st May 2006
Location:
Posted: 3rd Jun 2006 10:58
Thankyou for the DBP_VB6LIB.dll.
I have not been able to get past the LOAD without failing.
Can you clarify the syntax usage for me please?
Lets say the desired task is to send a text string out the serial port COM1 at 9600 baud to control robotics.
Is this how to do it?

LOAD DLL 1,"DBP_VB6LIB.dll",1
CALL DLL 1,"MSC_SetPortNum",1
CALL DLL 1,"MSC_SetPortSettings","9600,N,8,1"
CALL DLL 1,"MSC_OpenPort"
CALL DLL 1,"MSC_Output","THISISTHEDATASTRING12345ABC" + chr$(13)

Login to post a reply

Server time is: 2024-11-22 06:32:24
Your offset time is: 2024-11-22 06:32:24