[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 1

ldahread Subroutine

Purpose

Reads the archive header of a member of an archive file.

Library

Object File Access Routine Library (libld.a)

Syntax


#include <stdio.h>
#include <ar.h>
#include <ldfcn.h>

int ldahread( ldPointer, ArchiveHeader)
LDFILE *ldPointer;
ARCHDR *ArchiveHeader;

Description

If the TYPE(ldPointer) macro from the ldfcn.h file is the archive file magic number, the ldahread subroutine reads the archive header of the extended common object file currently associated with the ldPointer parameter into the area of memory beginning at the ArchiveHeader parameter.

Parameters

ldPointer Points to the LDFILE structure that was returned as the result of a successful call to ldopen or ldaopen.
ArchiveHeader Points to a ARCHDR structure.

Return Values

The ldahread subroutine returns a SUCCESS or FAILURE value.

Error Codes

The ldahread routine fails if the TYPE(ldPointer) macro does not represent an archive file, or if it cannot read the archive header.

Related Information

The ldfhread (ldfhread Subroutine) subroutine, ldgetname (ldgetname Subroutine) subroutine, ldlread, ldlinit, or ldlitem (ldlread, ldlinit, or ldlitem Subroutine) subroutine, ldshread or ldnshread (ldshread or ldnshread Subroutine) subroutine, ldtbread (ldtbread Subroutine) subroutine.

Subroutines, Example Programs, and Libraries in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]