2014-08-01 19:54:35 +00:00
|
|
|
#include "StdAfx.h"
|
|
|
|
#include <cstdint>
|
|
|
|
#include "Group.h"
|
|
|
|
#include "HandleManager.h"
|
|
|
|
#include "Exports_Common.h"
|
|
|
|
|
2014-08-12 13:38:37 +00:00
|
|
|
EXPORT int Group_BelongsToGroup(bool* result, int32_t handle, LPWSTR str)
|
2014-08-01 19:54:35 +00:00
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
Group* group = (Group*) handle_get_resource(handle);
|
2014-08-01 19:54:35 +00:00
|
|
|
|
|
|
|
if (group != nullptr)
|
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
*result = group->BelongsToGroup(str);
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2014-08-12 13:38:37 +00:00
|
|
|
EXPORT int Group_Destroy(int32_t handle)
|
2014-08-01 19:54:35 +00:00
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
Group* group = (Group*) handle_get_resource(handle);
|
2014-08-01 19:54:35 +00:00
|
|
|
|
|
|
|
if (group != nullptr)
|
|
|
|
{
|
2014-08-12 13:38:37 +00:00
|
|
|
handle_free(handle);
|
2014-08-01 19:54:35 +00:00
|
|
|
delete group;
|
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
|
|
|
}
|