Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

MSOAVINFO Structure

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;
    LPSTORAGE lpstgVBA;
} MSOAVINFO;
cbSize

Integer. Specifies the size of an MSOAVINFO structure.

fPath

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

fReadOnlyRequest

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

fInstalled

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

fHttpDownload

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

fVBAStg

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.

hwnd

Handle to the parent window of the Microsoft Office application.

u
pwzFullPath

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

lpStg

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

pwzHostName

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

szOrigURL

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

lpstgVBA

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.

ImportantImportant:

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))

Header

Msoav.h

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).

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.