Print Page | Close Window

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

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=7719
Printed Date: 13 July 2025 at 6:09pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: VC++ DLL to send data to serial port (COM1)
Posted By: eimon
Subject: VC++ DLL to send data to serial port (COM1)
Date 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



Replies:
Posted By: Simon HB9DRV
Date Posted: 03 August 2007 at 3:09am
Very easy - there are examples on http://www.codeproject.com - 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


Posted By: eimon
Date Posted: 03 August 2007 at 8:44pm

yes sir ive seen the samples on http://www.codeproject.com - 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


Posted By: eimon
Date Posted: 05 August 2007 at 8:37pm

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



-------------
you should be working


Posted By: Simon HB9DRV
Date 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


Posted By: eimon
Date 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


Posted By: Jose5
Date 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!!!


Posted By: eimon
Date 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


Posted By: Jose5
Date 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!!!


Posted By: eimon
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net