Community Forums
Page 1 of 3 123 LastLast
Results 1 to 5 of 12

Thread: Delphi DLL & Install Shield Exrpess 2

  1. #1
    Join Date
    Oct 2001
    Posts
    44,727

    Delphi DLL & Install Shield Exrpess 2



    hi,

    Can anybody please e-mail or post the source to a simple Delphi DLL that
    can be used with Install Shield Express, any DLL I try to make causes a
    Page Fault and it's driving me nuts

    Thanks in Advance

    Alex

  2. #2
    Join Date
    Oct 2001
    Posts
    44,727

    Re: Delphi DLL & Install Shield Exrpess 2



    Hi Alex,

    I have quoted a Knowledge base article which discusses about using a
    Delphi DLL as an Express extension. Also I have attached the compiled DLL.
    This is also available in the Online Knowledge base on our website at the
    following URL
    http://kb.installshield.com/isxkb
    =============================================================
    How To: Making A Custom Delphi DLL work as an Extension

    =============================================================
    For Distribution: Public
    This document relates to the following InstallShield Express product(s):
    Professional
    Target Platform(s): All Platforms

    ----------------------------------------------------------------------------
    ---------------------------------------------
    ISSUE:
    ----------------------------------------------------------------------------
    ---------------------------------------------

    I have a custom DLL function written in Delphi, but I can't seem to launch
    it as an extension from my InstallShield Express installation.

    ----------------------------------------------------------------------------
    ---------------------------------------------
    DISCUSSION:
    ----------------------------------------------------------------------------
    ---------------------------------------------

    InstallShield Express can only launch DLL functions that are C-callable,
    i.e. can be launched from a C program. To make sure that your Delphi DLL
    function follows the standard C calling convention, be sure to include the
    stdcall calling convention when declaring your function.


    Following is the code for a Delphi DLL that performs in a similar fashion
    to the C DLLs described in article X1068. Also attached is the compiled
    32-bit DLL.

    library MyDelphi;


    uses
    Classes,
    SysUtils,
    Dialogs in 'Dialogs.pas',
    Windows in 'Windows.pas';


    function Foo(mainwin: Hwnd; szSrcDir, szSupport, szInst, szRes: LPSTR):
    Char; export; stdcall;
    var
    test1: String;
    begin
    test1 := Format('Extension Called!! HWND=%x, SRCDIR=%s, SUPPORTDIR=%s,
    INSTALLDIR=%s ', [mainwin, szSrcDir, szSupport, szInst]);
    MessageDlg(test1, mtInformation, [mbOk], 0);
    end;


    exports
    Foo index 1;


    begin
    end.
    --------------------------------------------------------
    Regards,
    Prabhu RP

    Aditi Corp.
    InstallShield Authorized Solution Provider

    Alex <Darkside_of_the_Moon@msn.com> wrote in article
    <01bc9c20$61cde020$8b1c86c2@zen>...
    > hi,
    >
    > Can anybody please e-mail or post the source to a simple Delphi DLL that
    > can be used with Install Shield Express, any DLL I try to make causes a
    > Page Fault and it's driving me nuts
    >
    > Thanks in Advance
    >
    > Alex
    >

  3. #3
    Join Date
    Oct 2001
    Posts
    44,727

    re:Delphi DLL & Install Shield Exrpess 2



    ooooooooooh thanks a lot :-)))))))))))
    --
    for some delphi tips:

    http://www.euronet.nl/users/darkside/

    Aditi Corp. <prabhurp@aditi.com> wrote in article
    <01bc9e33$c5422b60$2d0c36ca@nquest134>...
    > Hi Alex,
    >
    > I have quoted a Knowledge base article which discusses about using a
    > Delphi DLL as an Express extension. Also I have attached the compiled
    DLL.
    > This is also available in the Online Knowledge base on our website at the
    > following URL
    > http://kb.installshield.com/isxkb
    > =============================================================
    > How To: Making A Custom Delphi DLL work as an Extension
    >
    > =============================================================
    > For Distribution: Public
    > This document relates to the following InstallShield Express product(s):
    > Professional
    > Target Platform(s): All Platforms
    >
    >
    ----------------------------------------------------------------------------

    > ---------------------------------------------
    > ISSUE:
    >
    ----------------------------------------------------------------------------

    > ---------------------------------------------
    >
    > I have a custom DLL function written in Delphi, but I can't seem to
    launch
    > it as an extension from my InstallShield Express installation.
    >
    >
    ----------------------------------------------------------------------------

    > ---------------------------------------------
    > DISCUSSION:
    >
    ----------------------------------------------------------------------------

    > ---------------------------------------------
    >
    > InstallShield Express can only launch DLL functions that are C-callable,
    > i.e. can be launched from a C program. To make sure that your Delphi DLL
    > function follows the standard C calling convention, be sure to include
    the
    > stdcall calling convention when declaring your function.
    >
    >
    > Following is the code for a Delphi DLL that performs in a similar fashion
    > to the C DLLs described in article X1068. Also attached is the compiled
    > 32-bit DLL.
    >
    > library MyDelphi;
    >
    >
    > uses
    > Classes,
    > SysUtils,
    > Dialogs in 'Dialogs.pas',
    > Windows in 'Windows.pas';
    >
    >
    > function Foo(mainwin: Hwnd; szSrcDir, szSupport, szInst, szRes: LPSTR):
    > Char; export; stdcall;
    > var
    > test1: String;
    > begin
    > test1 := Format('Extension Called!! HWND=%x, SRCDIR=%s, SUPPORTDIR=%s,
    > INSTALLDIR=%s ', [mainwin, szSrcDir, szSupport, szInst]);
    > MessageDlg(test1, mtInformation, [mbOk], 0);
    > end;
    >
    >
    > exports
    > Foo index 1;
    >
    >
    > begin
    > end.
    > --------------------------------------------------------
    > Regards,
    > Prabhu RP
    >
    > Aditi Corp.
    > InstallShield Authorized Solution Provider
    >
    > Alex <Darkside_of_the_Moon@msn.com> wrote in article
    > <01bc9c20$61cde020$8b1c86c2@zen>...
    > > hi,
    > >
    > > Can anybody please e-mail or post the source to a simple Delphi DLL
    that
    > > can be used with Install Shield Express, any DLL I try to make causes a
    > > Page Fault and it's driving me nuts
    > >
    > > Thanks in Advance
    > >
    > > Alex
    > >
    >

  4. #4
    Join Date
    Oct 2001
    Posts
    44,727

    re:Delphi DLL & Install Shield Exrpess 2



    In the same vein, is there any way to use a Delphi DLL to return a value to the
    installation program, such as the application directory (for an already
    installed version)

  5. #5
    Join Date
    Oct 2001
    Posts
    44,727

    re:Delphi DLL & Install Shield Exrpess 2



    On Wed, 04 Feb 1998 08:35:25 -0500, John Wollner <jwollner@home.com> wrote:
    >In the same vein, is there any way to use a Delphi DLL to return a value to the
    >installation program, such as the application directory (for an already

    No, unfortunately not. You might try to write to the memory block of the
    passed variable, but I'm not sure if you are allowed to.

    Stefan
    ellipse data systems

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •