Initial commit

This commit is contained in:
Sebastian H. Gabrielli 2025-01-24 23:01:50 +01:00
commit 7fa17639a2
35 changed files with 2113 additions and 0 deletions

View File

@ -0,0 +1,11 @@
{
"Version": 1,
"ProjectMap": {
"261558be-3639-413c-8c33-8adbb775d19e": {
"ProjectGuid": "261558be-3639-413c-8c33-8adbb775d19e",
"DisplayName": "Project1",
"ColorIndex": 0
}
},
"NextColorIndex": 1
}

BIN
.vs/Project1/v17/.suo Normal file

Binary file not shown.

Binary file not shown.

BIN
Debug/Project1.exe Normal file

Binary file not shown.

BIN
Debug/Project1.pdb Normal file

Binary file not shown.

31
Project1.sln Normal file
View File

@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31919.166
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Project1", "Project1\Project1.vcxproj", "{261558BE-3639-413C-8C33-8ADBB775D19E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{261558BE-3639-413C-8C33-8ADBB775D19E}.Debug|x64.ActiveCfg = Debug|Win32
{261558BE-3639-413C-8C33-8ADBB775D19E}.Debug|x64.Build.0 = Debug|Win32
{261558BE-3639-413C-8C33-8ADBB775D19E}.Debug|x86.ActiveCfg = Debug|Win32
{261558BE-3639-413C-8C33-8ADBB775D19E}.Debug|x86.Build.0 = Debug|Win32
{261558BE-3639-413C-8C33-8ADBB775D19E}.Release|x64.ActiveCfg = Release|x64
{261558BE-3639-413C-8C33-8ADBB775D19E}.Release|x64.Build.0 = Release|x64
{261558BE-3639-413C-8C33-8ADBB775D19E}.Release|x86.ActiveCfg = Release|Win32
{261558BE-3639-413C-8C33-8ADBB775D19E}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6857DD2F-4B36-4FF2-973D-BCC64B76719C}
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>C:\Users\sebgab\source\repos\Project1\Debug\Project1.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

BIN
Project1/Debug/Project1.ilk Normal file

Binary file not shown.

View File

@ -0,0 +1,2 @@
 Source.cpp
Project1.vcxproj -> C:\Users\sebgab\source\repos\Project1\Debug\Project1.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.30.30705:TargetPlatformVersion=10.0.26100.0:
Debug|Win32|C:\Users\sebgab\source\repos\Project1\|

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Project1/Debug/Source.obj Normal file

Binary file not shown.

BIN
Project1/Debug/vc143.idb Normal file

Binary file not shown.

BIN
Project1/Debug/vc143.pdb Normal file

Binary file not shown.

BIN
Project1/PTRobot.dll Normal file

Binary file not shown.

1748
Project1/PTRobot.h Normal file

File diff suppressed because it is too large Load Diff

BIN
Project1/PTRobot.lib Normal file

Binary file not shown.

BIN
Project1/PTRobot4100.dll Normal file

Binary file not shown.

BIN
Project1/PTRobot4200.dll Normal file

Binary file not shown.

BIN
Project1/PTRobotApp.exe Normal file

Binary file not shown.

BIN
Project1/PTRobotDP.dll Normal file

Binary file not shown.

BIN
Project1/PTRobotDPPRO.dll Normal file

Binary file not shown.

BIN
Project1/PTRobotDPse.dll Normal file

Binary file not shown.

BIN
Project1/PTRobotDPse3.dll Normal file

Binary file not shown.

BIN
Project1/PTRobotStr.dll Normal file

Binary file not shown.

164
Project1/Project1.vcxproj Normal file
View File

@ -0,0 +1,164 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{261558be-3639-413c-8c33-8adbb775d19e}</ProjectGuid>
<RootNamespace>Project1</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Source.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="PTRobot.h" />
</ItemGroup>
<ItemGroup>
<Library Include="PTRobot.lib" />
</ItemGroup>
<ItemGroup>
<None Include="PTRobot.dll" />
<None Include="PTRobot4100.dll" />
<None Include="PTRobot4200.dll" />
<None Include="PTRobotApp.exe" />
<None Include="PTRobotDP.dll" />
<None Include="PTRobotDPPRO.dll" />
<None Include="PTRobotDPse.dll" />
<None Include="PTRobotDPse3.dll" />
<None Include="PTRobotStr.dll" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="Source.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="PTRobot.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Library Include="PTRobot.lib">
<Filter>Header Files</Filter>
</Library>
</ItemGroup>
<ItemGroup>
<None Include="PTRobotApp.exe">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobotDP.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobotDPPRO.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobotDPse.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobotDPse3.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobotStr.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobot.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobot4100.dll">
<Filter>Header Files</Filter>
</None>
<None Include="PTRobot4200.dll">
<Filter>Header Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

79
Project1/Source.cpp Normal file
View File

@ -0,0 +1,79 @@
#include <stdio.h>
#include <Windows.h>
#include "PTRobot.h"
int main() {
printf("Hello, world!\n");
printf("Initializing\n");
int res = PTRobot_Initialize();
if (res) {
printf("Failed with error: %i\n", res);
}
else {
printf("Init OK!\n");
}
// Enumerate robots
printf("Enumerating robots\n");
HANDLE phRobots[256];
DWORD handles = 256; // Set to the size of the array
DWORD result = PTRobot_EnumRobots(phRobots, &handles); // Pass the address of handles
bool ded = true;
if (result == PTROBOT_OK) {
printf("Successfully enumerated %lu robots.\n", handles);
// You can now use phRobots array which contains the handles to the robots
ded = false;
}
else if (result == PTROBOT_INVALID_ROBOT) {
printf("No robots found.\n");
}
else if (result == PTROBOT_SEQUENCE) {
printf("Command called out of sequence.\n");
}
else if (result == PTROBOT_INTERNAL) {
printf("An internal error occurred.\n");
}
else if (result == PTROBOT_OVERFLOW) {
printf("Number of robots found exceeds the provided array size.\n");
}
else {
printf("Unknown error occurred.\n");
}
if (ded) { return 1; }
// Get status
PTRobotStatus status;
result = PTRobot_GetRobotStatus(phRobots[0], &status);
if (result == PTROBOT_OK) {
printf("Successfully enumerated %lu robots.\n", handles);
// You can now use phRobots array which contains the handles to the robots
}
else {
printf("ERROR: %u", result);
return 1;
}
printf("State: %u", status.dwSystemState);
printf("Error: %u", status.dwSystemError);
// Enumerate drives
HANDLE phDrives[256];
DWORD numDrives = 256;
result = PTRobot_EnumDrives(phRobots[0], phDrives, &numDrives);
if (result) {
printf("Failed to enumerate drives with error %u", result);
return 1;
}
else {
printf("Found %u drives", numDrives);
}
// Load drive
result = PTRobot_LoadDrive(phRobots[0], phDrives[0], 1, CLEARDRIVE_NO);
printf("Load drive: %u", result);
return 0;
}