I have been trying, unsuccessfully to work with a c program from visual basic, the dll's that I need to use were written in C. I have been unable to register these dll's, is there a way to use them with Visual Basic?
Printable View
I have been trying, unsuccessfully to work with a c program from visual basic, the dll's that I need to use were written in C. I have been unable to register these dll's, is there a way to use them with Visual Basic?
damn, i've seen an article on this on the web but cant remember where it is...
make a search at www.codeguru.com it's probably around there. also, in the same site, check the discussion boards (both the vb and the vcc) the vcc board has a dll section. anyway somewhere in these 2 boards u search and u'll find the answer for sure.
null
hi again. here are some links for you, seems what you looking for...
HOWTO: Make C DLL More Accessible to VB with a Type Library
http://support.microsoft.com/support.../Q189/1/33.ASP
Creating C++ DLLs to help VB
http://www.vbsquare.com/misc/cdlls/
Visual Basic Explorer
http://www.vbexplorer.com/
Creating a DLL for VB in VC++
http://www.daly.co.uk/iconic/programs/code.html
Programming Custom Hardware in Visual Basic
http://www.boondog.com/..%5Ctutorial...5Cdlltutor.htm
Extending VB with C++
http://pub13.ezboard.com/fvisualbasicexplorerfrm36
hope it helps...
null
you do in visual basic
Private Declare Function MyFunction(ByVal a as Integer, ByVal b as Integer, ByRef c as Integer) as Integer
if you declared the function as:
int MyFunction(int a, int b, int* c);
or.
Private Declare Sub MyVoidFunction(ByVal a as Integer, b as String)
if you did
void MyVoidFunction(int a, LPCSTR b);
voids do Sub's
anything else does functions, and at the end, you put the return type
void Sub
int Integer
float I don't know, but I think it's Single
double Double
char* or LPCSTR String
DWORD Long
char Byte
but remember, most VB types are unsigned, so do something about it
adn, if you use a pointer, in VB use ByRef or leave blank, otherwise, use ByVal
Good Luck
Oskilian