Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Windows Shell Icons displayed and exported to ICO files (Vista)
Winsock: reading email messages (POP3, port 110)
Animating a transition of the VFP form (a wire-frame rectangle)
Reading the state of mouse buttons within DO WHILE loop
Retrieving information about the main VFP window
Switching between keyboard layouts
Using the DrawText function
Using the SystemParametersInfo function
Wininet last error description
Drawing standard Windows icons
GDI+: Storing content of the Clipboard to a bitmap file
How to enable the SE_SHUTDOWN_NAME privilege for the application
Locking and unlocking file of a VFP table
Storing content of the Clipboard to a bitmap file
Testing if a connection to an Url can be established
Tracking mouse movement to detect when to start dragging
Exporting DLL icon resources as .ICO files
Start an executable from VFP application by using the CreateProcess
Displaying the associated icons and descriptions for files and folders
Obtaining Shell32.dll version
Adding supplementary data to AVI files
Class library providing access to the System Registry
GDI+: Scrolling through large image using the mouse
How to build UDP responder
Reading entries from Event logs

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
Before you begin:
With Event Viewer, users can monitor events recorded in the Application, Security, and System logs.



See also:
  • How to register custom Event Log source
  • Writing entries to custom Event Log
  • Reading from INI files
  • Writing to INI files
  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    8598 bytes  
    Created: 2007-02-17 17:01:25  
    Modified: 2010-06-30 09:16:13  
    Visits in 7 days: 127  
    Listed functions:
    ClearEventLog
    CloseEventLog
    GetEventLogInformation
    GetLastError
    GetNumberOfEventLogRecords
    GetOldestEventLogRecord
    GlobalAlloc
    GlobalFree
    GlobalSize
    OpenEventLog
    ReadEventLog
    Printer friendly API declarations
    My comment:
    Test as follows:
    LOCAL welog As WindowsEventLog,;
            werecord As WindowsEventRecord, nReccount

    welog = CREATEOBJECT("WindowsEventLog",;
            NULL, "Application")

    WAIT WINDOW NOWAIT "Reading log records..."
    nReccount = welog.ReadLogRecords()
    WAIT CLEAR

    CREATE CURSOR csResult ( recordnumber I,;
            timegenerated T, timewritten T,;
            eventid I, eventtype I, numstrings I,;
            eventcategory I, stringoffset I,;
            datalength I, dataoffset I, strings M,;
            eventdata M, eventbuffer M,;
            sysname C(32), source C(200))

    FOR EACH werecord IN welog.WindowEventRecords
            WITH werecord
                    INSERT INTO csResult VALUES (.recordnumber,;
                            WE_START_DATETIME+.timegenerated,;
                            WE_START_DATETIME+.timewritten,;
                            .eventid, .eventtype, .numstrings,;
                            .eventcategory, .stringoffset,;
                            .datalength, .dataoffset,;
                            .strings, .eventdata, .eventbuffer,;
                            .sysname, .source)
            ENDWITH
    NEXT

    * * *
    Read also: Using the Windows Event Log from Visual FoxPro by Craig Berntson.
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (50.19.155.235)
    1.64 hrs.Example: 'How to hide your program from the Close Program dialog (Win9* only)'
    6.99 hrs.Example: 'Establishing connection using the SQLDriverConnect'
    11.83 hrs.Function: 'SetSysColors'
    12.7 hrs.Example: 'How to create transparent areas inside a form -- punching holes in the form'
     Function: 'GetClassInfo'
    13.19 hrs.Example: 'How to find the application associated with a file name'
     Example: 'Using Change Notification Objects to monitor changes to the printer or print server'
    23.27 hrs.Example: 'Creating irregularly shaped FoxPro form using transparency color key'
    1 day(s)Example: 'Printing text with the Escape function'
     Example: 'Form Magnifier'
    Google
    Advertise here!