---
name: "CURLOPT_PROGRESSDATA"
section: "3"
platform: "linux"
package: "curl"
version: "8.23.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/CURLOPT_PROGRESSDATA"
---

# CURLOPT\_PROGRESSDATA(3)

pointer passed to the progress callback

## NAME

CURLOPT\_PROGRESSDATA - pointer passed to the progress callback

## SYNOPSIS

```
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_PROGRESSDATA, void *pointer);
```

## DESCRIPTION

Pass a *pointer* that is untouched by libcurl and passed as the first argument in the progress callback set with *[CURLOPT\_PROGRESSFUNCTION(3)](/CURLOPT_PROGRESSFUNCTION/3.md)*.

## DEFAULT

NULL

## PROTOCOLS

This functionality affects all supported protocols

## EXAMPLE

```
struct progress {
  char *private_data;
  size_t size;
};
static int progress_callback(void *clientp,
                             double dltotal,
                             double dlnow,
                             double ultotal,
                             double ulnow)
{
  struct progress *memory = clientp;
  printf("private: %p\n", (void *)memory->private_data);
  /* use the values */
  return 0; /* all is good */
}
int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    struct progress data;
    /* pass struct to callback */
    curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
    result = curl_easy_perform(curl);
    curl_easy_cleanup(curl);
  }
}
```

## AVAILABILITY

Added in curl 7.1

## RETURN VALUE

*[curl\_easy\_setopt(3)](/curl_easy_setopt/3.md)* returns a CURLcode indicating success or error.

CURLE\_OK (0) means everything was OK, non-zero means an error occurred, see *[libcurl-errors(3)](/libcurl-errors/3.md)*.

## SEE ALSO

[**CURLOPT\_PROGRESSFUNCTION**(3)](/CURLOPT_PROGRESSFUNCTION/3.md), [**CURLOPT\_XFERINFOFUNCTION**(3)](/CURLOPT_XFERINFOFUNCTION/3.md)
