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

# DlpReadUserInfo(3)

read and write user information to/from a PalmOS device

## NAME

**DlpReadUserInfo**, **DlpWriteUserInfo** – read and write user information to/from a PalmOS device

## LIBRARY

*libpconn*

## SYNOPSIS

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

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

*int*\

**DlpReadUserInfo**(*PConnection \*pconn*, *struct dlp\_userinfo \*userinfo*);

*int*\

**DlpWriteUserInfo**(*PConnection \*pconn*, *const struct dlp\_setuserinfo \*userinfo*);

## DESCRIPTION

**DlpReadUserInfo**() reads user information from *pconn* and stores it in *userinfo*. The *dlp\_userinfo* structure is defined in *\<pconn/dlp\_cmd.h\>* as

```
struct dlp_userinfo
{
	udword userid;
	udword viewerid;
	udword lastsyncPC;
	struct dlp_time lastgoodsync;
	struct dlp_time lastsync;
	ubyte usernamelen;
	ubyte passwdlen;
	char username[DLPCMD_USERNAME_LEN];
	ubyte passwd[256];
};
```

**DlpWriteUserInfo**() writes user information to the Palm. The *dlp\_setuserinfo* structure is defined as

```
struct dlp_setuserinfo
{
	udword userid;
	udword viewerid;
	udword lastsyncPC;
	struct dlp_time lastsync;
	ubyte modflags;
	ubyte usernamelen;
	const char *username;
};
```

The *modflags* field specifies which fields contain values and should therefore be uploaded. It should be the bitwise-or of zero or more of the following:

- DLPCMD\_MODUIFLAG\_USERID

  - DLPCMD\_MODUIFLAG\_SYNCPC

  - DLPCMD\_MODUIFLAG\_SYNCDATE

  - DLPCMD\_MODUIFLAG\_USERNAME

  - DLPCMD\_MODUIFLAG\_VIEWERID

  ## RETURN VALUE

**DlpReadUserInfo**() and **DlpWriteUserInfo**() return 0 if successful, or a negative value in case of error.

## SEE ALSO

[libpconn(3)](/libpconn/3.md), [new\_PConnection(3)](/new_PConnection/3.md).
