Last modified: July 13, 2010

Applies to: Office 2007 | Office 2010

Contains the attributes of a particular zone.

typedef struct _msoavinfo {
    int cbSize;
    struct {
        ULONG fPath:1;
        ULONG fReadOnlyRequest:1;
        ULONG fInstalled:1;
        ULONG fHttpDownload:1;
        ULONG fVBAStg:1;
    HWND hwnd;
    union {
        WCHAR *pwzFullPath;
        LPSTORAGE lpStg;
    } u;
    WCHAR *pwzHostName;
    WCHAR *szOrigURL;


Integer. Specifies the size of an MSOAVINFO structure.


Unsigned long integer. Determines whether to use pwzFullPath or lpstg. If fPath is set to TRUE, use pwzFullPath. Otherwise use lpstg.


Unsigned long integer. Specifies whether the file is to be opened as a read-only file.


Unsigned long integer. Indicates whether the file specified by pwzFullPath is an installed file.


Unsigned long integer. Indicates whether the file specified by pwzFullPath is a temporary file downloaded from HTTP/FTP.


Unsigned long integer value. Specifies the Visual Basic for Applications (VBA) storage for encrypted macros. If fVBAStg is set, lpstgVBA is the address of the IStorage (the VBA storage) for encrypted macros. Because some callers may set fVBAStg without supplying the lpstgVBA address, the implementer must check cbSize and ensure that lpstgVBA is within the MSOAVINFO structure before it uses it. For more information, see the note in the Remarks section.


Handle to the parent window of the Microsoft Office application.


Address of a wide character string that contains the full path of the file about to be opened.


Address of the OLE storage location of the file about to be opened.


Address of a wide character string that contains the host application name for the antivirus scanner user interface.


Address of a wide character string that contains the URL of the origin of a downloaded file.


Address of the OLE storage (the VBA storage within the document) for encrypted macros.

Supported Windows operating systems implement MSOAVINFO as ANSI and Unicode structures.

Important note Important

Because some MSOAVINFO structure members are handles and pointers (for example, the hwnd and lpstg members, which are typed as HWND and LPSTORAGE), the size of the structure varies depending whether you are using 32-bit or 64-bit version of Microsoft Office. Code which compares the cbSize member of the structure to a fixed constant instead of a value derived from the size of the structure members will not port from 32-bit to 64-bit versions of Microsoft Office. To determine whether lpstgVBA member is valid and should be checked, you can use the MsoFVerifyDecryptedVBAStorage macro in the Msoav.h file, which is reproduced in the following code sample.

#define MsoFVerifyDecryptedVBAStorage(pmsoavinfo) \
    (((pmsoavinfo) != NULL) && \
    (reinterpret_cast<size_t>(pmsoavinfo) + (pmsoavinfo)->cbsize >= reinterpret_cast<size_t>(&((pmsoavinfo)->lpstgVBA)) + sizeof(LPSTORAGE)) && \
    ((pmsoavinfo)->fVBAStg) && \
    ((pmsoavinfo)->lpstgVBA != NULL))



Minimum Availability

Microsoft Office

Minimum operating systems

Windows XP with Service Pack (SP) 3 (32-bit), Windows Vista with SP1 (32-bit or 64-bit), Windows Server 2003 R2 (32-bit or 64-bit) with MSXML 6.0 installed, Windows Server 2008 with SP2 (32-bit or 64-bit), Windows 7 (32-bit or 64-bit).