United Blogs

Welcome to United Blogs Sign in | Join | Help
in Search

James Musson's blog

VB6 and external function calls

I went to help a customer out with some performance issues they were experiencing with their VB and VFP(!) COM+ application.  A bit of a blast from the past and it dragged up a whole bunch of stuff I had put to the back of my mind.  One of these things was that when making external function calls (e.g. to the Win32 API or what-have-you) in a VB COM+ component it is better to wrap those external declarations up in a Typelib.  It's much nicer to use as well!  All you need to do is create the appropriate IDL for the functions you want to call and then use midl.exe to compile it into a tlb which you can then reference from VB6.  I have knocked up a quick sample that can be found here: vbapitlb.zip.

Published Wednesday, February 11, 2004 4:54 AM by james

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit
Powered by Community Server, by Telligent Systems