public static void TssSdkSetUserInfoEx(TssSdk.EENTRYID entryId, string uin, string appId, uint worldId, string roleId) { TssSdk.UserInfoEx userInfoEx = new TssSdk.UserInfoEx(); userInfoEx.size = Marshal.SizeOf(userInfoEx); userInfoEx.entrance_id = (uint)entryId; userInfoEx.uin_type = 2u; byte[] array = new byte[64]; byte[] array2 = TssSdk.String2Bytes(uin); int i = 0; while (i < array2.Length && i < 64) { array[i] = array2[i]; i++; } while (i < 64) { array[i] = 0; i++; } userInfoEx.uin_00 = array[0]; userInfoEx.uin_01 = array[1]; userInfoEx.uin_02 = array[2]; userInfoEx.uin_03 = array[3]; userInfoEx.uin_04 = array[4]; userInfoEx.uin_05 = array[5]; userInfoEx.uin_06 = array[6]; userInfoEx.uin_07 = array[7]; userInfoEx.uin_08 = array[8]; userInfoEx.uin_09 = array[9]; userInfoEx.uin_10 = array[10]; userInfoEx.uin_11 = array[11]; userInfoEx.uin_12 = array[12]; userInfoEx.uin_13 = array[13]; userInfoEx.uin_14 = array[14]; userInfoEx.uin_15 = array[15]; userInfoEx.uin_16 = array[16]; userInfoEx.uin_17 = array[17]; userInfoEx.uin_18 = array[18]; userInfoEx.uin_19 = array[19]; userInfoEx.uin_20 = array[20]; userInfoEx.uin_21 = array[21]; userInfoEx.uin_22 = array[22]; userInfoEx.uin_23 = array[23]; userInfoEx.uin_24 = array[24]; userInfoEx.uin_25 = array[25]; userInfoEx.uin_26 = array[26]; userInfoEx.uin_27 = array[27]; userInfoEx.uin_28 = array[28]; userInfoEx.uin_29 = array[29]; userInfoEx.uin_30 = array[30]; userInfoEx.uin_31 = array[31]; userInfoEx.uin_32 = array[32]; userInfoEx.uin_33 = array[33]; userInfoEx.uin_34 = array[34]; userInfoEx.uin_35 = array[35]; userInfoEx.uin_36 = array[36]; userInfoEx.uin_37 = array[37]; userInfoEx.uin_38 = array[38]; userInfoEx.uin_39 = array[39]; userInfoEx.uin_40 = array[40]; userInfoEx.uin_41 = array[41]; userInfoEx.uin_42 = array[42]; userInfoEx.uin_43 = array[43]; userInfoEx.uin_44 = array[44]; userInfoEx.uin_45 = array[45]; userInfoEx.uin_46 = array[46]; userInfoEx.uin_47 = array[47]; userInfoEx.uin_48 = array[48]; userInfoEx.uin_49 = array[49]; userInfoEx.uin_50 = array[50]; userInfoEx.uin_51 = array[51]; userInfoEx.uin_52 = array[52]; userInfoEx.uin_53 = array[53]; userInfoEx.uin_54 = array[54]; userInfoEx.uin_55 = array[55]; userInfoEx.uin_56 = array[56]; userInfoEx.uin_57 = array[57]; userInfoEx.uin_58 = array[58]; userInfoEx.uin_59 = array[59]; userInfoEx.uin_60 = array[60]; userInfoEx.uin_61 = array[61]; userInfoEx.uin_62 = array[62]; userInfoEx.uin_63 = array[63]; userInfoEx.appid_type = 2u; byte[] array3 = TssSdk.String2Bytes(appId); i = 0; while (i < array3.Length && i < 64) { array[i] = array3[i]; i++; } while (i < 64) { array[i] = 0; i++; } userInfoEx.appid_00 = array[0]; userInfoEx.appid_01 = array[1]; userInfoEx.appid_02 = array[2]; userInfoEx.appid_03 = array[3]; userInfoEx.appid_04 = array[4]; userInfoEx.appid_05 = array[5]; userInfoEx.appid_06 = array[6]; userInfoEx.appid_07 = array[7]; userInfoEx.appid_08 = array[8]; userInfoEx.appid_09 = array[9]; userInfoEx.appid_10 = array[10]; userInfoEx.appid_11 = array[11]; userInfoEx.appid_12 = array[12]; userInfoEx.appid_13 = array[13]; userInfoEx.appid_14 = array[14]; userInfoEx.appid_15 = array[15]; userInfoEx.appid_16 = array[16]; userInfoEx.appid_17 = array[17]; userInfoEx.appid_18 = array[18]; userInfoEx.appid_19 = array[19]; userInfoEx.appid_20 = array[20]; userInfoEx.appid_21 = array[21]; userInfoEx.appid_22 = array[22]; userInfoEx.appid_23 = array[23]; userInfoEx.appid_24 = array[24]; userInfoEx.appid_25 = array[25]; userInfoEx.appid_26 = array[26]; userInfoEx.appid_27 = array[27]; userInfoEx.appid_28 = array[28]; userInfoEx.appid_29 = array[29]; userInfoEx.appid_30 = array[30]; userInfoEx.appid_31 = array[31]; userInfoEx.appid_32 = array[32]; userInfoEx.appid_33 = array[33]; userInfoEx.appid_34 = array[34]; userInfoEx.appid_35 = array[35]; userInfoEx.appid_36 = array[36]; userInfoEx.appid_37 = array[37]; userInfoEx.appid_38 = array[38]; userInfoEx.appid_39 = array[39]; userInfoEx.appid_40 = array[40]; userInfoEx.appid_41 = array[41]; userInfoEx.appid_42 = array[42]; userInfoEx.appid_43 = array[43]; userInfoEx.appid_44 = array[44]; userInfoEx.appid_45 = array[45]; userInfoEx.appid_46 = array[46]; userInfoEx.appid_47 = array[47]; userInfoEx.appid_48 = array[48]; userInfoEx.appid_49 = array[49]; userInfoEx.appid_50 = array[50]; userInfoEx.appid_51 = array[51]; userInfoEx.appid_52 = array[52]; userInfoEx.appid_53 = array[53]; userInfoEx.appid_54 = array[54]; userInfoEx.appid_55 = array[55]; userInfoEx.appid_56 = array[56]; userInfoEx.appid_57 = array[57]; userInfoEx.appid_58 = array[58]; userInfoEx.appid_59 = array[59]; userInfoEx.appid_60 = array[60]; userInfoEx.appid_61 = array[61]; userInfoEx.appid_62 = array[62]; userInfoEx.appid_63 = array[63]; userInfoEx.world_id = worldId; byte[] array4 = TssSdk.String2Bytes(roleId); for (i = 0; i < array4.Length; i++) { array[i] = array4[i]; } while (i < 64) { array[i] = 0; i++; } userInfoEx.role_id_00 = array[0]; userInfoEx.role_id_01 = array[1]; userInfoEx.role_id_02 = array[2]; userInfoEx.role_id_03 = array[3]; userInfoEx.role_id_04 = array[4]; userInfoEx.role_id_05 = array[5]; userInfoEx.role_id_06 = array[6]; userInfoEx.role_id_07 = array[7]; userInfoEx.role_id_08 = array[8]; userInfoEx.role_id_09 = array[9]; userInfoEx.role_id_10 = array[10]; userInfoEx.role_id_11 = array[11]; userInfoEx.role_id_12 = array[12]; userInfoEx.role_id_13 = array[13]; userInfoEx.role_id_14 = array[14]; userInfoEx.role_id_15 = array[15]; userInfoEx.role_id_16 = array[16]; userInfoEx.role_id_17 = array[17]; userInfoEx.role_id_18 = array[18]; userInfoEx.role_id_19 = array[19]; userInfoEx.role_id_20 = array[20]; userInfoEx.role_id_21 = array[21]; userInfoEx.role_id_22 = array[22]; userInfoEx.role_id_23 = array[23]; userInfoEx.role_id_24 = array[24]; userInfoEx.role_id_25 = array[25]; userInfoEx.role_id_26 = array[26]; userInfoEx.role_id_27 = array[27]; userInfoEx.role_id_28 = array[28]; userInfoEx.role_id_29 = array[29]; userInfoEx.role_id_30 = array[30]; userInfoEx.role_id_31 = array[31]; userInfoEx.role_id_32 = array[32]; userInfoEx.role_id_33 = array[33]; userInfoEx.role_id_34 = array[34]; userInfoEx.role_id_35 = array[35]; userInfoEx.role_id_36 = array[36]; userInfoEx.role_id_37 = array[37]; userInfoEx.role_id_38 = array[38]; userInfoEx.role_id_39 = array[39]; userInfoEx.role_id_40 = array[40]; userInfoEx.role_id_41 = array[41]; userInfoEx.role_id_42 = array[42]; userInfoEx.role_id_43 = array[43]; userInfoEx.role_id_44 = array[44]; userInfoEx.role_id_45 = array[45]; userInfoEx.role_id_46 = array[46]; userInfoEx.role_id_47 = array[47]; userInfoEx.role_id_48 = array[48]; userInfoEx.role_id_49 = array[49]; userInfoEx.role_id_50 = array[50]; userInfoEx.role_id_51 = array[51]; userInfoEx.role_id_52 = array[52]; userInfoEx.role_id_53 = array[53]; userInfoEx.role_id_54 = array[54]; userInfoEx.role_id_55 = array[55]; userInfoEx.role_id_56 = array[56]; userInfoEx.role_id_57 = array[57]; userInfoEx.role_id_58 = array[58]; userInfoEx.role_id_59 = array[59]; userInfoEx.role_id_60 = array[60]; userInfoEx.role_id_61 = array[61]; userInfoEx.role_id_62 = array[62]; userInfoEx.role_id_63 = array[63]; TssSdk.tss_sdk_setuserinfo_ex(userInfoEx); }