Monday, January 21, 2013

ASP.Net 4.5 + Report Viewer 11.0 having blank report

Recently, I did a ASP.Net application. It is developed by VS 2012. There is a page showing a report by using Report Viewer which comes with VS2012.

 

Everything runs OK in my local machine until the application is deployed onto a remote server. The issue was that the report content is blank. It seems

no error at all until the debug window of the browser is opened. In the Console tab, it complains that “Ajax client-side framework failed to load”.

 

According to Khaled in the below thread (http://stackoverflow.com/questions/3695351/ajax-client-side-framework-failed-to-load-asp-net-4-0),

it is fixed by having below section:

<system.webServer>
    <modules runAllManagedModulesForAllRequests="true" />
</system.webServer>

 

without changes in Global.asax.

Tuesday, January 15, 2013

CC.Net sample Files

ccnet.config:

<?xml version="1.0" encoding="utf-8"?>
<cruisecontrol>
    <project name="cc-config">
        <!--Project for updating this config file when this config file is also managed in a SVN repository-->
        <triggers>
            <intervalTrigger seconds="30"/>
        </triggers>
        <sourcecontrol type="multi">
            <sourceControls>
                <svn>
                    <workingDirectory>C:\Program Files\CruiseControl.NET\server\cc.net</workingDirectory>
                    <trunkUrl>http://MySVNServer/repos/AutoBuild/CC.Net</trunkUrl>
                    <executable>C:\Program Files\CollabNet Subversion Client\svn.exe</executable>
                    <username>autobuildername</username>
                    <password>password</password>
                </svn>
                <svn>
                    <workingDirectory>C:\MyWorkingFolder\Common\trunk</workingDirectory>
                    <trunkUrl>http://MySVNServer/repos/common/trunk</trunkUrl>
                    <executable>C:\Program Files\CollabNet Subversion Client\svn.exe</executable>
                    <username>autobuildername</username>
                    <password>password</password>
                </svn>
            </sourceControls>
        </sourcecontrol>
    </project>
   
    <project>
        <name>MyProject</name>
        <webURL></webURL>
        <triggers>
            <intervalTrigger seconds="1800"/>
        </triggers>
        <workingDirectory>C:\MyWorkingFolder\MyProject</workingDirectory>
        <modificationDelaySeconds>300</modificationDelaySeconds>
        <labeller type="assemblyVersionLabeller">
            <major>1</major>
            <minor>8</minor>
            <build>4</build>
            <incrementOnFailure>false</incrementOnFailure>
        </labeller>
        <sourcecontrol type="multi">
            <sourceControls>
                <!-- Updating dependedcy 1 -->
                <svn>
                    <trunkUrl>http://MySVNServer/repos/Nsis/trunk/headers</trunkUrl>
                    <executable>C:\Program Files\CollabNet Subversion Client\svn.exe</executable>
                    <username>autobuildername</username>
                    <password>password</password>
                    <workingDirectory>C:\MyWorkingFolder\installer\NsisCommon\headers</workingDirectory>
                </svn>
                <svn>
                    <trunkUrl>http://MySVNServer/repos/dependency1/trunk</trunkUrl>
                    <executable>C:\Program Files\CollabNet Subversion Client\svn.exe</executable>
                    <username>autobuildername</username>
                    <password>password</password>
                    <workingDirectory>C:\MyWorkingFolder\dependency1\trunk</workingDirectory>
                </svn>
                <svn>
                    <trunkUrl>http://MySVNServer/repos/MyProject/trunk</trunkUrl>
                    <executable>C:\Program Files\CollabNet Subversion Client\svn.exe</executable>
                    <username>autobuildername</username>
                    <password>password</password>
                    <workingDirectory>C:\MyWorkingFolder\Trunk</workingDirectory>
                </svn>
            </sourceControls>
        </sourcecontrol>
        <tasks>
            <exec>
                <executable>C:\Windows\System32\cmd.exe</executable>
                <buildArgs>/c DEL /q /s "build result\*.*" </buildArgs>
                <buildTimeoutSeconds> 1200 </buildTimeoutSeconds>
            </exec>           
            <msbuild>
                <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
                <workingDirectory>C:\MyWorkingFolder\dependency1\Trunk</workingDirectory>
                <projectFile>C:\MyWorkingFolder\dependency1\Trunk\dependency1.msbuild</projectFile>
                <buildArgs>/noconsolelogger /p:Configuration=Release /v:diag /t:BuildProjectRes;BuildSelfUpdateRes;Build</buildArgs>
                <timeout>900</timeout>
                <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
                <environment>
                    <variable name="BDS" value="C:\Program Files\Codegear\RAD Studio\8.0"/>
                    <variable name="Path" value="C:\Program Files\Codegear\RAD Studio\8.0\bin;%Path%"/>
                    <variable name="Win32LibraryPath" value="C:\Program Files\CodeGear\RAD Studio\8.0\lib\Win32\Release"/>                   
                    <variable name="DXVCL" value="C:\Delphi\Third Party Packages\DevEx.VCL.56"/>
                </environment>
            </msbuild>           
            <msbuild>
                <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable>
                <workingDirectory>C:\MyWorkingFolder\MyProject\trunk\src</workingDirectory>
                <projectFile>MyProject.msbuild</projectFile>
                <buildArgs>/noconsolelogger /t:BuildProjectRes;Build /p:Configuration=Release;DCC_ExeOutput="..\bin" /v:diag</buildArgs>
                <timeout>900</timeout>
                <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
                <environment>
                    <variable name="BDS" value="C:\Program Files\Codegear\RAD Studio\8.0"/>
                    <variable name="Path" value="C:\Program Files\Codegear\RAD Studio\8.0\bin;%Path%"/>
                    <variable name="Win32LibraryPath" value="C:\Program Files\CodeGear\RAD Studio\8.0\lib\Win32\Release"/>
                    <variable name="DXVCL" value="F:\Delphi\Third Party Packages\DevEx.VCL.56"/>
                </environment>
            </msbuild>
            <exec>
                <executable>C:\Windows\System32\cmd.exe</executable>
                <buildArgs>/c xcopy /Y "bin\MyProject.exe" "Build Result\Indivisual File\bin\"</buildArgs>
                <!-- above path is related to workingDirectory of Project -->
            </exec>
            <exec>
                <!-- add EurekaLog -->
                <executable>C:\Program Files\CodeGear\RAD Studio\8.0\Bin\ecc32.exe</executable>
                <buildArgs> --el_alter_exe"src\MyProject.dproj;bin\MyProject.exe" --el_config"src\MyProject.dproj"</buildArgs>
                <buildTimeoutSeconds>900</buildTimeoutSeconds>
            </exec>
            <!-- below two build msi installer -->
            <exec>
               
                <executable>C:\Program Files\WiX Toolset v3.6\bin\candle.exe </executable>
                <buildArgs>@installer\MyProject-candle-response.txt</buildArgs>
                <buildTimeoutSeconds>1200 </buildTimeoutSeconds>
            </exec>
            <exec>
                <executable>C:\Program Files\WiX Toolset v3.6\bin\light.exe</executable>
                <buildArgs>@installer\MyProject-light-response.txt</buildArgs>
                <buildTimeoutSeconds>1200 </buildTimeoutSeconds>
            </exec>
            <exec>
                <executable>C:\Program Files\NSIS\makensis.exe</executable>
                <buildArgs>/V3 /DOS_Platform_Specification=MyProject32BitSpecification /DOutputDir="..\Build Result\Installer" "installer\MyProject.nsi"</buildArgs>
                <buildTimeoutSeconds>1200</buildTimeoutSeconds>
            </exec>
            <exec>
                <executable>C:\Windows\System32\cmd.exe</executable>
                <buildArgs>/c del "Build Result\Installer\*.wixpdb"</buildArgs>
                <buildTimeoutSeconds> 1200 </buildTimeoutSeconds>
            </exec>
        </tasks>
        <publishers>
            xmllogger=""
            <statistics/>
            <email mailport="25" includeDetails="TRUE" mailhostUsername="autobuildername" mailhostPassword="password" useSSL="FALSE">
                <from>productauto.builder@MyCompany.com</from>
                <mailhost>My-SMTP-Server</mailhost>
                <users>
                    <user name="BuildGuru" group="buildmaster" address="master@MyCompany.com"/>
                    <user name="Developer1" group="developers" address="developer1@MyCompany.com"/>
                    <user name="Tester1" group="testers" address="tester1@MyCompany.com"/>
                </users>
                <groups>
                    <group name="developers">
                        <notifications>
                            <notificationType>Failed</notificationType>
                            <notificationType>Fixed</notificationType>
                        </notifications>
                    </group>
                    <group name="testers">
                        <notifications>
                            <notificationType>Fixed</notificationType>
                        </notifications>
                    </group>
                    <group name="buildmaster">
                        <notifications>
                            <notificationType>Always</notificationType>
                        </notifications>
                    </group>
                </groups>
                <converters>
                    <!-- regexConverter find="$" replace="@TheCompany.com" /
-->
                </converters>
                <modifierNotificationTypes>
                    <NotificationType>Failed</NotificationType>
                    <NotificationType>Fixed</NotificationType>
                </modifierNotificationTypes>
                <subjectSettings>
                    <subject buildResult="StillBroken" value="Build is still broken for My Project"/>
                </subjectSettings>               
            </email>
            <buildpublisher>
                <sourceDir>Build Result</sourceDir>
                <publishDir>\\MyServer\Installs\MyProject\Installation Files\Version 1.8.4\Builds</publishDir>
                <useLabelSubDirectory>true</useLabelSubDirectory>
                <alwaysPublish>false</alwaysPublish>
            </buildpublisher>
        </publishers>
    </project>   
</cruisecontrol>

MSBuild file:

<?xml version="1.0" encoding="utf-8"?>
<Project
    xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
    >
    <!-- below import only works when this .msbuild file has the same name as the Delphi project file name -->
    <Import
        Project="$(MSBuildProjectName).dproj"
        />
    <!-- these two target are for debugging path purpose -->
    <Target
        Name="ShowDelphiProjectToBuild"
        >
        <Message
            Text="$(MSBuildProjectName).dproj"
            />
    </Target>
    <Target
        Name="ShowDCCPath"
        >
        <Message
            Text="$(DCC_UnitSearchPath)"
            />
    </Target>
    <UsingTask
        TaskName="DCC"
        AssemblyFile="$(BDS)\bin\Borland.Build.Tasks.Delphi.dll"
        />
    <Target
        Name="GetRevision"
        ><!-- SvnVersion is in the MSBuild Community Tasks Targets -->
        <SvnVersion
            LocalPath="$(MSBuildProjectDirectory)"
            >
            <Output
                TaskParameter="Revision"
                PropertyName="Revision"
                />
        </SvnVersion>
    </Target>
    <Target
        Name="BuildProjectRes"
        DependsOnTargets="Versioning"
        >
        <Microsoft.Build.Tasks.Exec
            Command="brcc32 $(ProjectName).rc $(ProjectName).res"
            />
    </Target>
    <!-- use Microsoft HTML Workshop for building CHM help file -->
    <Target
        Name="MakeHelp"
        >
        <Microsoft.Build.Tasks.Exec
            Command="hhc &quot;ProjectHelp.hhp&quot;"
            WorkingDirectory="$(ProjectRoot)\Help\"
            />
        <Microsoft.Build.Tasks.Copy
            SourceFiles="$(ProjectRoot)\Help\ProjectHelp.chm"
            DestinationFolder="$(PackingRoot)\InstallFiles\Project\Help"
            />
    </Target>
    <Target
        Name="PrepareDirForPublish"
        DependsOnTargets="BuildProjectRes"
        >
        <Microsoft.Build.Tasks.MakeDir
            Directories="$(CCNetWorkingDirectory)\$(MajorVer).$(MinorVer).$(ReleaseVer).$(Revision)"
            />
        <Microsoft.Build.Tasks.Copy
            SourceFiles="$(PackingRoot)\Output\$(MSBuildProjectName)Setup.exe"
            DestinationFolder="$(CCNetWorkingDirectory)\$(MajorVer).$(MinorVer).$(ReleaseVer).$(Revision)"
            />
        <Microsoft.Build.Tasks.Copy
            SourceFiles="$(PackingRoot)\InstallFiles\Project\Bin\$(MSBuildProjectName).exe"
            DestinationFolder="$(CCNetWorkingDirectory)\$(MajorVer).$(MinorVer).$(ReleaseVer).$(Revision)"
            />
    </Target>
    <Import
        Project="C:\Program Files\MSBuild\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"
        />
    <!--PropertyGroup-->
    <PropertyGroup>
        <ThirdPartyComponents>F:\Delphi\Third Party Packages</ThirdPartyComponents>
        <Abbrevia>$(ThirdPartyComponents)\Abbrevia\4.0\source</Abbrevia>
        <ComponentRoot></ComponentRoot>
        <DelphiColl>$(ThirdPartyComponents)\Delphi-coll\Library</DelphiColl>
        <DevExpress>$(ThirdPartyComponents)\DevEx.VCL.56\Library\Delphi15</DevExpress>
        <EurekaLog>$(ThirdPartyComponents)\EurekaLog 6\Delphi15</EurekaLog>
        <InstallScriptSourceDir></InstallScriptSourceDir>
        <JEDI>$(ThirdPartyComponents)\Jedi345</JEDI>
        <JCL>$(JEDI)\jcl</JCL>
        <JCLLib>$(JCL)\lib\d15;$(JCL)\source\common;$(JCL)\Source\windows;$(JCL)\Source;$(JCL)\Source\include</JCLLib>
        <JVCL>$(JEDI)\jvcl</JVCL>
        <JVCLLib>$(JVCL)\lib\d15;$(JVCL)\common;$(JVCL)\resources;$(JVCL)\run</JVCLLib>
        <ProjectRoot></ProjectRoot>
        <PackingRoot>$(ProjectRoot)\Installer</PackingRoot>
        <PublishRootDir></PublishRootDir>
        <TMS>$(ThirdPartyComponents)\TMS 6.0.3.0\</TMS>
        <VT>$(ThirdPartyComponents)\Soft Gems\Virtual Treeview 4.8.7\Source</VT>
        <OmniXML>$(ThirdPartyComponents)\OmniXML</OmniXML>
    </PropertyGroup>
    <PropertyGroup>
        <DCC_UnitSearchPath>$(BDS)\Lib\Win32\Release;$(Abbrevia);$(DevExpress);$(EurekaLog);$(FastMM);$(JCLLib);$(JVCLLib);$(TMS);$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <DCC_UnitSearchPath>$(SqliteLib);$(ClaimsLib);F:\Build\delphi_client\trunk\Common;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <DCC_UnitSearchPath>$(ManagedDLL);$(VT);$(Zip);$(OmniXML);$(BDS)\Lib\Indy10;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <DCC_UnitSearchPath>$(DelphiColl);$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
        <UnitSearchPath>$(DCC_UnitSearchPath)</UnitSearchPath>
        <!-- DCC_Define>compiler directives are specified in the .dproj file, they are not necessary to define here</DCC_Define -->
        <DCC_ObjPath>$(DCC_ObjectPath);$(UnitSearchPath)</DCC_ObjPath>
        <DCC_ResourcePath>$(DCC_ResourcePath);$(UnitSearchPath)</DCC_ResourcePath>
        <DCC_IncludePath>$(DCC_IncludePath);$(UnitSearchPath)</DCC_IncludePath>
        <ObjPath>$(UnitSearchPath)</ObjPath>
        <ResourcePath>$(UnitSearchPath)</ResourcePath>
        <IncludePath>$(UnitSearchPath)</IncludePath>
        <DCC_ExeOutput>C:\MyWorkingFolder\MyProject\Output</DCC_ExeOutput>
        <DCC_DcuOutput></DCC_DcuOutput>
        <ProjectName>MyProject</ProjectName>
        <MajorVer>1</MajorVer>
        <MinorVer>8</MinorVer>
        <ReleaseVer>4</ReleaseVer>
        <ProductVersion>$(MajorVer),$(MinorVer)</ProductVersion>
        <CompanyName>My Company Name</CompanyName>
        <Comments/>
    </PropertyGroup>
    <Target
        Name="MsBuildBinPath"
        >
        <Message
            Text="$(MSBuildBinPath)"
            />
    </Target>
    <Target
        Name="Versioning"
        DependsOnTargets="GetRevision"
        >
        <ItemGroup>
            <Tokens
                Include="MajorVer"
                >
                <ReplacementValue>$(MajorVer)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="MinorVer"
                >
                <ReplacementValue>$(MinorVer)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="ReleaseVer"
                >
                <ReplacementValue>$(ReleaseVer)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="Revision"
                >
                <ReplacementValue>$(Revision)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="ProductVersion"
                >
                <ReplacementValue>$(ProductVersion)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="CompanyName"
                >
                <ReplacementValue>$(CompanyName)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="FileDescription"
                >
                <ReplacementValue>$(FileDescription)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="InternalName"
                >
                <ReplacementValue>$(InternalName)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="LegalCopyRight"
                >
                <ReplacementValue>$(LegalCopyRight)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="LegalTrademarks"
                >
                <ReplacementValue>$(LegalTrademarks)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="OriginalFilename"
                >
                <ReplacementValue>$(OriginalFilename)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="ProductName"
                >
                <ReplacementValue>$(ProductName)</ReplacementValue>
            </Tokens>
            <Tokens
                Include="Comments"
                >
                <ReplacementValue>$(Comments)</ReplacementValue>
            </Tokens>
        </ItemGroup>
        <TemplateFile
            Template="versioninfo.template.rc"
            OutputFilename="$(ProjectName).rc"
            Tokens="@(Tokens)"
            />
        <TemplateFile
            Template="$(MSBuildProjectDirectory)\..\..\installer\product-version.template.nsh"
            OutputFilename="$(MSBuildProjectDirectory)\..\..\installer\product_version.nsh"
            Tokens="@(Tokens)"
            />
    </Target>
</Project>

 

Versioninfo.template.rc:

VS_VERSION_INFO VERSIONINFO
FILEVERSION ${MajorVer},${MinorVer},${ReleaseVer},${Revision}
PRODUCTVERSION ${ProductVersion}
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x4L
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "080904B0"
    BEGIN
      VALUE "CompanyName",      "${CompanyName}\0"
      VALUE "FileDescription",  "${FileDescription}\0"
      VALUE "FileVersion",      "${MajorVer}.${MinorVer}.${ReleaseVer}.${Revision}\0"
      VALUE "InternalName",     "${InternalName}\0"
      VALUE "LegalCopyright",   "${LegalCopyRight}\0"
      VALUE "LegalTrademarks",  "${LegalTrademarks}\0"
      VALUE "OriginalFilename", "${OriginalFilename}\0"
      VALUE "ProductName",      "${ProductName}\0"
      VALUE "ProductVersion",   "${ProductVersion}\0"
      VALUE "Comments",         "${Comments}\0"
    END
  END

  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x809,1200
  END
END

Wednesday, August 29, 2012

COM+ Practice (1)

So far, my understanding of COM+ in terms of registering is that it provide another way to register a COM.

The COM consuming applications (COM client) have nothing to change. 

 

Be aware, it still can be unregistered by using Regsvr32.exe.

Tuesday, July 31, 2012

Printing PDF, The easiest way

If the printer support PDF Direct Printing, LPR command line tool can be used for sending an PDF file directly to the printer, for example:

LPR –S <ip address of the printer server> –P “Printer name on the server” test.pdf

Please note:

  1. Double quote is not required for the printer name if the printer name has not contain space in it.
  2. LPR might not be turned on yet, at least on Window 7 it is not available by default, it can be turned on from Control Panel\All Control Panel Items\Programs and Features.

Wednesday, June 20, 2012

Undocumented Changes - From Delphi 2007 to Delphi XE–TRadioGroup

When I was trying  Evert Etienne's sample application for demonstrating all AnimateWindow possibilities (http://delphi.about.com/od/delphi-tips-2011/qt/hide-slide-fade-away-controls-delphi-form.htm), I noticed there was a difference of TRadioGroup in Delphi 2007 and Delphi XE(XE2).
This difference is in the below code snippet in Delphi XE:
procedure TCustomRadioGroup.ReadState(Reader: TReader);
begin
  FReading := True;
  inherited ReadState(Reader);
  FReading := False;
  if HandleAllocated then //<--- Delphi 2007 has no this checking!!!
    UpdateButtons;
end;
So, what is the deal of above difference?
The difference is, because of the checking, in Delphi XE and later version, the radio buttons will not be created until the handle of the radio group is allocated. The handle is not allocated when the radio group is just created, which means when TRadioGroup.Create is called, the buttons are not created yet. So the code like the below which is similar to  Evert Etienne’s sample will failed in Delphi XE as the controls is not nil but has no items at all:
procedure TForm1.FormCreate(Sender: TObject);
begin

TRadioButton(RadioGroup1.Controls[2]) …

end;
It is mystery to me that why it is doing that checking in Delphi XE.

Saturday, June 16, 2012

Delphi, Win.Ini and Windows7 (1)

Today I came across the following code:
var
  LDeviceList : TStringList;
  LIniFile : TIniFile;
begin
  LDeviceList := TStringList.Create;
  LIniFile := TIniFile.Create('win.ini');
  with LIniFile do
    try
      ReadSectionValues('devices', LDeviceList);
      ButtonPrinter.Enabled := LDeviceList.Count <> 0;
      …
    finally
      Free;
    end;
What  I was wondering was why it was using Win.Ini? I thought it had been discarded since long time ago, but above code is still working well on my Windows7 system.
So I did a search on my hard disk, there were three Win.Ini files. One was in C:\Windows, one was in C:\Users\<current user>\AppData\Local\VirtualStore\Windows, another one was in C:\Windows\winsxs\amd64_microsoft-windows-coreos_31bf3856ad364e35_6.1.7600.16385_none_814737ee58024dde. The one in Windows folder looked like the one above code was referring to. But what surprised me was that there was no [devices] section in the file at all, not either in the other two:
; for 16-bit app support
[fonts]
[extensions]
[mci extensions]
[files]
[Mail]
MAPI=1
CMCDLLNAME32=mapi32.dll
CMC=1
MAPIX=1
MAPIXVER=1.0.0.1
OLEMessaging=1
[MCI Extensions.BAK]
3g2=MPEGVideo
3gp=MPEGVideo
3gp2=MPEGVideo
3gpp=MPEGVideo
aac=MPEGVideo
adt=MPEGVideo
adts=MPEGVideo
m2t=MPEGVideo
m2ts=MPEGVideo
m2v=MPEGVideo
m4a=MPEGVideo
m4v=MPEGVideo
mod=MPEGVideo
mov=MPEGVideo
mp4=MPEGVideo
mp4v=MPEGVideo
mts=MPEGVideo
ts=MPEGVideo
tts=MPEGVideo

But the printer button was on when I ran the application and there was definitely no other code  controlled the printer button.

So I thought I had to debug the code. I put a break point on the line “ButtonPrinter.Enabled := LDeviceList.Count <> 0;” and it did run to there, and the LDeviceList did contain the correct printers installed on my Windows7!
So where was the real Win.Ini file it read from? Could not be the one in Windows folder. And the LIniFile does not tell you where the Win.Ini file was.
Then I launched VMMap.exe to view the memory and files were using by the application. I use it a lot to find out which DLL files the application is using to confirm the application is using the right one when there are a few versions of the same DLL stored in the system. But there is no sign of Win.Ini file in VMMap. Maybe FileMon is more proper for this case, so I ran FileMon and set its filter to show Ini file’s activity only, but there was no sign either!
That became  very interesting now. The code was reading something from the file but the system basically told you that sorry there was no such file has been opened and read.
What would you do then if you were me?