Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

Tip of the Day
Language: Enterprise
Expertise: Beginner
Aug 9, 1999

Use Strict Type Variables

If you want to improve performance of your application then you should
always try to use strict type variables. You can use strict type (or strongly typed) variables by referencing the type library that contains the CoClass. Strict typing uses vtable binding, which is always faster then late binding (or IDispatch binding).

Because the type of the variable is known at compile time, the vtable offset of the CMyObject::Method1() function is determined from the typelib at compile time, and the generated code simply uses the offset to invoke the function. If you don't use strict type variable then because the type of the objLateBind variable isn

Deepak Pant
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date