Click here to Skip to main content
       

ATL / WTL / STL

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: Suggestion for project typememberGarth J Lancaster20 May '13 - 16:20 
nooo .. you dont say
 
I think if you stick with a pure VS/Microsoft environment, your portability options are limited, again, depending on 'what portability' you want .. what I was thinking of with the Mono stuff is, and I'd need to check, it allows you to have pretty well one code-base - you'd just have to compile it for mono on the Linux platform
 
Why not write it in VS/MFC now, the core functionality (ie, not the display stuff) can be separated out into its own layer, and then consider where else/what else (if ??)you need it to run on...
 
There are 'Open IDE's for c, c++ iirc, that work with VS compiler, GCC etc (although the name of one eludes me right at this second)
GeneralRe: Suggestion for project typememberbkelly1320 May '13 - 16:27 
Re: nooo ... you dont say.
 
Re: Re: not sure about the 'within vs'
 
That sounded to me like you did not know what I intended with "vs." I did not mean to be sarcastic or anything.
 
Within MFC: I read about the various options: multi document, single document, and dialog in the help file, but it was really not very informative. Single document and multi document both provide a window with File open menus and the such already added. Dialog does not have that, but it "appears to be" a much simpler project. I only need to have one document open at a time.
 
Keeping this simple: There are about ten sections to a TMATS header. To make it simple for the reader I want to put the data for each major section in a separate dialog/window/(or some silly entity).
 
So which MFC option would you take?
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Suggestion for project typememberGarth J Lancaster20 May '13 - 16:32 
I would probably go Dialog, or Single document,
 
thought 1 : a tab bar, each tab being a section/TMATS header
 
thought 2 : 2 'panes' - left hand 'pane' is a tree structure (or listbox ?) of the file sections, when clicked upon, the TMATS header is displayed in detail on the right hand 'pane'
GeneralRe: Suggestion for project typememberbkelly1320 May '13 - 16:38 
This is really helpful for me. I would not have thought of either one. If I google each will I find a good description?
 
I think the multiple tabs would be easier, but the split pane concept (kind of like Windows Explorer?) would also be cool. What is the approximate work effort for each? Maybe on a one to ten scale? I don't really care what the ten on that scale really means, just a comparison between the two. Maybe assign ten to the more difficult one and assign something less than ten to the easier one.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Suggestion for project typememberGarth J Lancaster20 May '13 - 16:49 
just on a quick thought, the tabs are easier - caveat : as long as you only use them for 'displaying' data, ie, you dont have things going on in tabs that you need to pass between/to other tabs (Ive used a 5 tab bar as a workflow type thing, but an error in tab 3 meant they had to go back to tab 2 for example). One thing that may go against this is the size of the dialog, vs the number of tabs - 'fitting them on/scrolling them' so all the info is apparent to the user - with the dual pane view, you might not have that issue.
 
Im thinking '4' for tabs, and maybe '7' for split-pane
 
Again, if you have a class, with unit tests etc, that can handle parsing, 'getting sections', getting data from your TMATS files, then fitting it with a new UI shouldnt be a biggie
 
Im pretty sure google would bring up plenty of articles .. there's bound to be some lurking here on cp, if only for ideas
GeneralRe: Suggestion for project typememberbkelly1320 May '13 - 16:59 
Thinking of Tabs: If I have a class in charge of writing, can it access the tabs to fetch the data, then write the data to a new file?
 
I presume I would need to create some type of writer class that would be able to poll each tab asking for the data contained within the tab. (Presuming each tab is a separate object ) to provide the data to the file writer. Then the file writer class would poll each tab to get the data to write out.
 
Its past my bedtime so I'll not respond again and catch up tomorrow. But again, this has been very helpful for me. Thank you for taking the time to maintain this conversation.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Suggestion for project typememberGarth J Lancaster21 May '13 - 2:16 
I forgot about this [requirement]
 
>> The user will be able to edit the data and write out to a new file.
 
So maybe the tabs have some sort of edit - possibly hex edit control on them
 
Its not impossible - a 'commit changes' or 'write to file' button on the main dialog would loop through the tabs writing the data obtained from the edit control on it.
 
I think I would write, from an abstraction point of view ...
 
3. GUI Code
2. Tab Manager - Possibly linked to buffer manager/dirty flag - you need to know the order of the tabs and if they have been changed or not
1. File Parser/Writer
 
its about bed time for me too Sleepy | :zzz:
Questionhow to create own button , which can used on .Net/MFC with ATL/C++memberdev C plus24 Apr '13 - 0:02 
Hi all!
I want to do it, same as my topic...
do pratical???
if this can, and can u help me.
thanks so much
QuestionCOM or DCOM?memberprogDes23 Apr '13 - 1:17 
Hi guys,
 
I'm confused. I need to create interprocess communications between x64 and x86 processes running on the same machine.
Can I use COM for it? Cannot see anything on web.
Or does that mean that I must use DCOM?
 
Thanks for help.
AnswerNeither COM nor DCOM - Use sockets!professionalMarco Bertschi23 Apr '13 - 1:48 
Both COM and DCOM are dangerous to use and can easily crash both processes if there is a bug.
IMHO it is better when you use sockets for the inter-process communications because it makes the way your communication works more reliable and the two processes gain a bit of independence (of course you have to add error handling for failed communication attempts, otherwise you are having the same problem as with DCOM and COM).
Just my two cents about how we use to do it at our company.

GeneralRe: Neither COM nor DCOM - Use sockets!memberprogDes23 Apr '13 - 1:56 
I will take into account your 2 cents Smile | :) . Still, the question is open.
GeneralRe: Neither COM nor DCOM - Use sockets!professionalMarco Bertschi23 Apr '13 - 2:33 
Off course there are opportunities when you need to use COM or DCOM, but the savest way of using them is to avoid the usage Laugh | :laugh: .

AnswerRe: COM or DCOM?memberJonathan Davies23 Apr '13 - 2:52 
I've only used DCOM between machines and processes. When I did try to use it quite a while ago, I soon gave up on it due to security and permission problems when trying to do anything between machines in a corporate environment and so used MSMQ (Message Queuing) instead - much easier to work with and provides nice decoupling. Setup a named queue, connect at one end to post messages, connect at the other end to receive messages. Makes testing easy too. As others have said there are other ways as well.
AnswerRe: COM or DCOM?memberpasztorpisti23 Apr '13 - 3:21 
I would definitely use a socket for IPC, maybe shared memory in some cases. The most lightweight interprocess communication channel is probably an unnamed pipe but sockets are more flexible not to mention that the loopback interface is decoupled from the network stack so if both endpoints are on your machine then sockets are super-fast. With sockets you have the opportunity to run the processes on different machines anytime without much effort (possible with name pipes too, but thats more hassle and not crossplatform like sockets). In my opinion COM and DCOM are just unnecessary complications to solve your problem.
AnswerRe: COM or DCOM?memberbkelly1320 May '13 - 16:19 
I backup the opinions on using sockets. Use them. That knowledge will help in the long run and will be good for other platforms. I wrote some articles on TCP/IP that might be useful. Search for them on this site.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

QuestionI have backward compatibility, is the forward compatibility is ensured ?memberkhaliloenit17 Apr '13 - 6:29 
Normally the backward compatibility was planed to ensure that if one soft is compiled for an old version of the library, it can continue to work with the new higher version of the library without recompilation or special adaptation.(situation 1)
Is the reverse also true?
 
Means if the soft is compiled with the new higher version of dll it can continue to work with the old version of the library without recompilation or special adaptation.(situation 2)
 
My situation is the first one, So I ask if should I have also situation 2 works ?
AnswerRe: I have backward compatibility, is the forward compatibility is ensured ?mvpRichard MacCutchan17 Apr '13 - 9:15 
Without knowing what library you are talking about, or what your program does, it is impossible to answer this question.
Use the best guess

AnswerRe: I have backward compatibility, is the forward compatibility is ensured ?professionalMarco Bertschi23 Apr '13 - 2:34 
In the end, no one of us can see into the future, therefore it is not possible to say that your program will work with another version of the DLL in the future. Just because it is... you know... the future.

QuestionConverting souce code form serialization/ de serialization "MBCS" to serialization/ de serialization "UNICODE" : MFCmemberptr_Electron16 Apr '13 - 19:56 
I had an application which is using MFC serialization mechanism w.r.t MBCS (both for serialization/ de serialization ). Now I would like to convert my application to read/write Unicode using MFC serialization mechanism.
 
What would list of changes in this regard. (dos & dont's) Thanks in Advance !!
AnswerRe: Converting souce code form serialization/ de serialization "MBCS" to serialization/ de serialization "UNICODE" : MFCmvpRichard MacCutchan16 Apr '13 - 21:10 
Apart from the fact that you need to use the WCHAR and PWSTR types to refer to your characters there is no difference.
Use the best guess

QuestionHidden window cannot get WM_COPYDATA message?memberyihung.hung16 Apr '13 - 19:26 
My code is:
 
class CSubTapiCom;
 
class CWinHidden :
public CWindowImpl
{
BEGIN_MSG_MAP(CWinHidden)
MESSAGE_HANDLER(WM_COPYDATA, OnCopyData)
MESSAGE_HANDLER(WM_TIMER, OnTimer)
END_MSG_MAP()
public:
//CWinHidden() {};
CWinHidden(CSubTapiCom* pFullCtrl) : m_pFullCtrl(pFullCtrl) {};
 
public:
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
LRESULT CWinHidden::OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
m_pFullCtrl->OnCopyData(uMsg, wParam, lParam, bHandled);
 
return 0;
}
private:
CSubTapiCom* m_pFullCtrl;
};
 

// CSubTapiCom
class ATL_NO_VTABLE CSubTapiCom :
public CComObjectRootEx,
public CStockPropImpl,
public IPersistStreamInitImpl,
public IOleControlImpl,
public IOleObjectImpl,
public IOleInPlaceActiveObjectImpl,
public IViewObjectExImpl,
public IOleInPlaceObjectWindowlessImpl,
public ISupportErrorInfo,
public IConnectionPointContainerImpl,
public CProxy_ISubTapiComEvents,
public IPersistStorageImpl,
public ISpecifyPropertyPagesImpl,
public IQuickActivateImpl,
#ifndef _WIN32_WCE
public IDataObjectImpl,
#endif
public IProvideClassInfo2Impl<&CLSID_SubTapiCom, &__uuidof(_ISubTapiComEvents), &LIBID_SubTapiATLcomLib>,
#ifdef _WIN32_WCE // IObjectSafety is required on Windows CE for the control to be loaded correctly
public IObjectSafetyImpl,
#endif
public CComCoClass,
public CComControl
{
 
CWinHidden m_wndHidden;
HWND m_hHidden;
UINT m_uintTimer;
public:
 

CSubTapiCom() : m_wndHidden(this)
{
}
 
DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE |
OLEMISC_CANTLINKINSIDE |
OLEMISC_INSIDEOUT |
OLEMISC_ACTIVATEWHENVISIBLE |
OLEMISC_SETCLIENTSITEFIRST
)
 
DECLARE_REGISTRY_RESOURCEID(IDR_SUBTAPICOM)
 

