All pastes #265519 Raw Edit

Untitled

public cpp v1 · immutable
·published 2006-12-03 10:19 UTC
rendered paste body
nclude "stdafx.h"IRMPRemote *remote;LONG remoteCookie = 0;extern "C" DllExport void Command(long command, long param1, long param2 = 0){	remote->Command((RemoteCommand) command, (_variant_t) param1, (_variant_t) param2 );}extern "C" DllExport void GetInfo(long command, long param1, long dataptr){	remote->Info( (RemoteInfo) command, (_variant_t) param1, (_variant_t *)test);}extern "C" DllExport void initialize(){	CLSID clsid;	HRESULT hr = CoInitialize(NULL); 	hr = CLSIDFromProgID(OLESTR("YMP.YMPRemote"), &clsid);	hr = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER , __uuidof(IRMPRemote), (LPVOID *)&remote);     remote->Initialize(&remoteCookie);} extern "C" DllExport void shutdown(){	remote->Shutdown(remoteCookie);	CoUninitialize();}BOOL APIENTRY DllMain( HMODULE hModule, DWORD  ul_reason_for_call, LPVOID lpReserved ){    return TRUE;}