Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Visual Basic (Classic) FAQ

Inter-Process Communication

Exporting functions from C DLL by chiph
Posted: 8 Jul 01

If you're writing a C DLL that you expect to be able to call from VB, you may be tempted to use the __declspec(dllexport) keyword.  While this works fine for having other C functions call your DLL, VB is unable to find the exported functions.  Instead, you should export your functions using a .DEF file.   

The structure is pretty easy.  You tell it you're writing a DLL, give it a name and description, and list the exported functions, with optionally a numeric ordinal.

DESCRIPTION "Implements a Whizzo operation."
   Insert   @1
   Delete   @2
   Search   @3
   Whizzo   @4

Add the .DEF file to your Visual C++ project and re-link.  All should be fine.

Back to Visual Basic (Classic) FAQ Index
Back to Visual Basic (Classic) Forum

My Archive

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close