TIdHash128 Missing From Delphi XE3? - delphi

I am having a problem with Delphi XE3's Indy10. I cannot locate the class TIdHash128.
Indy's documentation states this should be found in IdHash.pas but this is not the case on my PC. Oddly enough the comment at the top of IdHash.pas reads "Rev 1.10 7/24/04 12:54:32 PM RLebeau Compiler fix for TIdHash128.HashValue()" despite having no definition for TIdHash128 in the file. I have also done a search through the source files but no TIdHash128 was found.
Is this supposed to be missing from XE3's version of Indy10?

Related

EOutOfResources in DLL

I migrated several DLLs and an application from Embarcadero C++ Builder XE to C++ Builder 10.1 Berlin.
Now when my DLL (which contains forms) gets loaded by the application, I get
EOutofResources "Das angegebene übergeordnete Element ist kein übergeordnetes Element von '%s'"
in TApplication::CreateHandle
After searching for hours, I found no one with the same error, not even the english translation. I would translate it as "The specified parent element is not a parent element of '%s'".
My stacktrace:
When I set breakpoints in my DLL's code, none are triggered, so I am not sure why there is even a call to the TApplication constructor (there IS one in my code, but it doesn't seem to be called).
I suspect some issue with dependencies, so I used dependency walker and it found two 64-bit dlls. Not sure if this is a false positive:
What can I do to fix or diagnose this further?
I tried starting a new VCL type project to see if there were differences in the project setup, and lo and behold:
<PropertyGroup>
<ProjectGuid>{E8815773-6421-4FB8-A109-F4F505A67A2E}</ProjectGuid>
<ProjectVersion>18.2</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<AppType>Application</AppType>
<MainSource>Project1.cpp</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Debug</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
<TargetedPlatforms>1</TargetedPlatforms>
</PropertyGroup>
The newly created project has an element FrameworkType set to VCL. My migrated project had this set to None. After changing this to VCL, the error went away.

How can I have a Delphi XE2 project without unit aliasses?

I'd like to compile my XE2 project without unit aliasses but can't get it to work.
I tried the following:
<DCC_UnitAlias /> in the *.dproj
<DCC_UnitAlias>$(DCC_UnitAlias)</DCC_UnitAlias>
<DCC_UnitAlias>;$(DCC_UnitAlias)</DCC_UnitAlias>
No DCC_UnitAlias entry in the *.dproj
These either result in a compiler error
[DCC Fataler Fehler] F1030 Ungültige Compileranweisung: '-A;Generics.Collections=System.Generics.Collections;...
(which translates to something like [DCC Fatal error] F1030 Invalid compiler directive: '-A;Generics.Collections=System.Generics.Collections;...)
or the inclusion of some default aliasses:
-AGenerics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE
I know this is not a big issue but it somehow annoys me. :-)
FWIW: <DCC_UnitAlias /> works in D2007.
Under Delphi 10.1, it looks like the default unit aliases are added unconditionnally in the file $(BDS)\Bin\CodeGear.Common.Targets. I assume it is similar in XE2 but don't have it installed to check.
<UnitAliases>Generics.Collections=System.Generics.Collections;Generics.Defaults=System.Generics.Defaults;WinTypes=Winapi.Windows;WinProcs=Winapi.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE</UnitAliases>
<UnitAliases Condition="'$(DCC_UnitAlias)'!=''">$(DCC_UnitAlias)$(UnitAliases)</UnitAliases>
Removing the first UnitAliases tag should let you specify your defaults more accurately, on a per project basis. Beware of the "DO NOT MODIFY" warning at the top of this file, though.

jcvl not working due to jcl requirements