BEGIN_COM_MAP(CSubTapiCom)
COM_INTERFACE_ENTRY(ISubTapiCom)
COM_INTERFACE_ENTRY(IDispatch)
COM_INTERFACE_ENTRY(IViewObjectEx)
COM_INTERFACE_ENTRY(IViewObject2)
COM_INTERFACE_ENTRY(IViewObject)
COM_INTERFACE_ENTRY(IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceObject)
COM_INTERFACE_ENTRY2(IOleWindow, IOleInPlaceObjectWindowless)
COM_INTERFACE_ENTRY(IOleInPlaceActiveObject)
COM_INTERFACE_ENTRY(IOleControl)
COM_INTERFACE_ENTRY(IOleObject)
COM_INTERFACE_ENTRY(IPersistStreamInit)
COM_INTERFACE_ENTRY2(IPersist, IPersistStreamInit)
COM_INTERFACE_ENTRY(ISupportErrorInfo)
COM_INTERFACE_ENTRY(IConnectionPointContainer)
COM_INTERFACE_ENTRY(ISpecifyPropertyPages)
COM_INTERFACE_ENTRY(IQuickActivate)
COM_INTERFACE_ENTRY(IPersistStorage)
#ifndef _WIN32_WCE
COM_INTERFACE_ENTRY(IDataObject)
#endif
COM_INTERFACE_ENTRY(IProvideClassInfo)
COM_INTERFACE_ENTRY(IProvideClassInfo2)
#ifdef _WIN32_WCE // IObjectSafety is required on Windows CE for the control to be loaded correctly
COM_INTERFACE_ENTRY_IID(IID_IObjectSafety, IObjectSafety)
#endif
END_COM_MAP()
 
BEGIN_PROP_MAP(CSubTapiCom)
PROP_DATA_ENTRY("_cx", m_sizeExtent.cx, VT_UI4)
PROP_DATA_ENTRY("_cy", m_sizeExtent.cy, VT_UI4)
PROP_ENTRY_TYPE("AutoSize", DISPID_AUTOSIZE, CLSID_NULL, VT_BOOL)
// Example entries
// PROP_ENTRY_TYPE("Property Name", dispid, clsid, vtType)
// PROP_PAGE(CLSID_StockColorPage)
END_PROP_MAP()
 
BEGIN_CONNECTION_POINT_MAP(CSubTapiCom)
CONNECTION_POINT_ENTRY(__uuidof(_ISubTapiComEvents))
END_CONNECTION_POINT_MAP()
 
BEGIN_MSG_MAP(CSubTapiCom)
CHAIN_MSG_MAP(CComControl)
DEFAULT_REFLECTION_HANDLER()
MESSAGE_HANDLER(WM_COPYDATA, OnCopyData)
END_MSG_MAP()
 
// ISupportsErrorInfo
STDMETHOD(InterfaceSupportsErrorInfo)(REFIID riid)
{
static const IID* arr[] =
{
&IID_ISubTapiCom,
};
 
for (int i=0; im_hWnd;
this->m_hWndCD;
 
RECT rect;
 
CString cstrName("subtapirec");
m_hHidden = m_wndHidden.Create(NULL, rect,cstrName);
 
return S_OK;
}
 
void FinalRelease()
{
::KillTimer(m_hHidden, 1);
m_wndHidden.DestroyWindow();
 
}
 
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
::MessageBox(NULL, _T("OnCopyData...1"), _T("INFO"), MB_OK);
 
return 0;
}
};
AnswerRe: Hidden window cannot get WM_COPYDATA message?mvpRichard MacCutchan16 Apr '13 - 21:09 
1. Please enclose your code in <pre> tags so it looks clear, as:
LRESULT OnCopyData(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
::MessageBox(NULL, _T("OnCopyData...1"), _T("INFO"), MB_OK);
 
return 0;
}
 
2. Please explain what your problem is.
Use the best guess

QuestionCoCreateInstance Problem & GetLastError 0x0000007ememberyihung.hung1 Apr '13 - 20:58 
Hi All
 
I have this call to CoCreateInstance that fails, and i get 0x0000007e from GetLastError. Has everybody allready had this kind of error ?
 
Thank you.
 

// import VoipTestCom.dll
#pragma warning(disable:4146)
#import "C:\workvs2008\binaries\Win32\Release\bin\VoipTestCom.dll" raw_interfaces_only, raw_native_types, no_namespace, named_guids
 

LRESULT CSTapiCom::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
 
ISimpleClientPtr m_sipclicom;
CAxWindow wnd;
CLSID clsid;
LPUNKNOWN pUnkCtrl, pUnkCont;
 
HRESULT hr = CLSIDFromProgID(OLESTR("VoipTestCom.SimpleClient"), &clsid);
 

if (hr == S_OK )
{
::MessageBox(NULL, _T("CLSIDFromProgID...ok"), _T("INFO"), MB_OK);
}
 

hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL, IID_IUnknown, (void**)&pUnkCtrl);
 
if (hr == S_OK )
{
::MessageBox(NULL, _T("CoCreateInstance...ok"), _T("INFO"), MB_OK);
}
else
{
TCHAR szBuff[64];
swprintf(szBuff, L"CoCreateInstance...fail->%x",GetLastError());
::MessageBox(NULL, szBuff, _T("INFO"), MB_OK);
}
 
return TRUE;
}
AnswerRe: CoCreateInstance Problem & GetLastError 0x0000007emvpRichard MacCutchan1 Apr '13 - 21:32 
What was the status returned from the call to CoCreateInstance?
Use the best guess

GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007ememberyihung.hung9 Apr '13 - 19:25 
i get 0x0000007e from GetLastError
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007emvpRichard MacCutchan9 Apr '13 - 21:18 
According to the documentation[^] that is equivalent to ERROR_MOD_NOT_FOUND which means it cannot find the file containing the COM class.
Use the best guess

GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007ememberyihung.hung12 Apr '13 - 14:32 
Here is the VoipTestCom_i.c & VoipTestCom.idl code I used to call the object. The object is nammed SimpleClient and the method I call is nammed TestOnRegisterStatusChanged(). I want to use ATL component into my Composite Control(CYHtapiCom) in C++ with ATL. When i test this code on my atl control. I am getting the error: CoCreateInstance failed 0x0000007e. How to add VoipTestCom controls to an ATL composite control programmatically in Visual C++? Thank you.
 
1.
LRESULT CYHtapiCom::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CAxWindow wnd;
CLSID clsid;
LPUNKNOWN pUnkCtrl, pUnkCont;
HRESULT hr = CLSIDFromProgID(OLESTR("VoipTestCom.SimpleClient"), &clsid);
hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL, IID_IUnknown, (void**)&pUnkCtrl);
CComQIPtr spPerStm(pUnkCtrl);
spPerStm->InitNew();
wnd.Attach(m_hWnd);
wnd.AttachControl(pUnkCtrl, &pUnkCont);
 
return TRUE;
}
 

 
2.VoipTestCom_i.c
 
/* this ALWAYS GENERATED file contains the IIDs and CLSIDs */
 
/* link this file in with the server and any clients */
 

/* File created by MIDL compiler version 7.00.0500 */
/* at Sat Apr 06 21:40:37 2013
*/
/* Compiler settings for .\VoipTestCom.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext, robust
error checks: stub_data
VC __declspec() decoration level:
__declspec(uuid()), __declspec(selectany), __declspec(novtable)
DECLSPEC_UUID(), MIDL_INTERFACE()
*/
//@@MIDL_FILE_HEADING( )
 
#pragma warning( disable: 4049 ) /* more than 64k source lines */
 

#ifdef __cplusplus
extern "C"{
#endif
 

#include
#include
 
#ifdef _MIDL_USE_GUIDDEF_
 
#ifndef INITGUID
#define INITGUID
#include
#undef INITGUID
#else
#include
#endif
 
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)
 
#else // !_MIDL_USE_GUIDDEF_
 
#ifndef __IID_DEFINED__
#define __IID_DEFINED__
 
typedef struct _IID
{
unsigned long x;
unsigned short s1;
unsigned short s2;
unsigned char c[8];
} IID;
 
#endif // __IID_DEFINED__
 
#ifndef CLSID_DEFINED
#define CLSID_DEFINED
typedef IID CLSID;
#endif // CLSID_DEFINED
 
#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \
const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
 
#endif !_MIDL_USE_GUIDDEF_
 
MIDL_DEFINE_GUID(IID, IID_ISimpleClient,0x5CA1C162,0x671E,0x4EE8,0x98,0x75,0x27,0x7F,0x4E,0xF1,0xE8,0xCE);
 

MIDL_DEFINE_GUID(IID, IID_IDeviceList,0x8B3A993C,0x9056,0x4415,0x95,0xF5,0x81,0xAD,0x46,0x09,0x5D,0x9F);
 

MIDL_DEFINE_GUID(IID, IID_ICallInfo,0x7BA463E1,0xBAAA,0x4577,0x8A,0xAA,0x84,0x5E,0xA5,0xC2,0x45,0xE1);
 

MIDL_DEFINE_GUID(IID, IID_IUtils,0xF1589BF5,0x0588,0x48C6,0x9C,0x32,0x20,0x82,0xA1,0x9F,0xF5,0x64);
 

MIDL_DEFINE_GUID(IID, IID_IVideoDeviceTest,0x2199B679,0x3511,0x4D58,0xA9,0x43,0x6D,0x2B,0xA2,0x8C,0xBD,0x3E);
 

MIDL_DEFINE_GUID(IID, IID_IVoipClientStatus,0x0D2EC4D1,0xD96E,0x4071,0xB9,0x1A,0xFE,0xE5,0x4C,0x4E,0x70,0xB6);
 

MIDL_DEFINE_GUID(IID, IID_IVoipClientContactItem,0xDB441795,0x875F,0x4CCD,0xB4,0x54,0x1A,0x40,0xC3,0x98,0x82,0x08);
 

MIDL_DEFINE_GUID(IID, IID_IVoipTermIdentity,0x5BAD5CE4,0x2662,0x4C05,0xB6,0x1E,0xF4,0x82,0xED,0x98,0x74,0xBB);
 

MIDL_DEFINE_GUID(IID, LIBID_VoipTestComLib,0x3143FF63,0x0F8E,0x47A3,0x99,0xD8,0x75,0x1F,0x99,0x67,0x9B,0xB1);
 

MIDL_DEFINE_GUID(IID, DIID__ISimpleClientEvents,0x072D2502,0xC12C,0x464F,0x86,0xC0,0x0E,0xB7,0xC8,0x5D,0x33,0x0B);
 

MIDL_DEFINE_GUID(CLSID, CLSID_SimpleClient,0x2D7EFB5B,0x2051,0x4EE2,0x8F,0x18,0xEB,0x46,0x0A,0x3E,0x28,0xD1);
 

MIDL_DEFINE_GUID(CLSID, CLSID_DeviceList,0xD145D987,0xC812,0x48A0,0xA9,0x10,0x5E,0xB4,0xC1,0x60,0xD7,0xA8);
 

MIDL_DEFINE_GUID(CLSID, CLSID_CallInfo,0xF0BDE6CB,0xC90E,0x40C7,0xAF,0xD3,0x12,0x12,0xE4,0xB7,0xA1,0x49);
 

MIDL_DEFINE_GUID(CLSID, CLSID_Utils,0x20AB2CF5,0x5A39,0x4DE9,0xBD,0x89,0x3F,0xBD,0xA0,0x6D,0x98,0xA6);
 

MIDL_DEFINE_GUID(IID, DIID__IVideoDeviceTestEvents,0x92E9DF0B,0x5C0A,0x41E0,0xA1,0xCB,0xE6,0xE0,0x25,0xBC,0xFA,0x7D);
 

