大网数据广告活动
Windows 系统接口

VBAGetExprSrv

· 52CE 我爱测

Loads Visual Basic for Applications and retrieves a pointer to the IExpressionService object.

Loads Visual Basic for Applications and retrieves a pointer to the IExpressionService object.

void VBAGetExprSrv(HINSTANCE FAR* lphinstVBA,
                    IExpressionService FAR* FAR* lplpexprsrv,
                    LPBYTE lpStackMin,
                    USHORT usMajVersionExprSrv,
                    USHORT usMinVersionExprSrv,
                    DWORD dwUnused1,
                    DWORD dwUnused2);

Parameters

  • lphinstVBA
    The location where the instance handle to Visual Basic for Applications is stored.

  • lplpexprsrv
    The location where the expression service object pointer is to be stored.

  • lpStackMin
    The minimum stack location that Visual Basic for Applications can go to.

  • usMajVersionExprSrv
    Major version associated with the expression service DLL.

  • usMinVersionExprSrv
    Minor version associated with the expression service DLL.

  • dwUnused1
    This argument is reserved for future use.

  • dwUnused2
    This argument is reserved for future use.

Property Value/Return Value

None. Use lphinstVBA and lplpexprsrv to determine whether VBAGetExprSrv succeeded, as indicated in the Remarks section below.

Remarks

This function is exported from vbajet32.dll.

VBAGetExprSrv calls LoadLibrary() to load the Visual Basic for Applications DLL based on the version numbers that are passed in. The handle returned by LoadLibrary() is stored in the location pointed to by lphinstVBA. If the call is successful, the caller must eventually call FreeLibrary() on this hinstance.

The expression service object pointer is undefined when lphinstVBA points to an invalid hinstance. The expression service object pointer is null if creating the expression service fails.

The value of lpStackMin does not affect the expression service. lpStackMin is required by the Visual Basic for Applications initialization code, and this value must be supplied by the caller.

See Also

Other Resources

VBA Language References

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 09/04/2009
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。