I am trying to manually install JCL and jvcl for delphi xe2.
I have installed JCL as directed and it seems to have installed with no issues.
Now I try to load the JVCL package 16 , it opens delphi and starts to load libarys, When it gets to the Jedi code Library MPL1.1 i start to get errors like below
Error reading form frmJucolorProviderDesigner
-class tjvcontextprovider not found
Ingnore Cancel Ingnore all
this is not the only one i get quite a few ill post a few more in case it helps
Error reading form JvStandardActions
-tjvSendMailAction not found
-tjvwebaction not found
Error reading form jvCheckItemsEditor
-tjvCheckListBox not found
Error reading form JvControlActoinsDM
-tjvControlcollapseAction not found
-TjvControlexpandAction not found
-TjvControlExportAction not found
-tjvControlOptimizeColumnsAction not found
-TjvControlCustomizeColumnsAction not found
-TjvControlPrintAction not found
Error reading form jvSpeedBarEditorMain
-jvFormStorage not found
-AppRegistryStorage not found
ect... I can add rest if you need.
But each - is its own dialog box with [ignore][cancel][ignore all]
Now after I press Ignore 50 times it will finally load the project, when i try to build all the projects for JVCl package it says required package jcl not found.
in library path i have
..jcl\source\common
..jcl\source\windows
..jcl\source\include
in browsing path i have
..jcl\source\common
..jcl\source\vcl
..jcl\source\windows
and in DCU debug path i have
..jcl\lib\d16\win32\debug
after adding
..jcl\lib\d16\win32, which contains the 32 bit jcl.dcp
The solution is to change the uses to use a fully qualified name:
uses
TypInfo,
{$IFDEF JvInterpreter_OLEAUTO}
OleConst, ActiveX,
{$IFDEF VER230} system.win.ComObj, {$ELSE} ComObj, {$ENDIF}
Now it compiles without error.
Try to add the following to your Search Path(HKCU\Software\Embarcadero\BDS\x.x\Library\Win32), of course including the correct path prefix:
..jcl\source;
..jcl\source\common;
..jcl\source\include;
..jcl\source\vcl;
..jcl\source\windows;
..jvcl\common;
..jvcl\run;
You might also be interested in the following link:
http://andy.jgknet.de/blog/2013/05/how-to-install-jcl-and-jvcl-for-xe4/

Issues with SWI-Prolog editor

