Click here to Skip to main content
15,901,035 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Virtual memory Problem Pin
jhwurmbach1-Feb-07 21:48
jhwurmbach1-Feb-07 21:48 
GeneralRe: Virtual memory Problem Pin
voorugonda prashanth1-Feb-07 22:09
voorugonda prashanth1-Feb-07 22:09 
GeneralRe: Virtual memory Problem [modified] Pin
jhwurmbach1-Feb-07 22:43
jhwurmbach1-Feb-07 22:43 
GeneralRe: Virtual memory Problem Pin
Roger Stoltz1-Feb-07 22:07
Roger Stoltz1-Feb-07 22:07 
GeneralRe: Virtual memory Problem Pin
Waldermort2-Feb-07 4:17
Waldermort2-Feb-07 4:17 
GeneralRe: Virtual memory Problem Pin
Roger Stoltz2-Feb-07 4:57
Roger Stoltz2-Feb-07 4:57 
AnswerRe: Virtual memory Problem Pin
ThatsAlok1-Feb-07 21:41
ThatsAlok1-Feb-07 21:41 
QuestionRTC problem Pin
minihotto1-Feb-07 19:52
minihotto1-Feb-07 19:52 
I run the program by Microsoft Visual Studio 2005 on the Windows® XP
operating system.
I try to run the basic program of RTC.
There is no compile error, but there is a run-time error.
==> hr = pIDispatch->QueryInterface
(IID_IRTCSessionStateChangeEvent,reinterpret_cast<void**> (&pISessionState));
The error message is __vfptr = CXX0030: Error: expression cannot be
evaluated.
The code is followed.
Can somebody tell me where is the problem?
#include "stdafx.h"<br />
#define _WIN32_DCOM<br />
#include <windows.h><br />
#include <Winuser.h><br />
#include <malloc.h><br />
#include <objbase.h><br />
#include <Rtccore.h><br />
#include <oleauto.h><br />
#include <iostream><br />
#include <unknwn.h><br />
#pragma comment(lib, "ole32.lib")<br />
#pragma comment(lib, "Uuid.lib")<br />
using namespace std; <br />
int _tmain(int argc, _TCHAR* argv[])<br />
{	<br />
	HRESULT hr = S_OK; <br />
	CoInitializeEx(NULL,COINIT_APARTMENTTHREADED);<br />
	IRTCClient      *pIRTCClient;<br />
	hr = CoCreateInstance( CLSID_RTCClient,	 NULL, CLSCTX_INPROC_SERVER, IID_IRTCClient,<br />
	reinterpret_cast<void **> (&pIRTCClient) );<br />
	hr = pIRTCClient->Initialize();<br />
	long      lEventMask;<br />
	lEventMask  =  RTCEF_ALL;	                <br />
	hr = pIRTCClient->put_EventFilter(lEventMask);<br />
	DWORD                               dwEventCookie;<br />
	IUnknown                            *pUnknown   = NULL;<br />
	IConnectionPointContainer           *pCPC       = NULL;<br />
	IConnectionPoint                    *pCP        = NULL;<br />
	hr = pIRTCClient->QueryInterface( IID_IUnknown, reinterpret_cast<void**> (&pUnknown) );<br />
	hr = pIRTCClient->QueryInterface( IID_IConnectionPointContainer, reinterpret_cast<void**> (&pCPC) );<br />
	hr = pCPC->FindConnectionPoint( IID_IRTCEventNotification, &pCP );<br />
	hr = pCP->Advise( pUnknown, &dwEventCookie ); <br />
	pCP->Release();<br />
	pCPC->Release();<br />
	pUnknown->Release(); <br />
	hr = pIRTCClient->put_ListenForIncomingSessions( RTCLM_BOTH ); <br />
	BSTR              bstrLocalURI  = NULL;<br />
	BSTR              bstrDestURI   = NULL;<br />
	RTC_SESSION_TYPE  SessionType;<br />
	IRTCSession       *pIRTCSession = NULL;<br />
	IRTCProfile       *pIRTCProfile = NULL;   <br />
	SessionType  = RTCST_PC_TO_PC ;  // Specify session type <br />
	if(SessionType == RTCST_PHONE_TO_PHONE){bstrLocalURI = SysAllocString(_T("tel:+14255550123"));}<br />
	bstrDestURI = SysAllocString(_T("sip:22500@163.22.20.154")); <br />
	hr = pIRTCClient->CreateSession( SessionType, bstrLocalURI, pIRTCProfile,RTCCS_FORCE_PROFILE,&pIRTCSession );<br />
	IRTCParticipant  *pIRTCParticipant;<br />
	hr = pIRTCSession->AddParticipant( bstrDestURI,  NULL, &pIRTCParticipant );<br />
        hr = pIRTCSession->Terminate(RTCTR_NORMAL);<br />
	IRTCSessionStateChangeEvent  *pISessionState = NULL;<br />
	RTC_SESSION_STATE             SessionState;<br />
        IDispatch  *pIDispatch = NULL;                   <br />
	hr = pIDispatch->QueryInterface(IID_IRTCSessionStateChangeEvent,reinterpret_cast<void**> (&pISessionState));<br />
	hr = pISessionState->get_State(&SessionState);<br />
	switch(SessionState)<br />
	{<br />
		case RTCSS_DISCONNECTED:<br />
		{<br />
			pIRTCSession->Release();<br />
			pIRTCSession = NULL;<br />
			break;<br />
		}<br />
	}<br />
	return 0;<br />
}<br />
<br />