MIDL_DEFINE_GUID(CLSID, CLSID_VideoDeviceTest,0xD88DE370,0xA7E0,0x4C16,0xB0,0x97,0x48,0x82,0x27,0x4A,0x21,0xCE);
 

MIDL_DEFINE_GUID(CLSID, CLSID_VoipClientStatus,0xADA36E49,0xB138,0x41BA,0x98,0xE3,0xED,0xA7,0x91,0xFE,0x2A,0x00);
 

MIDL_DEFINE_GUID(CLSID, CLSID_VoipClientContactItem,0xB4D89524,0x71A7,0x462D,0x9A,0x4D,0xA6,0xF4,0x3E,0x0B,0x8F,0x71);
 

MIDL_DEFINE_GUID(IID, DIID__IVoipTermIdentityEvents,0x521B5E5F,0x183C,0x40B3,0x93,0xF6,0x3B,0x84,0x9A,0x0B,0xF8,0xC3);
 

MIDL_DEFINE_GUID(CLSID, CLSID_VoipTermIdentity,0xAB04463D,0x90FF,0x4329,0x9D,0xF3,0x95,0x2C,0x87,0x1C,0xAD,0xD7);
 
#undef MIDL_DEFINE_GUID
 
#ifdef __cplusplus
}
#endif
 
3.VoipTestCom.idl
 
*/
/*******************************************************************************
*
*
* This file contains the implementation the Voip Client COM sample application.
******************************************************************************/
 
// VoipTestCom.idl : IDL source for VoipTestCom
//
 
// This file will be processed by the MIDL tool to
// produce the type library (VoipTestCom.tlb) and marshalling code.
 
import "oaidl.idl";
import "ocidl.idl";
 
typedef [uuid(3AF6FD30-0E85-4df2-89B2-6530A9AF1A9C), version(1.0)]
enum V2OIP_PROTOCOLTYPE
{
V2OIP_PROTOCOLTYPE_SIP = 0,
V2OIP_PROTOCOLTYPE_H323 = 1
} V2OIP_PROTOCOLTYPE;
 
typedef [uuid(EA50C609-3DD6-4dd2-AD29-0111EDE762CD), version(1.0)]
enum _LOG_MODE {
LOG_MODE_NONE = 0,
LOG_MODE_TRACE = 1,
LOG_MODE_WRITE = 2
}_LOG_MODE;
 
typedef [uuid(D69E4CD5-1159-42fc-8A50-C3511A8D247D), version(1.0)]
enum RVV2OIP_MEDIA_DEVICE_TYPE
{
RVV2OIP_MEDIA_DEVICE_UNKNOWN = -1,
RVV2OIP_MEDIA_DEVICE_MIC = 0,
RVV2OIP_MEDIA_DEVICE_SPEAKER = 1,
RVV2OIP_MEDIA_DEVICE_CAMERA = 2,
RVV2OIP_MEDIA_DEVICE_SCREEN = 3,
RVV2OIP_MEDIA_DEVICE_SCREEN_CAPTURE = 4
} RVV2OIP_MEDIA_DEVICE_TYPE;
 
typedef [uuid(F00F87B3-BE97-498b-853C-752CAF71875F), version(1.0)]
enum RVV2OIP_CALL_TYPE
{
RVV2OIP_CALLTYPENONE =-1 ,
RVV2OIP_CALLTYPEAUDIO,
RVV2OIP_CALLTYPEVIDEO,
RVV2OIP_CALLTYPEVIDEOPNC
} RVV2OIP_CALL_TYPE;
 
typedef [uuid(39D6C660-DCE6-412c-9EDB-0BC833D2498F), version(1.0)]
enum RVV2OIP_IMAGE_TYPE
{
RVV2OIP_IMAGE_TYPE_UNKNOWN =-1 ,
RVV2OIP_IMAGE_TYPE_JPEG
} RVV2OIP_IMAGE_TYPE;
 
typedef [uuid(C7263AE1-9DE9-495a-9B85-24A7F41FE0DE), version(1.0)]
enum RVV2OIP_MEDIA_DIRECTION
{
RVV2OIP_MEDIA_DIRECTION_UNKNOWN =-1 ,
RVV2OIP_MEDIA_DIRECTION_TRANSMITTING,
RVV2OIP_MEDIA_DIRECTION_RECEIVING
} RVV2OIP_MEDIA_DIRECTION;
 
typedef [uuid(A91B6062-8C5C-4e9c-A7C7-33CD9ED65FDC), version(1.0)]
enum RVV2OIP_CALLSTATE
{
RVV2OIP_CALLSTATEUNKNOWN=-1,
RVV2OIP_CALLSTATEIDLE,
RVV2OIP_CALLSTATEOFFERING,
RVV2OIP_CALLSTATEINVITING,
RVV2OIP_CALLSTATEPROCEEDING,
RVV2OIP_CALLSTATECONNECTED,
RVV2OIP_CALLSTATEDISCONNECTED,
RVV2OIP_CALLSTATEREDIRECTED,
} RVV2OIP_CALLSTATE;
 
typedef [uuid(CFF03535-1373-4323-843F-DE0123F41A20), version(1.0)]
enum RVV2OIP_CALLSTATEREASON
{
RVV2OIP_CALLSTATEREASON_IDLE,
RVV2OIP_CALLSTATEREASON_REJECTED_BY_REMOTE,
RVV2OIP_CALLSTATEREASON_REMOTE_BUSY,
RVV2OIP_CALLSTATEREASON_MSG_SEND_FAILURE,
RVV2OIP_CALLSTATEREASON_NO_REPLY_TIMEOUT,
RVV2OIP_CALLSTATEREASON_GIVE_UP_DNS,
RVV2OIP_CALLSTATEREASON_NETWORK_ERROR,
RVV2OIP_CALLSTATEREASON_LOCAL_OPERATION_FAILED
} RVV2OIP_CALLSTATEREASON;
 

typedef [uuid(1E6C3C88-3BDD-4ff2-9A35-1597FBDD069E), version(1.0)]
enum RVV2OIP_CALL_MEDIA_STREAM_TYPE
{
RVV2OIP_CALL_MEDIA_STREAM_UNKNOWN = -1,
RVV2OIP_CALL_MEDIA_STREAM_AUDIO,
RVV2OIP_CALL_MEDIA_STREAM_VIDEO,
} RVV2OIP_CALL_MEDIA_STREAM_TYPE;
 
typedef [uuid(F8DB4248-5729-4fb3-897F-EB7ADDE6DEF6), version(1.0)]
enum _VIDEO_RESOLUTION
{
_VIDEO_RESOLUTION_UNKNOWN = -1,
_VIDEO_RESOLUTION_QCIF,
_VIDEO_RESOLUTION_CIF,
_VIDEO_RESOLUTION_VGA,
_VIDEO_RESOLUTION_4CIF,
_VIDEO_RESOLUTION_SVGA,
_VIDEO_RESOLUTION_720p,
} _VIDEO_RESOLUTION;
 
typedef [uuid(E74D66A5-31E7-4ec5-938D-771BD460F828), version(1.0)]
enum _REG_STATE
{
REG_STATE_NONE = 0,
REG_STATE_SIP,
REG_STATE_H323,
REG_STATE_SIP_AND_H323
}_REG_STATE;
 
typedef [uuid(876C67EC-59A8-4b1d-9C0B-B880E11381BF), version(1.0)]
enum
{
RVV2OIP_CFGAPPLYACTION_UNKNOWN = -1,
RVV2OIP_CFGAPPLYACTION_ANYTIME,
RVV2OIP_CFGAPPLYACTION_REFRESH,
RVV2OIP_CFGAPPLYACTION_RESTART
}RVV2OIP_CFGAPPLYACTION;
 
typedef [uuid(FCE32EB7-1F5B-4b67-942E-AF888AB389BE), version(1.0)]
enum
{
NW_QUALITY_UNDEFINED,
NW_QUALITY_POOR,
NW_QUALITY_FAIR,
NW_QUALITY_GOOD
}_NW_QUALITY;
 

typedef [uuid(C4F66EEF-B732-4f72-9BC7-1ABE82799B51), version(1.0)]
enum
{
MEDIA_STREAM_DIRECTION_UNKNOWN = -1,
MEDIA_STREAM_TRANSMITTER = 0,
MEDIA_STREAM_RECEIVER
}_MEDIA_STREAM_DIRECTION;
 
typedef [uuid(7D581F49-828E-4b1a-B742-6DA5FEA681F1), version(1.0)]
enum
{
MEDIA_CODEC_NOT_SUPPORTED = -1,
MEDIA_CODEC_H264 = 0,
MEDIA_CODEC_G711_PCMU,
MEDIA_CODEC_G711_PCMA,
MEDIA_CODEC_G722,
MEDIA_CODEC_G7221,
MEDIA_CODEC_G729,
MEDIA_CODEC_G7231,
MEDIA_CODEC_G728,
MEDIA_CODEC_AMR,
MEDIA_CODEC_G723,
MEDIA_CODEC_G729AB,
MEDIA_CODEC_H261,
MEDIA_CODEC_H263,
MEDIA_CODEC_INBAND_DTMF,
MEDIA_CODEC_AUDIO_PARITY_FEC,
MEDIA_CODEC_H264_TSVC
}_MEDIA_CODEC_TYPE;
 
typedef [uuid(F0C19B8F-C071-4be8-8B38-076FED31CB05), version(1.0)]
enum _RVV2OIP_NAT_TRAVERSAL_MODE
{
RVV2OIP_CFG_NATOFFMODE = 0,
RVV2OIP_CFG_H460MODE,
RVV2OIP_CFG_NATBASICMODE
} _RVV2OIP_NAT_TRAVERSAL_MODE;
 
typedef [uuid(EE5C70E4-C2D6-4ef7-AB82-A86CE0E52F9C), version(1.0)]
enum
{
PIP_UNKNOWN = -1,
PIP_NONE = 0,
PIP_RIGHTBOTTOM = 1,
PIP_LEFTBOTTOM = 2,
PIP_RIGHTTOP = 3,
PIP_LEFTTOP = 4,
PIP_SEPARATE_WINDOW = 5
} __PIP_MODES;
 
typedef [uuid(121C5962-E056-4708-8CC9-38229B3EB2D2), version(1.0)]
enum
{
NOTIFIER_SEVERITY_TYPE_INFO,
NOTIFIER_SEVERITY_TYPE_WARNING,
NOTIFIER_SEVERITY_TYPE_MINOR,
NOTIFIER_SEVERITY_TYPE_MAJOR,
NOTIFIER_SEVERITY_TYPE_CRITICAL
} _NOTIFIER_SEVERITY_TYPE;
 
typedef [uuid(D1FC16E6-9A90-4cd0-96D2-4F5572CB32E1), version(1.0)]
enum
{
NOTIFIER_USER_TYPE_USER,
NOTIFIER_USER_TYPE_ADMIN,
NOTIFIER_USER_TYPE_ALL
}_NOTIFIER_USER_TYPE;
 
