C# DLL Export to Inno-Setup - Error E0434F4D

C# DLL Export to Inno-Setup - Error E0434F4D

By : user2957020
Date : November 22 2020, 03:03 PM
Any of those help Hans is right, you have to think about how to report or log errors.
However, in your case I guess the problem is that the CLR cannot find the other assembly. Assemblies are not resolved relative to the assembly that is using them but to the probing path of the current appdomain. In your case the appdomain will be the default one and your probing path will be the directory of the executable.
code :

Share : facebook icon twitter icon
Inno Setup - How to force programs started from Inno Setup to open on a certain place on the screen?

Inno Setup - How to force programs started from Inno Setup to open on a certain place on the screen?

By : Nnamdi Zobeashia
Date : March 29 2020, 07:55 AM
I wish did fix the issue. It's hardly possible to make an application to start at desired position, unless the application explicitly supports it.
So in general, what you can do is to watch for a certain window to appear and move it afterwards. You can identify the window by its caption (FindWindowByWindowName) or class (FindWindowByClassName). Drawback is that the window will briefly appear on its default position.
code :
Source: "DXWebSetup.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall

Filename: "{tmp}\DXWebSetup.exe"; StatusMsg: "Installing DirectX..."; \
  BeforeInstall: StartWaitingForDirectXWindow; AfterInstall: StopWaitingForDirectXWindow


function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord;
  external 'SetTimer@User32.dll stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord;
  external 'KillTimer@User32.dll stdcall';
function GetTickCount: DWord; external 'GetTickCount@kernel32 stdcall';
function SetWindowPos(hWnd: HWND; hWndInsertAfter: HWND; X: Integer; Y: Integer;
  cx: Integer; cy: Integer; uFlags: UINT): BOOL;
  external 'SetWindowPos@user32.dll stdcall'; 

  SWP_NOSIZE = $01;  

  WindowWaitTimer: LongWord;
  WindowWaitStarted: DWord;
  MoveWindowRunning: Boolean;

procedure MoveDirectXWindowProc(
  H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord);
  Retry: Boolean;
  Handle: HWND;
  Handle := FindWindowByWindowName('Installing Microsoft(R) DirectX(R)');
  if Handle = 0 then
    if DWord(GetTickCount - WindowWaitStarted) < 5000 then
      Log('DirectX window not found, will try again shortly');
      Retry := True;
      Log('Giving up waiting for DirectX window');
      Retry := False;
    Log('DirectX window found');

      Handle, 0, WizardForm.Left + ScaleX(150), WizardForm.Top + ScaleX(30),
      0, 0, SWP_NOSIZE or SWP_NOZORDER);
    Retry := False;

  if not Retry then
    Log('Stopping timer');
    KillTimer(0, WindowWaitTimer);
    WindowWaitTimer := 0;

procedure StartWaitingForDirectXWindow;
  Log('Starting waiting for DirectX window');
  WindowWaitTimer := SetTimer(0, 0, 100, CreateCallback(@MoveDirectXWindowProc));
  WindowWaitStarted := GetTickCount;

procedure StopWaitingForDirectXWindow;
  if WindowWaitTimer <> 0 then
    Log('DirectX installer finished, and we are still waiting for its window, stopping');
    KillTimer(0, WindowWaitTimer);
    WindowWaitTimer := 0;
    Log('DirectX installer finished, and we are no longer waiting for its window');
How can I obtain the Inno Setup version number from a batch or Inno Setup script?

How can I obtain the Inno Setup version number from a batch or Inno Setup script?

By : Sandy Prasetya
Date : November 15 2020, 03:01 PM
will be helpful for those in need On the contrary @magicnumber, there is indeed a compiler version constant available directly in your inno-script. The predefined Preprocessor variable Ver returns the 32-bit encoded version of Inno Setup compiler. Highest byte holds the major version, lowest byte usually holds zero. Make it prettyful with the DecodeVer function. Example:
#define MyCompilerVerStr DecodeVer(Ver)
code :
#ifdef UNICODE
  #define MyInnoVersion DecodeVer(Ver) + " (unicode)"
  #define MyInnoVersion DecodeVer(Ver) + " (non-unicode)"
Encode string to Base64 in Inno Setup (Unicode Version of Inno Setup)

Encode string to Base64 in Inno Setup (Unicode Version of Inno Setup)

By : Lucanauer
Date : March 29 2020, 07:55 AM
I wish this help you Base64 encodes bytes, not characters (strings). That's also probably the reason, why the Encode64 implementation, that you have found, takes AnsiString. AnsiString is commonly (ab)used in Inno Setup Pascal Script as a dynamic array of bytes. While string is an array of characters.
If you want to encode a string, you first have to represent the string as an array of bytes (in a way the recipient of the Base64-encoded string expects it) and then you can use your Encode64 implementation.
code :
Base64 := string(Encode64(AnsiString(S)));
Using path/value specified on Inno Setup compiler command-line in Inno Setup script

Using path/value specified on Inno Setup compiler command-line in Inno Setup script

By : user2337524
Date : March 29 2020, 07:55 AM
like below fixes the issue First, SOURCEPATH is a Inno Setup preprocessor predefined variable, so you need to use another name for your command-line "variable". I'll be using SOURCE_PATH.
code :
#define ApplicationVersion GetFileVersion(SOURCE_PATH)
#define srcpath SOURCEPATH
Source: "{#srcpath}MyApplication1.exe"; DestDir: "{app}\MyApplication1"
#define ApplicationVersion GetFileVersion(SOURCE_PATH)

