Skip to content

luisMedrano/winObjCLoggin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C++ loggin implentation

State of the project:

  • The Objective-C implementation (single view app)
  • Access to C++ class to add Windows (VisualStudio objects) to log to file
  • C++ implementation following the msdn sample:
#using <System.dll>

using namespace System;
using namespace System::Diagnostics;
using namespace System::Threading;
int main()
{

   // Create the source, if it does not already exist.
   if (  !EventLog::SourceExists( "MySource" ) )
   {
      //An event log source should not be created and immediately used.
      //There is a latency time to enable the source, it should be created
      //prior to executing the application that uses the source.
      //Execute this sample a second time to use the new source.``
      EventLog::CreateEventSource( "MySource", "MyNewLog" );
      Console::WriteLine( "CreatingEventSource" );
      // The source is created.  Exit the application to allow it to be registered.
      return 0;
   }


   // Create an EventLog instance and assign its source.
   EventLog^ myLog = gcnew EventLog;
   myLog->Source = "MySource";

   // Write an informational entry to the event log.    
   myLog->WriteEntry( "Writing to event log." );
}
  • issues: Console::WriteLine("Test") The console object it's not been recognize by visual studio once is converted using vsimporter.exe

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published