Some time ago I was fiddling with SWI-Prolog editor, trying to get something to work, and I change some configuration settings. It didn't work so I changed it back. Now SWI-Prolog editor is not working correctly. I will load files but when I click 'consult' it will just throw this error:
consult('C:/Users/Cubearth/Documents/Prolog/'filename.pl').
and I am not able to perform queries, on the knowledge base... it just does nothing. I know that it should return:
% library(win_menu) compiled into win_menu 0.00 sec, 20,952 bytes
% library(swi_hooks) compiled into pce_swi_hooks ......... (etc, etc)
For help, use ?- help(Topic). or ?- apropos(Word).
but I am not even getting that. I tried uninstalling both prolog and the editor, but still no luck.
Any ideas on how to fix this?
In order to help, I have included the configuration dump of prolog:
Installation
C:\Program Files (x86)\SWIPrologEditor\SWIMachine.ini
C:\Users\Cubearth\AppData\Roaming\SWIPrologEditor\SWIUser.ini
C:\Users\Cubearth\AppData\Roaming\SWIPrologEditor\SWIColor.ini
[SWI]
PortableApplication=0
Verzeichnis=C:\Program Files\pl
Manual=C:\Program Files\pl\bin\doc\Manual\Contents.html
XPCE=C:\Program Files\pl\bin\doc\UserGuide\Contents.html
[Program]
InterpreterParameter=-L32M
FileExtension=.pl
[Editor]
TabWidth=2
Indent=2
Indenthelp=1
AutomaticIndent=1
FileTab=1
Linenumbering=1
BracketPair=0
CursorBehindLine=1
Author=
Encoding=0
Structure=0
[Code]
Code-Completion=1
Parameter-Hints=1
Delay=100
[Options]
ColoredConsole=1
IntegratedWindow=1
ReturnToContinue=1
TraceStopsDebugToo=1
BAKFiles=1
RemoveWriteProtection=1
FileTabsMultiline=1
Language=C:\Program Files (x86)\SWIPrologEditor\english.ini
[Browser]
UseIEinternForDocuments=1
OnlyOneBrowserWindow=0
Browser=C:\Users\Cubearth\AppData\Local\Google\Chrome\Application\chrome.exe
Title=unknown
AltKeysBrowser=
ProxyEnabled=0
ProxyIP=
ProxyPort=0
[Printer]
Left=20
Top=20
Right=20
Bottom=20
Header=#%PATH%#
Footer=##- %PAGENUM% -
Linenumbers=0
LinenumbersInMargin=1
Let me enlighten the poor lost soul that is cubearth. You should double check to see which version of swi-prolog you installed (32-bit or 64-bit), because swi-prolog editor only works with the 32-bit version. If you tried using the editor with the 64-bit version, you'll get the error described above. ^^ .
p.s. You are welcome.
Enable trace, run cmd --
?- trace. consult('C:/Users/Cubearth/Documents/Prolog/'filename.pl').

dbExpress error in Delphi 2007

I have had Delphi 2007 for a while. I tried the Delphi 2009 trial. Then I un-installed the trial. Now I get this in a dbExpress Delphi 2007 application:
---------------------------
Debugger Exception Notification
---------------------------
Project ABC.exe raised exception class TDBXError with message
'Unable to load dbxora.dll (ErrorCode 126). It may be missing
from the system path.'.
---------------------------
Break Continue Help
---------------------------
I do not have dbxora.dll anywhere on my pc; I have dbxora30.dll, instead. Looking at another development machine (which has never had Delphi 2009 on it), I see dbxora30.dll too. FWIW, that file is here:
C:\Program Files\CodeGear\RAD Studio\5.0\bin\dbxora30.dll
And my path does include this location.
So it looks like Delphi 2009 introduced a new "dbxora.dll" which replaced "dbxora30.dll"... and when I un-installed Delphi 2009, it failed to point my system back to the original "dbxora30.dll". But now how do I use dbxora30 again?
Any suggestions?
I fixed the problem on my machine by editing this file:
C:\Users\Public\Documents\RAD Studio\dbExpress\dbxdrivers.ini
Under the section labeled [Oracle], I changed the "LibraryName" parameter from "dbxora.dll" to "dbxora30.dll".
I hope this helps someone else.
I had pretty much the same problem, though I installed the full Delphi 2009 along with the existing Delphi 2007 and found that it broke my previous exe files. I uninstalled Delpi 2009 but had to fix it by editing the same file (though it was in a different directory on my machine: C:\Documents and Settings\All Users\Documents\RAD Studio\dbExpress\dbxdrivers.ini). However, there were more lines than just the one that is mentioned above. Luckily, I had a backup of the ini file from before the Delphi 2009 installation. Here are the two sections in case anybody needs help with this:
[Oracle] - FROM DELPHI 2007
DriverUnit=DBXDynalink
DriverPackageLoader=TDBXDynalinkDriverLoader,DBXDynalinkDriver100.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxDynalinkDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
GetDriverFunc=getSQLDriverORACLE
LibraryName=dbxora30.dll
VendorLib=oci.dll
DataBase=Database Name
User_Name=user
Password=password
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
Oracle TransIsolation=ReadCommited
RowsetSize=20
OS Authentication=False
Multiple Transaction=False
Trim Char=False
Decimal Separator=.
MetaDataPackageLoader=TDBXOracleMetaDataCommandFactory,DbxReadOnlyMetaData100.bpl
MetaDataAssemblyLoader=Borland.Data.TDBXOracleMetaDataCommandFactory,Borland.Data.DbxReadOnlyMetaData,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
.
[Oracle] - FROM DELPHI 2009
DriverUnit=DBXOracle
DriverPackageLoader=TDBXDynalinkDriverLoader,DBXCommonDriver120.bpl
DriverPackage=DBXCommonDriver110.bpl
DriverAssemblyLoader=Borland.Data.TDBXDynalinkDriverLoader,Borland.Data.DbxCommonDriver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b
DriverAssembly=Borland.Data.DbxCommonDriver,Version=11.0.5000.0,Culture=neutral,PublicKeyToken=a91a7c5705831a4f
GetDriverFunc=getSQLDriverORACLE
LibraryName=dbxora.dll
VendorLib=oci.dll
DataBase=Database Name
User_Name=user
Password=password
BlobSize=-1
ErrorResourceFile=
LocaleCode=0000
Oracle TransIsolation=ReadCommited
RowsetSize=20
OS Authentication=False
Multiple Transaction=False
Trim Char=False
Decimal Separator=.
MetaDataPackageLoader=TDBXOracleMetaDataCommandFactory,DbxOracleDriver120.bpl
MetaDataAssemblyLoader=Borland.Data.TDBXOracleMetaDataCommandFactory,Borland.Data.DbxOracleDriver,Version=12.0.0.0,Culture=neutral,PublicKeyToken=91d62ebb5b0d1b1b

Resources