Page 1 of 3

Re: Maybe possibility for C# plugins

Posted: Tue Sep 20, 2011 3:10 pm
by giaviv
christ23,

As an alternative, you can create a win32 dll in C# and invoke it with the Run Program command.

Re: Maybe possibility for C# plugins

Posted: Tue Sep 27, 2011 8:10 am
by bokkie
christ23,

Did you manage to get something developed and tested using C#? I'm interested in hearing how it went and if it worked as you expected. If you did and you get to read this post, I'd appreciate a sample solution and code. :) :wink:

Re: Maybe possibility for C# plugins

Posted: Fri Oct 07, 2011 9:43 am
by sinan
I have just the thing for you, please download the attachments!!!

InstallAware has outsourced a .NET Plug-In Bridge and this is the first delivery we've had for it, arrived just today.

Try it out and let us know what you think?

Re: Maybe possibility for C# plugins

Posted: Fri Oct 07, 2011 9:44 am
by sinan
Here's the documentation file.

Re: Maybe possibility for C# plugins

Posted: Fri Oct 07, 2011 9:45 am
by sinan
Here's the actual materials.

Re: Maybe possibility for C# plugins

Posted: Sat Oct 08, 2011 3:32 am
by MaxLogic.eu
I'm the author of the NET Bridge, please do not hesitate to contact me if you need any help or if you find any bugs or problems using the NET Bridge.
I prepared a sample of a Runtime Plugin written in C# for you, you can download it here:
http://www.maxlogic.eu/downloads/install_aware/net_exeplug_c.zip

Re: Maybe possibility for C# plugins

Posted: Tue Dec 13, 2011 5:27 am
by MaxLogic.eu
Hi all,

if you wish to contact me, You can of course always use the contact form on my web page: www.maxlogic.eu
Or you can contact me directly by: info@maxlogic.eu

Or just post in this thread

Re: Maybe possibility for C# plugins

Posted: Fri Jan 06, 2012 4:39 am
by MaxLogic.eu
ModuleFolder is a string property of the called class.

in C# it should look like this:

private string module_folder;
public string ModuleFolder
{
get
{
return this.module_folder;
}
set
{
this.module_folder = value;
}
}

Re: Maybe possibility for C# plugins

Posted: Wed Jan 11, 2012 3:23 am
by MaxLogic.eu
Hi, if you plug in works in my test program and works in the IA. Then you are on the right way.
The problem seems to be in the debugger, right?
Unfortunately, I'm not able to help you here... I have little knowledge of the IA debugger.

Re: Maybe possibility for C# plugins

Posted: Sun Jan 15, 2012 7:23 am
by MaxLogic.eu
If the function is called and executed in my test tool, then that means that the plug-in itself is fine.
So let us focus on the configuration of your plug-in.
First, you have to create an entry in the windows registry, as described in the IA help.
But, the path have to point to the net bridge dll, not to your net assembly.

The next step is to configure the net bridge, so it can call your net assembly, to do this properly you have to edit
EXEPlug_NetBridge.ini
IDEPlug.dproj_NetBridge.ini

As soon as all this is done properly, IA should call the net bridge dll and it should call your net assembly.

Re: Maybe possibility for C# plugins

Posted: Mon Jan 16, 2012 7:53 am
by christ23
Hey together,

hmm - my account has been deleted (and all my posts in the past) :(, don't know why. But i could re-register ...

OK, i am with your opinion : I think the plugin itself is fine.
Now ...
- the windows registry. I tried to do exactly what the IA help describes, but i will post my .reg here, maybe you could have a look at it ?

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\MimarSinan\InstallAware\2.0\Plug-Ins\ORASQL2]
@="C:\\\\Documents and Settings\\\\***\\\\My Documents\\\\Doku\\\\Installer\\\\_InstallAware\\\\Plugins_dotNet\\\\NETBridgeProject\\\\_Bin\\\\data\\\\IDEPlug.dproj_NetBridge.dll"
"Action"="ORASQL2"
"Execute"="EXE_sql.dll"
"Script"="ORASQL-RUN"

Note : i had to mask (***) some user data, due to our safety guidelines


I think, the .reg is okay : Action=Key (ORASQL2), path=...\\IDEPlug.dproj_NetBridge.dll

- the EXEPlug_NetBridge.ini :

Code: Select all

[CFG]
;; The Net Assembly need to be plased in the same directory as the NET Bridge DLL.
;; Please provide only the Filename here without the path, but including the extension (usially .dll)
FILE=EXE_sql.dll

;; Please provide the full Classname including the full namespace here
NAMESPACE=EXE_sql.EXE_sql


- the IDEPlug.dproj_NetBridge.ini

Code: Select all

[CFG]
;; The Net Assembly need to be plased in the same directory as the NET Bridge DLL.
;; Please provide only the Filename here without the path, but including the extension (usially .dll)
FILE=IDE_sql.dll

;; Please provide the full Classname including the full namespace here
NAMESPACE=IDE_sql.IDE_sql


But, not working, ummm. The plug-in seems to be recognized by IA, it is available like a "MSI"-Command, and the CompileTimeBuild(...) is popping up, too.

But the RuntimeExecute not :( - why ?

Re: Maybe possibility for C# plugins

Posted: Mon Jan 16, 2012 8:32 am
by MaxLogic.eu
this one is wrong:
"Execute"="EXE_sql.dll"

it have to point to the net bridge, not your assembly,
so it must look like this:
"Execute"EXEPlug_NetBridge.dll"

The IA must always be pointed to the net bridge dlls not to the net assemblies.

Re: Maybe possibility for C# plugins

Posted: Tue Jan 17, 2012 1:51 am
by christ23
Hey,

great fine, it's almost like a powder (like Armstrong said on the moon). :)

Yesterday evening i realized the wrong "Execute=", but thanks for your help anyway !

Now ready for getting into the plug-ins ...

Re: Maybe possibility for C# plugins

Posted: Tue Jan 17, 2012 3:54 am
by MaxLogic.eu
I'm happy I was of some aid :)
If you need any further support, just let me know.

Re: Maybe possibility for C# plugins

Posted: Tue Jan 17, 2012 11:08 am
by christ23
Yepp, here is the further support call ;)

In the docs, it is said that the RunTimeExecute will be called twice, right ?

I only get it called once, but why ?

In the RunTimeExecute make a case decision like

Code: Select all

 if (null == NewVariables)
            {
                 // First call to the function
                 MessageBox.Show("first call");
            }
            else
            {
                // Second call to the function
                MessageBox.Show("second call");
                nRetVal = 0;
            }


That should be the right thing, isn't it ? But, the NewVariables always is "null". What am i doing wrong ?