Click here to Skip to main content
15,844,602 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How C++ read one digit each time from a sequence of digits? Pin
_AnsHUMAN_ 2-Mar-09 1:48
_AnsHUMAN_ 2-Mar-09 1:48 
GeneralRe: How C++ read one digit each time from a sequence of digits? Pin
followait2-Mar-09 1:57
followait2-Mar-09 1:57 
AnswerRe: How C++ read one digit each time from a sequence of digits? Pin
David Crow2-Mar-09 4:48
David Crow2-Mar-09 4:48 
QuestionRemote COM Pin
RevathiRamakumar2-Mar-09 1:14
RevathiRamakumar2-Mar-09 1:14 
AnswerRe: Remote COM Pin
CPallini2-Mar-09 1:26
mveCPallini2-Mar-09 1:26 
GeneralRe: Remote COM Pin
RevathiRamakumar2-Mar-09 1:29
RevathiRamakumar2-Mar-09 1:29 
QuestionRe: Remote COM Pin
CPallini2-Mar-09 1:34
mveCPallini2-Mar-09 1:34 
AnswerRe: Remote COM Pin
RevathiRamakumar2-Mar-09 1:42
RevathiRamakumar2-Mar-09 1:42 
This is my client code that calls the COM server on the remote machine...Thank u..

HRESULT hr;
IIGetFile2* pGetFile;

//
IUnknown* pUnknown = 0;
COSERVERINFO ServerInfo = {0,0,0,0};
wchar_t * remotemachine = L"servername";
ServerInfo.pwszName = remotemachine;
//MULTI_QI qi = {&__uuidof(IGetFile2),NULL,S_OK};
MULTI_QI qi={0,0,0};
qi.pIID = &IID_IUnknown;

//
IIGetFile2 * pInt = static_cast<IIGetFile2 *>(qi.pItf);
USES_CONVERSION;
CComPtr<IIGetFile2> Ptr1;
qi.pIID = &IID_IIGetFile2;

//

hr = CoCreateInstanceEx(CLSID_IGetFile2,NULL,CLSCTX_REMOTE_SERVER,&ServerInfo,1, &qi);
pUnknown = (IUnknown*)qi.pItf;

if(SUCCEEDED(hr))
{
AfxMessageBox("SUCCEEDED CoCreateEX");
}

pUnknown = (IUnknown*)qi.pItf;

hr = pUnknown->QueryInterface(IID_IIGetFile2, (void**)&pGetFile);
hr = pUnknown->Release();


if(SUCCEEDED(hr))
{
AfxMessageBox("SUCCEEDED QI");
_bstr_t bstrFileContent = pGetFile->GetFile2();
char* Text = _com_util::ConvertBSTRToString(bstrFileContent);
m_edit=Text;
UpdateData(FALSE);

}
QuestionRe: Remote COM Pin
CPallini2-Mar-09 1:55
mveCPallini2-Mar-09 1:55 
AnswerRe: Remote COM Pin
RevathiRamakumar2-Mar-09 2:02
RevathiRamakumar2-Mar-09 2:02 
GeneralRe: Remote COM Pin
CPallini2-Mar-09 2:57
mveCPallini2-Mar-09 2:57 
GeneralRe: Remote COM Pin
RevathiRamakumar3-Mar-09 17:50
RevathiRamakumar3-Mar-09 17:50 
GeneralRe: Remote COM Pin
RevathiRamakumar3-Mar-09 23:09
RevathiRamakumar3-Mar-09 23:09 
GeneralRe: Remote COM Pin
CPallini3-Mar-09 23:35
mveCPallini3-Mar-09 23:35 
GeneralRe: Remote COM Pin
RevathiRamakumar3-Mar-09 23:50
RevathiRamakumar3-Mar-09 23:50 
GeneralRe: Remote COM Pin
RevathiRamakumar4-Mar-09 18:49
RevathiRamakumar4-Mar-09 18:49 
QuestionDHTML dialouge class F1 (help info) Pin
coding_ram1-Mar-09 23:42
coding_ram1-Mar-09 23:42 
QuestionEnable MFC in Win32 DLL Pin
PankajB1-Mar-09 22:44
PankajB1-Mar-09 22:44 
AnswerRe: Enable MFC in Win32 DLL Pin
Cedric Moonen1-Mar-09 22:47
Cedric Moonen1-Mar-09 22:47 
GeneralRe: Enable MFC in Win32 DLL Pin
PankajB1-Mar-09 22:50
PankajB1-Mar-09 22:50 
AnswerRe: Enable MFC in Win32 DLL Pin
«_Superman_»1-Mar-09 22:51
professional«_Superman_»1-Mar-09 22:51 
GeneralRe: Enable MFC in Win32 DLL Pin
PankajB1-Mar-09 22:56
PankajB1-Mar-09 22:56 
Questionstring to hex number Pin
lune121-Mar-09 21:50
lune121-Mar-09 21:50 
AnswerRe: string to hex number Pin
grassrootkit1-Mar-09 22:13
grassrootkit1-Mar-09 22:13 
AnswerRe: string to hex number Pin
Cedric Moonen1-Mar-09 22:22
Cedric Moonen1-Mar-09 22:22 

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.