Title: [OT: NOT MFC ] ReportEvent

Hi All,

I am writing a string to the application event log as below.

<CODE>
      TCHAR szModulePathName[_MAX_PATH];

      _tcscpy(szModulePathName, _T("<file://C:\\Program Files\\ValidateWH\\Bin\\Support\\20040812\\>"));

      // Write to the application event log
      LPTSTR lpszMsg[1];
      int nCount = 0;
      HANDLE h;

      lpszMsg[0] = (LPTSTR)szModulePathName;
      nCount = 1;

      h = RegisterEventSource(NULL, pm_pszEventSource);
 
      ReportEvent(h, EVENTLOG_ERROR_TYPE, (WORD)0, pm_dwEventID,
                NULL, nCount, 0, (LPCTSTR*)&lpszMsg, NULL);
 
      DeregisterEventSource(h);
</CODE>

On a WIn2K Pro workstation this results in a clickable hpyer-link when this entry is viewed in EventVwr but on WinXP Pro the same code diesnot produce a clickable hyper-link.  Obviously there is a way to achieve a clickable hyper-link in the Event Log on WinXP - as some of the OS entries contain one - but my code (above) doesn't produce one.

Anyone with any ideas??

Thanks in advance,
Craig

---
Craig Lemon
Information Developer,
IT Services, Business Solutions
CHRISTCHURCH CITY COUNCIL
Phone: +64 3 941 8345
Cell: +64 27 414 4211
http://www.ccc.govt.nz
---




**********************************************************************
This electronic email and any files transmitted with it are intended
solely for the use of the individual or entity to whom they are addressed.

The views expressed in this message are those of the individual
sender and may not necessarily reflect the views of the Christchurch
City Council.

If you are not the correct recipient of this email please advise the
sender and delete.

Christchurch City Council
http://www.ccc.govt.nz
**********************************************************************
_______________________________________________
msvc mailing list
[EMAIL PROTECTED]
See http://beginthread.com/mailman/listinfo/msvc_beginthread.com for subscription 
changes, and list archive.

Reply via email to