Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - VC++ DLL to send data to serial port (COM1)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

VC++ DLL to send data to serial port (COM1)

 Post Reply Post Reply
Author
Message
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Topic: VC++ DLL to send data to serial port (COM1)
    Posted: 02 August 2007 at 11:49pm

Hi! anyone who can help me? Im working on a VC++ DLL  that accepts data from VB6 and then send it to COM1 which is my serial port...so from vb6 to VC++ DLL and to serial port...i hope you do hav idea on what im trying to do..i badly needed help on this...tnx in advance!

you should be working
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2007 at 3:09am
Very easy - there are examples on www.codeproject.com - there is no simple solution, just a series of calls to configure the serial port (speed, bits etc.) then you use OpenFile / Read / Write / Close.
 
This is something I do a lot in C++.
Simon HB9DRV
Back to Top
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Posted: 03 August 2007 at 8:44pm

yes sir ive seen the samples on www.codeproject.com- but the functions are limited, it only explains the communication between 2, either vb6 sending data to VC++ Dll and VC++ DLL sending data to serial ports....what i needed is the interfacing of these three, vb6 to send data to VC++ compiled DLL and then the DLL process the data and send it to serial port....so all of them are involved in the process...im a newbie on VC++ and hav not tried using the language before...pls help me sir..hav a a blessed day ahead!

you should be working
Back to Top
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2007 at 8:37pm

is there anyone who can help me with this...

you should be working
Back to Top
Simon HB9DRV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 July 2005
Location: Switzerland
Status: Offline
Points: 458
Post Options Post Options   Thanks (0) Thanks(0)   Quote Simon HB9DRV Quote  Post ReplyReply Direct Link To This Post Posted: 05 August 2007 at 11:46pm
Originally posted by eimon eimon wrote:

is there anyone who can help me with this...

Why do you want to use C++ to talk to the serial port - you can do this with VB. I don't know how - I am not a VB person - but there are many VB programs which control a serial port, you can buy commercial code to do this for about $50.
 
I can't help with interfacing VB to C++, only the C++ / serial port side.
Simon HB9DRV
Back to Top
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Posted: 06 August 2007 at 4:11am

Actually I am developing a driver for our system and  our boss want it it to be hidden and we find turning it into a DLL a solution that is why Im creating a VC++ Dll...i have no problem regarding VB its only in VC++ in which i am stucked...I used VC++ because I can compile it into a DLL and VB does not support such....can u help me regarding on how will i send a continous data to serial port....something like infinite loop..thanks in advance ..i have been googling for weeks but just cant find anything that would help me...

you should be working
Back to Top
Jose5 View Drop Down
Groupie
Groupie
Avatar

Joined: 07 June 2005
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose5 Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 4:04pm
are you a VC++ developer or just compiling straight out of the box to create a DLL file ????
IT WASENT ME!!!
Back to Top
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 8:30pm
No im not a VC++ developer as I have said before its my first time to use this language..you got it right i just compile straight, I am not capable of making my own code to create a DLL...can u help me with this?
you should be working
Back to Top
Jose5 View Drop Down
Groupie
Groupie
Avatar

Joined: 07 June 2005
Location: United States
Status: Offline
Points: 17
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jose5 Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 8:54pm
I can Help, go ahead  send me an email to jose@tsdinc.org so i can give you my phone number ...!
IT WASENT ME!!!
Back to Top
eimon View Drop Down
Newbie
Newbie
Avatar

Joined: 02 August 2007
Location: Philippines
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote eimon Quote  Post ReplyReply Direct Link To This Post Posted: 08 August 2007 at 10:03pm
I have sent you an email as u requested..im looking forward you can help me with this..
you should be working
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.