Hi, I have a custom action DLL. This DLL has some WinAPI calls and if any error comes I want to log it to msi logs. Following is the sample code I am using.
rc = MsiEnableLog(INSTALLLOGMODE_VERBOSE,L"C:\\log.txt",INSTALLLOGATTRIBUTES_APPEND); if(rc != ERROR_SUCCESS ) ::MessageBox(NULL, L"MsiEnableLog failed.", L"Error", MB_OK); PMSIHANDLE newHandle = ::MsiCreateRecord(2); wchar_t szTemp[MAX_PATH * 2]; wcscpy(szTemp,L"---- Please Log This----"); rc = MsiRecordSetString(newHandle, 0, szTemp); if(rc != ERROR_SUCCESS ) ::MessageBox(NULL, L"MsiRecordSetString failed.", L"Error", MB_OK); rc = MsiProcessMessage(hInstaller, INSTALLMESSAGE_INFO, newHandle); if(rc != IDOK ) ::MessageBox(NULL, L"MsiProcessMessage failed.", L"Error", MB_OK); MsiProcessMessage is returning 0 which means No action was taken. Also, these messages will get logged in C:\log.txt. What all setting do I need to do if I want to log it to the msi logs that are created in temp directory or in the log file that is specified by /l option? Can anyone help? Thanks in Advance, Sneha -- View this message in context: http://www.nabble.com/Unable-to-log-through-DLL-using-MsiProcessMessage-tp15850263p15850263.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users