Click here to Skip to main content
15,914,392 members
Home / Discussions / COM
   

COM

 
GeneralRe: MY very own language Pin
Jörgen Sigvardsson3-Oct-04 8:05
Jörgen Sigvardsson3-Oct-04 8:05 
GeneralRe: MY very own language Pin
MohammadAmiry8-Oct-04 5:30
MohammadAmiry8-Oct-04 5:30 
QuestionIRegExp problem ? Pin
necroleak1-Oct-04 23:22
sussnecroleak1-Oct-04 23:22 
AnswerRe: IRegExp problem ? Pin
Jörgen Sigvardsson3-Oct-04 8:09
Jörgen Sigvardsson3-Oct-04 8:09 
GeneralAfxOleInit and CoInitializeEx Pin
Shao Voon Wong1-Oct-04 5:51
mvaShao Voon Wong1-Oct-04 5:51 
GeneralRe: AfxOleInit and CoInitializeEx Pin
Jörgen Sigvardsson7-Oct-04 13:22
Jörgen Sigvardsson7-Oct-04 13:22 
GeneralIOleCommandTarget in a .net COM server! HELP! HELP!! Pin
SmallUmka1-Oct-04 1:00
SmallUmka1-Oct-04 1:00 
GeneralDCOM on Windows 2003: error in COM-client Pin
RadioShark30-Sep-04 2:05
RadioShark30-Sep-04 2:05 
Hi,

I’ve got a strange behaviour of DCOM on Windows 2003 Server. I’ve created COM-server (out-of-process) and COM-client for that COM-server. Both work successfully on local computer under any operation system. Also server and client work fine when COM-server is installed on Windows 2003 Server and when COM-client works on other PC running Windows XP.

When I try run COM-server on Windows XP and COM-client on Windows 2003 Server, COM-client told me “Can’t query COM-server at remote PC: Permission denied”.

Windows XP and Windows 2003 Server are located at the same network and at the same workgroup (not used domains). All permissions are set by default.

What should I do? Here is the sample code of COM-client:

CoInitializeEx(NULL,COINIT_MULTITHREADED);

IReqAuth * pReqAuth;

WCHAR *wszMachineName=L"ALPHA\0";

COSERVERINFO srv;
ZeroMemory(&srv,sizeof(srv));
srv.pwszName=wszMachineName;

MULTI_QI qi;
qi.pIID=&IID_IReqAuth;
qi.hr=0;
qi.pItf=NULL;

HRESULT hr=CoCreateInstanceEx(CLSID_ReqAuth,
NULL,
CLSCTX_SERVER,
&srv,
1,
&qi);

if (SUCCEEDED(hr))
{
pReqAuth=(IReqAuth *)qi.pItf;

printf("COM object OK\n");

char szTmp[MAX_PATH];

BSTR AppVersion;
hr=pReqAuth->GetVersion(&AppVersion);
if (SUCCEEDED(hr))
{
memset(szTmp,0,sizeof(szTmp));
wcstombs(szTmp,AppVersion,SysStringLen(AppVersion));
printf("AppVersion: %s\n",szTmp);
SysFreeString(AppVersion);
}
else
{
sprintf(szTmp, "GetVersion failed hr = %x\n", hr);
printf(szTmp);
};

pReqAuth->Release();
}
else
{
printf("Error creating COM-object %d\n",GetLastError());
};

::CoUninitialize();

Sleep(200);

Please help, my brains can’t think anymore.



Sincerely Yours,
RadioShark
GeneralRe: DCOM on Windows 2003: error in COM-client Pin
Milton Karimbekallil4-Oct-04 0:12
Milton Karimbekallil4-Oct-04 0:12 
Question.Net COM alternative?? Pin
Gammill29-Sep-04 11:33
Gammill29-Sep-04 11:33 
AnswerRe: .Net COM alternative?? Pin
ursus zeta29-Sep-04 14:18
ursus zeta29-Sep-04 14:18 
Questioncan someone recommend a COM book? Pin
liyang yu29-Sep-04 3:31
liyang yu29-Sep-04 3:31 
AnswerRe: can someone recommend a COM book? Pin
Gammill29-Sep-04 11:22
Gammill29-Sep-04 11:22 
GeneralEssential COM Pin
ursus zeta30-Sep-04 6:22
ursus zeta30-Sep-04 6:22 
GeneralRegsvr32 writes an error Pin
Rassul Yunussov28-Sep-04 7:58
Rassul Yunussov28-Sep-04 7:58 
GeneralRe: Regsvr32 writes an error Pin
geo_m12-Oct-04 21:17
geo_m12-Oct-04 21:17 
GeneralRe: Regsvr32 writes an error Pin
Rassul Yunussov14-Oct-04 5:37
Rassul Yunussov14-Oct-04 5:37 
GeneralRe: Regsvr32 writes an error Pin
geo_m14-Oct-04 19:44
geo_m14-Oct-04 19:44 
GeneralRe: Regsvr32 writes an error Pin
Eurosid21-Jul-05 6:04
Eurosid21-Jul-05 6:04 
GeneralPLS HELP : CreateInstance (__uuidof(SHDocVw::ShellWindows) failed Pin
SenPy28-Sep-04 7:23
SenPy28-Sep-04 7:23 
GeneralRe: PLS HELP : CreateInstance (__uuidof(SHDocVw::ShellWindows) failed Pin
4apai30-Sep-04 23:07
4apai30-Sep-04 23:07 
Generalchanging the stack size in DLL Pin
Anonymous28-Sep-04 5:57
Anonymous28-Sep-04 5:57 
GeneralRe: changing the stack size in DLL Pin
darkbyte29-Sep-04 4:09
darkbyte29-Sep-04 4:09 
GeneralAdd-ins, creating using Visual C++ : Help! Pin
agentnem27-Sep-04 18:46
agentnem27-Sep-04 18:46 
GeneralPLS HELP : CoCreateInstance on IE object failed on XP/SP2 Pin
SenPy27-Sep-04 13:31
SenPy27-Sep-04 13: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.