Solved

Serial Port Communication in VB

Posted on 2001-06-02
5
259 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 50 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

734 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