Archived
1
0
This repository has been archived on 2024-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
winamp/Src/Winamp/JSAPI_DispatchTable.cpp

22 lines
394 B
C++
Raw Normal View History

2024-09-24 12:54:57 +00:00
#include "JSAPI_DispatchTable.h"
#include <strsafe.h>
JSAPI::Dispatcher::Dispatcher(const wchar_t *_name, DISPID _id, IDispatch *_object)
:id(_id), object(_object)
{
memset(name, 0, sizeof(name));
if (NULL != object)
object->AddRef();
StringCchCopyW(name, ARRAYSIZE(name), _name);
}
JSAPI::Dispatcher::~Dispatcher()
{
if (NULL != object)
{
object->Release();
object = NULL;
}
}