Outlook 2007 Bitness - outlook-2007

I need to get the bitness of Outlook, in 2010 it is stored in a ReqistryKey named Bitness under the path
64bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Office\14.0\Outlook\Bitness
32bit Windows:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Outlook\Bitness
In 2007 these Keys doesn't exist, and so I retrieve a null reference exception.
My Question is, how can I get the bitness in Outlook 2007? I need to set header, so I have to use it.

Outlook 2007 does not have a 64-bit version. If it's being used then it is the 32-bit version.

Related

How to find IdMappedPortTCP Delphi 7 in Delphi 2010

I need help. I want to ask about the location of IdMappedPortTCP Delphi 7 in Delphi 2010, because I cannot find it. In delphi 7, I can find it in indy server > tcp port, but how to find it in Delphi 2010?. Thanks for your suggestions.
Are all packages registered and enabled? Even if a component package is not installed, you still can create instances if you add its source path(s) to the project search path. For Indy, you need <Indy>Lib\Core, Lib\Protocols and Lib\System. (This also makes it easier to switch Indy versions)
Delphi 7 shipped with Indy 8 (or maybe an early Indy 9, I forget which). Delphi 2010 ships with Indy 10. A lot of architectural and hierarchical changes between those versions. On the Component/Tool Pallette, TIdMappedPortTCP is located under "Indy Servers". If you do not have that available then you likely do not have the Indy design-time package loaded in the IDE.

How do I determine the Delphi version which created a Delphi project