QuestionCRecordset Pin
Bravoone_20061-Feb-07 19:41
Bravoone_20061-Feb-07 19:41 
QuestionRe: CR Pin
prasad_som1-Feb-07 19:49
prasad_som1-Feb-07 19:49 
AnswerRe: CRecordset Pin
David Crow2-Feb-07 3:06
David Crow2-Feb-07 3:06 
AnswerRe: CRecordset Pin
Mark Salsbery2-Feb-07 7:21
Mark Salsbery2-Feb-07 7:21 
QuestionConvertin 24 bit Bitmap file to 8 bit Bitmap Pin
Vijjuuu.1-Feb-07 19:24
Vijjuuu.1-Feb-07 19:24 
AnswerRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Waldermort1-Feb-07 19:31
Waldermort1-Feb-07 19:31 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Vijjuuu.1-Feb-07 19:43
Vijjuuu.1-Feb-07 19:43 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Waldermort1-Feb-07 20:00
Waldermort1-Feb-07 20:00 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Vijjuuu.1-Feb-07 21:50
Vijjuuu.1-Feb-07 21:50 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Waldermort2-Feb-07 2:51
Waldermort2-Feb-07 2:51 
AnswerRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Christian Graus1-Feb-07 19:41
protectorChristian Graus1-Feb-07 19:41 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Vijjuuu.1-Feb-07 19:46
Vijjuuu.1-Feb-07 19:46 
GeneralRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Christian Graus1-Feb-07 20:26
protectorChristian Graus1-Feb-07 20:26 
AnswerRe: Convertin 24 bit Bitmap file to 8 bit Bitmap Pin
Mark Salsbery2-Feb-07 7:29
Mark Salsbery2-Feb-07 7:29 
QuestionValue of dmPaperSize in DEVMODE structure for custom papersize Pin
vcpgmr1-Feb-07 19:18
vcpgmr1-Feb-07 19:18 
AnswerRe: Value of dmPaperSize in DEVMODE structure for custom papersize Pin
KKumarTG1-Feb-07 19:55
KKumarTG1-Feb-07 19:55 
GeneralRe: Value of dmPaperSize in DEVMODE structure for custom papersize Pin
vcpgmr4-Feb-07 17:31
vcpgmr4-Feb-07 17:31 

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

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.