---
name: "PX_new2"
section: "3"
platform: "linux"
package: "pxlib-dev"
version: "0.6.9-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PX_new2"
---

# PX\_new2(3)

create new instance of Paradox file

## NAME

PX\_new2 — create new instance of Paradox file

## SYNOPSIS

\#include \<paradox.h\>

pxdoc\_t\* PX\_new2(void  (\*errorhandler)(pxdoc\_t \*p, int type, const char \*msg, void \*data), void\* (\*allocproc)(pxdoc\_t \*p, size\_t size, const char \*caller), void\* (\*reallocproc)(pxdoc\_t \*p, void \*mem, size\_t size, const char \*caller), void  (\*freeproc)(pxdoc\_t \*p, void \*mem))

## DESCRIPTION

Creates a new instance of a Paradox file. This function, [PX\_new(3)](/PX_new/3.md)  or [PX\_new3(3)](/PX_new3/3.md)  must be called before any other functions. If the caller has its own  error and memory management functions they can be passed.

Calling [PX\_new2(3)](/PX_new2/3.md) is identical to calling [PX\_new3(3)](/PX_new3/3.md) with the  last parameter set to NULL.

## RETURN VALUE

Returns a pointer to an internal representation of a Paradox file or  NULL on failure.

## SEE ALSO

[PX\_new(3)](/PX_new/3.md), [PX\_new3(3)](/PX_new3/3.md), [PX\_open\_file(3)](/PX_open_file/3.md), [PX\_open\_fp(3)](/PX_open_fp/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
