---
name: "PX_new3"
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_new3"
---

# PX\_new3(3)

create new instance of Paradox file

## NAME

PX\_new3 — create new instance of Paradox file

## SYNOPSIS

\#include \<paradox.h\>

pxdoc\_t\* PX\_new3(void  (\*errorhandler)(pxdoc\_t \*p, int type, const char \*msg, void \*para), 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), void \*errorhandler\_user\_data)

## DESCRIPTION

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

In opposition to [PX\_new2(3)](/PX_new2/3.md) this function has an extra parameter  **errorhandler\_user\_data** which is a pointer to  user data which is passed to the error handler function as the  fourth parameter. This could be used to pass e.g. a widget pointer  where error message are to be output, or a context which otherwise had  to passed to the error handler through a global variable.

## 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\_new2(3)](/PX_new2/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.