typedef [uuid(2C3908B0-BABD-4d06-B885-89D7A3490A99), version(1.0)]
enum
{
RVV2OIP_IDENTITYREGSTATEUNKNOWN,
RVV2OIP_IDENTITYREGSTATEIDLE,
RVV2OIP_IDENTITYREGSTATEREGISTERING,
RVV2OIP_IDENTITYREGSTATEREGISTERED,
RVV2OIP_IDENTITYREGSTATENOTREGISTERED,
RVV2OIP_IDENTITYREGSTATEAUTHENTICATING,
RVV2OIP_IDENTITYREGSTATEUNREGISTERING,
RVV2OIP_IDENTITYREGSTATEREDIRECTED,
RVV2OIP_IDENTITYREGSTATETERMINATED
} RVV2OIP_IDENTITYREGSTATE;
 
typedef [uuid(4027E4A4-22B8-41df-AAEC-B8191B9B5C17), version(1.0)]
enum
{
RVV2OIP_IDENTITYREGREASONIDLE,
RVV2OIP_IDENTITYREGREASONSERVERADDRESSNOTCONFIGURED,
RVV2OIP_IDENTITYREGREASONSERVERREJECTED,
RVV2OIP_IDENTITYREGREASONNOREPLY,
RVV2OIP_IDENTITYREGREASONAUTHFAILED,
RVV2OIP_IDENTITYREGREASONNETWORKERROR,
RVV2OIP_IDENTITYREGREASONINTERNALERROR,
RVV2OIP_IDENTITYREGREASONUNKNOWN
} RVV2OIP_IDENTITYREGREASON;
 
typedef [uuid(3CDF5C23-F456-4d24-B340-BEE9010CD635), version(1.0)]
enum
{
RVV2OIP_MEDIATYPEUNKNOWN,
RVV2OIP_MEDIATYPEAUDIO,
RVV2OIP_MEDIATYPEVIDEO,
RVV2OIP_MEDIATYPESECONDVIDEO,
} RVV2OIP_MEDIATYPE;
 
typedef [uuid(E39F400A-51B5-4353-8FA0-C4A0AE58150F), version(1.0)]
enum
{
RV_V2OIP_REGSTATEUNDEFINED,
RV_V2OIP_REGSTATENOT_REGISTERED,
RV_V2OIP_REGSTATEREGISTERED,
RV_V2OIP_REGSTATEDISCOVERED,
RV_V2OIP_REGSTATEREGISTERING,
RV_V2OIP_REGSTATEREDIRECTED,
RV_V2OIP_REGSTATEUNAUTHENTICATED,
RV_V2OIP_REGSTATEFAILED,
RV_V2OIP_REGSTATEMSGSENDFAILURE
} RV_V2OIP_REGISTRATION_STATE;
 
typedef [uuid(D7213080-31FD-4449-A735-DD68A279F5E7), version(1.0)]
enum
{
RVV2OIP_CFGGROUPTYPEUNKNOWN = -1,
RVV2OIP_CFGGROUPTYPESYSTEM,
RVV2OIP_CFGGROUPTYPENETWORK,
RVV2OIP_CFGGROUPTYPESECURITY,
RVV2OIP_CFGGROUPTYPEIDENTITY,
RVV2OIP_CFGGROUPTYPEVIDEO,
RVV2OIP_CFGGROUPTYPEAUDIO,
RVV2OIP_CFGGROUPTYPEPREFERENCES,
RVV2OIP_CFGGROUPTYPEJITTER,
RVV2OIP_CFGGROUPTYPERTCP,
RVV2OIP_CFGGROUPTYPEDEBUGGING,
RVV2OIP_CFGGROUPTYPELOG,
RVV2OIP_CFGGROUPTYPENOTIFICATIONS,
RVV2OIP_CFGGROUPTYPECALLINFO,
RVV2OIP_CFGGROUPTYPECLIENTSTATUS,
RVV2OIP_CFGGROUPTYPELICENSE,
RVV2OIP_CFGGROUPTYPEAPPLICATION,
RVV2OIP_CFGGROUPTYPEAPPLICATIONINDICATIONS,
RVV2OIP_CFGGROUPTYPECALCULATED,
RVV2OIP_CFGGROUPTYPELDAP,
RVV2OIP_CFGGROUPTYPEASF,
RVV2OIP_CFGGROUPTYPEMGMT,
RVV2OIP_CFGGROUPTYPENATTRAVERSAL,
RVV2OIP_CFGGROUPBEEDESKUI
}RVV2OIP_CFGGROUPTYPE;
 
typedef [uuid(AF21911C-362F-4481-A4F4-531080C9BFE8), version(1.0)]
enum
{
UNKNOWN_VIDEO_FORMAT = -1,
VIDEO_FORMAT_YV12 = 0,
VIDEO_FORMAT_I420,
VIDEO_FORMAT_YUY2,
VIDEO_FORMAT_RGB16,
VIDEO_FORMAT_RGB24,
VIDEO_FORMAT_RGB32,
VIDEO_FORMAT_H264
} __VIDEO_FORMAT;
 
typedef [uuid(897B2F99-C50E-41ad-BEC9-BB7BB5F4C378), version(1.0)]
enum
{
UNKNOWN_REG_TYPE = -1,
REG_TYPE_SIP = 0,
REG_TYPE_H323 = 1
} _REG_TYPE;
 
typedef [uuid(CC002133-8DD2-4379-9303-C38AA29D485E), version(1.0)]
enum
{
CONTACT_ITEM_STATE_UNDEFINED = -1,
CONTACT_ITEM_STATE_ONLINE = 0,
CONTACT_ITEM_STATE_OFFLINE = 1,
CONTACT_ITEM_STATE_AWAY = 2,
CONTACT_ITEM_STATE_IDLE = 3,
CONTACT_ITEM_STATE_ON_THE_PHONE = 4,
CONTACT_ITEM_STATE_BUSY = 5
 
} _CONTACT_ITEM_STATE;
 
typedef [uuid(EDC3F782-39D1-4dab-8FA5-2309B9F47FF9), version(1.0)]
enum
{
RVV2OIP_INTERFACEUNKNOWN,
RVV2OIP_INTERFACEADDED,
RVV2OIP_INTERFACEREMOVED,
RVV2OIP_INTERFACENONE
}RVV2OIP_NETWORKINTERFACECHANGE;
 
typedef [uuid(A5F2466A-6EF3-4893-A43C-7E467E4906ED), version(1.0)]
enum
{
RvV2oip_CloudAdsRegionCenter,
RvV2oip_CloudAdsRegionLeft,
RvV2oip_CloudAdsRegionRight,
RvV2oip_CloudAdsRegionTop,
RvV2oip_CloudAdsRegionBottom
} RvV2oip_CloudAdsRegion;
 
typedef [uuid(0463BF93-D4AE-4353-9B20-53BBF042A671), version(1.0)]
enum
{
RvV2oip_CloudAdsInstructionPlay,
RvV2oip_CloudAdsInstructionStop
} RvV2oip_CloudAdsInstruction;
 
typedef [uuid(4D13A014-E8E4-454f-97A0-6C29D87516DD), version(1.0)]
enum RVV2OIP_VOL_PARAM
{ RVV2OIP_VOL_PARAM_UNKNOWN = -1,
RVV2OIP_VOL_PARAM_ADJUST_ENABLE,
RVV2OIP_VOL_PARAM_ADJUST_DISABLE
} RVV2OIP_VOL_PARAM;
 
typedef [uuid(81FE1E66-B6F6-4f9f-A459-602A186690A3), version(1.0)]
enum RVV2OIP_VOL_MEASURE
{ RVV2OIP_VOL_MEASURE_UNKNOWN = -1,
RVV2OIP_VOL_MEASURE_LEVEL,
RVV2OIP_VOL_MEASURE_METER
} RVV2OIP_VOL_MEASURE;
 
typedef [uuid(0AB8382C-7EED-4acc-BBAF-944830E0F845), version(1.0)]
enum RVV2OIP_CTRL_CMD
{ RVV2OIP_CTRL_CMD_UNKNOWN = -1,
RVV2OIP_CTRL_CMD_PLAY,
RVV2OIP_CTRL_CMD_STOP,
RVV2OIP_CTRL_CMD_CAPTURE
} RVV2OIP_CTRL_CMD;
 
typedef [uuid(23F00D7A-F107-4e0e-8B33-FEE7833F724F), version(1.0)]
enum RVV2OIP_DEVICE_USAGE
{ RVV2OIP_DEVICE_USAGE_UNKNOWN = -1,
RVV2OIP_DEVICE_USAGE_SPEAKER,
RVV2OIP_DEVICE_USAGE_RING
} RVV2OIP_DEVICE_USAGE;
 
