Jump to content

GreOpenJournalFile: Difference between revisions

From EDM2
Created page with "GreOpenJournalFile opens a journal file for play. The journal file must exist and must contain valid journaled calls. This function is supported by the graphics engine. ==..."
 
Ak120 (talk | contribs)
m Augiasstall
 
Line 1: Line 1:
GreOpenJournalFile opens a journal file for play. The journal file must exist and must contain valid journaled calls.  
GreOpenJournalFile opens a journal file for play. The journal file must exist and must contain valid journaled calls.


This function is supported by the graphics engine.  
This function is supported by the graphics engine.


==Syntax==
==Syntax==
  GreOpenJournalFile(pszFileName, flOption, cBufSize, pInstance, lFunction);
GreOpenJournalFile(pszFileName, flOption, cBufSize, pInstance, lFunction)


==Parameters==
==Parameters==
;pszFileName (PSZ) - input  
;pszFileName (PSZ) - input:Pointer a string containing the file name.
:Pointer a string containing the file name.  
;flOption (ULONG) - input:An option flag that identifies the type of journal file.
 
:Valid values are:
;flOption (ULONG) - input  
::JNL_PERM_FILE - A disk file with the name pszFileName, which was created by using [[GreCreateJournalFile]] (JNL_PERM_FILE).
:An option flag that identifies the type of journal file.  
::Bit 3 - A shared memory file pointed to by pszFileName and already filled with complete journal records. One way this journal file might have been created is by using GreCreateJournalFile (JNL_USERRAM_FILE) and being filled by the engine.
 
;cBufSize (ULONG) - input:Size of buffer required for the file.
:Valid values are:  
;pInstance (PVOID) - input:Pointer to instance data.
 
;lFunction (ULONG) - input:High-order WORD=flags; low-order WORD=NGreOpenJournalFile.
::JNL_PERM_FILE A disk file with the name pszFileName, which was created by using GreCreateJournalFile (JNL_PERM_FILE).  
 
::Bit 3 A shared memory file pointed to by pszFileName and already filled with complete journal records. One way this journal file might have been created is by using GreCreateJournalFile (JNL_USERRAM_FILE) and being filled by the engine. .
 
;cBufSize (ULONG) - input  
:Size of buffer required for the file.  
 
;pInstance (PVOID) - input  
:Pointer to instance data.  
 
;lFunction (ULONG) - input  
:High-order WORD=flags; low-order WORD=NGreOpenJournalFile.  


==Return Code==
==Return Code==
;rc (ULONG) - returns  
;rc (ULONG) - returns:Return codes.
:Return codes.  
:This function returns the journal file handle (ULONG), or if an error occurs, it returns NULL.
 
Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:
:This function returns the journal file handle (ULONG), or if an error occurs, it returns NULL.  
:*PMERR_BASE_ERROR
 
:Possible Errors Detected:   When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:  
 
:*PMERR_BASE_ERROR  
:*PMERR_INSUFFICIENT_MEMORY  
:*PMERR_INSUFFICIENT_MEMORY  
:*PMERR_INV_IN_AREA  
:*PMERR_INV_IN_AREA  
Line 42: Line 26:
:*PMERR_INV_JOURNAL_OPTION  
:*PMERR_INV_JOURNAL_OPTION  
:*PMERR_RAM_JNL_FILE_TOO_SMALL  
:*PMERR_RAM_JNL_FILE_TOO_SMALL  
 
Refer to the "Error Explanations" section of the ''Presentation Manager Programming Reference'' for further explanation.
:Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.  
 
==Sample Code==
<PRE>
#define INCL_GRE_JOURNALING
#include <os2.h>
 
PSZ      pszFileName;  /*  Pointer a string containing the file name. */
ULONG    flOption;    /*  An option flag that identifies the type of journal file. */
ULONG    cBufSize;    /*  Size of buffer required for the file. */
PVOID    pInstance;    /*  Pointer to instance data. */
ULONG    lFunction;    /*  High-order WORD=flags; low-order WORD=NGreOpenJournalFile. */
ULONG    rc;          /*  Return codes. */
 
rc = GreOpenJournalFile(pszFileName, flOption,
      cBufSize, pInstance, lFunction);
</PRE>


[[Category:Gre]]
[[Category:Gre]]

Latest revision as of 08:45, 2 January 2020

GreOpenJournalFile opens a journal file for play. The journal file must exist and must contain valid journaled calls.

This function is supported by the graphics engine.

Syntax

GreOpenJournalFile(pszFileName, flOption, cBufSize, pInstance, lFunction)

Parameters

pszFileName (PSZ) - input
Pointer a string containing the file name.
flOption (ULONG) - input
An option flag that identifies the type of journal file.
Valid values are:
JNL_PERM_FILE - A disk file with the name pszFileName, which was created by using GreCreateJournalFile (JNL_PERM_FILE).
Bit 3 - A shared memory file pointed to by pszFileName and already filled with complete journal records. One way this journal file might have been created is by using GreCreateJournalFile (JNL_USERRAM_FILE) and being filled by the engine.
cBufSize (ULONG) - input
Size of buffer required for the file.
pInstance (PVOID) - input
Pointer to instance data.
lFunction (ULONG) - input
High-order WORD=flags; low-order WORD=NGreOpenJournalFile.

Return Code

rc (ULONG) - returns
Return codes.
This function returns the journal file handle (ULONG), or if an error occurs, it returns NULL.

Possible Errors Detected: When an error is detected, the graphics engine calls WinSetErrorInfo to post the condition. Reasons for failure of this function include:

  • PMERR_BASE_ERROR
  • PMERR_INSUFFICIENT_MEMORY
  • PMERR_INV_IN_AREA
  • PMERR_INV_IN_PATH
  • PMERR_INV_JOURNAL_OPTION
  • PMERR_RAM_JNL_FILE_TOO_SMALL

Refer to the "Error Explanations" section of the Presentation Manager Programming Reference for further explanation.