2.2.5.1.4 file::GetHandle

Description

Get the handle of current open file.

Syntax

OUIP GetHandle( )

Parameters

Return

A variable of type UINT. It is file::hFileNull (an operating-system-independent empty file indicator) if the handle has not been assigned.

Examples

EX1

int file_GetHandle_ex1()
{
    file ff;
    bool bOK = ff.Open("C:\\test.txt", file::modeCreate | file::modeReadWrite);
    if(!bOK)
    {
        out_str("Failed to open file C:\\test.txt");
        return 0;
    }
    UINT hFile = ff.GetHandle();  
    out_int("hFile = ",hFile);
    return 1;
}

Remark

See Also

Header to Include

origin.h