[Migrated content. Thread originally posted on 19 January 2012]
Hi All,Does any one know how to COBOLIZE this?
support.microsoft.com/.../301279
Many thanks
Neil.
[Migrated content. Thread originally posted on 19 January 2012]
Hi All,[Migrated content. Thread originally posted on 19 January 2012]
Hi All, $set sourceformat"variable"
* COBOL version of MS KB 301279
$set ilusing"System"
$set ilusing"System.Diagnostics"
class-id. Module1.
method-id. Main static.
01 sSource string.
01 sLog string.
01 sEvent string.
01 sMachine string.
01 eLog type EventLog.
procedure division.
set sSource to "dotNET Sample App"
set sLog to "Application"
set sEvent to "Sample Event"
set sMachine to "."
if not type EventLog::SourceExists(sSource sMachine)
invoke type EventLog::CreateEventSource(sSource sLog sMachine)
end-if
set eLog to new EventLog(sLog sMachine sSource)
invoke eLog::WriteEntry(sEvent)
invoke eLog::WriteEntry(sEvent, type EventLogEntryType::Warning, 234, 3 as binary-short)
end method Main.
end class Module1.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.