Quote:
|
So let me get this straight for my sake and anyone else's who might look at this and not know--the Call Library Function Node basically calls/uses a function in a library that you specify. A .dll file is a compressed library with many functions that can be used universally with many systems/programs. And user32.dll is a library that has many/all of the Windows API functions, which can be used by other programs to interact with windows. Aren't they written in a unique programming language that is very similar to C/Java/most text-based languages?
|
You seem to have it pretty straight. Libraries are a general concept found on most operating systems. They are a collection of functions that do useful things, and are hopefully documented and grouped according to their functionality. What are they written in? It depends. On the original Mac and Lisa, they were in Pascal and some assembly. C was the language developed for developing unix, and not surprisingly, most of the libraries for linux are still written in C. I believe the NeXT was built around Objective C, BeOS may have had some amount of C++. There were OSes built around Lisp, and of course before C, most OSes were written in Assembly or even lower level.
In reality, the language the functions are written in isn't important, but the calling conventions are. Notice the dialog for clf asks you the calling conventions? That is because Windows actually has several conventions. These conventions specify how a calling function passes parameters to the called function and retrieves results. This is done differently on different computer architectures and on different OSes.
Given the information you gave LV about the parameters, it takes the wire information and pushes the parameters onto the stack according to the stdcall conventions, executes the call instruction with the address to your function in the library, then retrieves the results and does any stack or register cleanup as specified by the convention. As long as the conventions are followed, any language can reuse code from any other. To flip roles, you can build a DLL from LV so that it can be called from any program capable of calling into a Windows library.
Greg McKaskle