This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Calling methods in a .NET Assembly
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 14, 2008
11:00 AM
Calling methods in a .NET Assembly
I can call methods within a .NET Assembly that take no parameters (or just a couple of strings). However I am struggling with a method that takes in the following two parameters:
IntPtr and bool
Essentially what the method requires is a handle to the current window and a boolean value (true/false).
When I try and use this method using "hMSI" - a HWND and "FALSE" as the parameters I catch an error: "No such interface supported".
My understanding is that IntPtr is effectively an int and that hMSI is a HWND (so is also an int). I think this should be OK?
I am a bit more worried about the second boolean parameter. I suspect "FALSE" resolves itself to be 0 rather than "false" [if that makes sense].
Does anyone have any experience with passing in booleans or HWNDs into .NET Assemblies?
Thanks for your time!
IntPtr and bool
Essentially what the method requires is a handle to the current window and a boolean value (true/false).
When I try and use this method using "hMSI" - a HWND and "FALSE" as the parameters I catch an error: "No such interface supported".
My understanding is that IntPtr is effectively an int and that hMSI is a HWND (so is also an int). I think this should be OK?
I am a bit more worried about the second boolean parameter. I suspect "FALSE" resolves itself to be 0 rather than "false" [if that makes sense].
Does anyone have any experience with passing in booleans or HWNDs into .NET Assemblies?
Thanks for your time!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 16, 2008
05:34 PM
What does your InstallScript code look like? How about the .NET method's signature?