Add Original SDK
This commit is contained in:
@@ -0,0 +1,224 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{2960c946-f28b-4c7c-9c85-55a82b8728d0}</ProjectGuid>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>14.4</ProjectVersion>
|
||||
<Base>True</Base>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
<TargetedPlatforms>3</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<OutputExt>exe</OutputExt>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Locale>2057</VerInfo_Locale>
|
||||
<BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
|
||||
<DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
|
||||
<DynamicRTL>true</DynamicRTL>
|
||||
<ILINK_ObjectSearchPath>..\..\..\C;..\..\Visual Studio 5\DinkeyChange;..\..\C++Builder\DinkeyChange;$(ILINK_ObjectSearchPath)</ILINK_ObjectSearchPath>
|
||||
<UsePackages>true</UsePackages>
|
||||
<NoVCL>true</NoVCL>
|
||||
<ProjectType>CppGuiApplication</ProjectType>
|
||||
<PackageImports>vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;$(PackageImports)</PackageImports>
|
||||
<BCC_wpar>false</BCC_wpar>
|
||||
<IncludePath>..\..\;$(BDS)\include;..\..\..\C;..\..\Visual Studio 5\DinkeyChange;..\..\C++Builder\DinkeyChange;$(IncludePath)</IncludePath>
|
||||
<AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
|
||||
<ILINK_LibraryPath>..\..\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\..\C;..\..\Visual Studio 5\DinkeyChange;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<Defines>NO_STRICT;$(Defines)</Defines>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
|
||||
<BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
|
||||
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
||||
<BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
|
||||
<IntermediateOutputDir>Debug</IntermediateOutputDir>
|
||||
<TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
|
||||
<BCC_StackFrames>true</BCC_StackFrames>
|
||||
<ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
<BCC_DisableOptimizations>true</BCC_DisableOptimizations>
|
||||
<TASM_Debugging>Full</TASM_Debugging>
|
||||
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<Defines>_DEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||
<Defines>_DEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<IntermediateOutputDir>Release</IntermediateOutputDir>
|
||||
<ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
<TASM_Debugging>None</TASM_Debugging>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
|
||||
<Defines>NDEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
|
||||
<Defines>NDEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>CPlusPlusBuilder.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>CppGuiApplication</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<CPlusPlusBuilder.Personality>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">2057</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Debugging>
|
||||
<Debugging Name="DebugSourceDirs"/>
|
||||
</Debugging>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"/>
|
||||
<Parameters Name="Launcher"/>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"/>
|
||||
<Parameters Name="HostApplication"/>
|
||||
<Parameters Name="RemoteHost"/>
|
||||
<Parameters Name="RemotePath"/>
|
||||
<Parameters Name="RemoteParams"/>
|
||||
<Parameters Name="RemoteLauncher"/>
|
||||
<Parameters Name="UseRemoteLauncher">False</Parameters>
|
||||
<Parameters Name="RemoteCWD"/>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"/>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<Linker>
|
||||
<Linker Name="LibPrefix"/>
|
||||
<Linker Name="LibSuffix"/>
|
||||
<Linker Name="LibVersion"/>
|
||||
</Linker>
|
||||
<ProjectProperties>
|
||||
<ProjectProperties Name="AutoShowDeps">False</ProjectProperties>
|
||||
<ProjectProperties Name="ManagePaths">True</ProjectProperties>
|
||||
<ProjectProperties Name="VerifyPackages">True</ProjectProperties>
|
||||
</ProjectProperties>
|
||||
</CPlusPlusBuilder.Personality>
|
||||
<Platforms>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">True</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Cpp.Targets"/>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="..\..\C++Builder\DinkeyChange\ChangeTest.rc">
|
||||
<Form>ChangeTest.res</Form>
|
||||
<BuildOrder>1</BuildOrder>
|
||||
</ResourceCompile>
|
||||
<CppCompile Include="changetest_imports.c">
|
||||
<BuildOrder>2</BuildOrder>
|
||||
</CppCompile>
|
||||
<CppCompile Include="..\..\changetest.c">
|
||||
<BuildOrder>0</BuildOrder>
|
||||
</CppCompile>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,50 @@
|
||||
ChangeTest - sample code to call DinkeyChange.dll in C++ Builder XE3 (and more recent)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This project is written in C++ Builder XE3 but will work in more recent
|
||||
versions (they will upgrade the Project to the latest version). For earlier versions
|
||||
you should use the project in the C++Builder folder.
|
||||
|
||||
The source files in the project are:
|
||||
|
||||
File name Folder Description
|
||||
changetest.c Samples\c main source code file for C
|
||||
changetest.h Samples\c contains some useful constants
|
||||
DinkeyChange_borland.lib Samples\c\import_libs contains the function definitions for DinkeyChange.dll
|
||||
DinkeyChange64_borland.a Samples\c\import_libs contains the function definitions for DinkeyChange64.dll
|
||||
changetest_imports.c Samples\c\C++Builder XE3\DinkeyChange contains code to link the correct import library
|
||||
changetest.rc Samples\c\C++Builder\DinkeyChange resource for main dialog
|
||||
resource.h Samples\c\C++Builder\DinkeyChange header file for resource
|
||||
|
||||
Note that the source paths are structured to minimise files. If you want to
|
||||
move this project the references to these files will probably be no longer valid.
|
||||
|
||||
The project can compile to both 32-bit and 64-bit platforms and will link the appropriate
|
||||
import library. For 32-bit you will call DinkeyChange.dll and for 64-bit you will call
|
||||
DinkeyChange64.dll.
|
||||
|
||||
The sample code contains 7 functions. Just use which ever functions are most
|
||||
appropriate and customise in your own way. The sample code is just a guide.
|
||||
As none of the parameters are sensitive then there is no need to implement
|
||||
strong security in calling DinkeyChange.
|
||||
|
||||
Note - you will not be able to debug your program after DinkeyChange has been called.
|
||||
Our strong anti-debug code will cause the debugger to throw an exception. However,
|
||||
if you do need to debug your code you can use our debug module for DinkeyChange:
|
||||
DinkeyChangeDebug.dll (or 64-bit version). So, you can use DinkeyChange.dll
|
||||
for your release build and DinkeyChangeDebug.dll for your debug build.
|
||||
|
||||
Note - the 32-bit DinkeyChange_borland.lib was created using Borland's IMPLIB tool. If there is a problem
|
||||
with the file we provide you can create your own by running (for example):
|
||||
|
||||
c:\program files\CodeGear\Rad Studio 5.0\bin\implib import_libs\DinkeyChange_borland.lib DinkeyChange.dll
|
||||
|
||||
(This assumes that the current directory is the Samples\C directory).
|
||||
|
||||
Note - the 64-bit DinkeyChange64_borland.a was created using Borland's MKEXP tool. If there is a problem
|
||||
with the file we provide you can create your own by running (for example):
|
||||
(from a RAD Studio Command Prompt)
|
||||
|
||||
mklib import_libs\DinkeyChange64_borland.a DinkeyChange64.dll
|
||||
|
||||
(This assumes that the current directory is the Samples\C directory).
|
||||
@@ -0,0 +1,12 @@
|
||||
// this file exists just to conditionally link in the correct import library
|
||||
// (32-bit or 64-bit depending on the build)
|
||||
// It is not very elegant but we cannot see any other way of doing it.
|
||||
// If you know a better way of doing this then please let us know!
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef __clang__
|
||||
#pragma link "..\\..\\import_libs\\DinkeyChange64_borland.a" // link 64-bit import library
|
||||
#else
|
||||
#pragma link "..\\..\\import_libs\\DinkeyChange_borland.lib" // link 32-bit import library
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,229 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{139221f8-7474-4beb-9d31-ff91c75d2342}</ProjectGuid>
|
||||
<Config Condition="'$(Config)'==''">Release</Config>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>14.4</ProjectVersion>
|
||||
<Base>True</Base>
|
||||
<Platform Condition="'$(Platform)'==''">Win64</Platform>
|
||||
<TargetedPlatforms>3</TargetedPlatforms>
|
||||
<AppType>Application</AppType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
|
||||
<Cfg_1_Win64>true</Cfg_1_Win64>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<OutputExt>exe</OutputExt>
|
||||
<VerInfo_Locale>2057</VerInfo_Locale>
|
||||
<BCC_OptimizeForSpeed>true</BCC_OptimizeForSpeed>
|
||||
<DCC_CBuilderOutput>JPHNE</DCC_CBuilderOutput>
|
||||
<DynamicRTL>true</DynamicRTL>
|
||||
<ILINK_ObjectSearchPath>..\..\..\C;$(ILINK_ObjectSearchPath)</ILINK_ObjectSearchPath>
|
||||
<UsePackages>true</UsePackages>
|
||||
<NoVCL>true</NoVCL>
|
||||
<ProjectType>CppGuiApplication</ProjectType>
|
||||
<PackageImports>vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;bdertl.bpi;vcldbx.bpi;$(PackageImports)</PackageImports>
|
||||
<BCC_wpar>false</BCC_wpar>
|
||||
<IncludePath>..\..\;$(BDS)\include;..\..\..\C;$(IncludePath)</IncludePath>
|
||||
<AllPackageLibs>rtl.lib;vcl.lib</AllPackageLibs>
|
||||
<ILINK_LibraryPath>..\..\;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;..\..\..\C;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<Defines>NO_STRICT;$(Defines)</Defines>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<BCC_OptimizeForSpeed>false</BCC_OptimizeForSpeed>
|
||||
<DCC_DebugInfoInExe>true</DCC_DebugInfoInExe>
|
||||
<ILINK_FullDebugInfo>true</ILINK_FullDebugInfo>
|
||||
<BCC_InlineFunctionExpansion>false</BCC_InlineFunctionExpansion>
|
||||
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
||||
<BCC_UseRegisterVariables>None</BCC_UseRegisterVariables>
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<BCC_DebugLineNumbers>true</BCC_DebugLineNumbers>
|
||||
<IntermediateOutputDir>Debug</IntermediateOutputDir>
|
||||
<TASM_DisplaySourceLines>true</TASM_DisplaySourceLines>
|
||||
<BCC_StackFrames>true</BCC_StackFrames>
|
||||
<ILINK_LibraryPath>$(BDS)\lib\debug;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
<BCC_DisableOptimizations>true</BCC_DisableOptimizations>
|
||||
<TASM_Debugging>Full</TASM_Debugging>
|
||||
<BCC_SourceDebuggingOn>true</BCC_SourceDebuggingOn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
|
||||
<Defines>_DEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||
<Defines>_DEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<IntermediateOutputDir>Release</IntermediateOutputDir>
|
||||
<ILINK_LibraryPath>$(BDS)\lib\release;$(ILINK_LibraryPath)</ILINK_LibraryPath>
|
||||
<TASM_Debugging>None</TASM_Debugging>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
|
||||
<Defines>NDEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<LinkPackageImports>rtl.bpi;vcl.bpi</LinkPackageImports>
|
||||
<Defines>NDEBUG;$(Defines)</Defines>
|
||||
</PropertyGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>CPlusPlusBuilder.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>CppGuiApplication</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<CPlusPlusBuilder.Personality>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">2057</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Debugging>
|
||||
<Debugging Name="DebugSourceDirs"/>
|
||||
</Debugging>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"/>
|
||||
<Parameters Name="Launcher"/>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"/>
|
||||
<Parameters Name="HostApplication"/>
|
||||
<Parameters Name="RemoteHost"/>
|
||||
<Parameters Name="RemotePath"/>
|
||||
<Parameters Name="RemoteParams"/>
|
||||
<Parameters Name="RemoteLauncher"/>
|
||||
<Parameters Name="UseRemoteLauncher">False</Parameters>
|
||||
<Parameters Name="RemoteCWD"/>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
<Parameters Name="Debug Symbols Search Path"/>
|
||||
<Parameters Name="LoadAllSymbols">True</Parameters>
|
||||
<Parameters Name="LoadUnspecifiedSymbols">False</Parameters>
|
||||
</Parameters>
|
||||
<Linker>
|
||||
<Linker Name="LibPrefix"/>
|
||||
<Linker Name="LibSuffix"/>
|
||||
<Linker Name="LibVersion"/>
|
||||
</Linker>
|
||||
<ProjectProperties>
|
||||
<ProjectProperties Name="AutoShowDeps">False</ProjectProperties>
|
||||
<ProjectProperties Name="ManagePaths">True</ProjectProperties>
|
||||
<ProjectProperties Name="VerifyPackages">True</ProjectProperties>
|
||||
</ProjectProperties>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k170.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp170.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k170.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp170.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</CPlusPlusBuilder.Personality>
|
||||
<Platforms>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">True</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Project="$(BDS)\Bin\CodeGear.Cpp.Targets"/>
|
||||
<ItemGroup>
|
||||
<CppCompile Include="..\..\apitest.c">
|
||||
<BuildOrder>0</BuildOrder>
|
||||
</CppCompile>
|
||||
<CppCompile Include="dlltest_imports.c">
|
||||
<BuildOrder>3</BuildOrder>
|
||||
</CppCompile>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<Import Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj" Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,71 @@
|
||||
Sample code to call Runtime Modules in C++ Builder XE3 (or more recent)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This project is written in C++ Builder XE3 but will work in more recent
|
||||
versions (they will upgrade the Project to the latest version). For earlier versions
|
||||
you should use the C++ Builder sample.
|
||||
|
||||
The source files in the project are:
|
||||
|
||||
File name Folder Description
|
||||
apitest.c Samples\c main source code file for C
|
||||
dris.h Samples\c contains the DRIS structure
|
||||
dlltest_imports.c Samples\c\C++Builder\Runtime contains code to link the correct import library
|
||||
dpwin32_borland.lib Samples\c\import_libs contains the function definitions for dpwin32.dll
|
||||
dpwin64_borland.a Samples\c\import_libs contains the function definitions for dpwin64.dll
|
||||
|
||||
Note that the source paths are structured to minimise files. If you want to
|
||||
move this project the references to these files will probably be no longer valid.
|
||||
|
||||
The DllTest project uses the dynamic runtime library (e.g. dpwin32.dll or dpwin64.dll).
|
||||
|
||||
NB There is no ObjTest project because currently there is no 64-bit static module for 64-bit C++ Builder.
|
||||
|
||||
The project can compile to both 32-bit and 64-bit platforms and will link the appropriate
|
||||
import library. For 32-bit builds you need to protect dpwin32.dll and for 64-bit builds you
|
||||
need to protect dpwin64.dll. The protected DLL will need to be in the same folder as your
|
||||
compiled program for it to run correctly.
|
||||
|
||||
The sample code contains 10 functions. You will not need to use all these
|
||||
functions in your code. Just use which ever functions are most appropriate
|
||||
and customise in your own way. The sample code is just a guide. You should
|
||||
implement the protection in a stronger way using the techniques described in
|
||||
the "Increasing your Protection" chapter of the manual.
|
||||
|
||||
Code marked with !!!! are places where you should customise the sample code so
|
||||
that it will work properly:
|
||||
|
||||
* Change the MY_SDSN value to the value of your SDSN
|
||||
* Change the MY_PRODCODE value to the Product Code in the dongle
|
||||
* Change the MyAlgorithm code (if you call a user algorithm)
|
||||
* Change the CryptDRIS code (if you encrypt the DRIS)
|
||||
* Change the CryptApiData (if you encrypt Data you send to our API)
|
||||
* Change the MyRWAlgorithm code (if encrypt Data you send to our API using the R/W algorithm)
|
||||
|
||||
You will also probably want to replace our error messages with your own.
|
||||
|
||||
NB You need to protect dpwin32.dll (dpwin64.dll) and *not* your program.
|
||||
Because your program is linked to the DLL it is protected.
|
||||
|
||||
Note - once dpwin32.dll (dpwin64.dll) is protected you will not be able to debug your program -
|
||||
after our API has been called. Our strong anti-debug code will cause the debugger to
|
||||
throw an exception. If you do want to debug your code then you can use the debug module:
|
||||
dpwin32debug.dll (dpwin64debug.dll), but this should not be used for release. NB You will need
|
||||
to link to the dpwin32debug_borland.lib (dpwin64debug_borland.a) import library if you use the
|
||||
debug module. Edit dlltest_imports.c to do this.
|
||||
(See readme.txt in samples\c for restrictions concerning the debug module).
|
||||
|
||||
Note - the 32-bit dpwin32_borland.lib was created using Borland's IMPLIB tool. If there is a problem
|
||||
with the file we provide you can create your own by running (for example):
|
||||
|
||||
c:\program files\CodeGear\Rad Studio\5.0\bin\implib import_libs\dpwin32_borland.lib dpwin32.dll
|
||||
|
||||
(This assumes that the current directory is the Samples\C directory).
|
||||
|
||||
Note - the 64-bit dpwin64_borland.a was created using Borland's MKEXP tool. If there is a problem
|
||||
with the file we provide you can create your own by running (for example):
|
||||
(from a RAD Studio Command Prompt)
|
||||
|
||||
mklib import_libs\dpwin64_borland.lib dpwin64.dll
|
||||
|
||||
(This assumes that the current directory is the Samples\C directory).
|
||||
@@ -0,0 +1,12 @@
|
||||
// this file exists just to conditionally link in the correct import library
|
||||
// (32-bit or 64-bit depending on the build)
|
||||
// It is not very elegent but we cannot see any other way of doing it.
|
||||
// If you know a better then please let us know!
|
||||
|
||||
#ifdef __BORLANDC__
|
||||
#ifdef __clang__
|
||||
#pragma link "..\\..\\import_libs\\dpwin64_borland.a" // link 64-bit import library
|
||||
#else
|
||||
#pragma link "..\\..\\import_libs\\dpwin32_borland.lib" // link 32-bit import library
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user