// CustomRotorDLL.cpp : Defines the exported functions for the DLL application.
  

#include "stdafx.h"  
#include "CustomRotor.h"  

namespace CustomRotorLibrary
{

	const char * message = "getTempOut";
	char * version;
	int x = 11;
	int y = 22;
	int z = 33;
	unsigned int azimuth = 340;
	unsigned int elevation = 99;
	unsigned int sensor = 3;
	int templab = 22;
	int templna = 23;
	int tempout = 24;
	unsigned int mode = 2;
	bool azmove = true;
	bool elmove = true;
	bool filter = true;
	bool scale = true; // true if farenheight
	bool home = true;
	bool inuse = true;
	bool method = true;
	bool ready = true;
	bool simulation = true;
   // Pragma description at http://www.seti.net/engineering/notebook/volume-11/Chap68/chap68.php

    #pragma comment(linker, "/EXPORT:getAzimuth=?getAzimuth@Functions@CustomRotorLibrary@@SAIXZ")
	unsigned int Functions::getAzimuth(void)
	{
		return azimuth;
	}


    #pragma comment(linker, "/EXPORT:Add=?Add@Functions@CustomRotorLibrary@@SANNN@Z")
	double Functions::Add(double a, double b)// Ordinal 3
	{
		return a + b;
	}

	#pragma comment(linker, "/EXPORT:Version=?Version@Functions@CustomRotorLibrary@@SAHPAD@Z")
	int Functions::Version(char* ptrVersionString)// Ordinal 4

	{
		char * Version;
		Version = "1.6.3.2323";
		strcpy_s(ptrVersionString, strlen(Version) + 1, Version);
		return  strlen(Version);
	}

    #pragma comment(linker, "/EXPORT:Multiply=?Multiply@Functions@CustomRotorLibrary@@SANNN@Z")
	double Functions::Multiply(double a, double b)
	{
		return a * b;
	}


   #pragma comment(linker, "/EXPORT:ReturnTwoStrings=?ReturnTwoStrings@Functions@CustomRotorLibrary@@SAXPAD0@Z")
	void Functions::ReturnTwoStrings(char* str1, char* str2)
   
	 {
	 	strcpy_s(str1, 4, "123");
	 	strcpy_s(str2, 10, "abc");
	 }

   #pragma comment(linker, "/EXPORT:ANDER=?ANDER@Functions@CustomRotorLibrary@@SA_N_N0@Z")
	bool Functions::ANDER(bool a, bool b)
		//
	{
		return a && b;   // AND
	}
	 
}



