• 【XLL API 函数】 xlGetInst


    返回正在调用 DLL 的 Excel 实例的实例句柄。

    原型

    Excel4(xlGetInst, LPXLOPER pxRes, 0); /* returns low part only */
    Excel12(xlGetInst, LPXLOPER12 pxRes, 0); /* returns full handle */
    

    参数

    这个函数没有参数

    属性值/返回值

    实例句柄位于 val.w 字段中。

    备注

    这个函数可用于区别调用了DLL的多个Excel实例。

    当你使用 Excel4/Excel4v 调用这个函数,将返回一个 16 位长度的 XLOPER 整型变量 和 32位长度的 XLOPER12 整型变量。

    实例

    下面的实例比较两个实例:SAMPLESEXAMPLEEXAMPLE.C

    short WINAPI xlGetInstExample(void)
    {
        XLOPER xRes;
        static HANDLE hOld = 0;
        int iRet;
    
        Excel4(xlGetInst, (LPXLOPER)&xRes, 0);
    
        if((unsigned int)xRes.val.w != hOld)
            iRet = 0;
        else
            iRet = 1;
    
        hOld = xRes.val.w;
    
        return iRet;
    }
    
    
    
  • 相关阅读:
    hdu 3496
    poj 2374
    zoj 3399
    poj 1321
    sgu 365
    hdu 3555
    poj 3345
    poj 2355
    Android重命名文件
    在workflow中传值的sample
  • 原文地址:https://www.cnblogs.com/boluoke/p/5980289.html
Copyright © 2020-2023  润新知