Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
08/21/02 10:13
Read: times


 
#27609 - RE: Visual Basic and 8052.
Hi all,
I'd like to add an innovative twist to this discussion... how about VB + C application?

The problem most often faced with C is in providing a GUI. I've come across several discussions where people discuss the tradeoff between efficient code and need for a decent UI when its VB vs C/C++.

Well there's a technique I came across where you can actually access the functions for a C DLL in VB. I used this method once, where I created an easy drag-and-drop interface thru VB but all the functionality was encapsulated in a C DLL (actually a C wrapper over a VC++ funcitons)

Its pretty easy to do. You have to simply write a .ODL file which exports the functions to other applications like VB. Its all given on this link:

http://support.microsoft.com/default.a...US;q189133

However the issue I believe may be in developing an asynchronous, or interrupt-based application. In that case I surmise you will have to do some VC++ coding to raise events on arrival of data to signal the VB module to read it from a C buffer. It should not be too difficult...

The reason VB is so bulky and slow is that it does *EVERYTHING* over COM (Microsoft's Component Object Modelling). So there are innumerable overhead calls to execute a single function call. Using VB with C, there will only be one pesudo-COM call, and the rest of the execution will be in simple C.

The GUI part of the code will still be bulky, but the speed of execution should improve vastly. I haven't tried this method for any complex or hardware-dependent application, but I don't see why it shouldn't work.

Another similar alternative is using a Java frontend and a C backend through JNI (Java Native Interface).

Linux is probably the best to go, since you have total access to internals and can directly play with the hardware anyway you want.

kundi

List of 19 messages in thread
TopicAuthorDate
Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and C            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and C            01/01/70 00:00      
RE: to Kunal Kandekar            01/01/70 00:00      
RE: Visual Basic and C            01/01/70 00:00      
RE: Visual Basic and 8052.            01/01/70 00:00      
RE: Visual Basic and 8052. to andy            01/01/70 00:00      
RE: Visual Basic and 8052. to andy            01/01/70 00:00      
RE: to Kunal Kandekar            01/01/70 00:00      
RE: Visual Basic and 8052. to andy            01/01/70 00:00      

Back to Subject List