How to pass a NULL pointer to a DLLI need to have access to some system DLLs from Microsoft. In some cases it is possible for example to get the size for a transfer/string buffer by passing first a NULL pointer to the function, later allocating space for that buffer and later call the same function with the address of that buffer., , For the second functionality it is necessary to declare the function in the Uses section with a CPTR argument (instead of CLONG, which allows directly to generate the NULL pointer). By this way every variable is passed by its address. How can I now directly pass a NULL pointer to the function without using an intermediate DLL exporting two different functions covering the two different functionalities by calling the desired function in the original DLL with different arguments? |