Click here to Skip to main content
15,886,067 members
Home / Discussions / COM
   

COM

 
GeneralATL - Collections - shared data Pin
14-Jan-01 13:42
suss14-Jan-01 13:42 
GeneralRe: ATL - Collections - shared data Pin
Todd Wilson8-Feb-01 12:58
Todd Wilson8-Feb-01 12:58 
GeneralATL globals Pin
2sky10-Jan-01 13:57
2sky10-Jan-01 13:57 
GeneralITypelib2::GetDocumentation2 Pin
4-Jan-01 3:56
suss4-Jan-01 3:56 
GeneralRe: ITypelib2::GetDocumentation2 Pin
6-Feb-01 15:19
suss6-Feb-01 15:19 
GeneralDcom working on the client(suppose to work work on the server) Pin
Hushpappy3-Jan-01 6:22
Hushpappy3-Jan-01 6:22 
GeneralRe: Dcom working on the client(suppose to work work on the server) Pin
18-Jan-01 14:15
suss18-Jan-01 14:15 
GeneralRe: Dcom working on the client(suppose to work work on the server) Pin
John McTainsh4-Feb-01 16:22
John McTainsh4-Feb-01 16:22 
Hi Hush,

You may be registering the exe on your machine rather than the remote machine. You need to run "dcom.exe /regserver" from the client and FROM the server. This can not be done remotely (as far as I know?).

I have come across this problem often enough to include the following code in the remote classes to tell me where it is running.

// ***************************************************************************
//DESCRIPTION:
// Return the machine name of the machine running this code.
//PARAMS:
// *pbsrtMachine Name returned here
//RETURN:
// Standard HRESULT
//CREATED:
// 1-2-2001, 16:51:31 by john@mctainsh.com
// ***************************************************************************
STDMETHODIMP CWhereAmI::GetMachine(BSTR *pbstrMachine)
{
ATLTRACE( _T("CWhereAmI::GetMachine(%p)\n"), pbstrMachine );
ATLASSERT( pbstrMachine );

USES_CONVERSION;
//Get my name
DWORD dwComputerNameLength = MAX_COMPUTERNAME_LENGTH + 1;
TCHAR szComputerName[MAX_COMPUTERNAME_LENGTH + 2];
if( GetComputerName( szComputerName, &dwComputerNameLength ) )
szComputerName[dwComputerNameLength] = NULL;
else
_tcscpy( szComputerName, _T("Unknown") );

*pbstrMachine = SysAllocString( T2W( szComputerName ) );

return S_OK;
}

---------------------------------------------------

I have a note on DCOM remoting at
http://www.mctainsh.com/COM/SmartPtr3.aspx
The hardest thing I find is getting security correct. Let me know how you get on...

Have a great day!
http://www.mctainsh.com
QuestionQ: how to expose an interface using ATL? Pin
Tony Young27-Dec-00 10:08
Tony Young27-Dec-00 10:08 
AnswerRe: Q: how to expose an interface using ATL? Pin
Michael Dunn27-Dec-00 14:21
sitebuilderMichael Dunn27-Dec-00 14:21 
GeneralAsp and thumbnail Pin
26-Dec-00 2:35
suss26-Dec-00 2:35 
GeneralMixed COM Apartment models Pin
Christian Skovdal Andersen22-Dec-00 11:39
Christian Skovdal Andersen22-Dec-00 11:39 
GeneralClistCtrl and Callback Items in WTL Pin
21-Dec-00 22:40
suss21-Dec-00 22:40 
GeneralATL component connection points and smart pointers error Pin
19-Dec-00 7:40
suss19-Dec-00 7:40 
GeneralRe: ATL component connection points and smart pointers error Pin
Brian C Hart19-Dec-00 10:01
professionalBrian C Hart19-Dec-00 10:01 
GeneralRe: ATL component connection points and smart pointers error Pin
20-Dec-00 5:04
suss20-Dec-00 5:04 
GeneralClass not registered Pin
VVN18-Dec-00 5:42
VVN18-Dec-00 5:42 
GeneralRe: Class not registered Pin
18-Dec-00 9:14
suss18-Dec-00 9:14 
GeneralRe: Class not registered Pin
18-Dec-00 9:15
suss18-Dec-00 9:15 
GeneralRe: Class not registered Pin
Julien16-Jan-01 11:20
Julien16-Jan-01 11:20 
GeneralWindow DLL to detect wm_message of an active window Pin
16-Dec-00 22:33
suss16-Dec-00 22:33 
QuestionCOM can be used instead of Dlls ? Pin
11-Dec-00 3:31
suss11-Dec-00 3:31 
QuestionRegistering COM Object (NT Service) on Remote mahine? Pin
Ahmed01927-Dec-00 21:16
Ahmed01927-Dec-00 21:16 
QuestionMy ActiveX in Excel's "Insert object" dialog? Pin
Serge_l5-Dec-00 21:31
Serge_l5-Dec-00 21:31 
GeneralDynamic Search Handlers Pin
Jason De Arte27-Nov-00 10:08
Jason De Arte27-Nov-00 10:08 

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.