Solved

ocx and dlls

Posted on 2001-06-19
12
275 Views
Last Modified: 2010-04-17
if i create a dll or ocx control using visual basic or visual c
is there is any different in the speed of execution when using this control or dll in another application in case of build it using visual c or visual basic?
0
Comment
Question by:aft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6207738
i guess that code in C could basically be faster than code in VB, but the difference will meanwhile only show on highly intensive code. For simply application extensions, both will be equal in performance.
Cheers
0
 
LVL 4

Expert Comment

by:prashant_n_mhatre
ID: 6207916
Yeah...angelIII is right..if properly implemented..Visual C is always faster than Visual Basic.
0
 
LVL 4

Expert Comment

by:prashant_n_mhatre
ID: 6207920
Yeah...angelIII is right..if properly implemented..Visual C is always faster than Visual Basic.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:prashant_n_mhatre
ID: 6207921
Yeah...angelIII is right..if properly implemented..Visual C is always faster than Visual Basic.
0
 
LVL 4

Expert Comment

by:prashant_n_mhatre
ID: 6207923
Yeah...angelIII is right..if properly implemented..Visual C is always faster than Visual Basic.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6207944
Saying that Visual Basic is faster is not always true. An application written in Visual C++ MFC is not faster than a VB WIN32 written application. This is because the MFC framework is a lot bigger and slower than the plain Win32 API.

Comparing a VB WIN32 written application with a Visual C++ WIN32 written application you feel find no difference in performance. They make use of the same dll's and the same compiler (at least VB6 and VC6 that I am sure about). The same goes for DLL's.

If you create an ocx or dll with the functions, and other stuff available, with the DllRegisterServer and the IClassFactory in either one of those products you will find no difference in execution.

Even DLL's and OCX's written in VB, though only a little bit slower depending on how you write the code (late binding mostly), and which functions you use are only a little bit slower in execution.

regards,
CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6207951
Basically what I am saying is that the way you decide to write your code will make the application run faster or not. Win32 API will give you the best performance, and never using late binding.

Regards,
CJ
0
 

Author Comment

by:aft
ID: 6208088
why visual basic controls is more slower?
0
 

Author Comment

by:aft
ID: 6208111
it have to be with the same speed because both converted to machine code
0
 

Author Comment

by:aft
ID: 6208204
it have to be with the same speed because both converted to machine code
0
 
LVL 4

Accepted Solution

by:
prashant_n_mhatre earned 10 total points
ID: 6208228
I guess C offers the power of pointers, VB doesn't. Also VB is object-based language.

Machine code will be different for different programs doing the same thing. Even the optimization performed by compiler will be different in both cases.

As I already saild "if properly implemented..Visual C is always faster than Visual Basic."

So your implementation matters...You can write bad code in VC than in VB. It is up to you.

If you are using only 'C', there is no question of LATE BINDING.
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 6209318
The controls are all the same. The ones you use in MFC and VB are both coming from the same ocx-files. It's just the functions you use that matters, and how they are being handled with. A

Machinecode will be different for each compiler, prashant_n_mhatre is correct with what he said.

Regards,
CJ
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question