Post

 Resources 

Console

Nitro for VB


Getting started



First, we will create a project in VC++:

Image


From the VC++ IDE menu choose File->New and activate the tabpage "Projects". From the procets-list choose "ATL COM AppWizard". Give our baby a name. I named our lib "MyLib". This will be the name of the COM-DLL and will also be the name of the TypeLib as you will find it in the VB references list.

After that, press "OK" and VC AppWizard will create a ATL COM Project for us. ATL means Active Template Library and consists of a set of C++ template classes that make implementing COM objects and interfaces much easier.

Image


n the next step of the AppWizard choose "Dynamic Link Library(DLL)" as servertype. This will generate a in-process COM-component for us, that means, it will run in the same process environment as our VB application. Our component will have dependencies to the "atl.dll" which is stored in your windows/system folder. You need to redistribute and register it if you want to install your app on another machine. You could also enable "MFC"-support, but if you do this your component will have dependencies to the mfc dlls too. We won't do this.

Now press "Finish" and after that "OK". Your project and the source files will be created.

Our project workspace will now look like this:

Image


Forget about that functions, I will not explain them and you will not need them.



Next: Let it breathe | 1 | 2 | 3 | 4 | 5

1 comment

Tutorial Console

Tutorial by:

Torsten Damberg


Date: 2000 May 11


Navigate



1 comment

Latest comment


by: Soulmartyr

I'm not sure about anyone else, but in VB 2005 Express Edition, things seem to run just as fast as VC++ when you compile them and run the stand-alone.

Is anyone else seeing this? I made two different .DLL libraries, one in VB2k5, one in VC++. The method in the libraries did a calculation of the SIN(30) *2 in a for-next loop for five-thousand repitions. I saw an average difference of .0000002 seconds in running the two different versions. I used QueryPerformanceCounter to time everything.

Post a Comment


Printer Friendly



Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 12 visitors within the last 20 minutes
RSS News Feed