Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhelp on timeSetEvent for periodic timer Pin
bkhn4113-Dec-04 4:46
bkhn4113-Dec-04 4:46 
GeneralSATO printer programming Pin
Blubbo13-Dec-04 4:40
Blubbo13-Dec-04 4:40 
GeneralPainting text problem Pin
__makaveli__13-Dec-04 4:30
__makaveli__13-Dec-04 4:30 
GeneralHelppp cant figure this out Pin
James198513-Dec-04 3:24
James198513-Dec-04 3:24 
GeneralRe: Helppp cant figure this out Pin
jmkhael13-Dec-04 3:53
jmkhael13-Dec-04 3:53 
GeneralRe: Helppp cant figure this out Pin
toxcct13-Dec-04 7:56
toxcct13-Dec-04 7:56 
QuestionHow to pop system menu in an owner-draw dialog Pin
max_xiayi13-Dec-04 3:01
max_xiayi13-Dec-04 3:01 
GeneralDCOM Question Pin
Anonymous13-Dec-04 3:00
Anonymous13-Dec-04 3:00 
Hey Guys,

I create an empty out-of-process EXE COM which I exposed a HelloWorld interface to display a message box with "Hello".
and I create a client to connect to the COM object and use the interface to execute the message box.

The Client connects fine locally, but I'm having trouble connecting remotely, one the remote machine I'm getting error number 5.not sure what it means.

Any ideas, feedback or if someone has a working sample of this simple scenario I would appreciate it.

Here is the code for my client:
void CTestclientDlg::OnOK()
{
HRESULT hResult;
ITestInterface *pTS = NULL;


COSERVERINFO CoServerInfo;
memset(&CoServerInfo, 0, sizeof(CoServerInfo));
CoServerInfo.pwszName =_bstr_t("\\\\ServerName") ;


// structure for CoCreateInstanceEx
MULTI_QI qi;
memset( &qi, 0, sizeof(qi));

// Fill the qi with a valid interface
qi.pIID = &IID_ITestInterface;


CoInitializeSecurity (NULL, -1, NULL, NULL, RPC_C_AUTHN_LEVEL_CONNECT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);

hResult = CoInitialize( 0 );

if( SUCCEEDED( hResult ) )
{
hResult = CoCreateInstanceEx( CLSID_TestInterface, NULL, CLSCTX_REMOTE_SERVER, &CoServerInfo, 1, &qi );

if( SUCCEEDED( hResult ) )
{
pTS = (ITestInterface*)qi.pItf;
pTS->SayHello( );
}
else
{
DWORD eCode = HRESULT_CODE(hResult);

CString Err;
Err.Format( "%d", eCode );
AfxMessageBox( Err);
}
}
CoUninitialize( );
}

Questionhow to convert string to binary Pin
Abhi Lahare13-Dec-04 1:45
Abhi Lahare13-Dec-04 1:45 
AnswerRe: how to convert string to binary Pin
valikac13-Dec-04 4:57
valikac13-Dec-04 4:57 
Generaltooltips for controls inside groupbox Pin
V.13-Dec-04 0:49
professionalV.13-Dec-04 0:49 
GeneralRe: tooltips for controls inside groupbox Pin
PJ Arends13-Dec-04 7:11
professionalPJ Arends13-Dec-04 7:11 
GeneralRe: tooltips for controls inside groupbox Pin
V.13-Dec-04 7:24
professionalV.13-Dec-04 7:24 
GeneralRe: tooltips for controls inside groupbox Pin
PJ Arends13-Dec-04 7:50
professionalPJ Arends13-Dec-04 7:50 
GeneralRe: tooltips for controls inside groupbox Pin
V.13-Dec-04 8:58
professionalV.13-Dec-04 8:58 
GeneralRe: tooltips for controls inside groupbox Pin
toxcct13-Dec-04 8:02
toxcct13-Dec-04 8:02 
GeneralRe: tooltips for controls inside groupbox Pin
V.13-Dec-04 8:55
professionalV.13-Dec-04 8:55 
QuestionCool tools? Pin
ManOfTheYear13-Dec-04 0:37
ManOfTheYear13-Dec-04 0:37 
AnswerRe: Cool tools? Pin
ThatsAlok13-Dec-04 1:04
ThatsAlok13-Dec-04 1:04 
AnswerRe: Cool tools? Pin
13-Dec-04 1:04
suss13-Dec-04 1:04 
AnswerRe: Cool tools? Pin
Anonymous13-Dec-04 11:32
Anonymous13-Dec-04 11:32 
GeneralX509 certificate contents dump Pin
override13-Dec-04 0:19
override13-Dec-04 0:19 
GeneralConnecting Visual C++6.0 to Visual Basic Pin
reenacutie12-Dec-04 23:53
reenacutie12-Dec-04 23:53 
GeneralRe: Connecting Visual C++6.0 to Visual Basic Pin
ThatsAlok13-Dec-04 0:24
ThatsAlok13-Dec-04 0:24 
GeneralRe: Connecting Visual C++6.0 to Visual Basic Pin
vishalmore13-Dec-04 1:51
vishalmore13-Dec-04 1:51 

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.