DLL Externals and LiveCode - what's a handle and how do I use it?
livfoss at mac.com
Wed May 11 13:07:31 EDT 2011
I am still struggling with the most basic concepts of externals for LC Windows apps, with the intention of using a third-party DLL to enhance the functionality of my current project. I have had some help from Ken Ray and others but I remain deeply clueless. Currently I'm looking at a DLL which has a number of functions relating to bitmaps. I want to be able to drive the DLL presumably by function calls, passing it parameters and receiving results. Relating to bitmap manipulation, the DLL seems to be offering me a 'handle' so that I can pick up a bitmap presumably from RAM. I realise this is a very elementary question, but can anyone tell me what a handle is (some sort of pointer probably, but what sort?) and what use it might be within a LiveCode app, given that I can eventually find out how to generate the right glue code to access it - Ken's note had helped me but he only deals with passing strings, and thus doesn't cover the idea of binary info, and I am not clear how to proceed.
I am very willing to read tutorial material on this but there doesn't seem to be much of it about. I am dimly beginning to see that there is more commonality than I guessed in the different OSs and IDEs when it comes to things like identifying and parameterising windows and other objects, the use of name spaces, and naming and calling functions and their parameters, but I still don't know enough to continue.
More information about the use-livecode