forked from excitom/vp-spades
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVpOLE.h
64 lines (53 loc) · 2.26 KB
/
VpOLE.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef _VPOLE_H_
#define _VPOLE_H_
#include <afxole.h> // MFC OLE classes
#include <afxdisp.h> // MFC OLE automation classes
#ifndef WIN32
// Ole stuff
#include <ole2.h>
#include <olectl.h>
#include "compobj.h"
#include "olectlid.h"
#include "OLENLS.H" // dispatch intarface definition
#else
#include "winreg.h" // Registry definition
#include <afxodlgs.h> // MFC OLE dialog classes
#endif
#include "Str816.h" // Helper classes for work with OLESTR
// GUID of interface that can be queried from VP sink.
// Object shoud use this interface for communication with VP.
// const IID BASED_CODE IID_IVpComm =
// { 0xB196B283, 0xBAB4, 0x101A, { 0xB6, 0x9C, 0x00, 0xAA, 0x00, 0x34, 0x1D, 0x05 } };
EXTERN_C const GUID CDECL BASED_CODE IID_IVpComm;
// Vp interface
// Through this interface game object can send
// commands & requests to VP.
interface IVpComm : public IUnknown
{
// Commands & Requests from objects to VP
public:
virtual STDMETHODIMP_(short) LeaveGroup() = 0;
virtual STDMETHODIMP_(short) Send(long Id, short SendType, LPCTSTR Message, BSTR* Data) = 0;
virtual STDMETHODIMP_(short) SendToService(long ServiceId, long SrvSendType,
LPCTSTR Message, BSTR* Data, long ReqId) = 0;
virtual STDMETHODIMP_(short) EnumMembers(long Id, short MaxLevel) = 0;
virtual STDMETHODIMP_(short) QueryService(long* Id, short* VpType) = 0;
virtual STDMETHODIMP_(short) GetPresenceInfo(long Id, BSTR* Nickname, BSTR* Fullname,
BSTR* Location, BSTR* Email) = 0;
virtual STDMETHODIMP_(LPCTSTR) GetPlaceName() = 0;
// VP service methods
public:
virtual STDMETHODIMP_(void) GetParentWnd(long* ParentWnd) = 0;
virtual STDMETHODIMP_(void) SetGameWnd(long GameWnd) = 0;
virtual STDMETHODIMP_(void) DupAvatar(long ParentWnd, short Seat) = 0;
virtual STDMETHODIMP_(void) SetAvatarPos(short Seat, short Left, short Top,
short Width, short Height) = 0;
};
// Subkey into HKEY_CLASSES_ROOT registry entry for
// registration object as VpGame
#ifdef WIN32
#define SUBKEY_VPGAME_REG "Software\\Ubique\\VpGames32"
#else
#define SUBKEY_VPGAME_REG "Software\\Ubique\\VpGames16"
#endif
#endif //_VPOLE_H_