In a detect section, the line to call a DLL function has the following format:
var = value ? LibHandle_or_Path FunctionName [Args]*
This is similar to other detect lines that use the var = value format. If the detect section is called using the read-syms command, value is assigned to var. But if the detect section is called using the detect command, the DLL function is called to get a value assigned to var.
The DLL function called from a detect section must conform to the prototype shown below. The function’s return value indicates the actual number of bytes returned by the function in the lpszValue buffer. If the return value is greater than the size of the buffer, cbValue, the Setup program reallocates the buffer to the specified size and recalls the function.
UINT FunctionName(lpszArgs[], cArgs, lpszValue,
cbValue)
LPSTR lpszArgs[];
USHORT cArgs;
LPSTR lpszValue;
UINT cbValue);