---
name: "bson_oid_init"
section: "3"
platform: "linux"
package: "libbson-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bson_oid_init"
---

# bson\_oid\_init(3)

## SYNOPSIS

```
void
bson_oid_init (bson_oid_t *oid, bson_context_t *context);
```

## PARAMETERS

- •

  **oid**: A *bson\_oid\_t*.

- •

  **context**: An *optional* *bson\_context\_t* or NULL.

## DESCRIPTION

Generates a new *bson\_oid\_t* using either **context** or the default *bson\_context\_t*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
