|
-
November 8th, 1999, 11:57 AM
#1
VB and C++
Is there any way that I can call C/C++ functions from VB? I like the interface to VB better but I have some C/C++ functions that I need to call. Can I use VB or do I have to create my app in VC so I can use those functions?
-
November 8th, 1999, 02:21 PM
#2
Re: VB and C++
if you have the C++ functions in a DLL you can use them in VB
Example: the following line lets you use the function Sleep from then kernel32.dll
private Declare Sub Sleep Lib "kernel32" (byval dwMilliseconds as Long)
In VC you have to declare the function as follows:
extern "C" __declspec(dllexport) void Sleep(DWORD dwMilliseconds);
hope I could help
Tom
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|