interface IDeviceList;
interface ICallInfo;
interface IVoipClientStatus;
interface IVoipClientContactItem;
interface IVoipTermIdentity;
[
object,
uuid(5CA1C162-671E-4EE8-9875-277F4EF1E8CE),
dual,
nonextensible,
helpstring("ISimpleClient Interface"),
pointer_default(unique)
]
interface ISimpleClient : IDispatch{
 
[id(1), helpstring("Initialize VoipTestCom SimpleClient")] HRESULT Init([in] LONGLONG videoOutHwnd, [in] LONGLONG videoLocalOutHwnd, [in] LONGLONG videoOutPncHwnd, [in] BSTR configFilePath, [in] _LOG_MODE logMode, [out,retval] VARIANT_BOOL* pRetVal);
[id(2), helpstring("Get Device Count by Type")] HRESULT GetDevices([in] RVV2OIP_MEDIA_DEVICE_TYPE devType, [in] RVV2OIP_DEVICE_USAGE devUsage, [out,retval] IDeviceList** ppDeviceList);
[id(3), helpstring("Unitialize VoipClient COM object")] HRESULT Terminate([out,retval] VARIANT_BOOL* pRetVal);
[id(4), helpstring("Start Audio/Video call")] HRESULT StartCall([in] RVV2OIP_CALL_TYPE callType, [in] BSTR remoteUser, [in] VARIANT_BOOL isSecure, [in] VARIANT_BOOL isEncrypted, [out,retval] VARIANT_BOOL* pRetVal);
[propget, id(5), helpstring("Get Call Session Status")] HRESULT ActiveCallStatus([out, retval] RVV2OIP_CALLSTATE* pVal);
[id(6), helpstring("End Current Call")] HRESULT EndCall([out,retval] VARIANT_BOOL* pRetVal);
[propget, id(7), helpstring("property LogMode")] HRESULT LogMode([out, retval] _LOG_MODE* pVal);
[propput, id(7), helpstring("property LogMode")] HRESULT LogMode([in] _LOG_MODE newVal);
[id(8), helpstring("Answer Incoming Call")] HRESULT AnswerCall([out,retval] VARIANT_BOOL* pRetVal);
[id(9), helpstring("Reject Incoming Call")] HRESULT RejectCall([out,retval] VARIANT_BOOL* pRetVal);
[id(10), helpstring("Mute/Unmute Audio/Video Streams")] HRESULT SetMute([in] RVV2OIP_CALL_MEDIA_STREAM_TYPE streamType, [in] VARIANT_BOOL mute);
[id(11), helpstring("Get Mute State by stream type")] HRESULT GetMute([in] RVV2OIP_CALL_MEDIA_STREAM_TYPE streamType, [out,retval] VARIANT_BOOL* pRetVal);
[propget, id(12), helpstring("Get Current Call Type (Audio/Video)")] HRESULT CurrentCallType([out, retval] RVV2OIP_CALL_TYPE* pVal);
[id(13), helpstring("method HoldCall")] HRESULT HoldCall([out,retval] VARIANT_BOOL* pRetVal);
[id(14), helpstring("method RetrieveCall")] HRESULT RetrieveCall([out,retval] VARIANT_BOOL* pRetVal);
[propget, id(15), helpstring("Get Current Call Statistics")] HRESULT CallInfo([out, retval] ICallInfo** ppCallInfo);
[propget, id(16), helpstring("Is VoipClient Initialized?")] HRESULT IsInitialized([out, retval] VARIANT_BOOL* pVal);
[id(17), helpstring("Set Speaker Vol")] HRESULT SetPlayVol([in] ULONG leftVol, [in] ULONG rightVol, [out,retval] VARIANT_BOOL* pRetVal);
[id(18), helpstring("Refresh Configuration")] HRESULT Refresh([out, retval] VARIANT_BOOL* pRetVal);
[id(19), helpstring("Send Dtmf Keys")] HRESULT SendDtmf([in] BSTR key, [out,retval] VARIANT_BOOL* pRetVal);
[propget, id(20), helpstring("Set/Get Picture in Picture mode")] HRESULT PIPMode([out, retval] __PIP_MODES* pVal);
[propput, id(20), helpstring("Set/Get Picture in Picture mode")] HRESULT PIPMode([in] __PIP_MODES newVal);
[id(21), helpstring("Accept/Reject Call Tranfere Request")] HRESULT CallTransferComplete([in] VARIANT_BOOL bTranfereAgree, [out,retval] VARIANT_BOOL* pRetVal);
[id(22), helpstring("Complete Adding current call to Conference - agree or reject")] HRESULT AddToConfComplete([in] VARIANT_BOOL bConfAgree, [out,retval] VARIANT_BOOL* pRetVal);
[propget, id(23), helpstring("property ActiveCallsCount")] HRESULT ActiveCallsCount([out, retval] UINT* pVal);
[propget, id(24), helpstring("property StatusInfo")] HRESULT StatusInfo([out, retval] IVoipClientStatus** ppInfo);
[id(25), helpstring("method AddContactItem")] HRESULT AddContactItem([in] IVoipClientContactItem* pItem);
[id(26), helpstring("method RemoveContactItem")] HRESULT RemoveContactItem([in] IVoipClientContactItem* pItem);
[id(27), helpstring("method PublishPresence")] HRESULT PublishPresence([in] _CONTACT_ITEM_STATE newStatus);
[id(28), helpstring("method StartPresentation")] HRESULT StartPresentation([out, retval] VARIANT_BOOL* bRetVal);
[id(29), helpstring("method StopPresentation")] HRESULT StopPresentation(void);
[propget, id(30), helpstring("property IsTerminated")] HRESULT IsTerminated([out, retval] VARIANT_BOOL* bRetVal);
[id(31), helpstring("method Restart")] HRESULT Restart(void);
[id(32), helpstring("method GetCfgParamValue")] HRESULT GetCfgParamValue([in] RVV2OIP_CFGGROUPTYPE groupType, [in] BSTR paramKey, [in] BSTR identityID, [in] BSTR defaultValue, [out,retval] BSTR* pRetVal);
[id(33), helpstring("method SetCfgParamValue")] HRESULT SetCfgParamValue([in] RVV2OIP_CFGGROUPTYPE groupType, [in] BSTR identityID, [in] BSTR paramKey, [in] BSTR paramValue, [out,retval] VARIANT_BOOL* pRetVal);
[id(34), helpstring("method GetCfgRequiredAction")] HRESULT GetCfgRequiredAction([out,retval] RVV2OIP_CFGAPPLYACTION* pRetVal);
[id(35), helpstring("method SaveCfgToFile")] HRESULT SaveCfgToFile([in] BSTR cfgFilePath, [out, retval] VARIANT_BOOL* pVal);
[id(36), helpstring("method Register Open API application callbacks")] HRESULT RegisterOpenApiApplicationCBs( void);
[id(37), helpstring("method Get list of supported/unsupported features in license")] HRESULT GetLicenseSupportedBuffer([in] VARIANT_BOOL isSupported , [out,retval] BSTR* supportedBuf);
[id(38), helpstring("method UnRegister")] HRESULT UnRegister([out,retval] VARIANT_BOOL* pRetVal);
[id(39), helpstring("method LogPrint")] HRESULT LogPrint(LONG threadID,[in] BSTR dateString, LONG dateMS, BSTR logType, BSTR className, BSTR metohdName, BSTR message);
[propget, id(40), helpstring("property IsCloudEnabled")] HRESULT IsCloudEnabled([out, retval] VARIANT_BOOL* pVal);
[id(41), helpstring("method Cloud_AddEvent")] HRESULT Cloud_AddEvent([in] LONG opcode, [in] BSTR description, [out,retval] VARIANT_BOOL* pRetVal);
[id(42), helpstring("method Cloud_SetTags")] HRESULT Cloud_SetTags([in] BSTR tags, [out,retval] VARIANT_BOOL* pRetVal);
[id(43), helpstring("method SetCfgBuffer")] HRESULT SetCfgBuffer([in] SHORT cfgBufLen, [in] BSTR cfgBuf, [out,retval] VARIANT_BOOL* pRetVal);
[id(44), helpstring("method CloudAdsRegisterAdUnit")] HRESULT CloudAdsRegisterAdUnit([in] BSTR name, [in] ULONG width, [in] ULONG height, [in] RvV2oip_CloudAdsRegion region, [out,retval] VARIANT_BOOL* pRetVal);
[id(45), helpstring("method Start")] HRESULT Start(void);
[id(46), helpstring("method LoadIOTData")] HRESULT LoadIOTData([in] BSTR xmlBuffer);
[id(47), helpstring("method CalcLocalMbps")] HRESULT CalcLocalMbps(void);
[id(48), helpstring("method Snapshot")] HRESULT Snapshot([in] RVV2OIP_IMAGE_TYPE imageType, [in] RVV2OIP_MEDIATYPE mediaType, [in] RVV2OIP_MEDIA_DIRECTION mediaDir, [in] USHORT compressionPower, [out] ULONG* pWidth, [out] ULONG* pHeight, [out,retval] VARIANT* pImage);
[id(49), helpstring("method TestOnRegisterStatusChanged")] HRESULT TestOnRegisterStatusChanged([in] LONG lsta);
[id(50), helpstring("method TestOnLineStatusChanged")] HRESULT TestOnLineStatusChanged([in] LONG nline, [in] LONG nsta);
[id(51), helpstring("method About")] HRESULT About(void);
};
[
object,
uuid(8B3A993C-9056-4415-95F5-81AD46095D9F),
dual,
nonextensible,
helpstring("IDeviceList Interface"),
pointer_default(unique)
]
interface IDeviceList : IDispatch{
[propget, id(1), helpstring("property Count")] HRESULT Count([out, retval] LONG* pVal);
[propget, id(2), helpstring("property DeviceType")] HRESULT DeviceType([out, retval] RVV2OIP_MEDIA_DEVICE_TYPE* pVal);
[id(3), helpstring("method GetDeviceName")] HRESULT GetDeviceName([in] LONG deviceIndex, [out,retval] BSTR* pDeviceName);
[propget, id(4), helpstring("Get Selected Device Index")] HRESULT SelectedDevice([out, retval] LONG* pVal);
[propput, id(4), helpstring("Set Selected Device Index")] HRESULT SelectedDevice([in] LONG newVal);
[id(5), helpstring("Get Index Of Device name in list, if found")] HRESULT IndexOf([in] BSTR deviceName, [out,retval] LONG* pDeviceIndex);
[id(6), helpstring("method IsEncoderSupported")] HRESULT HasEncodedStream([in] LONG deviceIndex , [out,retval] VARIANT_BOOL* pRetVal);
[id(7), helpstring("method StartTest")] HRESULT StartTest([in] LONG deviceIndex, [out,retval] VARIANT_BOOL* pRetVal);
[id(8), helpstring("method StopTest")] HRESULT StopTest([in] LONG deviceIndex);
[id(9), helpstring("method SetVol")] HRESULT SetVol([in] LONG deviceIndex, [in] RVV2OIP_VOL_MEASURE unitType, [in] RVV2OIP_VOL_PARAM volParam, [in] LONG value);
[id(10), helpstring("method GetVol")] HRESULT GetVol([in] LONG deviceIndex, [in] RVV2OIP_VOL_MEASURE unitType, [out] LONG* value);
[propget, id(11), helpstring("property Usage")] HRESULT Usage([out, retval] RVV2OIP_DEVICE_USAGE* pVal);
[id(12), helpstring("method UpdateRegionOfInterest")] HRESULT UpdateRegionOfInterest([in] LONG deviceIndex, [in] SHORT Left, [in] SHORT Top, [in] SHORT Width, [in] SHORT Height, [in] VARIANT_BOOL drawFrame, [in] SHORT colorR, [in] SHORT colorG, [in] SHORT colorB);
};
[
object,
uuid(7BA463E1-BAAA-4577-8AAA-845EA5C245E1),
dual,
nonextensible,
helpstring("ICallInfo Interface"),
pointer_default(unique)
]
interface ICallInfo : IDispatch{
[propget, id(1), helpstring("property CallProtocol")] HRESULT CallProtocol([out, retval] LONG* pVal);
[propget, id(2), helpstring("property IsOutgoing")] HRESULT IsOutgoing([out, retval] VARIANT_BOOL* pVal);
[propget, id(3), helpstring("property RemoteURI")] HRESULT RemoteURI([out, retval] BSTR* pVal);
[propget, id(4), helpstring("property RemoteDisplayName")] HRESULT RemoteDisplayName([out, retval] BSTR* pVal);
[propget, id(5), helpstring("property CallDuration")] HRESULT CallDuration([out, retval] LONG* pVal);
[propget, id(6), helpstring("property Network Quality")] HRESULT NWQuality([out, retval] _NW_QUALITY* pVal);
[propget, id(7), helpstring("property Number Of Streams in Current Call")] HRESULT StreamsCount([out, retval] LONG* pVal);
[propget, id(8), helpstring("property Stream MediaType")] HRESULT MediaType([in] LONG StreamIndex, [out, retval] RVV2OIP_MEDIATYPE* pVal);
[propget, id(9), helpstring("property Media Stream Direction")] HRESULT Direction([in] LONG StreamIndex, [out, retval] _MEDIA_STREAM_DIRECTION* pVal);
[propget, id(10), helpstring("property CodecType")] HRESULT CodecType([in] LONG StreamIndex, [out, retval] _MEDIA_CODEC_TYPE* pVal);
[propget, id(11), helpstring("property FrameWidth")] HRESULT FrameWidth([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(12), helpstring("property FrameHeigth")] HRESULT FrameHeigth([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(13), helpstring("property FrameRate")] HRESULT FrameRate([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(14), helpstring("property Bandwidth")] HRESULT Bandwidth([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(15), helpstring("property Jitter")] HRESULT Jitter([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(16), helpstring("property TotalPacketLoss")] HRESULT TotalPacketLoss([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(17), helpstring("property PeriodicPacketLossPercent")] HRESULT PeriodicPacketLossPercent([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(18), helpstring("property Resolution")] HRESULT Resolution([in] LONG StreamIndex, [out, retval] _VIDEO_RESOLUTION* pVal);
[propget, id(19), helpstring("Get Index of media stream info by type and direction")] HRESULT IndexOfStream([in] RVV2OIP_MEDIATYPE MediaType, [in] _MEDIA_STREAM_DIRECTION MediaDirection, [out, retval] LONG* pVal);
[propget, id(20), helpstring("Is Specific Stream having valid information?")] HRESULT IsValid(LONG StreamIndex, [out, retval] VARIANT_BOOL* pVal);
[propget, id(21), helpstring("property FCRequests")] HRESULT FCRequests([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(22), helpstring("property FCLastBandwidth")] HRESULT FCLastBandwidth([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(23), helpstring("property IDRRequests")] HRESULT IDRRequests([in] LONG StreamIndex, [out, retval] LONG* pVal);
[propget, id(24), helpstring("property CallType")] HRESULT CallType([out, retval] LONG* pVal);
[propget, id(25), helpstring("property IsEncrypted")] HRESULT IsEncrypted([in] LONG StreamIndex, [out, retval] VARIANT_BOOL* pVal);
};
[
object,
uuid(F1589BF5-0588-48C6-9C32-2082A19FF564),
dual,
nonextensible,
helpstring("IUtils Interface"),
pointer_default(unique)
]
interface IUtils : IDispatch{
[id(1), helpstring("Convert Resolution To BitRate")] HRESULT Resol2Br([in] _VIDEO_RESOLUTION resol, [out,retval] ULONG* pRetVal);
[id(2), helpstring("Convert Video BitRate To Video Resolution")] HRESULT Br2Resol([in] ULONG bitRate, [out,retval] _VIDEO_RESOLUTION* pRetVal);
[id(3), helpstring("method IsErrorNofication")] HRESULT IsErrorNofication([in] UINT errorCode, [out,retval] VARIANT_BOOL* pRetVal);
[id(4), helpstring("method Dim2Resol")] HRESULT Dim2Resol([in] UINT width, [in] UINT height, [out,retval] _VIDEO_RESOLUTION* pRetVal);
};
 
[
object,
uuid(2199B679-3511-4D58-A943-6D2BA28CBD3E),
dual,
nonextensible,
helpstring("IVideoDeviceTest Interface"),
pointer_default(unique)
]
interface IVideoDeviceTest : IDispatch{
[id(1), helpstring("method Init")] HRESULT Init([in] UINT cameraIndex, [in] UINT screenIndex, [in] LONGLONG windowHandle, [out,retval] VARIANT_BOOL* pRetVal);
[id(2), helpstring("method Terminate")] HRESULT Terminate([out,retval] VARIANT_BOOL* pRetVal);
[id(3), helpstring("method Play")] HRESULT Play([out,retval] VARIANT_BOOL* pRetVal);
[id(4), helpstring("method Pause")] HRESULT Pause([out,retval] VARIANT_BOOL* pRetVal);
[id(5), helpstring("method Resume")] HRESULT Resume([out,retval] VARIANT_BOOL* pRetVal);
[id(6), helpstring("method Stop")] HRESULT Stop([out,retval] VARIANT_BOOL* pRetVal);
[propget, id(7), helpstring("property VideoFormatsCount")] HRESULT VideoFormatsCount([in] UINT streamIndex, [out, retval] UINT* pVal);
[propget, id(8), helpstring("property VideoFormatItem")] HRESULT VideoFormatItem([in] UINT streamIndex, [in] UINT formatIndex, [out, retval] __VIDEO_FORMAT* format);
[propget, id(9), helpstring("property VideoFormatResolutionsCount")] HRESULT VideoFormatResolutionsCount([in] UINT streamIndex, [in] __VIDEO_FORMAT format, [out, retval] UINT* pVal);
[id(10), helpstring("method VideoFormatResolutionItem")] HRESULT GetVideoFormatResolutionItem([in] UINT streamIndex,
[in] __VIDEO_FORMAT format,
[in] UINT resolutionIndex,
[out] UINT* minFrameRate,
[out] UINT* maxFrameRate,
[out] UINT* width,
[out] UINT* height,
[out,retval] VARIANT_BOOL* pRetVal);
 
[id(11), helpstring("method Configure")] HRESULT Configure([in] UINT streamIndex, [in] __VIDEO_FORMAT format, [in] UINT frameRate, [in] UINT width, [in] UINT height, [out, retval] VARIANT_BOOL* pVal);
[propget, id(12), helpstring("property CurrentVideoFormat")] HRESULT CurrentVideoFormat([out, retval] __VIDEO_FORMAT* pVal);
[propget, id(13), helpstring("property CurrentWidth")] HRESULT CurrentWidth([out, retval] UINT* pVal);
[propget, id(14), helpstring("property CurrentHeight")] HRESULT CurrentHeight([out, retval] UINT* pVal);
[propget, id(15), helpstring("property CurrentFrameRate")] HRESULT CurrentFrameRate([out, retval] UINT* pVal);
[propget, id(16), helpstring("property IsStarted")] HRESULT IsStarted([out,retval] VARIANT_BOOL* pRetVal);
[propget, id(17), helpstring("property IsPaused")] HRESULT IsPaused([out,retval] VARIANT_BOOL* pRetVal);
[propget, id(18), helpstring("property IsInitialized")] HRESULT IsInitialized([out, retval] VARIANT_BOOL* pVal);
[propget, id(19), helpstring("property CurrentStream")] HRESULT CurrentStream([out, retval] UINT* pVal);
[propget, id(20), helpstring("property StreamsCount")] HRESULT StreamsCount([out, retval] UINT* pVal);
};
[
object,
uuid(0D2EC4D1-D96E-4071-B91A-FEE54C4E70B6),
dual,
nonextensible,
helpstring("IVoipClientStatus Interface"),
pointer_default(unique)
]
interface IVoipClientStatus : IDispatch{
[propget, id(1), helpstring("property IsRegisteredToSipRegistrar")] HRESULT IsRegisteredToSipRegistrar([out, retval] VARIANT_BOOL* pVal);
[propget, id(2), helpstring("property SipRegistrationState")] HRESULT SipRegistrationState([out, retval] RV_V2OIP_REGISTRATION_STATE* pVal);
[propget, id(3), helpstring("property IsRegisteredToSipRegistrar")] HRESULT IsRegisteredToH323Gatekeeper([out, retval] VARIANT_BOOL* pVal);
[propget, id(4), helpstring("property SipRegistrationState")] HRESULT H323RegistrationState([out, retval] RV_V2OIP_REGISTRATION_STATE* pVal);
};
[
object,
uuid(DB441795-875F-4CCD-B454-1A40C3988208),
dual,
nonextensible,
helpstring("IVoipClientContactItem Interface"),
pointer_default(unique)
]
interface IVoipClientContactItem : IDispatch{
[propget, id(1), helpstring("property Name")] HRESULT Name([out, retval] BSTR* pVal);
[propput, id(1), helpstring("property Name")] HRESULT Name([in] BSTR newVal);
[propget, id(2), helpstring("property URI")] HRESULT URI([out, retval] BSTR* pVal);
[propput, id(2), helpstring("property URI")] HRESULT URI([in] BSTR newVal);
[propget, id(3), helpstring("property State")] HRESULT State([out, retval] _CONTACT_ITEM_STATE* pVal);
[propput, id(3), helpstring("property State")] HRESULT State([in] _CONTACT_ITEM_STATE newVal);
[propget, id(4), helpstring("property Type")] HRESULT Type([out, retval] _REG_STATE* pVal);
[propput, id(4), helpstring("property Type")] HRESULT Type([in] _REG_STATE newVal);
};
[
object,
uuid(5BAD5CE4-2662-4C05-B61E-F482ED9874BB),
dual,
nonextensible,
helpstring("IVoipTermIdentity Interface"),
pointer_default(unique)
]
interface IVoipTermIdentity : IDispatch{
[propget, id(1), helpstring("ID of the Identity")] HRESULT ID([out, retval] BSTR* pVal);
[propget, id(2), helpstring("Protocol Type of the identity")] HRESULT ProtocolType([out, retval] V2OIP_PROTOCOLTYPE* pVal);
[propget, id(3), helpstring("Identity Handle")] HRESULT Handle([out, retval] ULONGLONG* pVal);
[propget, id(4), helpstring("Identity RegState")] HRESULT RegState([out, retval] RVV2OIP_IDENTITYREGSTATE* pVal);
[propget, id(5), helpstring("Identity RegReason")] HRESULT RegReason([out, retval] RVV2OIP_IDENTITYREGREASON* pVal);
};
[
uuid(3143FF63-0F8E-47A3-99D8-751F99679BB1),
version(1.0),
helpstring("VoipTestCom 1.0 Type Library")
]
library VoipTestComLib
{
typedef [uuid(6B86828F-7E94-4e31-993B-94851E1A37AB), version(1.0)]
enum _VOIP_CONSTANTS
{
MIN_VIDEO_FRAME_RATE = 5,
MAX_VIDEO_FRAME_RATE = 30,
MIN_VIDEO_BITRATE = 68000,
MAX_VIDEO_BITRATE = 4096000,
MIN_SPEAKER_VOL = 0,
MAX_SPEAKER_VOL = 100,
MAX_V2OIP_URI_LEN = 256,
PROTOCOL_TCP = 1,
PROTOCOL_UDP = 0,

/* Notification Codes */
/* Info */
NOTIFY_CODE_STARTED = 2001,
NOTIFY_CODE_STOPPED = 2002,
NOTIFY_CODE_CALL_STARTED = 2003,
NOTIFY_CODE_CALL_ENDED = 2004,
NOTIFY_CODE_RESTARTED = 2005,
NOTIFY_CODE_REFRESHED = 2006,
NOTIFY_CODE_REGISTERED_TO_SIP_SERVER = 2007,
NOTIFY_CODE_REGISTERED_TO_H323_GATEKEEPER = 2008,
NOTIFY_CODE_REGISTRATION_PROCESS_COMPLETED = 2009,
NOTIFY_CODE_LICENSE_VALIDATION_SUCCESS = 2011,
NOTIFY_CODE_LICENSE_FEATURE_NOT_SUPPORTED = 2013,
NOTIFY_CODE_UPDATE_ADDRESSBOOK_SUCCESS = 2014,
NOTIFY_CODE_UPDATE_CONFIGURATION_SUCCESS = 2015,
NOTIFY_CODE_UPDATE_SOFTWARE_SUCCESS = 2016,
NOTIFY_CODE_STUN_PUBLIC_ADDRESS_OK = 2017,
NOTIFY_CODE_CLOUD_CONNECTED = 2018,
NOTIFY_CODE_CLOUD_TAGS_UPDATED = 2019,
NOTIFY_CODE_CALL_DOWNGRADED_TO_AUDIO_ONLY = 2020,
NOTIFY_CODE_MEDIA_STREAM_NOTIFICATION = 2025,
/* Errors */
NOTIFY_CODE_NETWORK_PROBLEMS = 2501,
NOTIFY_CODE_NO_ADDRESS = 2502,
NOTIFY_CODE_START_FAILED = 2503,
NOTIFY_CODE_SIP_REGISTRATION_FAILED = 2504,
NOTIFY_CODE_H323_REGISTRATION_FAILED = 2505,
NOTIFY_CODE_REGISTRATION_FAILED = 2506,
NOTIFY_CODE_ILLEGAL_STATE = 2507,
NOTIFY_CODE_ILLEGAL_CALLER_TYPE = 2508,
NOTIFY_CODE_RESTART_FAILED = 2509,
NOTIFY_CODE_REFRESH_FAILED = 2510,
NOTIFY_CODE_MEDIA_ENGINE_INIT_FAILED = 2511,
NOTIFY_CODE_OUTOFRESOURCES = 2512,
NOTIFY_CODE_CALL_DIAL_FAILED = 2513,
 
NOTIFY_CODE_PRESENTATION_CHANNEL_FAILED = 2514,
NOTIFY_CODE_PRESENTATION_REQUEST_TIMEOUT = 2515,
 
NOTIFY_CODE_UPDATE_ADDRESSBOOK_FAIL = 2516,
NOTIFY_CODE_UPDATE_CONFIGURATION_FAIL = 2517,
NOTIFY_CODE_UPDATE_SOFTWARE_FAIL = 2518,
NOTIFY_CODE_LICENSE_REQUEST_FAILED = 2519,
NOTIFY_CODE_PRESENTATION_REMOTE_REJECTED = 2520,
NOTIFY_CODE_CALL_DOWNGRADED_TO_VIDEO_SEND_ONLY = 2021,
NOTIFY_CODE_CALL_DOWNGRADED_TO_VIDEO_RECV_ONLY = 2022,

NOTIFY_CODE_NO_LICENSE = 2521,
NOTIFY_CODE_LICENSE_VALIDATION_FAILED = 2522,
NOTIFY_CODE_GENERIC_ERROR = 2523,
NOTIFY_CODE_NO_MATCHING_AUDIO = 2524,
NOTIFY_CODE_NO_MATCHING_VIDEO = 2525,
NOTIFY_CODE_NO_MATCHING_MEDIA = 2526,
NOTIFY_CODE_MEDIA_ENGINE_FAILED_TO_CHOOSE_CODEC = 2527,
NOTIFY_CODE_STUN_NO_PUBLIC_ADDRESS = 2528,
NOTIFY_CODE_STUN_AUTHENTICATION_FAILED = 2529,
NOTIFY_CODE_SIP_STACK_INIT_FAILED = 2530,
NOTIFY_CODE_H323_STACK_INIT_FAILED = 2531,
NOTIFY_CODE_IDENTITY_ADD_FAILED = 2532,
NOTIFY_CODE_MEDIA_STREAM_ERROR = 2534,
NOTIFY_CODE_OPENAPI_FAIL_OPEN_PORT = 2600,
NOTIFY_CODE_CLOUD_NOT_CONNECTED = 2601,
 
/*End of notification codes*/

MIN_VIDEO_NETSENSE_MIN_SENSITIVITY_MS = 60,
MIN_VIDEO_NETSENSE_MAX_SENSITIVITY_MS = 5000,
 

VIDEO_MODE_SHARPNESS = 0,
VIDEO_MODE_MOTION = 1
 
} _VOIP_CONSTANTS;
 
importlib("stdole2.tlb");
[
uuid(072D2502-C12C-464F-86C0-0EB7C85D330B),
helpstring("_ISimpleClientEvents Interface")
]
dispinterface _ISimpleClientEvents
{
properties:
methods:
[id(1), helpstring("method CallStateChanges")] HRESULT CallStateChanges([in] RVV2OIP_CALLSTATE callState, [in] RVV2OIP_CALLSTATEREASON callStateReason, [in] RVV2OIP_CALL_TYPE callType, [in] BSTR remoteCallerName, [in] VARIANT_BOOL isOutgoing);
[id(2), helpstring("Raised after notification raised from voipTest to end user")] HRESULT OnUserNotify([in] UINT val, [in] _NOTIFIER_SEVERITY_TYPE severity, [in] _NOTIFIER_USER_TYPE userType, [in] BSTR description, [in] BSTR additionalInfo, [in] BSTR suggestedAction);
[id(3), helpstring("Raised when new incoming call is offered")] HRESULT OnNewIncomingCall([in] RVV2OIP_CALL_TYPE callType, [in] V2OIP_PROTOCOLTYPE callProtocol, [in] BSTR callRemoteDisplayName, [in] BSTR callRemotePartyURI, [in] BSTR callRemotePartyE164PhoneNumber);
[id(4), helpstring("Event Raised when remote part put the call on hold")] HRESULT OnRemoteHold(void);
[id(5), helpstring("Event raised when remote part retrieved the call that was on hold")] HRESULT OnRemoteUnHold(void);
[id(6),helpstring("method ContactPresenceChanged")] HRESULT ContactPresenceChanged([in] IVoipClientContactItem* pItem);
[id(7), helpstring("method ContactPresenceAdded")] HRESULT ContactPresenceAdded([in] IVoipClientContactItem* pItem);
[id(8), helpstring("method OnStartPresentation")] HRESULT OnStartPresentation([in] VARIANT_BOOL isEncoming, [out,retval] VARIANT_BOOL* pRetVal);
[id(9), helpstring("method OnStopPresentation")] HRESULT OnStopPresentation([in] VARIANT_BOOL isEncoming);
[id(10), helpstring("method OnClientIdentityRegStateChanged")] HRESULT OnClientIdentityRegStateChanged([in] BSTR identityID, [in] V2OIP_PROTOCOLTYPE identityProtocolType, [in] ULONGLONG identityHandle, [in] RVV2OIP_IDENTITYREGSTATE identityRegState, [in] RVV2OIP_IDENTITYREGREASON identityRegReason);
[id(11), helpstring("Event Raised when call is muted")] HRESULT OnCallMute([in] RVV2OIP_MEDIATYPE mediaType, [in] VARIANT_BOOL bLocalMute);
[id(12), helpstring("Event Raised when call is unmuted")] HRESULT OnCallUnMute([in] RVV2OIP_MEDIATYPE mediaType, [in] VARIANT_BOOL bLocalMute);
[id(13), helpstring("Raised when new record is created in History")] HRESULT OnNewHistoryRecordCreated([in] RVV2OIP_CALL_TYPE callType, [in] V2OIP_PROTOCOLTYPE callProtocol, [in] BSTR recordId, [in] BSTR callerId, [in] INT dateTime, [in] INT duration, [in] INT isMissedCall, [in] INT isOutgoing);
[id(14), helpstring("method OnNetworkInterfaceChange")] HRESULT OnNetworkInterfaceChange([in] BSTR interfaceAddress, [in] RVV2OIP_NETWORKINTERFACECHANGE interfaceState, [in] VARIANT_BOOL interfaceInUse);
[id(15), helpstring("method OnOpenApiApplicationExecute")] HRESULT OnOpenApiApplicationExecute([in] BSTR eventName, [in] BSTR eventParams, [out,retval] LONG* pRetVal);
[id(16), helpstring("method OnHistoryRecordAdded")] HRESULT OnHistoryRecordAdded([in] BSTR callerID, [in] INT dateTime, [in] INT duration, [in] RVV2OIP_CALL_TYPE callType, [in] V2OIP_PROTOCOLTYPE callProtocol, [in] VARIANT_BOOL isOutgoing, [in] VARIANT_BOOL isMissedCall);
[id(17), helpstring("method OnHistoryRecordRemoved")] HRESULT OnHistoryRecordRemoved([in] BSTR callerID, [in] INT dateTime, [in] INT duration, [in] RVV2OIP_CALL_TYPE callType, [in] V2OIP_PROTOCOLTYPE protocolType, [in] VARIANT_BOOL isOutgoing, [in] VARIANT_BOOL isMissedCall);
[id(18), helpstring("method OnHistoryRecordsCleared")] HRESULT OnHistoryRecordsCleared(void);
[id(19), helpstring("method OnClientAdsInstructionEvent")] HRESULT OnClientAdsInstructionEvent([in] BSTR name, [in] RvV2oip_CloudAdsInstruction instruction, [in] BSTR url, [in] ULONG width, [in] ULONG height, [in] VARIANT_BOOL bResize);
 
[id(20), helpstring("method OnRegisterStatusChanged")] HRESULT OnRegisterStatusChanged([in] LONG lsta);
[id(21), helpstring("method OnLineStatusChanged")] HRESULT OnLineStatusChanged([in] LONG nline, [in] LONG nsta);
};
[
uuid(2D7EFB5B-2051-4EE2-8F18-EB460A3E28D1),
helpstring("SimpleClient Class")
]
coclass SimpleClient
{
[default] interface ISimpleClient;
[default, source] dispinterface _ISimpleClientEvents;
};
[
uuid(D145D987-C812-48A0-A910-5EB4C160D7A8),
helpstring("DeviceList Class")
]
coclass DeviceList
{
[default] interface IDeviceList;
};
[
uuid(F0BDE6CB-C90E-40C7-AFD3-1212E4B7A149),
helpstring("CallInfo Class")
]
coclass CallInfo
{
[default] interface ICallInfo;
};
[
uuid(20AB2CF5-5A39-4DE9-BD89-3FBDA06D98A6),
helpstring("Utils Class")
]
coclass Utils
{
[default] interface IUtils;
};
[
uuid(92E9DF0B-5C0A-41E0-A1CB-E6E025BCFA7D),
helpstring("_IVideoDeviceTestEvents Interface")
]
dispinterface _IVideoDeviceTestEvents
{
properties:
methods:
};
[
uuid(D88DE370-A7E0-4C16-B097-4882274A21CE),
helpstring("VideoDeviceTest Class")
]
coclass VideoDeviceTest
{
[default] interface IVideoDeviceTest;
[default, source] dispinterface _IVideoDeviceTestEvents;
};
[
uuid(ADA36E49-B138-41BA-98E3-EDA791FE2A00),
helpstring("VoipClientStatus Class")
]
coclass VoipClientStatus
{
[default] interface IVoipClientStatus;
};
[
uuid(B4D89524-71A7-462D-9A4D-A6F43E0B8F71),
helpstring("VoipClientContactItem Class")
]
coclass VoipClientContactItem
{
[default] interface IVoipClientContactItem;
};
[
uuid(521B5E5F-183C-40B3-93F6-3B849A0BF8C3),
helpstring("_IVoipTermIdentityEvents Interface")
]
dispinterface _IVoipTermIdentityEvents
{
properties:
methods:
};
[
uuid(AB04463D-90FF-4329-9DF3-952C871CADD7),
helpstring("VoipTermIdentity Class")
]
coclass VoipTermIdentity
{
[default] interface IVoipTermIdentity;
[default, source] dispinterface _IVoipTermIdentityEvents;
};
};
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007emvpRichard MacCutchan12 Apr '13 - 21:55 
You don't really think I can read through all that and come to a sensible conclusion?
Use the best guess

AnswerRe: CoCreateInstance Problem & GetLastError 0x0000007ememberStephen Hewitt11 Apr '13 - 23:32 
The obvious question is: did you initialise COM?
Steve

GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007ememberyihung.hung12 Apr '13 - 15:31 
CoInitialize? Where do I add the CoInitialize?
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007ememberStephen Hewitt12 Apr '13 - 19:11 
Somewhere before you use COM.
Steve

GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007ememberyihung.hung13 Apr '13 - 2:52 
LRESULT CYHtapiCom::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
{
CAxWindow wnd;
CLSID clsid;
LPUNKNOWN pUnkCtrl, pUnkCont;
HRESULT hr = CLSIDFromProgID(OLESTR("VoipTestCom.SimpleClient"), &clsid);
hr = CoCreateInstance(clsid, NULL, CLSCTX_ALL, IID_IUnknown, (void**)&pUnkCtrl);
CComQIPtr spPerStm(pUnkCtrl);
spPerStm->InitNew();
wnd.Attach(m_hWnd);
wnd.AttachControl(pUnkCtrl, &pUnkCont);

return TRUE;
}
GeneralRe: CoCreateInstance Problem & GetLastError 0x0000007emvpRichard MacCutchan12 Apr '13 - 22:00 
Have you not read http://msdn.microsoft.com/en-us/library/ms886306.aspx[^]?
Use the best guess

Question[SOLVED] IHTMLDOCUMENT2 get_Script problem in threadmembermr_m_imran28 Mar '13 - 8:20 
Hi
VC++ 2008. I have this web browseron my dialog based MFC app which hosts JavaScript functions thatI access from the app using COM stuff. It worked. I then shifted all the COM related code to a worker thread because that's where I'm receiving data, from the socket, to be displayed on the web browser. And that's where things are not working. I've read things about marshalling which needs to be done if COM is to be accessed from or accross threads. But I can't figure out where to start!
spDisp = m_ex->get_Document();
spDisp->QueryInterface(IID_IHTMLDocument2,(void**)&m_spDoc);
m_spDoc->get_Script(&spScript);
This is the code, copied form some example on the web. m_ex is the pointer to the CExplorer1 object (the web browser control). The program crashes on the last line. Can someone please guide me what to do exactly so that it runs in the thread? Thanks.
AnswerRe: IHTMLDOCUMENT2 get_Script problem in threadmvpRichard MacCutchan28 Mar '13 - 8:48 
At a guess I would say that the second line failed, so m_spDoc has not been given a valid pointer. You should check the results of your API calls to see if they succeed or not, as described in this MSDN page[^].
Use the best guess

GeneralRe: IHTMLDOCUMENT2 get_Script problem in thread [modified]membermr_m_imran28 Mar '13 - 17:36 
Thanks for the quick response, Richard. The second line returns S_OK and m_spDoc contains a non-zero value. It's all about STA, I'm almost sure, but have no clue how to go about it Smile | :)
 
Edited: DONE! Thanks to:
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/94728897-4c44-4f58-a09b-c4c4609a2116/[^]

modified 29 Mar '13 - 0:19.

QuestionTo Identify .Net Dll's among many Dll's in a Project.memberVishal_K8927 Mar '13 - 1:36 
I am new to .Net,I have informed all forms of Dll's is used in project, viz., Win32.dll, COM'Dll, and .Net Dll's, I need to find how we can identify .Net Dll's,
 
however though, I could identify COM'Dll using DllRegisterServer as search attribute.(InProcServer) in entire Solution. ie., using VS 2008 IDE, the above keyword "DllRegisterServer" relating to all COM Dll's was found.
 

But, Is there a Similar way to identify .Net Dll's ??
 
Details:
 
VS 2008 IDE, Win 7 O/S, Project using .exe,.dll's etc.,
 

With Regards,
VishalK_89
AnswerRe: To Identify .Net Dll's among many Dll's in a Project.mvpRichard MacCutchan27 Mar '13 - 3:51 
Please do not post the same question in multiple forums; choose one and stick to it.
Use the best guess

QuestionAdditional Include Directoriesmemberbkelly1324 Mar '13 - 9:47 
Windows 7, Visual Studio 2008, MFC, C++
 
This solution uses source code from directory D:\COMMON_CODE. To test some things the solution was copied to a new directory. It will not compile. There are several errors, all of the format:
 
1>c1xx : fatal error C1083: Cannot open source file: '..\..\..\..\COMMON_CODE\C_Log_Writer.cpp': No such file or directory
 
I did not enter "..\..\" etc when configuring the solution/project.
 
In the solution explorer, right click on the project and select Properties. From there select Configuration Properties -> C/C++ -> Additional Include Directories. In there is the above named directory. Just as it was before the copy operation. Clean Solution" was performed as was a direct compile of stdafx.cpp. The error remains.
 
The solution has the information of where to look for these files. What do I need to do to get it to look there?
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

AnswerRe: Additional Include DirectoriesmemberGarth J Lancaster24 Mar '13 - 11:32 
not exactely sure where/what your problem is ...
 
Are all your 'Cannot open source file' errors related to files under 'COMMON_CODE' directory ?
 
This is what I would do if all the errors ARE related to files under 'COMMON_CODE' - (and I'd use Windows Explorer and find to check where they are)
 
a) set an environment variable to where COMMON_CODE is - that is, I'd set a Permanent System variable - eg COMMON_CODE and point it to Drive:\Path\COMMON_CODE
 
b) restart the machine
 
c) In VS2008, open your project, Under 'Additional Include Directories', include ${COMMON_CODE} (I think you need a space between this and the other directories iirc)
 
When you move directories in future, you change the environment variable, not the project. I do this particularly for 3rd party libraries, where I might need to point to different versions of a library.
 
You still have to point it to the correct location, in either case/whichever way you're doing it, it looks like your 'Additional Include Directories' setting is still wrong
 
'g'
GeneralRe: Additional Include Directoriesmemberbkelly1324 Mar '13 - 12:15 
Re: Are all your 'Cannot open source file' errors related to files under 'COMMON_CODE' directory ?
 
Yes, they are. The entire solution compiled and ran as expected. Then I copied the entire solution to another location. The build then began reporting that it could not find any of the files in directory D:\COMMON_CODE.
 
Re: You still have to point it to the correct location, in either case/whichever way you're doing it, it looks like your 'Additional Include Directories' setting is still wrong.
 
I don't see how it can be wrong. The common directory did not move, but the entire solution did. The additional directory location is being converted to a relative location directory. The configuration section does not specify a relative location, it specifies an absolute location.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Additional Include DirectoriesmemberH.Brydon26 Mar '13 - 16:32 
Garth J Lancaster wrote:
c) In VS2008, open your project, Under 'Additional Include Directories', include ${COMMON_CODE} (I think you need a space between this and the other directories iirc)

The include directories should be a semicolon-separated list. The directories themselves may (or may not) contain spaces.
 
In the bigger picture, I endorse this way of specifying directories.
 
If I understand the original problem properly, OP used a full filespec for an include directory. Visual Studio likes to keep track of file and directory locations relative to the location of the project file (or solution file, depending on things). If you get a solution/project working in one location (which points to an absolute file/folder location) and then copy the solution/project to another location, the 'relative' file/folder pointers will be wrong. Garth's solution should fix that part of the problem.
--
Harvey

AnswerRe: Additional Include Directoriesmemberdusty_dex24 Mar '13 - 11:41 
Have you tried deleting all temporary files, including precompiled headers?
"It's true that hard work never killed anyone. But I figure, why take the chance." - Ronald Reagan
 
That's what machines are for.
 
Got a problem?
Sleep on it.

GeneralRe: Additional Include Directoriesmemberbkelly1324 Mar '13 - 12:26 
I deleted the dot NCP file where the project file is located. I deleted the all the files in the release directory and all the files in the debug directory. All to no avail.
 
I removed the D:\COMMON_CODE from the configuration, cleaned, recompiled, re-added it, and same results. It still refuses to find the files in the common directory. The errors show a relative directory location based on the original location.
 
What other files might I try to delete.
 
The same project continues to build in the original location.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

AnswerRe: Additional Include DirectoriesmemberSoMad24 Mar '13 - 13:26 
Perhaps I am missing something here. The sample you have shown is for a .cpp file. This suggests to me that this is not a problem with your "Additional Include Directories", but that those files were included into your project with the relative path. I would open up the .vcxproj (if that is the extension used for 2008) and look at the path specified for that file.
 
As an example from one of my projects, there are files included like this:
<ItemGroup>
  :
  <ClCompile Include="StdAfx.cpp">
    :
    :
  </ClCompile>
  <ClCompile Include="..\..\Libraries\include\Packets\Stream.cpp">
    :
    :
  </ClCompile>
  :
</ItemGroup>
 
Obviously if you just copy the solution to a folder with a different nesting level, that will mess things up.
 
[EDIT]Updated the entries from my sample to show the .cpp files instead of the .h files[/EDIT]
 
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

GeneralRe: Additional Include Directoriesmemberbkelly1324 Mar '13 - 13:47 
File Project_Client_.vcproj contains:
<Tool
				Name="VCCLCompilerTool"
				Optimization="0"
				AdditionalIncludeDirectories="D:\COMMON_CODE"
				PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
				MinimalRebuild="true"
				BasicRuntimeChecks="3"
				RuntimeLibrary="1"
				UsePrecompiledHeader="2"
				WarningLevel="3"
				DebugInformationFormat="4"
 
It has the absolute location of the include files. I presume that is correct.
 
Re: Obviously if you just copy the solution to a folder with a different nesting level, that will mess things up.
 
I don't see why. Everything within the solution proper is in the same relative locations. Only this directory is in the stated absolute location. The problem is only with the common code directory, and it has the correct path for that. Same as the original location.
 
Edit: But then in another place in the same file is this:
	<Files>
		<Filter
			Name="Source Files"
			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
			>
			<File
				RelativePath="..\..\..\..\COMMON_CODE\C_Log_Writer.cpp"
				>
			</File>
			<File
				RelativePath="..\..\..\..\COMMON_CODE\C_TCP_Client.cpp"
				>
 
So it has the location in both relative and absolute position. That appears to be the worst of both worlds. How do I tell VS to recalculate all the relative positions.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/

GeneralRe: Additional Include DirectoriesmemberSoMad24 Mar '13 - 14:00 
But that is because the "Additional Include" directories is for including header files.
 
Let me ask you this: If you double-click on your C_Log_Writer.cpp in your solution, is it found and opened in the IDE? I do not expect it to be if the relative path specified in you project file is now incorrect.
 
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

GeneralRe: Additional Include Directories [modified]memberbkelly1324 Mar '13 - 14:11 
Upon clicking on C_Log_Writer.cpp VS pops a message:
d:\B\COMMON_CODE\C_TCP_Client.cpp Cannot open file.
 
The solution is in directory D:\B\etc. The common code is in D:\COMMON_CODE like I explicitly specified in the configuration. It has no business putting that \B\ in there. I say again, the additional directories was specified as an absolute path, not a relative one. The original solution had both the dot CPP and the dot H file added. All were shown in the solution explorer.
 
Edit:
While in that configuration section of VS and with Additional Directories selected, press F1. In there it has an example that includes MAIN.C. I do not see it as limited to dot H or dot HPP files.
Thanks for your time
If you work with telemetry, please check this bulletin board: http://www.bkelly.ws/irig_106/


modified 24 Mar '13 - 20:21.

GeneralRe: Additional Include DirectoriesmemberSoMad24 Mar '13 - 14:40 
Alright, so it may not be limited to header files, but I cannot remember ever seeing it used for .cpp files. I will refer back to my original answer, the problem is not with your Additional Include Directories, but with the way file references are stored when added to a project.
 
You may have a point that Visual Studio should use the Additional Include Directories path and save file references without paths (although I would not trust the "find first match" scheme to always find the correct file in case of multiple files with the same name in different Include Directories), but the way you can fix it now seems obvious to me: Correct the paths of the files in your project file. You can even try to just remove the paths completely and see if the files are found using the Additional Include Directories.
 
Soren Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty

AnswerRe: Additional Include DirectoriesmvpRichard MacCutchan24 Mar '13 - 23:37 
This has nothing to do with include directories, since the file in question is a .cpp not a header file. You need to remove the relevant file(s) from the project and add them in again, using the absolute paths.
Use the best guess

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web01 | 2.6.130523.1 | Last Updated 21 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid