07.21.2015 MP2100 Programming based C++
File -> New -> Procjet...
Installed Templates
Visual C++ -> Windows Forms Application
Project -> Properties -> Configuration Properties ->
C/C++ -> General
Additional Include Directories
C:/YeTools/PCAPI/Include;%(AdditionalIncludeDirectories)
C/C++ -> Code Generation
Struct Member Alignment
1 Byte (/Zp1)
C/C++ -> Language
Treat WChar_t As Built in Type
No (/Zc:char_t-)
Linker -> General
Additional Library Directories
C:/YeTools/PCAPI/Lib;%(AdditionalLibraryDirectories)
Linker -> Input
Additional Dependencies
$(NoInherit);ymcPCAPI.Lib;%(AdditionalDependencies)
Linker -> Advanced
Randomized Base Address
No (/DYNAMICBASE:NO)
including headers
stdafx.h
#include <Windows.h>
#include <stdio.h>
#include <tchar.h>
#include <ymcPCAPI.h>
stdafx.cpp
#pragma pack ( 8 ) // insert at first line
Form1.h
// after #pragma once
#include <ymcPCAPI.h>
#include <stdio.h>
HCONTROLLER g_hController; // Controller Handle
HDEVICE g_hDevice; // Device Handle
HAXIS g_hAxis; // Axis Handle