Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Serial Port Communication in VB

Posted on 2001-06-02
5
Medium Priority
?
273 Views
Last Modified: 2008-03-17
1.How to write serail port communication using visual basic?

2. I do have written a code in visual basic for eg
Declare Function CreateFile Lib "kernel32" Alias "CreateFileA" (ByVal lpFileName As String, ByVal dwDesiredAccess As Long, ByVal dwShareMode As Long, ByVal lpSecurityAttributes As Long, ByVal dwCreationDisposition As Long, ByVal dwFlagsAndAttributes As Long, ByVal hTemplateFile As Long) As Long\

The paprameters being passed to this function are
filename Com2:
dwDesiredAccess &HC0000000
dwShareMode 0
lpSecurityAttributes 0&
dwCreationDisposition &H3
dwFlagsAndAttributes 0
hTemplateFile 0

I would like to know how this CreateFile function works and what does Lib "Kernel32" does mean?

I would apperciate if anyone ould help in figuring this out..

Navin
0
Comment
Question by:NavinKumar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 5

Accepted Solution

by:
dgorin earned 200 total points
ID: 6149537
1. Look at the MSComm control, you can find info in the VB documents under ActiveX controls.

2.  Lib "Kernel32" identifies the Windows library file for the Windows API function you defined.  Look at the VB docs for more info on using the Windows API calls.

0
 
LVL 1

Expert Comment

by:j3877
ID: 6152436
lib "kernel32" means that you are calling an API function from the library kernel32 (C:\Windows\System\Kernel32.dll).

[slightly lengthened version of previous comment]
0
 
LVL 1

Expert Comment

by:Un1
ID: 6549355
A true multithread VB5 VB6 source code communication control(Using CreateThread API, No crash in VB6):


http://www.banasoft.com/Comm.htm
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7132832
Hi NavinKumar,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept dgorin@nw's comment(s) as an answer.
**** Un1's link is broken.

NavinKumar, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with my recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7167860
Comment from expert accepted as answer

Computer101
E-E Moderator
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question