Initial community commit
This commit is contained in:
22
Src/Winamp/JSAPI_DispatchTable.cpp
Normal file
22
Src/Winamp/JSAPI_DispatchTable.cpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user