File Content Extraction 25.2
Viewing SDK Programming Guide

# VAPIMWP_INIT_SETPASSWORD

Sets the password to use to open a password-protected file before the file is opened. Currently,you can use this to set a password for ZIP and PST files. This is a parameter of the `VAPIM_INIT` message.

## Syntax

    SendMessage (hWndVAPI, VAPIM_INIT, VAPIMWP_INIT_SETPASSWORD,
                (LPARAM) (LPCTSTR) pPasswordInfo );

## Arguments

Argument | Description
--- | ---
`hWndVAPI` | The handle of the VAPI window.
`pPasswordInfo` | A pointer to a password string.

## Returns

`SendMessage()` returns `TRUE` if successful, or `FALSE` if it fails.

## Discussion

- For password-protected PST files, you must call this message before the `VAPIMWP_INIT_OPEN_DOCUMENT` message.

- For password-protected ZIP files, you can call this message after the `VAPIMWP_INIT_OPEN_DOCUMENT`, but you must call it before the protected subfile is extracted or viewed.

- Unicode passwords are not supported.

Copyright 2016-2025 Open Text
Version 25.2 | Last updated April 2025

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: File Content Extraction 25.2

Topic Title: VAPIMWP_INIT_SETPASSWORD