2014-08-01 19:54:35 +00:00
|
|
|
#include "StdAfx.h"
|
|
|
|
#include <cstdint>
|
|
|
|
#include "Meter.h"
|
|
|
|
#include "HandleManager.h"
|
|
|
|
#include "Exports_Common.h"
|
|
|
|
|
2014-08-12 13:38:37 +00:00
|
|
|
EXPORT int Meter_Destroy(int handle)
|
2014-08-01 19:54:35 +00:00
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
Meter* meter = (Meter*) handle_get_resource(handle);
|
2014-08-01 19:54:35 +00:00
|
|
|
|
|
|
|
if (meter != nullptr)
|
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
handle_free(handle);
|
2014-08-01 19:54:35 +00:00
|
|
|
delete meter;
|
2014-08-12 13:38:37 +00:00
|
|
|
return Results::Ok;
|
2014-08-01 19:54:35 +00:00
|
|
|
}
|
|
|
|
|
2014-08-12 13:38:37 +00:00
|
|
|
return Results::InvalidHandle;
|
2014-08-01 19:54:35 +00:00
|
|
|
}
|