// RsSamplePlugin.cpp : Defines the entry point for the DLL application.
//

#include "stdafx.h"
#include "RpSamplePlugin.h"


#ifndef DLLMAIN_HINSTANCE
#ifndef _WIN32_WCE
#define DLLMAIN_HINSTANCE	HINSTANCE
#else
#define DLLMAIN_HINSTANCE	HANDLE
#endif
#endif

//class CRsSamplePluginModule;
//extern CRsSamplePluginModule _AtlModule;

class CRsSamplePluginModule : public CAtlDllModuleT<CRsSamplePluginModule>

{
public:
	//DECLARE_LIBID(__uuidof(CmdPrompt))
	//DECLARE_REGISTRY_APPID_RESOURCEID(IDR_CMDPROMPT, "{D056D1A2-BDC8-4187-B275-05A881EEDEB8}")

};

CRsSamplePluginModule _AtlModule;




#ifdef _MANAGED
#pragma managed(push, off)
#endif

BOOL WINAPI DllMain(DLLMAIN_HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) 
{
	hInstance;
	return _AtlModule.DllMain(dwReason, lpReserved);
}

#ifdef _MANAGED
#pragma managed(pop)
#endif

//#pragma comment(linker, "/EXPORT:GetRosettaPackage=_GetRosettaPackage@0,PRIVATE")

#ifdef __cplusplus    // If used by C++ code, 
extern "C" {          // we need to export the C interface
#endif
__declspec(dllexport) HRESULT __cdecl GetRosettaPackage(IRsUnknownPackage **ppPackage)
{
	// create main package object 
	CComObject<CRpSamplePlugin> *pPackage = NULL;
	HRESULT hRes = CComObject<CRpSamplePlugin>::CreateInstance(&pPackage);
	if (FAILED(hRes))
		return hRes;
	CComQIPtr<IRsUnknownPackage> spPackage = pPackage;
	if (!pPackage)
		return E_NOINTERFACE;
	return spPackage.CopyTo(ppPackage);
}

#ifdef __cplusplus
}
#endif
