Solved

how to include c header file in vb

Posted on 2001-06-12
6
377 Views
Last Modified: 2013-11-18
How to include c header file in vb. normally in c written as follows:
#include "vbconst.h"

is there any way to write the above include statement in vb module.
0
Comment
Question by:azsoft
  • 2
  • 2
  • 2
6 Comments
 
LVL 3

Expert Comment

by:sombell
ID: 6180363
You cant do what youre asking for for two reasons:

1) There is no "include" capability in VB. you would have to cut and paste the text into the VB form.

2) The syntax of C header files is totally different to the syntax of VB, so even if you cut and paste the whole header file, it will cause compilation errors in VB. You need to edit the header file to turn it into VB syntax.

If you want to include common declarations in your VB program (API functions & constants) then I reccomend you get yourself a copy of the VB Type Library. To use this you include it as a Reference in the project, then all the declarations are available to you in your program.

you can get the VB Type Library from :

http://www.themandelbrotset.com/Technical/typelib.asp

unfortunately you will still find there are some declarations not in this (though not that many). You will have to do these "by hand" still. But at least the majority are done for you.

Hope this helps.

Sombell
0
 
LVL 15

Accepted Solution

by:
ameba earned 50 total points
ID: 6180447
You can write this statement:
#Const include = "vbconst.h"
but it won't include a file. :-)
To include a file, press Ctrl+D, or use menu Project, Add Module, or drag file from Windows Explorer to VB Project Explorer.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 6181615
>How to include c header file in vb

If it is a c header, it will be meaningless in VB unless you rewrite it in VB syntax.
0
Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

 
LVL 38

Expert Comment

by:PaulHews
ID: 6181625
But that has already been said (and I haven't had coffee yet this morning.  *yawn* scritch scritch.)
0
 
LVL 15

Expert Comment

by:ameba
ID: 6182094
Yes, that will teach me to choose where to put my comments.
0
 
LVL 3

Expert Comment

by:sombell
ID: 6182221
grief !
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Element alignment and word wrapping 9 75
TT Auto Dashboard 13 95
Added a column screws up code 5 63
VB script to continue despite error 2 17
Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

821 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