Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how to include c header file in vb

Posted on 2001-06-12
6
Medium Priority
?
385 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 150 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
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!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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 Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

927 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