AJ_Status AJSVC_MarshalAppIdAsVariant(AJ_Message msg, string appId) { AJ_Status status = AJ_Status.AJ_OK; byte [] b = new byte[appId.Length / 2]; for (int i = 0; i < appId.Length / 2; i++) { b[i] = (byte)((A2H(appId[i << 1]) << 4) + (A2H(appId[(i << 1) + 1]))); } status = AjInst.MarshalArgs(msg, "v", AJ.APP_ID_SIGNATURE, b); return(status); }
static public void MakeMethodCall(UInt32 bus, UInt32 sessionId, AJ myAlljoyn) { AJ_Status status = AJ_Status.AJ_OK; AJ_Message msg = new AJ_Message(); status = myAlljoyn.MarshalMethodCall(bus, msg, BASIC_CLIENT_CAT, fullServiceName, sessionId, 0, METHOD_TIMEOUT); if (status == AJ_Status.AJ_OK) { status = myAlljoyn.MarshalArgs(msg, "ss", "Hello ", "World!"); } if (status == AJ_Status.AJ_OK) { status = myAlljoyn.DeliverMsg(msg); } }