Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Custom GDI+ class
Winsock: sending email messages (SMTP, port 25)
Using EnumPrinters function to enumerate locally installed printers
Semi-transparent Form
Custom HttpRequest class (WinHTTP)
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
How to convert a bitmap file to monochrome format (1 bpp)
Custom HttpRequest class (WinINet)
Compressing and decompressing files with Windows API Runtime Library routines
Custom FTP Class for Visual FoxPro application
Printing Image File, programmatically set print page orientation to landscape
How to create MD-5 and SHA-1 hash values from a string
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
GDI+: Creating thumbnails to preview images in a directory
Adding icon to the systray (requires VFP9)
Extended MessageBox Class
How to ping a remote site using ICMP API calls
GDI+: Storing content of the Clipboard to a bitmap file
Transparent Menu Class (requires VFP9)
Using Month Calendar Control (VFP9, Comctl32.dll)
How to activate Windows Calculator
How to detect if additional monitor is connected and active
How to print FoxPro form
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: 42  
    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-2010 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.0.85), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (38.107.191.109)
    1.75 min.Function: 'DeleteDC'
    20.07 min.Function: 'GetEnvironmentStrings'
    Function group: 'Process and Thread'
    23.47 min.
    2 day(s)Function: 'waveInReset'
    Function group: 'Windows Multimedia'
     Function: 'WindowFromDC'
    Function group: 'Painting and Drawing'
     
    Function group: 'Clipboard'
     Function: 'midiOutShortMsg'
    Function group: 'Windows Multimedia'
     Function: 'midiOutReset'
    Function group: 'Windows Multimedia'
     Example: 'Get the power status of your laptop computer'
     
    Function group: 'Shell Lightweight Utility APIs -- misc. functions'
    Google
    Advertise here!