• XbCreateEventKey(cKeyName, cMsgFileName)


    • Description
      This function is used to create an EventKey in the Registery of the local machine.

    • Parameter(s)

      cKeyName
      the name of a new event key. This key is storing in your registery-file.

      cMsgFileName
      Specifies the path and name of the message-file you need for this event key.
      In this Version of XbEvent you can only use the path and filename, where is
      XbEvent.Dll is stored.

    • Return Value
      If the function succeeds, the return value is 0, every other value means an
      error. To get extended error information, call XbEventGetLastError.
  • Sample
    #include "xbevent.ch"

    local cKey          := "MyEventEntry"
    local cMsgFileName  := "C:\WINNT\SYSTEM32\XBEVENT.DLL"

    //
    // create an Eventlog-Key
    //
    if (XbCreateEventKey(cKey, cMsgFileName) != 0)
      XbEventGetLastError(@cError)
      ? "Error :", cError
    endif