If your variable rd is null you will get a "Null Reference Exception". You can only use pointers that points to an object, you can not use pointers that has only been declared, but not yet points to an object. (Differ between pointer variables and objects)
Note that ConnectService() has nothing to do with advertising services. To advertise a service and to connect to a service are two completely different things.
To undserstand how to connect to a service on remote device, take a look at the FindAndConnect sample in the SDK. Start there and see how it works.
To understand how you create and advertise your own services, please take a look at the SimpleService sample in the SDK. When you get that sample working, you have a good platform to go on from.