---
name: "DlpWriteResource"
section: "3"
platform: "linux"
package: "coldsync"
version: "3.0+pre3-3"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/DlpWriteResource"
---

# DlpWriteResource(3)

write a resource to a PalmOS device

## NAME

**DlpWriteResource** – write a resource to a PalmOS device

## LIBRARY

*libpconn*

## SYNOPSIS

**#include \<palm.h\>**

**#include \<pconn/pconn.h\>**

*int*\

**DlpWriteResource**(*PConnection \*pconn*, *const ubyte handle*, *const udword type*, *const uword id*, *const uword size*, *const ubyte \*data*);

## DESCRIPTION

**DlpWriteResource** writes a resource to a database on a Palm. The database must already be open for writing.

*handle* is a database handle, as returned by [DlpOpenDB(3)](/DlpOpenDB/3.md).

*type* specifies the resource's four-character type, with the first character in the most-significant eight bits.

*id* specifies the resource ID.

*size* specifies the length of the resource, in bytes.

*data* points to the resource data.

## RETURN VALUE

**DlpWriteResource** returns 0 if successful, or a negative value otherwise.

## SEE ALSO

[libpconn(3)](/libpconn/3.md), [DlpOpenDB(3)](/DlpOpenDB/3.md), [DlpWriteRecord(3)](/DlpWriteRecord/3.md).
