Specifies that the DLL should be loaded using the Windows flag LOAD_WITH_ALTERED_SEARCH_PATH, which, in essence, causes the loader to search for any dependent DLLs in the directory containing the DLL. Use delay loading if you want to call a DLL function for which you don't know whether it will actually be available at runtime: if the DLL function can't be called, the Pascal script will still run but throw an expection when you try to call the DLL function which you can catch to handle the absence of the DLL function. This does not happen if you specify delay loading using 'delayload'. Normally the Pascal script checks at startup whether the DLL function can be called and if not, refuses to run. Specifies that the DLL should be delay loaded. The third form specifies additional one or more options for loading the DLL, separated by spaces: Valid calling conventions are: 'stdcall' (the default), 'cdecl', 'pascal' and 'register'. The second form specifies that the DLL function should be called using a special calling convention. All standard Win32 API functions use 'stdcall' just like most custom DLL functions. The first form specifies that the DLL function should be called using default calling convention, which is 'stdcall'. If your function has for example prototype function A(B: Integer): Integer, the following three forms are supported: To be able to call a DLL function you should first write the function prototype as normal but instead of then writing the function body, you use the 'external' keyword to specify a DLL. This includes both standard Win32 API functions inside standard Windows DLLs and custom functions in custom made DLLs (how to make such a custom DLL is beyond the scope of this help file). The Pascal script can call functions inside external DLLs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |