installshield调用第三方dll文件

在卸载程序时需要调用dll文件释放license,研究了下怎样去掉用第三方dll文件。

首先看官方的例子:

/*--------------------------------------------------------------*\
*
* InstallShield Example Script
*
* Demonstrates the UseDLL and the UnUseDLL functions.
*
* UseDLL is called to load an example .dll file into memory.  A
* function in this .dll file is then called to demonstrate how
* .dll functions can be used in an installation.  Finally,
* UnUseDLL is called to unload the example .dll file from memory.
*
* Note: This script requires that the constant DLL_FILE be set
*       to the fully qualified name of a .dll file that contains
*       a function called MydllReturn.  The format of that
*       function must match the prototype declaration below.
*
\*--------------------------------------------------------------*/
 
#define DLL_FILE "MyDLL.dll"
 
// Include Ifx.h for built-in InstallScript function prototypes.
#include "Ifx.h"
 
 
    // Prototype MydllReturn in Mydll.dll.
    prototype  Mydll.MydllReturn (INT, POINTER);
export prototype ExFn_UseDLL(HWND);
 
function ExFn_UseDLL(hMSI)
    STRING  svString;
    INT     nValue;
    POINTER psvString;
    NUMBER  nResult;
    BOOL    bDone;
begin
 
    // Load the .dll file into memory.
    nResult = UseDLL (DLL_FILE);
 
    if (nResult = 0) then
        MessageBox ("UseDLL successful \n\n.dll file loaded.", INFORMATION);
    else
        MessageBox ("UseDLL failed.\n\nCouldn't load .dll file.", INFORMATION);
        abort;
    endif;
 
    // bDone controls the following while loop.
    bDone = FALSE;
 
    // Loop while bDone is FALSE.
    while (bDone = FALSE)
        // Disable the Back button in installation dialogs.
        Disable (BACKBUTTON);
 
        // Get a string from the user.
        AskText ("Enter an example string.", "Example string.", svString);
 
        // Get a pointer to the string to pass to MydllReturn.
        psvString = &svString;
 
        // Get the string length to pass to MydllReturn.
        nValue = StrLength (svString);
 
        // Call MydllReturn.
        MydllReturn (nValue, psvString);
 
        // Display the string to observe how it was altered by MydllReturn.
        SprintfBox (INFORMATION, "UseDLL", "MydllReturn() changed the string " +
                   "to: %s", svString);
 
        // Give the user a chance to do another example.
        if (AskYesNo ("Do another example?", YES) = NO) then
            bDone = TRUE;
        endif;
    endwhile;
 
    // Remove the .dll file from memory.
    if (UnUseDLL (DLL_FILE) < 0) then
        MessageBox ("UnUseDLL failed.\n\n.dll file still in memory.", SEVERE);
    else
        MessageBox ("UnUseDLL successful.\n\n.dll file removed from memory.",
                   INFORMATION);
    endif;
 
end;

说明:

文件名:Mydll.dll

声明:prototype Mydll.MydllReturn (INT, POINTER);

prototype [CallingConvention] [ReturnType] DLLName.FunctionName( ParamType1, ParamType2, ... );

调用:UseDLL (DLL_FILE)

释放:UnUseDLL


注意:

使用时请注意两个关键词(搜索一下看看):

cdecl

BYREF

官方帮助文档:http://helpnet.installshield.com/installshield20helplib/installshield20helplib.htm

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
InstallShield是一款知名的软件安装程序制作工具,用于帮助开发者创建可靠和易于安装的应用程序安装程序。InstallShield 2022是其新版,这个版本还未正式发布,因此目前还没有相关的官方汉化版本。 然而,有些第三方网站或社区可能会提供InstallShield的汉化补丁或汉化包。这些汉化资源可能由国内或国外的开发者提供,旨在为用户提供使用InstallShield时更直观和便捷的中文界面。 如果您希望使用InstallShield 2022的汉化版本,可以通过以下步骤进行操作: 1. 首先,在网上搜索InstallShield 2022汉化相关的资源。您可以使用搜索引擎,搜索关键词"InstallShield 2022 汉化"或"InstallShield 2022 中文",寻找适合的资源。 2. 当您找到相关资源后,请务必审慎下载,并确保其来源可靠和安全。 3. 下载汉化补丁或汉化包后,需按照具体的安装步骤进行操作。一般情况下,您需要先将InstallShield 2022正式版安装在计算机上,然后再运行汉化补丁或安装汉化包,按照提示选择中文语言。 4. 安装完成后,您应该能够在InstallShield 2022的界面上看到中文菜单、按钮和选项,以便更方便地操作该软件。 需要注意的是,使用第三方提供的汉化资源需要谨慎,因为这些资源不属于官方渠道,存在一定的风险,比如可能会引入病毒或恶意软件。因此,在进行任何下载和安装操作前要谨慎核实资源的可信度,并采取合适的安全防护措施。 总结而言,如果您想要在InstallShield 2022中使用中文界面,可以尝试搜索并下载第三方提供的汉化资源。但请谨记安全第一,并从可靠的渠道确保资源的安全性。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值