" is not a valid integer

Interested in developing new plug-ins? Got one to share? Post here!
Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

" is not a valid integer

Postby christ23 » Wed Aug 01, 2012 12:34 am

Hi together,

i am developing a plugin written in C# at the moment (with the Delphi Bridge from MaxLogic - thanks to him at this point, also for his support!).

But since some days, i am getting a strange error message when running my plugin.

I have simplified my code, but it won't work any more. In the Test-Tool from MaxLogic, everything works fine, but not in IA.

First of all, i have this .reg :

Code: Select all

Windows Registry Editor Version 5.00

@="C:\\Documents and Settings\\***\\My Documents\\Doku\\Installer\\_InstallAware\\Plugins_dotNet\\_NEW2012\\IA_NetBridge_and_TestTool\\data\\IDEPlug_NetBridge.dll"

Then i got my C# Code :

Code: Select all

namespace EXE_sql
    /// <summary>
    /// delegate for to represent Delphi callback
    /// </summary>
    /// <param name="SmartPosition">integer parameter</param>
    /// <param name="text">string parameter</param>
    /// <returns></returns>
    public delegate bool RunTimeCallback(Int32 SmartPosition, string text);

    public class EXE_sql
        string m_newval = "";

        public unsafe int RunTimeExecute(
            uint window,
            string variables,
            string state,
            Int32 callback,
            ref Int32 returnVal,
            ref string newval,
            bool firstiteration)



                if (firstiteration)

                    IntPtr ptr = new IntPtr(callback);
                    RunTimeCallback callbackMethod = (RunTimeCallback)Marshal.GetDelegateForFunctionPointer(ptr, typeof(

                    callbackMethod(0, "Initialize sql ...");
                    callbackMethod(30, "Initialize sql ... getting credentials ... ");
                    callbackMethod(90, "Initialize sql ... getting credentials ... connecting ... executing ... getting values ...");
                    int eestasks = 23;
                    this.m_newval = "EESTASKS, " + eestasks.ToString();

                    returnVal = 0;
                    return this.m_newval.Length;
                    //   MessageBox.Show("Second call");
                    //IntPtr ptr = new IntPtr(callback);
                    //RunTimeCallback callbackMethod = (RunTimeCallback)Marshal.GetDelegateForFunctionPointer(ptr, typeof(
                    //  RunTimeCallback));
                    //callbackMethod(100, "Initialize sql ... getting credentials ... connecting ... executing ... getting values ... finish");

                    newval = this.m_newval;
                    return 0;

            catch (Exception err)

                throw err;


In IA i have this code :
1.PNG (4.26 KiB) Viewed 11038 times

Now when running my plugin (compiling works fine) :
2.PNG (5.56 KiB) Viewed 11038 times

The thing is, the variable "EESTASKS" is filled with the 23 from the Plugin ! And, as you can see, the error comes up at a blank (!) line (Line 232 as the box says)

Any ideas ??
Last edited by christ23 on Tue Aug 28, 2012 3:05 am, edited 1 time in total.

Site Admin
Posts: 4846
Joined: Sun Aug 22, 2010 4:28 am

Re: " is not a valid integer

Postby FrancescoT » Thu Aug 02, 2012 3:30 am

Dear User,

your topic has been moved to "Plug-In Development" forum.

Anyway, I am not an expert of c# plug-in development (I use C/C++ only)... but seems that the parameters you entered doesn't not have the correct format.

Francesco Toscano
InstallAware Software Support

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE

Posts: 82
Joined: Mon Jan 16, 2012 4:51 am

Re: " is not a valid integer

Postby christ23 » Sun Aug 26, 2012 1:34 am

Hi FrancescoT,

i have checked all my parameters, they are allright. The strange thing on this topic is, this error comes up "randomly". I was working with my plugin-development without errors. Then having trouble with the plugin not being called in non-debug-mode-of-IA, and (seemed) to having found the error.

Now, after two times everything was right, i am getting the "..."is not a valid integer value"-error again. In this post, my problem had gone when i changed the machine. Now i have shooten this new machine also, cannot remove the error.

Any further ideas ?
(Cutting and pasting at another line has not resolved the problem, making a new project also did not work)

Posts: 767
Joined: Sun Feb 08, 2009 6:30 am

Re: " is not a valid integer

Postby bokkie » Mon Aug 27, 2012 1:09 pm


You seem to be the resident expert on dot net plugins? :)

If so, and you get to read this reply could you look at this recent thread of mine and see if you can explain what my problem might be? Thanks.

The thread: viewtopic.php?f=2&t=8797
Peter. Smartly dressed, he still resembles an unmade bed.
InstallAware MVP

Return to “Plug-In Development”

Who is online

Users browsing this forum: No registered users and 1 guest