forked from EvilBeaver/OneScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
870d8a3
commit c34b6cb
Showing
8 changed files
with
1,444 additions
and
857 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,50 @@ | ||
/*.vssscc | ||
*.vspscc | ||
|
||
/src/*.vssscc | ||
/src/*.suo | ||
/src/oscript/oscript.csproj.user | ||
|
||
/src/ScriptEngine/bin/x86/Debug | ||
|
||
/src/ScriptEngine/bin/x86/Release | ||
|
||
/src/ScriptEngine/obj/Release/*.cache | ||
/src/ScriptEngine/obj/x86/Debug/*.cache | ||
/src/ScriptEngine/obj/x86/Debug | ||
|
||
/src/TestApp/bin/x86/Debug | ||
|
||
/src/ScriptEngine/obj/x86/Release | ||
|
||
/src/TestApp/bin/x86/Release | ||
/src/TestApp/obj/Release | ||
|
||
/src/TestApp/obj/x86/Debug | ||
|
||
/src/TestApp/obj/x86/Release | ||
|
||
/src/oscript/obj/Release | ||
|
||
/src/oscript/obj/Debug | ||
|
||
/src/oscript/obj/x86/Release | ||
|
||
/src/oscript/bin/x86/Release | ||
|
||
/src/oscript/obj/x86/Debug | ||
|
||
/src/ScriptEngine.StdLib/bin/x86/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/x86/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/Debug/*.cache | ||
/*.vssscc | ||
*.vspscc | ||
|
||
/src/*.vssscc | ||
/src/*.suo | ||
/src/oscript/oscript.csproj.user | ||
|
||
/src/ScriptEngine/bin/x86/Debug | ||
|
||
/src/ScriptEngine/bin/x86/Release | ||
|
||
/src/ScriptEngine/obj/Release/*.cache | ||
/src/ScriptEngine/obj/x86/Debug/*.cache | ||
/src/ScriptEngine/obj/x86/Debug | ||
|
||
/src/TestApp/bin/x86/Debug | ||
|
||
/src/ScriptEngine/obj/x86/Release | ||
|
||
/src/TestApp/bin/x86/Release | ||
/src/TestApp/obj/Release | ||
|
||
/src/TestApp/obj/x86/Debug | ||
|
||
/src/TestApp/obj/x86/Release | ||
|
||
/src/oscript/obj/Release | ||
|
||
/src/oscript/obj/Debug | ||
|
||
/src/oscript/obj/x86/Release | ||
|
||
/src/oscript/bin/x86/Release | ||
|
||
/src/oscript/obj/x86/Debug | ||
|
||
/src/ScriptEngine.StdLib/bin/x86/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/x86/Release | ||
|
||
/src/ScriptEngine.StdLib/obj/Debug/*.cache | ||
/src/*.sdf | ||
/src/Debug | ||
/src/ScriptEngine.HostedScript/bin/x86/Debug | ||
/src/ScriptEngine.HostedScript/obj/x86/Debug | ||
Debug | ||
/src/*.opensdf | ||
/src/ipch/scriptengine.snegopat-bbe5b63/scriptengine.ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
#include "stdafx.h" | ||
#include "IAddinLoaderImpl.h" | ||
#include "Snegopat_i.c" | ||
|
||
//extern const IID IID_IAddinLoader; | ||
//extern const IID IID_IAddinGroup; | ||
|
||
IAddinLoaderImpl::IAddinLoaderImpl(IDispatch* pDesigner) | ||
{ | ||
m_refCount = 0; | ||
m_pDesigner = pDesigner; | ||
} | ||
|
||
|
||
IAddinLoaderImpl::~IAddinLoaderImpl(void) | ||
{ | ||
|
||
} | ||
|
||
//IUnknown interface | ||
#pragma region IUnknown implementation | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::QueryInterface( | ||
REFIID riid , | ||
void **ppObj) | ||
{ | ||
if (riid == IID_IUnknown) | ||
{ | ||
*ppObj = static_cast<IUnknown*>(this); | ||
AddRef() ; | ||
return S_OK; | ||
} | ||
if (riid == IID_IAddinLoader) | ||
{ | ||
*ppObj = static_cast<IUnknown*>(this); | ||
AddRef() ; | ||
return S_OK; | ||
} | ||
// | ||
//if control reaches here then , let the client know that | ||
//we do not satisfy the required interface | ||
// | ||
*ppObj = NULL ; | ||
return E_NOINTERFACE ; | ||
} | ||
|
||
ULONG __stdcall IAddinLoaderImpl::AddRef() | ||
{ | ||
return InterlockedIncrement(&m_refCount) ; | ||
} | ||
|
||
ULONG __stdcall IAddinLoaderImpl::Release() | ||
{ | ||
long nRefCount = 0; | ||
nRefCount = InterlockedDecrement(&m_refCount) ; | ||
if (nRefCount == 0) | ||
{ | ||
m_pDesigner->Release(); | ||
delete this; | ||
} | ||
|
||
return nRefCount; | ||
} | ||
|
||
#pragma endregion | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::proto( | ||
BSTR *result) | ||
{ | ||
*result = SysAllocString(L"1s"); | ||
return S_OK; | ||
} | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::load( | ||
BSTR uri, | ||
BSTR *fullPath, | ||
BSTR *uniqueName, | ||
BSTR *displayName, | ||
IUnknown **result) | ||
{ | ||
return E_NOTIMPL; | ||
} | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::canUnload( | ||
BSTR fullPath, | ||
IUnknown *addin, | ||
VARIANT_BOOL *result) | ||
{ | ||
return E_NOTIMPL; | ||
} | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::unload( | ||
BSTR fullPath, | ||
IUnknown *addin, | ||
VARIANT_BOOL *result) | ||
{ | ||
return E_NOTIMPL; | ||
} | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::loadCommandName( | ||
BSTR *result) | ||
{ | ||
return E_NOTIMPL; | ||
} | ||
|
||
HRESULT __stdcall IAddinLoaderImpl::selectLoadURI( | ||
BSTR *result) | ||
{ | ||
return E_NOTIMPL; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#pragma once | ||
|
||
#include "Stdafx.h" | ||
#include "Snegopat_h.h" | ||
|
||
class IAddinLoaderImpl : | ||
public IAddinLoader | ||
{ | ||
private: | ||
ULONG m_refCount; | ||
IDispatch* m_pDesigner; | ||
|
||
public: | ||
IAddinLoaderImpl(IDispatch* pDesigner); | ||
|
||
//IUnknown interface | ||
virtual HRESULT __stdcall QueryInterface( | ||
REFIID riid, | ||
void **ppObj); | ||
virtual ULONG __stdcall AddRef(); | ||
virtual ULONG __stdcall Release(); | ||
|
||
virtual HRESULT __stdcall proto( | ||
BSTR *result); | ||
|
||
virtual HRESULT __stdcall load( | ||
BSTR uri, | ||
BSTR *fullPath, | ||
BSTR *uniqueName, | ||
BSTR *displayName, | ||
IUnknown **result); | ||
|
||
virtual HRESULT __stdcall canUnload( | ||
BSTR fullPath, | ||
IUnknown *addin, | ||
VARIANT_BOOL *result); | ||
|
||
virtual HRESULT __stdcall unload( | ||
BSTR fullPath, | ||
IUnknown *addin, | ||
VARIANT_BOOL *result); | ||
|
||
virtual HRESULT __stdcall loadCommandName( | ||
BSTR *result); | ||
|
||
virtual HRESULT __stdcall selectLoadURI( | ||
BSTR *result); | ||
|
||
virtual ~IAddinLoaderImpl(void); | ||
}; | ||
|
Oops, something went wrong.