What I've got at the moment:
Type: 131232 (Call a function in a standard dll, in the path of the destination machine)
Function name: SearchPathA
Arguments: (Type, source, Value)
STRING, inProperty, NULLSTRING
STRING, inProperty, SEARCHFILE
STRING, inProperty, EXTENSION
NUMBER, inProperty, BUFFERSIZE
STRING, outProperty, FILEPATH
POINTER, outProperty, FILENAME
The return type is a number, the return property is RETURNVALUE.
The source is set to Kernel32.dll
The SearchPath function has the following prototype:
DWORD SearchPath (
LPCTSTR lpPath,
LPCTSTR lpFileName,
LPCTSTR lpExtension,
DWORD nBufferLength,
LPTSTR lpBuffer,
LPTSTR *lpFilePart
)
I think I'm passing in all the right details. After running the custom action, the return value is 0 (function failed), the filepath is blank and the filename pointer is 0. To get error information, I need to call GetLastError, which I can't do as part of the custom action.
Does anybody have any suggestions? Is this call possible?