I am trying to automatically figure out which Delphi version (of Delphi 5 to XE2 installed on my computer) to use to open a given project without upgrading that project by mistake.
Up to Delphi 7 there is a .dof file in .ini format for each project.
Delphi 5 does not have any entry which might help, but starting from Delphi 6 there is a [FileVersion] section which contains the following values:
Delphi 5: N/A
Delphi 6: 6.0
Delphi 7: 7.0
So I guess that settles that, since older Delphi versions do not concern me.
For Delphi 2005 and 2006 there is a .bdsproj file in XML format containing a version entry:
\BorlandProject\PersonalityInfo\Option\Option
In Delphi 2005 it looks like this:
<Option Name="Version" Type="String">1.0</Option>
In Delphi 2006 like this:
<Option Name="Version">1.0</Option>
So I could look whether the attribute "Type" exists and depending on that decide on Delphi 2005 or 2006.
Could somebody please have a look at his Delphi 2005 and 2006 projects and verify this difference? (Or do you maybe have got a better idea?)
edit: I just tried to verify this and found, that Delphi 2005 does not always add the Type-Attribute. So now I am stuck.
edit: Maybe the GUID stored there is unique to the Delphi version?
Delphi 2005: {87D03616-A4C7-4B5A-AF0F-0164EA60BC59}
Delphi 2006: {CFE1BEE6-6FDE-4241-8CA5-D38D14EAA768}
Somehow I doubt it, I am afraid that the GUID may represent different SKUs (Professional / Architect etc.). But maybe you could verify this?
Starting with Delphi 2007 there is a .dproj file in a different XML format. The Delphi 2007 format does not contain any version entry I could find, but from Delphi 2009 on there seems to be the following entry:
\project\PropertyGroup\ProjectVersion
These are the values I found in my .dproj files:
Delphi 2007: N/A
Delphi 2009: 12.0
Delphi 2010: 12.0
Delphi XE: 12.3
Delphi XE2: 13.4
If these are correct, I could reliably determine Delphi 2007, XE and XE2. But how do I distinguish between Delphi 2009 and 2010?
Also, these numbers look odd to me. Does anybody know whether there are any differences between the various updates of Delphi, e.g. did the original Delphi XE2 release maybe start with 13.0 and with each update increment the number after the dot? But if that's the case, how did Delphi XE get 12.3?
(There is a similar question How can I tell what version of Delphi was used to create a project but the single answer there is quite limited.)
Just in case anybody else needs this: I have just added a page to the Delphi Wiki which summarizes all answers and adds information for newer Delphi versions (currently up to Delphi 10.4.1).
I have now compared the .bdsproj files of Delphi 2005 and 2006 and there is no difference. Also, there is no difference between the .dproj files created by Delphi 2009 and 2010.
So the answer is:
if a .dproj file exists -> read \project\PropertyGroup\ProjectVersion
empty -> Delphi 2007
12.0 -> Delphi 2009 or 2010
12.2 or 12.3 -> Delphi XE1 (according to Uwe Schuster)
13.4 -> Delphi XE2
if a .bdsproj file exists -> Delphi 2005 or 2006
if a .dof file exists -> read [FileVersion]\version
empty -> Delphi 5 (or possibly older)
6.0 -> Delphi 6
7.0 -> Delphi 7
Unfortunately this does not allow me to write a program that automatically starts the correct Delphi version for a given project.
Maybe I will let the program ask the user if there are two possibilities and store his answer in a .ini file so the next time the program knows which Delphi version to start.
btw: The reason I was looking into this is that I have several times accidentally opened Delphi 2007 projects with a later Delphi version which upgraded it and I had to reverse these changes by hand. This has become so annoying that I wanted to prevent it by registering my own program as handler for .dpr files.
The version numbers in the *PROJ files are not bound to releases or updates and not all versions hit the streets.
Delphi XE RTM used version 12.2
Delphi XE Update #1 uses version 12.3
Delphi XE2 (RTM till Update #4) uses 13.4
Just installed XE3 (RTM).
14.3 XE3 (C++ & Delphi)
Today I find this topic googlin about Delphi edition (Standard, Professional, Enterprise).
Anyway I checked some .dof files spread in mine machine and there is facts related to ancient delphi versions:
if a .dof file exists -> read [Directories]/Packages
Delphi 3
[Directories]
OutputDir=
UnitOutputDir=
SearchPath=
Packages=VCLX30;VCL30;INETDB30;INET30;
Delphi 5
[Directories]
OutputDir=.
UnitOutputDir=.
PackageDLLOutputDir=.
PackageDCPOutputDir=.
SearchPath=
Packages=Vcl50;Inet50;Inetdb50;Vclx50;Indy50;
Additional info can be finded near end of dof file:
D3:
[Excluded Packages]
C:\Program Files\Borland\Delphi 3\Bin\DCLDSS30.dpl=Delphi Decision Cube Components
C:\PROGRAM FILES\BORLAND\DELPHI 3\BIN\DCLTEE30.DPL=Delphi TeeChart Components
D5:
[Excluded Packages]
$(DELPHI)\Bin\CorIde50.bpl=Borland Core IDE Package
$(DELPHI)\Bin\direct50.bpl=Borland Direct IDE Package

Statically link firebird driver for dbexpress

Is it possible to deploy zero-dll executable that connects to Firebird using dbExprss? If so, how?
Cause I've tried to include
DBXFirebird but the executable always
needs dbxfb.dll.
Thank you all.
Up to Delphi 2006, you can link the dbExpress driver DLLs into your application by including the appropriate unit.
Since Delphi 2007, this is no longer the case, and you have to ship the driver DLL.

How to compute the Delphi root directory for a range of compilers?

For Delphi 2007, the IDE root directory can be found in the system registry at [HKLM\SOFTWARE\Borland\BDS\5.0\RootDir]. And similarly for Delphi 2010, the key is [HKLM\SOFTWARE\CodeGear\BDS\7.0\RootDir]. But what about the other compilers? If you have any other Delphi compilers, what is in your registry to point to the IDE root?
What are the registry keys to compute the IDE root directory for:
Delphi 7
Delphi 2005
Delphi 2006
Delphi 2009
Delphi XE
Thanks in advance if you can advise for all of these compilers.
Delphi 5: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\5.0\RootDir
Delphi 6: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\6.0\RootDir
Delphi 7: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\Delphi\7.0\RootDir
Delphi 8 (.NET-only product): HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\2.0\RootDir
Delphi 2005: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\3.0\RootDir
BDS 2006: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\4.0\RootDir
Delphi 2007: HKEY_LOCAL_MACHINE\SOFTWARE\Borland\BDS\5.0\RootDir
Delphi 2009: HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\6.0\RootDir
Delphi 2010: HKEY_LOCAL_MACHINE\SOFTWARE\CodeGear\BDS\7.0\RootDir
Delphi XE: HKEY_LOCAL_MACHINE\SOFTWARE\Embarcadero\BDS\8.0\RootDir
The above are for win32 systems that use HKEY_LOCAL_MACHINE\SOFTWARE as base node. For win64 systems, use HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node as base node.
Upon first IDE start of each Delphi version, the values are copied over from HKEY_LOCAL_MACHINE\SOFTWARE\x\BDS\y.0\RootDir to HKEY_CURRENT_USER\Software\x\BDS\y.0\RootDir, so do not be tempted to use the HKEY_CURRENT_USER based values as they are never there for users that build from a script and never start the IDE (automated build systems and building from the command-line come to mind).
I am trying to keep an up-to-date version of the registry keys in my blog.
I don't know if this is the registry entry that you're looking for but here's one named "RootDir" in Delphi 7:
Computer\HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\RootDir
![alt text][1]

Can Delphi 2006 be Installed After Delphi 2007 is Already Installed?

During rebuild after a computer crash, I re-installed Delphi 7, then Delphi 2007. We skipped installation of Delphi 2006. However, now I would like to install Delphi 2006 before Embarcadero discontinues allowing for download of the latest version of D2006.
Is it possible to install Delphi 2006 on this computer without having an adverse impact on the other two installations?
My only concern is the potential problem of mixup in the SYSTEM PATH variable, where each version of Delphi uses the system PATH value to remember the location of the BPL files. Then the system PATH statement holds multiple BPL path locations created by each Delphi installation. However, each version Delphi only finds and uses the FIRST BPL path found in the list of paths - which always happens to be the most recent install. (Delphi installs insert - rather than append - the BPL path references at the beginning of the current system PATH value.) If this happens, then it is possible, for example, for Delphi 7 to reference the BPL files of Delphi 2007. Of course, that's not good at all. This is something that I know how to work around - if it is the only issue.
I'm hoping that the answer is not "uninstall Delphi 2007 first." That is painful for me as it takes significant time to re-install all the add-on components.
I have installed Delphi 5, Delphi 2006, Delphi 2007 and Delphi 2009 in various orders on several computers (laptop, work machine, home desktop, etc.) and have been fine.
I believe since 2007 is based on the 2006 version, that installing 2006 after 2007 is installed will most likely cause some problems. If you absolutely have to have a copy of 2006 for testing purposes, I strongly recommend setting up a virtual machine using VMWare or Virtual PC. This will allow you to test against 2006 directly...if you have 2006 and 2007 installed on the same machine, then your not testing 2006... your testing 2006 with 2007 installed.

Resources