Source: "{#SOURCE_PATH}MyApplication1.exe"; DestDir: "{app}\MyApplication1"
How to change LoadStringFromFile function from Inno Setup 5 to Inno Setup 6 and make it work

How to change LoadStringFromFile function from Inno Setup 5 to Inno Setup 6 and make it work

By : Greasy Lightning
Date : March 29 2020, 07:55 AM
Hope that helps As I have commented to your previous question, this is not about upgrading from Inno Setup 5 to Inno Setup 6. Inno Setup 6 is compatible with Inno Setup 5 code. Your problem is that you have used legacy Ansi version of Inno Setup 5. And Inno Setup 6 has Unicode version only. You should have used Unicode version even with Inno Setup 5. See Upgrading from Ansi to Unicode version of Inno Setup (any disadvantages)
In general, you should not use AnsiString. It's a legacy of the Ansi version. With AnsiString, your code will fail, if a user uses non-ASCII characters in the the paths.
code :
procedure CurStepChanged(CurStep: TSetupStep);
  FileData: AnsiString;
  UnicodeStr: string;
  if (CurStep = ssInstall) then
    LoadStringFromFile(GetSvcDir('2') + '\PostSteps.ps1', FileData);
    UnicodeStr := FileData;
    StringChangeEx(UnicodeStr, 'ScvProdPath', GetSvcDir('0') + '\', True);
    StringChangeEx(UnicodeStr, 'ProdSitePath', GetWebDir('0') + '\', True);
    StringChangeEx(UnicodeStr, 'ProdAuthPath', GetWebDir('1') + '\', True);
    StringChangeEx(UnicodeStr, '444', GetConfig('4'), True);
    StringChangeEx(UnicodeStr, '8732', GetConfig('3'), True);
    StringChangeEx(UnicodeStr, 'RV_ExceptionsPath', GetSvcDir('2') + '\RVExceptions', True);
    FileData := UnicodeStr;
    SaveStringToFile(GetSvcDir('2') + '\PostSteps.ps1', FileData, False);
Related Posts Related Posts :
  • Why does C# also not allow empty conditions in while loops?
  • Unable to get a block of code into my regex match groups
  • What is difference between dbcontext.Add and dbcontext.AddObject
  • How do I update the file version number of C# DLL without recompiling?
  • Value for html control always null
  • HttpClient hangs when timeout is setting (Windows Phone)
  • Handle Multiple Form tag in asp.net page?
  • create word document with html content in c#
  • Confusion about Find And Replace
  • Format sms messages in Clickatell
  • Automated Function Overload
  • String to date in MS Access SQL statement gives type mismatch error
  • ShowDialog exiting on certain events
  • Is there a try Convert.ToInt32... avoiding exceptions
  • How to move wpf application into minimize tray at Window Start-up C#?
  • How to change display format of long variable?
  • How to use Addfields in MongoDB C# Aggregation Pipeline
  • MsTest TestCleanup method not called when an unhandled exception is thrown
  • missing last data when exporting gridview to excel
  • How to add array of objects to List in c#
  • Lambda Expression to order (sort) my list collection
  • Library for displaying music notation
  • How to compare two dictionaries in c# and get the output as True and False after validation
  • specify fields to be serialized with JSON
  • How do you obtain the content of a specific node using XmlDocument in C#?
  • How to ignore the first line in a csv file when you read the csv file in C#
  • c# - Problem calling public void from class
  • How to tell a class which objects it should create? Type vs. object confusion :(
  • Save CheckBox state to xml
  • WIX CAQuietExec NETSH Command Fails
  • Issues sending http put request every 60 seconds to RoR app
  • ConfigurationManager.ConnectionStrings.ConnectionString Issue
  • Real size WPF controls for printing
  • How to cancel properly?
  • C# String multiplication error
  • Using Solrnet and Assigning Attributes with Entity Framework Generated POCOs
  • Regex pattern for single backslash
  • TextBox: insert spaces for credit card number?
  • C# DLL loaded for exe-application is not found when launching similar DLL by rundll32.exe
  • Debug a Windows Service with WCF library
  • Open a file from an external assembly?
  • Servicestack RegistrationFeature Unable to bind request
  • Index was outside the bounds of the array confusion
  • Error in Xml to List code. The ':' character, hexadecimal value 0x3A, cannot be included in a name
  • I am trying to do a while loop with a string conditional statement in C#
  • C# 'Cannot access a disposed object. Object name: 'SslStream'.'
  • How to make Gecko use seperate CookieContainer per instance?
  • C# Advanced form "please wait"
  • Send and Receive data C# using network stream
  • How to discover that appsettings changed in C#?
  • Check what needs full trust
  • What is the execution order of an MVC Razor view/layout
  • Table designer (Entity Framework) is too resource intense
  • How to clean up an exception string so it can be displayed via Javascript Alert?
  • Configuring Amazon SES Feedback Notifications via Amazon SNS in ASP.NET MVC (C#)
  • C# api responce and request
  • Dynamodb putitem function not working properly
  • theme in windows phone(light or dark) using c#
  • Backup attached database file(.mdf) using c# and SQL Server
  • What is 'TextFile' and where it is uses in WPF project
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org