PDA

View Full Version : any dcom developers around?


Doom9
31st October 2003, 16:41
I have to get into COM/DCOM for a little project. So far all examples I could find were VC++6 based, which is as good as useless as VS.NET with ATL7 makes things completely different (basically all the examples explain steps that you don't have to do in VC++7, and list code you'll never see or have to write in VC++7).
So as a complete noob I started writing my stuff as a COM dll, which I finally got working. So next, I create a Windows service, using the same Interface definition, and the same test program, and it does work, sort of, but here's the catch: It works when client and server are on the same PC. I have this huge VC++6 example how to connect to a remote DCOM server but it makes no sense because it hooks into methods that aren't even there in a VC++7 DCOM project, so I'm a bit lost how I can make my client connect to the DCOM server on another machine. Basically, I connect to the server like this.

ILoginPtr server("SSoServer.Login");

Where SSoServer is the name of the service and Login the name of the class providing the service and handling the requests. So when I run this line on a remote machine, I get an "Invalid class string" com error, which is no wonder since it can't locate the server. So how do I tell my project where to locate the server?

On a sidenote, I the server connects to a database via ADO (ODBC Access driver) and this works just fine using the COM dll, but on the server all I get is a "The datasource name was not found and no default driver was specified" (the code is exactly the same).. if anyone has any ideas (the DSN is locally registered, I've just verified that and the COM version is still working just fine).

VidHack
31st October 2003, 22:30
Perhaps this could help you.

ftp://ftp.borland.com/pub/bcppbuilder/techpubs/bcb5/b5com_s.zip

Its a link to the Borland Dcom/Com developer help file.

Its worth a shot, unfortunatly, I have a bunch of Dcom/Com books at home, and I dont have access right now....

VidHack