diff --git a/code/Makefile.am b/code/Makefile.am index d5197ad515..d4cbc26760 100644 --- a/code/Makefile.am +++ b/code/Makefile.am @@ -536,6 +536,8 @@ FS2_SOURCES = \ network/multi_rate.h \ network/multi_respawn.cpp \ network/multi_respawn.h \ + network/multi_sexp.cpp \ + network/multi_sexp.h \ network/multi_team.cpp \ network/multi_team.h \ network/multi_update.h \ diff --git a/code/ai/ai_profiles.cpp b/code/ai/ai_profiles.cpp index 4829f963d7..cb375ac428 100644 --- a/code/ai/ai_profiles.cpp +++ b/code/ai/ai_profiles.cpp @@ -280,13 +280,13 @@ void parse_ai_profiles_tbl(char *filename) // represented in fractions of F1_0 if (optional_string("$Predict Position Delay:")) { - int i; + int iLoop; float temp_list[NUM_SKILL_LEVELS]; parse_float_list(temp_list, NUM_SKILL_LEVELS); - for (i = 0; i < NUM_SKILL_LEVELS; i++) - profile->predict_position_delay[i] = fl2f(temp_list[i]); + for (iLoop = 0; iLoop < NUM_SKILL_LEVELS; iLoop++) + profile->predict_position_delay[iLoop] = fl2f(temp_list[iLoop]); } if (optional_string("$Player Shield Recharge Scale:")) @@ -331,6 +331,9 @@ void parse_ai_profiles_tbl(char *filename) if (optional_string("$Percentage Awarded For Capship Assist:")) parse_float_list(profile->assist_award_percentage_scale, NUM_SKILL_LEVELS); + if (optional_string("$Repair Penalty:")) + parse_int_list(profile->repair_penalty, NUM_SKILL_LEVELS); + if (optional_string("$Delay Before Allowing Bombs to Be Shot Down:")) parse_float_list(profile->delay_bomb_arm_timer, NUM_SKILL_LEVELS); diff --git a/code/ai/ai_profiles.h b/code/ai/ai_profiles.h index ce71e6a962..8f151bb947 100644 --- a/code/ai/ai_profiles.h +++ b/code/ai/ai_profiles.h @@ -84,8 +84,7 @@ #define AIPF_FIX_HEAT_SEEKER_STEALTH_BUG (1 << 23) #define AIPF_MULTI_ALLOW_EMPTY_PRIMARIES (1 << 24) #define AIPF_MULTI_ALLOW_EMPTY_SECONDARIES (1 << 25) -#define AIPF_ALLOW_TURRETS_TARGET_WEAPONS_FREELY (1 << 26) - +#define AIPF_ALLOW_TURRETS_TARGET_WEAPONS_FREELY (1 << 26) #define MAX_AI_PROFILES 5 @@ -141,6 +140,10 @@ typedef struct ai_profile_t { // percentage of the capships score given to other team mates on a kill float assist_award_percentage_scale[NUM_SKILL_LEVELS]; + + // the number of points subtracted from score for a rearm started on a player + int repair_penalty[NUM_SKILL_LEVELS]; + float delay_bomb_arm_timer[NUM_SKILL_LEVELS]; } ai_profile_t; diff --git a/code/ai/aibig.cpp b/code/ai/aibig.cpp index 7e01d26843..581a6df69b 100644 --- a/code/ai/aibig.cpp +++ b/code/ai/aibig.cpp @@ -500,7 +500,7 @@ void ai_bpap(object *objp, vec3d *attacker_objp_pos, vec3d *attacker_objp_fvec, ship_info *sip = &Ship_info[Ships[objp->instance].ship_info_index]; model_subsystem *tp = NULL; if (ss != NULL) - model_subsystem *tp = ss->system_info; + tp = ss->system_info; best_point = objp->pos; nearest_dist = weapon_travel_dist; @@ -546,6 +546,7 @@ void ai_bpap(object *objp, vec3d *attacker_objp_pos, vec3d *attacker_objp_fvec, dist = vm_vec_normalized_dir(&v2p, &result_point, attacker_objp_pos); bool in_fov = false; + if (tp == NULL) { dot = vm_vec_dot(&v2p, attacker_objp_fvec); if (dot > fov) @@ -1051,7 +1052,7 @@ void ai_big_chase_attack(ai_info *aip, ship_info *sip, vec3d *enemy_pos, float d } } - // use dist normal to enemy here (dont break 50 barrier) + // use dist normal to enemy here (don't break 50 barrier) if (dist_to_enemy < ATTACK_STOP_DISTANCE) { // accelerate_ship(aip, accel * 0.5f); accelerate_ship(aip, -1.0f); diff --git a/code/ai/aicode.cpp b/code/ai/aicode.cpp index 4eec3e9e27..cfb22b18ea 100644 --- a/code/ai/aicode.cpp +++ b/code/ai/aicode.cpp @@ -858,7 +858,7 @@ * * 81 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 80 8/10/99 5:02p Andsager * Fix bug where AI gets stuck in SM_EVADE_WEAPON with no target. @@ -4031,22 +4031,6 @@ void ai_do_objects_docked_stuff(object *docker, int docker_point, object *dockee return; } - // if this is a multi game, we currently only support one-on-one docking - if (Game_mode & GM_MULTIPLAYER) - { - if (object_is_docked(docker)) - { - Error(LOCATION, "Ship %s tried to dock to more than one object. Multiplayer currently does not support multiple ship docking.\n", Ships[docker->instance].ship_name); - return; - } - - if (object_is_docked(dockee)) - { - Error(LOCATION, "Ship %s tried to dock to more than one object. Multiplayer currently does not support multiple ship docking.\n", Ships[dockee->instance].ship_name); - return; - } - } - // link the two objects dock_dock_objects(docker, docker_point, dockee, dockee_point); @@ -4075,10 +4059,9 @@ void ai_do_objects_docked_stuff(object *docker, int docker_point, object *dockee } } - // add multiplayer hook here to deal with docked objects. We need to only send information - // about the object that is docking. Both flags will get updated. + // add multiplayer hook here to deal with docked objects. if ( MULTIPLAYER_MASTER && update_clients) - send_ai_info_update_packet( docker, AI_UPDATE_DOCK ); + send_ai_info_update_packet( docker, AI_UPDATE_DOCK, dockee ); } // code which is called when objects become undocked. Equivalent of above function. @@ -4098,7 +4081,7 @@ void ai_do_objects_undocked_stuff( object *docker, object *dockee ) // do anything else. We don't need to send info for both objects, since multi // only supports one docked object if ( MULTIPLAYER_MASTER ) - send_ai_info_update_packet( docker, AI_UPDATE_UNDOCK ); + send_ai_info_update_packet( docker, AI_UPDATE_UNDOCK, dockee ); if (docker->type == OBJ_SHIP && dockee->type == OBJ_SHIP) { @@ -6320,7 +6303,7 @@ int ai_select_primary_weapon(object *objp, object *other_objp, int flags) sip = &Ship_info[shipp->ship_info_index]; //made it so it only selects puncture weapons if the active goal is to disable something -Bobboau - if ((flags & WIF_PUNCTURE) && (Ai_info[shipp->ai_index].goals[0].ai_mode & AI_GOAL_DISARM_SHIP | AI_GOAL_DISABLE_SHIP)) + if ((flags & WIF_PUNCTURE) && (Ai_info[shipp->ai_index].goals[0].ai_mode & (AI_GOAL_DISARM_SHIP | AI_GOAL_DISABLE_SHIP))) // if (flags & WIF_PUNCTURE) { if (swp->current_primary_bank >= 0) @@ -7382,9 +7365,15 @@ void set_predicted_enemy_pos(vec3d *predicted_enemy_pos, object *pobjp, object * { float weapon_speed, range_time; ship *shipp = &Ships[pobjp->instance]; + vec3d target_moving_direction; Assert( eobjp != NULL ); + target_moving_direction = eobjp->phys_info.vel; + + if (The_mission.ai_profile->flags & AIPF_USE_ADDITIVE_WEAPON_VELOCITY) + vm_vec_sub2(&target_moving_direction, &pobjp->phys_info.vel); + weapon_speed = ai_get_weapon_speed(&shipp->weapons); weapon_speed = MAX(weapon_speed, 1.0f); // set not less than 1 @@ -7403,7 +7392,7 @@ void set_predicted_enemy_pos(vec3d *predicted_enemy_pos, object *pobjp, object * float dist; dist = vm_vec_dist_quick(&pobjp->pos, &eobjp->pos); - vm_vec_scale_add(predicted_enemy_pos, &eobjp->pos, &eobjp->phys_info.vel, aip->time_enemy_in_range * dist/weapon_speed); + vm_vec_scale_add(predicted_enemy_pos, &eobjp->pos, &target_moving_direction, aip->time_enemy_in_range * dist/weapon_speed); } else { float collision_time; vec3d gun_pos, pnt; @@ -7418,13 +7407,13 @@ void set_predicted_enemy_pos(vec3d *predicted_enemy_pos, object *pobjp, object * vm_vec_unrotate(&gun_pos, &pnt, &pobjp->orient); vm_vec_add2(&gun_pos, &pobjp->pos); - collision_time = compute_collision_time(&eobjp->pos, &eobjp->phys_info.vel, &gun_pos, weapon_speed); + collision_time = compute_collision_time(&eobjp->pos, &target_moving_direction, &gun_pos, weapon_speed); if (collision_time == 0.0f) { collision_time = 100.0f; } - vm_vec_scale_add(predicted_enemy_pos, &eobjp->pos, &eobjp->phys_info.vel, collision_time); + vm_vec_scale_add(predicted_enemy_pos, &eobjp->pos, &target_moving_direction, collision_time); // set globals G_collision_time = collision_time; @@ -10317,7 +10306,7 @@ void guard_object_was_hit(object *guard_objp, object *hitter_objp) return; } - // dont attack if you can't see him + // don't attack if you can't see him if ( awacs_get_level(hitter_objp, &Ships[aip->shipnum], 1) < 1 ) { // if he's a stealth and visible, but not targetable, ok to attack. if ( is_object_stealth_ship(hitter_objp) ) { @@ -10959,11 +10948,6 @@ void ai_guard() } - -// define for the points subtracted from score for a rearm started on a player. -#define REPAIR_PENALTY 50 - - // function to clean up ai flags, variables, and other interesting information // for a ship that was getting repaired. The how parameter is useful for multiplayer // only in that it tells us why the repaired ship is being cleaned up. @@ -11002,7 +10986,7 @@ void ai_do_objects_repairing_stuff( object *repaired_objp, object *repair_objp, // if this is a player ship, then subtract the repair penalty from this player's score if ( repaired_objp->flags & OF_PLAYER_SHIP ) { if ( !(Game_mode & GM_MULTIPLAYER) ) { - Player->stats.m_score -= (int)(REPAIR_PENALTY * scoring_get_scale_factor()); // subtract the penalty + Player->stats.m_score -= The_mission.ai_profile->repair_penalty[Game_skill_level]; // subtract the penalty } else { /* int pnum; @@ -11010,10 +10994,10 @@ void ai_do_objects_repairing_stuff( object *repaired_objp, object *repair_objp, // multiplayer game -- find the player, then subtract the score pnum = multi_find_player_by_object( repaired_objp ); if ( pnum != -1 ) { - Net_players[pnum].player->stats.m_score -= (int)(REPAIR_PENALTY * scoring_get_scale_factor()); + Net_players[pnum].player->stats.m_score -= The_mission.ai_profile->repair_penalty[Game_skill_level]; // squad war - multi_team_maybe_add_score(-(int)(REPAIR_PENALTY * scoring_get_scale_factor()), Net_players[pnum].p_info.team); + multi_team_maybe_add_score(-(The_mission.ai_profile->repair_penalty[Game_skill_level]), Net_players[pnum].p_info.team); } else { nprintf(("Network", "Couldn't find player for ship %s for repair penalty\n", Ships[repaired_objp->instance].ship_name)); } @@ -13009,27 +12993,15 @@ void ai_transfer_shield(object *objp, int quadrant_num) float transfer_delta; float max_quadrant_strength; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - max_quadrant_strength = get_max_shield_quad(objp,quadrant_num); + max_quadrant_strength = get_max_shield_quad(objp); transfer_amount = 0.0f; transfer_delta = (SHIELD_BALANCE_RATE/2) * max_quadrant_strength; - if (objp->shield_quadrant[quadrant_num] + (n_shd_sections-1)*transfer_delta > max_quadrant_strength) - transfer_delta = (max_quadrant_strength - objp->shield_quadrant[quadrant_num])/(n_shd_sections-1); + if (objp->shield_quadrant[quadrant_num] + (MAX_SHIELD_SECTIONS-1)*transfer_delta > max_quadrant_strength) + transfer_delta = (max_quadrant_strength - objp->shield_quadrant[quadrant_num])/(MAX_SHIELD_SECTIONS-1); - for (i=0; ishield_quadrant[i] >= transfer_delta) { objp->shield_quadrant[i] -= transfer_delta; @@ -13050,34 +13022,21 @@ void ai_balance_shield(object *objp) float delta; // if we are already at the max shield strength for all quads then just bail now - if ( (Ships[objp->instance].ship_max_shield_strength == shield_get_strength(objp)) || (Ships[objp->instance].ship_max_shield_strength == 0.0f) ) + if ( Ships[objp->instance].ship_max_shield_strength == shield_get_strength(objp) ) return; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - shield_strength_avg = shield_get_strength(objp)/n_shd_sections; - float shield_multiplier = shield_get_strength(objp) / Ships[objp->instance].ship_max_shield_strength;; + shield_strength_avg = shield_get_strength(objp)/MAX_SHIELD_SECTIONS; delta = SHIELD_BALANCE_RATE * shield_strength_avg; - for (i=0; iinstance].ship_max_shield_segment[i] * shield_multiplier; + for (i=0; ishield_quadrant[i] < shield_strength_avg) { // only do it the retail way if using smart shields (since that's a bigger thing) - taylor if (The_mission.ai_profile->flags & AIPF_SMART_SHIELD_MANAGEMENT) shield_add_strength(objp, delta); else - objp->shield_quadrant[i] += delta/n_shd_sections; + objp->shield_quadrant[i] += delta/MAX_SHIELD_SECTIONS; if (objp->shield_quadrant[i] > shield_strength_avg) objp->shield_quadrant[i] = shield_strength_avg; @@ -13087,7 +13046,7 @@ void ai_balance_shield(object *objp) if (The_mission.ai_profile->flags & AIPF_SMART_SHIELD_MANAGEMENT) shield_add_strength(objp, -delta); else - objp->shield_quadrant[i] -= delta/n_shd_sections; + objp->shield_quadrant[i] -= delta/MAX_SHIELD_SECTIONS; if (objp->shield_quadrant[i] < shield_strength_avg) objp->shield_quadrant[i] = shield_strength_avg; @@ -13124,7 +13083,7 @@ void ai_manage_shield(object *objp, ai_info *aip) aip->shield_manage_timestamp = timestamp((int) (delay * 1000.0f)); if (sip->flags & SIF_SMALL_SHIP) { - if ((aip->last_hit_time != 0) && (Missiontime - aip->last_hit_time < F1_0*10)) + if (Missiontime - aip->last_hit_time < F1_0*10) ai_transfer_shield(objp, aip->last_hit_quadrant); else ai_balance_shield(objp); @@ -13294,8 +13253,10 @@ void maybe_evade_dumbfire_weapon(ai_info *aip) float t = ai_endangered_by_weapon(aip); if ((t > 0.0f) && (t < 1.0f)) { // Check if this weapon is from a large ship Pl_objp is attacking... if so, enter strafe mode - if ( ai_big_maybe_enter_strafe_mode(Pl_objp, aip->danger_weapon_objnum) ) { - return; + if ( !(aip->ai_flags & AIF_NO_DYNAMIC) ) { + if ( ai_big_maybe_enter_strafe_mode(Pl_objp, aip->danger_weapon_objnum) ) { + return; + } } switch (aip->mode) { @@ -15885,7 +15846,7 @@ void ai_ship_hit(object *objp_ship, object *hit_objp, vec3d *hitpos, int shield_ if (aip->submode == SM_ATTACK_FOREVER) return; - if ( hit_objp->type == OBJ_WEAPON ) { + if ( (hit_objp->type == OBJ_WEAPON) && !(aip->ai_flags & AIF_NO_DYNAMIC) ) { if ( ai_big_maybe_enter_strafe_mode(objp_ship, OBJ_INDEX(hit_objp), 1) ) return; } diff --git a/code/ai/aigoals.cpp b/code/ai/aigoals.cpp index cbb1df7366..1875e1e560 100644 --- a/code/ai/aigoals.cpp +++ b/code/ai/aigoals.cpp @@ -962,7 +962,7 @@ void ai_clear_ship_goals( ai_info *aip ) aip->active_goal = AI_GOAL_NONE; // for good measure // next line moved here on 8/5/97 by MWA - // Dont reset player ai (and hence target) + // Don't reset player ai (and hence target) // Goober5000 - account for player ai //if ( !((Player_ship != NULL) && (&Ships[aip->shipnum] == Player_ship)) || Player_use_ai ) { if ( (Player_ship == NULL) || (&Ships[aip->shipnum] != Player_ship) || Player_use_ai ) @@ -1826,7 +1826,7 @@ void ai_add_goal_wing_internal( wing *wingp, int goal_type, char *name, int imme int i; // be sure we are not trying to issue dock or undock goals to wings - Assert ( (goal_type != AI_GOAL_DOCK) || (goal_type != AI_GOAL_UNDOCK) ); + Assert ( (goal_type != AI_GOAL_DOCK) && (goal_type != AI_GOAL_UNDOCK) ); for (i = 0; i < wingp->current_count; i++) { int num = wingp->ship_index[i]; diff --git a/code/ai/aiturret.cpp b/code/ai/aiturret.cpp index 1633f94297..a5f21f8f97 100644 --- a/code/ai/aiturret.cpp +++ b/code/ai/aiturret.cpp @@ -244,6 +244,7 @@ int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos vec3d v2e; float size_mod; bool in_fov; + vm_vec_normalized_dir(&v2e, &objp->pos, tpos); size_mod = objp->radius / (dist + objp->radius); @@ -253,7 +254,7 @@ int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos in_fov = turret_std_fov_test(ss, tvec, &v2e, size_mod); if ( in_fov ) { - return 1; + return 1; } return 0; @@ -518,7 +519,6 @@ void evaluate_obj_as_target(object *objp, eval_enemy_obj_struct *eeo) object *turret_parent_obj = &Objects[eeo->turret_parent_objnum]; ship *shipp; ship_subsys *ss = eeo->turret_subsys; - model_subsystem *tp = ss->system_info; float dist; // Don't look for bombs when weapon system is not ok @@ -985,11 +985,10 @@ int get_nearest_turret_objnum(int turret_parent_objnum, ship_subsys *turret_subs } } } + return -1; - } - int Use_parent_target = 0; DCF_BOOL(use_parent_target, Use_parent_target) @@ -1059,6 +1058,7 @@ int find_turret_enemy(ship_subsys *turret_subsys, int objnum, vec3d *tpos, vec3d float dist; bool in_fov; dist = vm_vec_normalized_dir(&v2e, &Objects[aip->target_objnum].pos, tpos); + if (tp->flags & MSS_FLAG_TURRET_ALT_MATH) in_fov = turret_adv_fov_test(turret_subsys, tvec, &v2e); else @@ -1140,7 +1140,7 @@ int aifft_rotate_turret(ship *shipp, int parent_objnum, ship_subsys *ss, object if (ss->turret_enemy_objnum != -1) { model_subsystem *tp = ss->system_info; - vec3d gun_pos, gun_vec; + vec3d gun_pos, gun_vec, target_moving_direction; //float weapon_speed; float weapon_system_strength; //HACK HACK HACK -WMC @@ -1175,8 +1175,14 @@ int aifft_rotate_turret(ship *shipp, int parent_objnum, ship_subsys *ss, object } } + target_moving_direction = lep->phys_info.vel; + //Try to guess where the enemy will be, and store that spot in predicted_enemy_pos - set_predicted_enemy_pos_turret(predicted_enemy_pos, &gun_pos, objp, &enemy_point, &lep->phys_info.vel, wip->max_speed, ss->turret_time_enemy_in_range * (weapon_system_strength + 1.0f)/2.0f); + if (The_mission.ai_profile->flags & AIPF_USE_ADDITIVE_WEAPON_VELOCITY) { + vm_vec_sub2(&target_moving_direction, &objp->phys_info.vel); + } + + set_predicted_enemy_pos_turret(predicted_enemy_pos, &gun_pos, objp, &enemy_point, &target_moving_direction, wip->max_speed, ss->turret_time_enemy_in_range * (weapon_system_strength + 1.0f)/2.0f); //Mess with the turret's accuracy if the weapon system is damaged. if (weapon_system_strength < 0.7f) { @@ -1191,6 +1197,7 @@ int aifft_rotate_turret(ship *shipp, int parent_objnum, ship_subsys *ss, object //If the dot product is smaller than or equal to the turret's FOV, try and point the gun at it. vec3d v2e; vm_vec_normalized_dir(&v2e, predicted_enemy_pos, &gun_pos); + bool in_fov; if (tp->flags & MSS_FLAG_TURRET_ALT_MATH) { @@ -1237,7 +1244,7 @@ float aifft_compute_turret_dot(object *objp, object *enemy_objp, vec3d *abs_gunp if (ship_subsystem_in_sight(enemy_objp, enemy_subsysp, abs_gunposp, &subobj_pos, 1, &dot_out, &vector_out)) { vec3d turret_norm; - vm_vec_rotate(&turret_norm, &turret_subsysp->system_info->turret_norm, &objp->orient); + vm_vec_unrotate(&turret_norm, &turret_subsysp->system_info->turret_norm, &objp->orient); float dot_return = vm_vec_dot(&turret_norm, &vector_out); if (The_mission.ai_profile->flags & AIPF_SMART_SUBSYSTEM_TARGETING_FOR_TURRETS) { @@ -1249,7 +1256,7 @@ float aifft_compute_turret_dot(object *objp, object *enemy_objp, vec3d *abs_gunp return -1.0f; } } else { - // target is in sight and we dont care if its in turret's fov or not + // target is in sight and we don't care if its in turret's fov or not return dot_return; } } else @@ -2085,7 +2092,7 @@ void ai_fire_from_turret(ship *shipp, ship_subsys *ss, int parent_objnum) } ship_get_global_turret_gun_info(&Objects[parent_objnum], ss, &gpos, &gvec, use_angles, &predicted_enemy_pos); - + // Fire in the direction the turret is facing, not right at the target regardless of turret dir. vm_vec_sub(&v2e, &predicted_enemy_pos, &gpos); dist_to_enemy = vm_vec_normalize(&v2e); @@ -2157,10 +2164,12 @@ void ai_fire_from_turret(ship *shipp, ship_subsys *ss, int parent_objnum) ok_to_fire = true; } } + if ( ok_to_fire && (tp->flags & MSS_FLAG_TURRET_HULL_CHECK) ) { int model_num = Ship_info[shipp->ship_info_index].model_num; mc_info hull_check; vec3d end; + vm_vec_scale_add(&end, &gpos, &gvec, model_get_radius(model_num)); hull_check.model_num = model_num; @@ -2242,8 +2251,8 @@ bool turret_std_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mo float dot = vm_vec_dot(v2e, gvec); if (((dot + size_mod) > tp->turret_fov) && ((dot - size_mod) <= tp->turret_max_fov)) return true; - -return false; + + return false; } bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod) diff --git a/code/anim/animplay.cpp b/code/anim/animplay.cpp index 3e95a6238a..f4fd6434d2 100644 --- a/code/anim/animplay.cpp +++ b/code/anim/animplay.cpp @@ -61,7 +61,7 @@ * --Goober5000 * * Revision 2.7 2004/02/16 11:47:31 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -84,7 +84,7 @@ * Put dithering back in for tgas and jpgs * * Revision 2.4 2003/11/29 10:52:08 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -102,7 +102,7 @@ * Revision 2.1.2.3 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.1.2.2 2002/09/28 22:13:42 randomtiger diff --git a/code/asteroid/asteroid.cpp b/code/asteroid/asteroid.cpp index 11089c1f25..fb4565b578 100644 --- a/code/asteroid/asteroid.cpp +++ b/code/asteroid/asteroid.cpp @@ -527,7 +527,7 @@ int asteroid_obj_list_add(int objnum) index = cur_asteroid - Asteroids; Assert(index >= 0 && index < MAX_ASTEROID_OBJS); - Assert(!Asteroid_objs[index].flags & ASTEROID_OBJ_USED); + Assert(!(Asteroid_objs[index].flags & ASTEROID_OBJ_USED)); Asteroid_objs[index].flags = 0; Asteroid_objs[index].objnum = objnum; diff --git a/code/autopilot/autopilot.cpp b/code/autopilot/autopilot.cpp index 50259daeee..9fc850da9c 100644 --- a/code/autopilot/autopilot.cpp +++ b/code/autopilot/autopilot.cpp @@ -1058,7 +1058,7 @@ void EndAutoPilot() { for (j = 0; j < MAX_AI_GOALS; j++) { - ai_goal *aigp = &Wings[i].ai_goals[j]; + ai_goal *aigp = &Wings[Ships[i].wingnum].ai_goals[j]; if ( ((aigp->ship_name != NULL) && !stricmp(aigp->ship_name, goal_name)) && (aigp->ai_mode == goal) ) @@ -1678,7 +1678,7 @@ unsigned int DistanceTo(char *nav) unsigned int DistanceTo(int nav) { - if (nav > MAX_NAVPOINTS && nav < 0) + if (nav >= MAX_NAVPOINTS && nav < 0) return 0xFFFFFFFF; return (uint)vm_vec_dist_quick(&Player_obj->pos, Navs[nav].GetPosition()); @@ -1695,7 +1695,7 @@ bool IsVisited(char *nav) bool IsVisited(int nav) { - if (nav > MAX_NAVPOINTS && nav < 0) + if (nav >= MAX_NAVPOINTS && nav < 0) return 0; if (Navs[nav].flags & NP_VISITED) diff --git a/code/bmpman/bmpman.cpp b/code/bmpman/bmpman.cpp index 1c182580fb..6e7cf89181 100644 --- a/code/bmpman/bmpman.cpp +++ b/code/bmpman/bmpman.cpp @@ -2884,7 +2884,7 @@ void bm_page_in_texture( int bitmapnum, int nframes ) if (bitmapnum < 0) return; - Assert( bm_bitmaps[n].handle == bitmapnum ); + Assertion( (bm_bitmaps[n].handle == bitmapnum), "bitmapnum = %i, n = %i, bm_bitmaps[n].handle = %i", bitmapnum, n, bm_bitmaps[n].handle ); if (nframes <= 0) { if ( (bm_bitmaps[n].type == BM_TYPE_ANI) || (bm_bitmaps[n].type == BM_TYPE_EFF) ) diff --git a/code/bmpman/bmpman.h b/code/bmpman/bmpman.h index cc657e2eff..4543daecdb 100644 --- a/code/bmpman/bmpman.h +++ b/code/bmpman/bmpman.h @@ -253,7 +253,7 @@ * Revision 2.0.2.10 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.0.2.9 2002/11/04 16:04:20 randomtiger diff --git a/code/cfile/cfile.cpp b/code/cfile/cfile.cpp index d0788acb45..116e7e48bc 100644 --- a/code/cfile/cfile.cpp +++ b/code/cfile/cfile.cpp @@ -168,10 +168,10 @@ * -DTP reworked mod support, * * Revision 2.6 2002/11/04 08:32:38 DTP - * Made sure, that VP and Plain files dont get added twice to the search order. Side-effect of Mod support. + * Made sure that VP and Plain files don't get added twice to the search order. Side-effect of Mod support. * * Revision 2.5 2002/10/30 06:31:05 DTP - * doh!, used upper case in include, dont know how much it matters for *nix systems, but here it is + * doh!, used upper case in include, don't know how much it matters for *nix systems, but here it is * * Revision 2.4 2002/10/27 23:59:28 DTP * DTP; started basic implementation of mod-support diff --git a/code/cfile/cfilesystem.cpp b/code/cfile/cfilesystem.cpp index 89a4f4978a..f2b5ede065 100644 --- a/code/cfile/cfilesystem.cpp +++ b/code/cfile/cfilesystem.cpp @@ -156,7 +156,7 @@ * -DTP reworked mod support, * * Revision 2.5 2002/10/30 06:29:45 DTP - * doh!, used upper case in include, dont know how much it matters for *nix systems, but here it is + * doh!, used upper case in include, don't know how much it matters for *nix systems, but here it is * * Revision 2.4 2002/10/30 06:26:11 DTP * DTP Implemented basic VP files handling. mission and campaign files inside VP files found in mod dir still not supported, cheking / creating directories not implented either diff --git a/code/cmdline/cmdline.cpp b/code/cmdline/cmdline.cpp index a930b59557..fd48e74d26 100644 --- a/code/cmdline/cmdline.cpp +++ b/code/cmdline/cmdline.cpp @@ -431,7 +431,7 @@ * Fixed setup of center_alpha in OGL which was causing crash. * * Revision 2.54 2004/02/16 11:47:31 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -471,7 +471,7 @@ * Changed target view not to use lower res texture, hi res one is already chached so might as well use it * * Revision 2.47 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -511,12 +511,12 @@ * * Revision 2.40 2003/11/08 22:25:47 Kazan * Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar" - * DONT MESS WITH OTHER PEOPLES INCLUDE PATHS - * DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths! + * DON'T MESS WITH OTHER PEOPLES INCLUDE PATHS + * DON'T MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths! * * Revision 2.39 2003/11/03 18:07:26 randomtiger * Added -d3d_no_vsync command to make turning off vsync optional. - * Removed 32bit command, it doesnt do anything. + * Removed 32bit command, it doesn't do anything. * Made aa multisample reg check safe. * * Revision 2.38 2003/10/27 23:04:20 randomtiger @@ -543,7 +543,7 @@ * * Revision 2.34 2003/10/14 17:39:12 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -624,7 +624,7 @@ * Added "-dshowvid" command-line option, which must be set in order for movies to play. * * Revision 2.16 2002/12/21 13:39:25 DTP - * did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe + * did bit more house keeping. modfied Phreak's fps cmdline a bit, so that we don't have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe * * Revision 2.15 2002/12/17 03:08:18 DTP * fix to Show_framerate. seems it will call an unresolved external error during fred builds. modified my ifndefs a bit, dsw modified to include preprocessor tag FRED. @@ -675,7 +675,7 @@ * Revision 2.4.2.2 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.4.2.1 2002/08/27 13:19:02 penguin @@ -1684,7 +1684,7 @@ int cmdline_parm::get_int() // returns - the float representation for the parameter arguement float cmdline_parm::get_float() { - Assert(args); + Assert(args!=NULL); int offset = 0; if (stacks) { diff --git a/code/cmdline/cmdline.h b/code/cmdline/cmdline.h index de04328204..2fa84fbd57 100644 --- a/code/cmdline/cmdline.h +++ b/code/cmdline/cmdline.h @@ -235,7 +235,7 @@ * and other stuff * * Revision 2.46 2004/02/16 11:47:31 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -271,7 +271,7 @@ * Changed target view not to use lower res texture, hi res one is already chached so might as well use it * * Revision 2.40 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -308,12 +308,12 @@ * * Revision 2.35 2003/11/08 22:25:47 Kazan * Timerbar was enabled in both release and debug - so i made it a command line option "-timerbar" - * DONT MESS WITH OTHER PEOPLES INCLUDE PATHS - * DONT MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths! + * DON'T MESS WITH OTHER PEOPLES INCLUDE PATHS + * DON'T MESS WITH EXEC NAMES (leave it fs2_open_r and fs2_open_d) or paths! * * Revision 2.34 2003/11/03 18:07:26 randomtiger * Added -d3d_no_vsync command to make turning off vsync optional. - * Removed 32bit command, it doesnt do anything. + * Removed 32bit command, it doesn't do anything. * Made aa multisample reg check safe. * * Revision 2.33 2003/10/27 23:04:20 randomtiger @@ -394,7 +394,7 @@ * Added "-dshowvid" command-line option, which must be set in order for movies to play. * * Revision 2.16 2002/12/21 13:39:25 DTP - * did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe + * did bit more house keeping. modfied Phreak's fps cmdline a bit, so that we don't have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe * * Revision 2.15 2002/12/17 03:08:18 DTP * fix to Show_framerate. seems it will call an unresolved external error during fred builds. modified my ifndefs a bit, dsw modified to include preprocessor tag FRED. @@ -440,7 +440,7 @@ * Revision 2.3.2.2 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.3.2.1 2002/08/27 13:19:02 penguin diff --git a/code/cutscene/cutscenes.cpp b/code/cutscene/cutscenes.cpp index a35b8560a0..548446caf3 100644 --- a/code/cutscene/cutscenes.cpp +++ b/code/cutscene/cutscenes.cpp @@ -65,7 +65,7 @@ * * Revision 2.8 2004/01/24 15:52:25 randomtiger * I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window. - * In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. + * In OGL it works perfectly and in both APIs it doesn't switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. * * Revision 2.7 2003/08/21 20:54:38 randomtiger * Fixed switching - RT @@ -368,7 +368,7 @@ void cutscene_mark_viewable(char *filename) char cut_file[MAX_FILENAME_LEN]; char file[MAX_FILENAME_LEN]; - Assert(filename); + Assert(filename!=NULL); // strip off extension strcpy( file, filename ); diff --git a/code/cutscene/decoder16.cpp b/code/cutscene/decoder16.cpp index 01cebcbf72..81be206102 100644 --- a/code/cutscene/decoder16.cpp +++ b/code/cutscene/decoder16.cpp @@ -316,7 +316,7 @@ static void dispatchDecoder16(ushort **pFrame, unsigned char codeType, unsigned y = far_p_table[k*2+1]; copyFrame(*pFrame, *pFrame + x + y*g_width); - *pDataRemain--; + (*pDataRemain)--; break; case 0x3: @@ -327,7 +327,7 @@ static void dispatchDecoder16(ushort **pFrame, unsigned char codeType, unsigned y = far_n_table[k*2+1]; copyFrame(*pFrame, *pFrame + x + y*g_width); - *pDataRemain--; + (*pDataRemain)--; break; case 0x4: @@ -338,7 +338,7 @@ static void dispatchDecoder16(ushort **pFrame, unsigned char codeType, unsigned y = close_table[k*2+1]; copyFrame(*pFrame, *pFrame + (backBuf2 - backBuf1) + x + y*g_width); - *pDataRemain--; + (*pDataRemain)--; break; case 0x5: diff --git a/code/cutscene/decoder8.cpp b/code/cutscene/decoder8.cpp index a30ed7e31b..7f66d0cdbc 100644 --- a/code/cutscene/decoder8.cpp +++ b/code/cutscene/decoder8.cpp @@ -220,21 +220,21 @@ static void dispatchDecoder8(ubyte **pFrame, ubyte codeType, ubyte **pData, int relFar(*(*pData)++, 1, &x, &y); copyFrame(*pFrame, *pFrame + x + y*g_width); *pFrame += 8; - *pDataRemain--; + (*pDataRemain)--; break; case 0x3: relFar(*(*pData)++, -1, &x, &y); copyFrame(*pFrame, *pFrame + x + y*g_width); *pFrame += 8; - *pDataRemain--; + (*pDataRemain)--; break; case 0x4: relClose(*(*pData)++, &x, &y); copyFrame(*pFrame, *pFrame + ((ubyte *)g_vBackBuf2 - (ubyte *)g_vBackBuf1) + x + y*g_width); *pFrame += 8; - *pDataRemain--; + (*pDataRemain)--; break; case 0x5: @@ -521,7 +521,7 @@ static void dispatchDecoder8(ubyte **pFrame, ubyte codeType, ubyte **pData, int } (*pData)++; - *pDataRemain--; + (*pDataRemain)--; *pFrame -= (8*g_width - 8); break; diff --git a/code/cutscene/mvelib.cpp b/code/cutscene/mvelib.cpp index 4efd681c42..dbe52748b4 100644 --- a/code/cutscene/mvelib.cpp +++ b/code/cutscene/mvelib.cpp @@ -82,7 +82,8 @@ MVEFILE *mvefile_open(char *filename) // NOTE: CF_TYPE *must* be ANY to get movies off of the CDs // assume lower case filename for *nix - if ( (file->stream = cfopen(lower_name, "rb", CFILE_NORMAL, CF_TYPE_ANY)) ) { + file->stream = cfopen(lower_name, "rb", CFILE_NORMAL, CF_TYPE_ANY); + if ( file->stream ) { cf_opened = 1; } diff --git a/code/debugconsole/console.cpp b/code/debugconsole/console.cpp index 1129609044..7fbecb2c46 100644 --- a/code/debugconsole/console.cpp +++ b/code/debugconsole/console.cpp @@ -759,9 +759,9 @@ void debug_console( void (*_func)() ) last_oldcommand++; strcpy( oldcommand_line[last_oldcommand], command_line); } else { - int i; - for (i=0; iCheckMenuItem(m_current_briefing, MF_BYPOSITION | MF_CHECKED ); + // Karajorma - it might be nice to autobalance the briefings and debriefings but I'm not doing anything till I + // understand how the how system works better. disabling the option for now. + m = pMenu->GetSubMenu(1); + m->EnableMenuItem(ID_AUTOBALANCE, MF_GRAYED); + CDialog::OnInitMenu(pMenu); } @@ -512,6 +518,7 @@ void briefing_editor_dlg::update_data(int update) if (m_last_stage >= 0) { ptr = &Briefing->stages[m_last_stage]; deconvert_multiline_string(buf3, m_text, MAX_BRIEF_LEN); + lcl_fred_replace_stuff(buf3, MAX_BRIEF_LEN); if (stricmp(ptr->new_text, buf3)) set_modified(); @@ -1529,7 +1536,7 @@ void briefing_editor_dlg::OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_tree.end_label_edit(pTVDispInfo->item); } BOOL briefing_editor_dlg::DestroyWindow() diff --git a/code/fred2/campaigneditordlg.cpp b/code/fred2/campaigneditordlg.cpp index c0fd1feab1..bd28d9025b 100644 --- a/code/fred2/campaigneditordlg.cpp +++ b/code/fred2/campaigneditordlg.cpp @@ -400,7 +400,7 @@ void campaign_editor::OnEndlabeleditSexpTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_tree.end_label_edit(pTVDispInfo->item); } int campaign_editor::handler(int code, int node, char *str) diff --git a/code/fred2/cmdbrief.cpp b/code/fred2/cmdbrief.cpp index 281a0a7602..23aac0cad5 100644 --- a/code/fred2/cmdbrief.cpp +++ b/code/fred2/cmdbrief.cpp @@ -75,6 +75,7 @@ #include "CmdBrief.h" #include "cfile/cfile.h" #include "sound/audiostr.h" +#include "localization/localize.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -158,6 +159,7 @@ void cmd_brief_dlg::update_data(int update) free(last_cmd_brief->stage[m_last_stage].text); deconvert_multiline_string(buf, m_text, CMD_BRIEF_TEXT_MAX); + lcl_fred_replace_stuff(buf, CMD_BRIEF_TEXT_MAX); last_cmd_brief->stage[m_last_stage].text = strdup(buf); string_copy(last_cmd_brief->stage[m_last_stage].ani_filename, m_ani_filename, MAX_FILENAME_LEN); string_copy(last_cmd_brief->stage[m_last_stage].wave_filename, m_wave_filename, MAX_FILENAME_LEN); diff --git a/code/fred2/createwingdlg.cpp b/code/fred2/createwingdlg.cpp index caf9d79b9a..36d58242d3 100644 --- a/code/fred2/createwingdlg.cpp +++ b/code/fred2/createwingdlg.cpp @@ -56,7 +56,7 @@ END_MESSAGE_MAP() void create_wing_dlg::OnOK() { - char msg[512]; + CString msg; int i; object *ptr; @@ -70,7 +70,7 @@ void create_wing_dlg::OnOK() for (i=0; iCheckMenuItem(m_current_debriefing, MF_BYPOSITION | MF_CHECKED ); + // Karajorma - it might be nice to autobalance the briefings and debriefings but I'm not doing anything till I + // understand how the how system works better. disabling the option for now. + m = pMenu->GetSubMenu(1); + m->EnableMenuItem(ID_AUTOBALANCE, MF_GRAYED); + CDialog::OnInitMenu(pMenu); } @@ -278,7 +284,9 @@ void debriefing_editor_dlg::update_data(int update) ptr->formula = m_tree.save_tree(); deconvert_multiline_string(ptr->new_text, m_text, MAX_DEBRIEF_LEN); + lcl_fred_replace_stuff(ptr->new_text, MAX_DEBRIEF_LEN); deconvert_multiline_string(ptr->new_recommendation_text, m_rec_text, MAX_RECOMMENDATION_LEN); + lcl_fred_replace_stuff(ptr->new_recommendation_text,MAX_RECOMMENDATION_LEN); string_copy(ptr->voice, m_voice, MAX_FILENAME_LEN); } @@ -497,7 +505,7 @@ void debriefing_editor_dlg::OnEndlabeleditTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_tree.end_label_edit(pTVDispInfo->item); } void debriefing_editor_dlg::OnClose() diff --git a/code/fred2/dumpstats.cpp b/code/fred2/dumpstats.cpp index 3b542ed1d4..07f3693a29 100644 --- a/code/fred2/dumpstats.cpp +++ b/code/fred2/dumpstats.cpp @@ -520,7 +520,7 @@ void DumpStats::get_ship_weapon_selection(CString &buffer) buffer += temp; // ships - for (j=0; j 0) { - temp.Format("\tWeapon name: %s, count %d\r\n", Weapon_info[j].name, Team_data[i].weaponry_pool[j]); - buffer += temp; - } + for (j=0; j 0) + temp.Format("\tWeapon name: %s, count %d\r\n", Weapon_info[Team_data[i].weaponry_pool[j]].name, Team_data[i].weaponry_count[j]); + buffer += temp; + } } diff --git a/code/fred2/eventeditor.cpp b/code/fred2/eventeditor.cpp index d1119e39c0..ebed8fd9b4 100644 --- a/code/fred2/eventeditor.cpp +++ b/code/fred2/eventeditor.cpp @@ -188,6 +188,7 @@ #include "mission/missionmessage.h" #include "cfile/cfile.h" #include "sound/audiostr.h" +#include "localization/localize.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -537,7 +538,7 @@ void event_editor::OnEndlabeleditEventTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_event_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_event_tree.end_label_edit(pTVDispInfo->item); } // This is needed as a HACK around default MFC standard @@ -554,6 +555,7 @@ void event_editor::OnOK() GetDlgItem(IDC_EVENT_TREE)->SetFocus(); ::SetFocus(h); } + ((CListBox *) GetDlgItem(IDC_MESSAGE_LIST))->SetCurSel(m_cur_msg); } int event_editor::query_modified() @@ -1295,6 +1297,7 @@ int event_editor::save_message(int num) } string_copy(m_messages[num].message, m_message_text, MESSAGE_LENGTH - 1); + lcl_fred_replace_stuff(m_messages[num].message, MESSAGE_LENGTH); if (m_messages[num].avi_info.name){ free(m_messages[num].avi_info.name); } diff --git a/code/fred2/fred.rc b/code/fred2/fred.rc index 55fcd2ed46..10023e0119 100644 --- a/code/fred2/fred.rc +++ b/code/fred2/fred.rc @@ -463,6 +463,10 @@ BEGIN MENUITEM "Team 1", ID_TEAM_1 MENUITEM "Team 2", ID_TEAM_2 END + POPUP "Options" + BEGIN + MENUITEM "Balance Teams", ID_AUTOBALANCE + END END IDR_WAYPOINT_PATH_EDIT_MENU MENU @@ -779,9 +783,8 @@ BEGIN END IDD_MISSION_NOTES DIALOG 0, 0, 479, 327 -STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Mission Specs" -FONT 8, "MS Sans Serif" BEGIN RTEXT "Title",IDC_STATIC,7,10,29,8 EDITTEXT IDC_MISSION_TITLE,41,7,109,14,ES_AUTOHSCROLL @@ -906,12 +909,12 @@ BEGIN COMBOBOX IDC_SHIP_CARGO1,47,65,94,258,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SHIP_ALT,47,79,94,125,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SHIP_CALLSIGN,47,93,94,125,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "Texture Replacement",IDC_TEXTURES,47,110,93,14,0,WS_EX_STATICEDGE + PUSHBUTTON "Texture Replacement",IDC_TEXTURES,47,110,94,14,0,WS_EX_STATICEDGE COMBOBOX IDC_HOTKEY,189,24,68,122,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_SHIP_PERSONA,189,40,68,129,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP EDITTEXT IDC_SCORE,189,55,68,14,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Player Ship",IDC_PLAYER_SHIP,"Button",BS_3STATE | WS_TABSTOP,189,88,51,10 - PUSHBUTTON "Set As Player Ship",IDC_SET_AS_PLAYER_SHIP,187,100,69,14,0,WS_EX_STATICEDGE + PUSHBUTTON "Set As Player Ship",IDC_SET_AS_PLAYER_SHIP,188,98,69,14,0,WS_EX_STATICEDGE PUSHBUTTON "Misc",IDC_FLAGS,47,132,50,14,0,WS_EX_STATICEDGE PUSHBUTTON "Initial Status",IDC_INITIAL_STATUS,101,132,50,14,0,WS_EX_STATICEDGE PUSHBUTTON "Initial Orders",IDC_GOALS,156,132,50,14,0,WS_EX_STATICEDGE @@ -930,7 +933,7 @@ BEGIN CONTROL "Spin1",IDC_ARRIVAL_DELAY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,86,206,11,14 LTEXT "Seconds",IDC_STATIC,103,208,45,8 CONTROL "Update Cue",IDC_UPDATE_ARRIVAL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,94,245,54,10 - CONTROL "Tree1",IDC_ARRIVAL_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | WS_BORDER | WS_TABSTOP,15,255,133,84,WS_EX_CLIENTEDGE + CONTROL "Tree1",IDC_ARRIVAL_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,15,255,133,84,WS_EX_CLIENTEDGE CONTROL "No Warp Effect",IDC_NO_ARRIVAL_WARP,"Button",BS_3STATE | WS_TABSTOP,16,341,65,10 COMBOBOX IDC_DEPARTURE_LOCATION,202,162,103,127,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_DEPARTURE_TARGET,202,176,103,262,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP @@ -938,7 +941,7 @@ BEGIN CONTROL "Spin3",IDC_DEPARTURE_DELAY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,240,206,11,14 LTEXT "Seconds",IDC_STATIC,255,209,45,8 CONTROL "Update Cue",IDC_UPDATE_DEPARTURE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,251,246,54,10 - CONTROL "Tree1",IDC_DEPARTURE_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | WS_BORDER | WS_TABSTOP,172,256,133,84,WS_EX_CLIENTEDGE + CONTROL "Tree1",IDC_DEPARTURE_TREE,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_EDITLABELS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,172,256,133,84,WS_EX_CLIENTEDGE CONTROL "No Warp Effect",IDC_NO_DEPARTURE_WARP,"Button",BS_3STATE | WS_TABSTOP,172,342,65,10 EDITTEXT IDC_HELP_BOX,7,362,307,53,ES_MULTILINE | ES_READONLY,WS_EX_TRANSPARENT LTEXT "Ship Name",IDC_STATIC,7,10,36,8 @@ -968,6 +971,7 @@ BEGIN EDITTEXT IDC_ASSIST_SCORE,189,72,68,14,ES_AUTOHSCROLL | ES_NUMBER LTEXT "Assist %",IDC_STATIC,158,75,27,8 LTEXT "Callsign",IDC_STATIC,18,95,25,8 + PUSHBUTTON "Alt Ship Class",IDC_ALT_SHIP_CLASS,187,114,69,14,0,WS_EX_STATICEDGE END IDD_WEAPON_EDITOR DIALOGEX 0, 0, 519, 79 @@ -1148,31 +1152,41 @@ BEGIN LTEXT "This operator can accept any type of arguments, however they must\nall match. What type of arguments would you like to use?",IDC_STATIC,7,7,221,18 END -IDD_LOADOUT_EDITOR DIALOG 0, 0, 204, 199 +IDD_LOADOUT_EDITOR DIALOG 0, 0, 266, 321 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Team Loadout Editor" MENU IDR_PLAYER_EDIT_MENU FONT 8, "MS Sans Serif" BEGIN - LISTBOX IDC_SHIP_LIST,7,19,91,103,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_SHIP_POOL,67,124,32,14,ES_AUTOHSCROLL - CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,57,124,11,14 - LISTBOX IDC_WEAPON_LIST,104,19,93,103,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_WEAPON_POOL,165,124,32,14,ES_AUTOHSCROLL - CONTROL "Spin2",IDC_POOL_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,155,124,11,14 - EDITTEXT IDC_DELAY,119,158,32,14,ES_AUTOHSCROLL - CONTROL "Spin1",IDC_DELAY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,47,156,9,14 - DEFPUSHBUTTON "OK",IDOK,48,178,41,14 - PUSHBUTTON "Cancel",IDCANCEL,99,178,41,14 + LISTBOX IDC_SHIP_LIST,7,108,121,103,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_SHIP_POOL,67,215,60,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_SPIN1,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,57,215,9,14 + LISTBOX IDC_WEAPON_LIST,134,108,123,103,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_WEAPON_POOL,195,215,54,14,ES_AUTOHSCROLL + CONTROL "Spin2",IDC_POOL_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,183,215,9,14 + EDITTEXT IDC_DELAY,144,280,32,14,ES_AUTOHSCROLL + CONTROL "Spin1",IDC_DELAY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,176,280,9,14 + DEFPUSHBUTTON "OK",IDOK,84,302,41,14 + PUSHBUTTON "Cancel",IDCANCEL,135,302,41,14 LTEXT "Available starting ships",IDC_STATIC,7,7,74,8 - LTEXT "Extra available",IDC_STATIC,7,127,52,8 - LTEXT "Amount used in wings:",IDC_STATIC,7,141,72,8 - LTEXT "",IDC_WINGS_SHP_COUNT,81,141,18,8 - LTEXT "Player entry delay",IDC_STATIC,59,160,58,8 - LTEXT "Available weapons pool",IDC_STATIC,104,7,76,8 - LTEXT "Amount used in wings:",IDC_STATIC,104,141,72,8 - LTEXT "",IDC_WINGS_WPN_COUNT,179,141,18,8 - LTEXT "Extra available",IDC_STATIC,104,127,52,8 + LTEXT "Extra available",IDC_STATIC,7,218,52,8 + LTEXT "Amount used in wings:",IDC_STATIC,7,262,72,8 + LTEXT "",IDC_WINGS_SHP_COUNT,81,262,18,8 + LTEXT "Player entry delay",IDC_STATIC,84,282,58,8 + LTEXT "Available weapons pool",IDC_STATIC,134,7,76,8 + LTEXT "Amount used in wings:",IDC_STATIC,134,262,72,8 + LTEXT "",IDC_WINGS_WPN_COUNT,208,262,18,8 + LTEXT "Extra available",IDC_STATIC,134,218,52,8 + LISTBOX IDC_SHIP_VARIABLES_LIST,7,31,123,62,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_WEAPON_VARIABLES_LIST,134,31,123,62,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LTEXT "From Variable",IDC_STATIC,7,19,45,10 + LTEXT "From Table Entry",IDC_STATIC,7,97,56,10 + COMBOBOX IDC_SHIP_VARIABLES_COMBO,7,244,117,71,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_WEAPON_VARIABLES_COMBO,134,244,123,71,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "From Variable",IDC_STATIC,134,19,45,10 + LTEXT "From Table Entry",IDC_STATIC,134,97,56,10 + LTEXT "Set Amount From Variable",IDC_STATIC,7,234,84,10 + LTEXT "Set Amount From Variable",IDC_STATIC,134,234,93,10 END IDD_ORIENT_EDITOR DIALOG 0, 0, 229, 119 @@ -1258,10 +1272,10 @@ BEGIN EDITTEXT IDC_MINI_HELP_BOX,7,283,423,14,ES_MULTILINE | ES_READONLY,WS_EX_DLGMODALFRAME | WS_EX_TRANSPARENT END -IDD_BG_BITMAP DIALOG 0, 0, 431, 316 +IDD_BG_BITMAP DIALOGEX 0, 0, 431, 354 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Background Editor" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN LISTBOX IDC_SBITMAP_LIST,14,36,102,105,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Add",IDC_ADD_SBITMAP,14,147,41,14 @@ -1309,12 +1323,12 @@ BEGIN LTEXT "Pattern:",IDC_STATIC,14,274,26,8 LTEXT "Color:",IDC_STATIC,15,290,23,8 LTEXT "Pitch",IDC_STATIC,145,255,17,8 - GROUPBOX "Nebula",IDC_STATIC,5,171,210,137 + GROUPBOX "Nebula",IDC_STATIC,5,167,210,179 LTEXT "Bank",IDC_STATIC,144,272,18,8 LTEXT "Heading",IDC_STATIC,134,289,28,8 LTEXT "Number of stars:",IDC_STATIC,227,222,52,8 LTEXT "Static",IDC_TOTAL,283,222,43,8 - GROUPBOX "Misc",IDC_STATIC,220,214,206,95 + GROUPBOX "Misc",IDC_STATIC,220,215,206,131 GROUPBOX "Suns",IDC_STATIC,220,23,206,124 GROUPBOX "Bitmaps",IDC_STATIC,5,23,210,145 LTEXT "Scale",IDC_STATIC,340,108,19,8 @@ -1342,9 +1356,15 @@ BEGIN COMBOBOX IDC_BACKGROUND_NUM,14,8,83,265,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP COMBOBOX IDC_BACKGROUND_SWAP_NUM,343,8,83,265,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP PUSHBUTTON "Swap With",IDC_SWAP_BACKGROUND,293,7,41,14 - EDITTEXT IDC_ENVMAP,311,287,107,14,ES_AUTOHSCROLL - PUSHBUTTON "Environment Map",IDC_ENVMAP_BROWSE,228,287,78,14 + EDITTEXT IDC_ENVMAP,311,324,107,14,ES_AUTOHSCROLL + PUSHBUTTON "Environment Map",IDC_ENVMAP_BROWSE,228,324,78,14 PUSHBUTTON "Skybox Model",IDC_SKYBOX_MODEL,228,268,78,14 + CONTROL "No Lighting",IDC_SKY_FLAG_NO_LIGHTING,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,239,296,52,10 + CONTROL "Transparent",IDC_SKY_FLAG_XPARENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,297,296,54,10 + CONTROL "No Z-Buffer",IDC_SKY_FLAG_NO_ZBUFF,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,239,309,53,10 + CONTROL "No Cull",IDC_SKY_FLAG_NO_CULL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,297,309,39,10 + CONTROL "No Glowmaps",IDC_SKY_FLAG_NO_GLOW,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,351,309,60,10 + GROUPBOX "Skybox Flags",IDC_STATIC,231,285,185,36 END IDD_REINFORCEMENT_EDITOR DIALOGEX 0, 0, 183, 119 @@ -1396,10 +1416,10 @@ BEGIN LTEXT "Please specify a name for this\nnew wing",IDC_STATIC,7,7,99,18 END -IDD_INITIAL_STATUS DIALOG 0, 0, 197, 297 +IDD_INITIAL_STATUS DIALOGEX 0, 0, 197, 311 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Initial Status Editor" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN EDITTEXT IDC_VELOCITY,57,7,40,14,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin2",IDC_VELOCITY_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,98,7,11,14 @@ -1409,25 +1429,27 @@ BEGIN CONTROL "Locked",IDC_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,78,40,10 EDITTEXT IDC_SHIELDS,57,55,40,14,ES_AUTOHSCROLL | ES_NUMBER CONTROL "Spin3",IDC_SHIELDS_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,99,56,9,14 - COMBOBOX IDC_DOCKEE,103,131,80,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - COMBOBOX IDC_DOCKEE_POINT,103,145,80,102,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - LISTBOX IDC_SUBSYS,16,205,68,60,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - EDITTEXT IDC_CARGO_NAME,39,271,86,12,ES_AUTOHSCROLL - LTEXT "Integrity",IDC_STATIC,90,205,28,8 - EDITTEXT IDC_DAMAGE,90,215,40,14,ES_AUTOHSCROLL | ES_NUMBER - CONTROL "Spin1",IDC_DAMAGE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,118,237,9,14 + COMBOBOX IDC_DOCKEE,103,142,80,106,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_DOCKEE_POINT,103,156,80,102,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LISTBOX IDC_SUBSYS,16,215,68,60,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + EDITTEXT IDC_CARGO_NAME,39,281,86,12,ES_AUTOHSCROLL + LTEXT "Integrity",IDC_STATIC,90,215,28,8 + EDITTEXT IDC_DAMAGE,90,225,40,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "Spin1",IDC_DAMAGE_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,118,247,9,14 DEFPUSHBUTTON "OK",IDOK,140,7,50,14 PUSHBUTTON "Cancel",IDCANCEL,140,24,50,14 LTEXT "Velocity",IDC_STATIC,27,10,26,8 LTEXT "Shield Integrity",IDC_STATIC,7,58,47,8 - GROUPBOX "Subsystems",IDC_STATIC,7,191,132,99 + GROUPBOX "Subsystems",IDC_STATIC,7,201,132,99 LTEXT "Hull Integrity",IDC_STATIC,14,27,40,8 - LTEXT "Cargo:",IDC_STATIC,15,273,22,8 - GROUPBOX "Dockpoints",IDC_STATIC,7,106,183,80 - LISTBOX IDC_DOCKER_POINT,16,119,79,60,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP - LTEXT "Occupied by",IDC_STATIC,103,119,52,8 + LTEXT "Cargo:",IDC_STATIC,15,284,22,8 + GROUPBOX "Dockpoints",IDC_STATIC,7,116,183,80 + LISTBOX IDC_DOCKER_POINT,16,129,79,60,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + LTEXT "Occupied by",IDC_STATIC,103,129,52,8 CONTROL "Primaries Won't Fire",IDC_PRIMARIES_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,89,78,10 CONTROL "Secondaries Won't Fire",IDC_SECONDARIES_LOCKED,"Button",BS_3STATE | WS_TABSTOP,93,89,89,10 + CONTROL "Turrets Locked",IDC_TURRETS_LOCKED,"Button",BS_3STATE | WS_TABSTOP,7,101,81,8 + CONTROL "Afterburner Locked",IDC_AFTERBURNER_LOCKED,"Button",BS_3STATE | WS_TABSTOP,93,101,83,10 END IDD_ASTEROID_EDITOR DIALOG 0, 0, 376, 210 @@ -1708,10 +1730,10 @@ BEGIN LTEXT "Wave Filename",IDC_STATIC,7,139,50,8 END -IDD_SHIP_FLAGS DIALOG 0, 0, 286, 250 +IDD_SHIP_FLAGS DIALOGEX 0, 0, 286, 250 STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Additional Ship Properties" -FONT 8, "MS Sans Serif" +FONT 8, "MS Sans Serif", 0, 0, 0x0 BEGIN CONTROL "Destroy Before Mission",IDC_DESTROY_CHECK,"Button",BS_3STATE | WS_TABSTOP,7,7,87,10 EDITTEXT IDC_DESTROY_VALUE,19,17,40,14,ES_AUTOHSCROLL | ES_NUMBER @@ -1751,12 +1773,13 @@ BEGIN CONTROL "Always Scream on Death",IDC_ALWAYS_DEATH_SCREAM,"Button",BS_3STATE | WS_TABSTOP,165,77,98,10 CONTROL "Vaporize on Death",IDC_VAPORIZE,"Button",BS_3STATE | WS_TABSTOP,165,87,97,10 EDITTEXT IDC_RESPAWN_PRIORITY,221,97,49,14,ES_AUTOHSCROLL - LTEXT "Respawn Priority",IDC_STATIC,165,99,54,8 + LTEXT "Respawn Priority",IDC_STATIC,161,98,54,8 DEFPUSHBUTTON "OK",IDOK,7,229,65,14 PUSHBUTTON "Cancel",IDCANCEL,214,229,65,14 - CONTROL "AutoNav Carry Status",IDC_NAV_CARRY,"Button",BS_3STATE | WS_TABSTOP,166,114,97,10 - CONTROL "AutoNav Needs Link",IDC_NAV_NEEDSLINK,"Button",BS_3STATE | WS_TABSTOP,166,124,97,10 - CONTROL "Hide Ship Name",IDC_HIDE_SHIP_NAME,"Button",BS_3STATE | WS_TABSTOP,166,135,99,10 + CONTROL "AutoNav Carry Status",IDC_NAV_CARRY,"Button",BS_3STATE | WS_TABSTOP,165,114,97,10 + CONTROL "AutoNav Needs Link",IDC_NAV_NEEDSLINK,"Button",BS_3STATE | WS_TABSTOP,165,124,97,10 + CONTROL "Hide Ship Name",IDC_HIDE_SHIP_NAME,"Button",BS_3STATE | WS_TABSTOP,165,135,99,10 + CONTROL "Set Class Dynamically",IDC_SET_CLASS_DYNAMICALLY,"Button",BS_3STATE | WS_TABSTOP,165,145,104,10 END IDD_ADD_VARIABLE DIALOG 0, 0, 422, 102 @@ -2119,9 +2142,7 @@ BEGIN IDD_LOADOUT_EDITOR, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 197 TOPMARGIN, 7 - BOTTOMMARGIN, 192 END IDD_ORIENT_EDITOR, DIALOG @@ -2148,7 +2169,7 @@ BEGIN VERTGUIDE, 215 VERTGUIDE, 220 VERTGUIDE, 426 - BOTTOMMARGIN, 308 + BOTTOMMARGIN, 346 HORZGUIDE, 126 HORZGUIDE, 132 END @@ -2190,7 +2211,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 190 TOPMARGIN, 7 - BOTTOMMARGIN, 290 + BOTTOMMARGIN, 304 END IDD_ASTEROID_EDITOR, DIALOG @@ -2842,6 +2863,63 @@ END ///////////////////////////////////////////////////////////////////////////// +///////////////////////////////////////////////////////////////////////////// +// English (U.K.) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG) +#ifdef _WIN32 +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK +#pragma code_page(1252) +#endif //_WIN32 + +///////////////////////////////////////////////////////////////////////////// +// +// Dialog +// + +IDD_ALT_SHIP_CLASS DIALOG 0, 0, 312, 212 +STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU +CAPTION "Alternate Ship Class Editor" +FONT 8, "MS Sans Serif" +BEGIN + DEFPUSHBUTTON "OK",IDOK,201,191,50,14 + PUSHBUTTON "Cancel",IDCANCEL,255,191,50,14 + LISTBOX IDC_ALT_CLASS_LIST,7,7,147,155,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SET_FROM_SHIP_CLASS,190,25,115,164,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + COMBOBOX IDC_SET_FROM_VARIABLES,190,54,115,136,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + CONTROL "Default To This Class",IDC_DEFAULT_TO_CLASS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,190,70,96,14 + LTEXT "Set From Ship Class",ID_STATIC,190,15,64,8 + LTEXT "Set From Variable",IDC_STATIC,190,43,82,9,SS_CENTERIMAGE + PUSHBUTTON "U\np",IDC_ALT_CLASS_UP,158,7,21,78,BS_MULTILINE + PUSHBUTTON "D\no\nw\nn",IDC_ALT_CLASS_DOWN,158,84,21,78,BS_MULTILINE + PUSHBUTTON "Add",IDC_ALT_CLASS_ADD,7,177,50,17 + PUSHBUTTON "Delete",IDC_ALT_CLASS_DELETE,109,177,50,17 + PUSHBUTTON "Insert",IDC_ALT_CLASS_INSERT,58,177,50,17 +END + + +///////////////////////////////////////////////////////////////////////////// +// +// DESIGNINFO +// + +#ifdef APSTUDIO_INVOKED +GUIDELINES DESIGNINFO +BEGIN + IDD_ALT_SHIP_CLASS, DIALOG + BEGIN + LEFTMARGIN, 7 + RIGHTMARGIN, 305 + TOPMARGIN, 7 + BOTTOMMARGIN, 205 + END +END +#endif // APSTUDIO_INVOKED + +#endif // English (U.K.) resources +///////////////////////////////////////////////////////////////////////////// + + #ifndef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// diff --git a/code/fred2/freddoc.cpp b/code/fred2/freddoc.cpp index 9bfe46b1ab..cdef0e7d9a 100644 --- a/code/fred2/freddoc.cpp +++ b/code/fred2/freddoc.cpp @@ -83,7 +83,7 @@ * taylor and I fixed fred2 by making code.lib and fred2's defines match up * * Revision 1.8 2004/05/02 18:03:19 randomtiger - * Fred doesnt need subspace palette any more + * Fred doesn't need subspace palette any more * * Revision 1.7 2004/04/03 18:06:35 Kazan * Fixes: @@ -451,6 +451,7 @@ int Undo_count = 0; extern int Num_unknown_ship_classes; extern int Num_unknown_weapon_classes; +extern int Num_unknown_loadout_classes; CFREDDoc::CFREDDoc() { @@ -722,7 +723,7 @@ int CFREDDoc::load_mission(char *pathname, int flags) return -1; } - if ((Num_unknown_ship_classes > 0) || (Num_unknown_weapon_classes > 0)) + if ((Num_unknown_ship_classes > 0) || (Num_unknown_weapon_classes > 0) || (Num_unknown_loadout_classes > 0)) { if (flags & MPF_IMPORT_FSM) { @@ -784,19 +785,39 @@ int CFREDDoc::load_mission(char *pathname, int flags) } } - generate_weaponry_usage_list(used_pool); - for ( j = 0; j < Num_teams; j++ ) { - for (i=0; i= 0); Assert(Mission_palette <= 98); - // RT, dont need this anymore + // RT, don't need this anymore #if 0 if (The_mission.flags & MISSION_FLAG_SUBSPACE) { diff --git a/code/fred2/fredview.cpp b/code/fred2/fredview.cpp index ba7c551929..6f5cdc1d6e 100644 --- a/code/fred2/fredview.cpp +++ b/code/fred2/fredview.cpp @@ -5175,7 +5175,7 @@ void CFREDView::OnDestroy() snd_close(); DBUGFILE_OUTPUT_0("About to gr_close"); gr_close(); - os_set_window(0); + os_set_window(NULL); CView::OnDestroy(); } diff --git a/code/fred2/initialstatus.cpp b/code/fred2/initialstatus.cpp index d95c06dc81..70ef3cb083 100644 --- a/code/fred2/initialstatus.cpp +++ b/code/fred2/initialstatus.cpp @@ -46,6 +46,8 @@ initial_status::initial_status(CWnd* pParent /*=NULL*/) m_locked = FALSE; m_primaries_locked = FALSE; m_secondaries_locked = FALSE; + m_turrets_locked = FALSE; + m_afterburner_locked = FALSE; m_cargo_name = _T(""); //}}AFX_DATA_INIT inited = 0; @@ -83,6 +85,8 @@ void initial_status::DoDataExchange(CDataExchange* pDX) DDX_Check(pDX, IDC_LOCKED, m_locked); DDX_Check(pDX, IDC_PRIMARIES_LOCKED, m_primaries_locked); DDX_Check(pDX, IDC_SECONDARIES_LOCKED, m_secondaries_locked); + DDX_Check(pDX, IDC_TURRETS_LOCKED, m_turrets_locked); + DDX_Check(pDX, IDC_AFTERBURNER_LOCKED, m_afterburner_locked); DDX_Text(pDX, IDC_CARGO_NAME, m_cargo_name); DDV_MaxChars(pDX, m_cargo_name, 20); //}}AFX_DATA_MAP @@ -121,6 +125,8 @@ BEGIN_MESSAGE_MAP(initial_status, CDialog) ON_BN_CLICKED(IDC_LOCKED, OnLocked) ON_BN_CLICKED(IDC_PRIMARIES_LOCKED, OnPrimariesLocked) ON_BN_CLICKED(IDC_SECONDARIES_LOCKED, OnSecondariesLocked) + ON_BN_CLICKED(IDC_TURRETS_LOCKED, OnTurretsLocked) + ON_BN_CLICKED(IDC_AFTERBURNER_LOCKED, OnAfterburnersLocked) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -178,25 +184,38 @@ BOOL initial_status::OnInitDialog() m_locked = 0; // Lock primaries - if (Ships[m_ship].flags2 & SF2_PRIMARIES_LOCKED) - { + if (Ships[m_ship].flags2 & SF2_PRIMARIES_LOCKED) { m_primaries_locked = 1; } - else - { + else { m_primaries_locked = 0; } //Lock secondaries - if (Ships[m_ship].flags2 & SF2_SECONDARIES_LOCKED) - { + if (Ships[m_ship].flags2 & SF2_SECONDARIES_LOCKED) { m_secondaries_locked = 1; } - else - { + else { m_secondaries_locked = 0; } + //Lock turrets + if (Ships[m_ship].flags2 & SF2_LOCK_ALL_TURRETS_INITIALLY) { + m_turrets_locked = 1; + } + else { + m_turrets_locked = 0; + } + + if (Ships[m_ship].flags2 & SF2_AFTERBURNER_LOCKED) { + m_afterburner_locked = 1; + } + else { + m_afterburner_locked = 0; + } + + + if (m_multi_edit) { objp = GET_FIRST(&obj_used_list); while (objp != END_OF_LIST(&obj_used_list)) { @@ -225,6 +244,42 @@ BOOL initial_status::OnInitDialog() if (m_locked) m_locked = 2; } + + if (Ships[get_ship_from_obj(objp)].flags2 & SF2_PRIMARIES_LOCKED){ + if (!m_primaries_locked) + m_primaries_locked = 2; + } + else { + if (m_primaries_locked) + m_primaries_locked = 2; + } + + if (Ships[get_ship_from_obj(objp)].flags2 & SF2_SECONDARIES_LOCKED){ + if (!m_secondaries_locked) + m_secondaries_locked = 2; + } + else { + if (m_secondaries_locked) + m_secondaries_locked = 2; + } + + if (Ships[get_ship_from_obj(objp)].flags2 & SF2_LOCK_ALL_TURRETS_INITIALLY){ + if (!m_turrets_locked) + m_turrets_locked = 2; + } + else { + if (m_turrets_locked) + m_turrets_locked = 2; + } + + if (Ships[get_ship_from_obj(objp)].flags2 & SF2_AFTERBURNER_LOCKED){ + if (!m_afterburner_locked) + m_afterburner_locked = 2; + } + else { + if (m_afterburner_locked) + m_afterburner_locked = 2; + } } objp = GET_NEXT(objp); @@ -348,6 +403,26 @@ void initial_status::OnOK() Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_SECONDARIES_LOCKED; } + if (m_turrets_locked == 1) + { + Ships[get_ship_from_obj(objp)].flags2 |= SF2_LOCK_ALL_TURRETS_INITIALLY; + } + else if (!m_turrets_locked) + { + Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_LOCK_ALL_TURRETS_INITIALLY; + } + + if (m_afterburner_locked == 1) + { + Ships[get_ship_from_obj(objp)].flags2 |= SF2_AFTERBURNER_LOCKED; + } + else if (!m_afterburner_locked) + { + Ships[get_ship_from_obj(objp)].flags2 &= ~SF2_AFTERBURNER_LOCKED; + } + + + } objp = GET_NEXT(objp); @@ -375,7 +450,17 @@ void initial_status::OnOK() if (m_secondaries_locked == 1) Ships[m_ship].flags2 |= SF2_SECONDARIES_LOCKED; else if (!m_secondaries_locked) - Ships[m_ship].flags2 &= ~SF2_SECONDARIES_LOCKED; + Ships[m_ship].flags2 &= ~SF2_SECONDARIES_LOCKED; + + if (m_turrets_locked == 1) + Ships[m_ship].flags2 |= SF2_LOCK_ALL_TURRETS_INITIALLY; + else if (!m_turrets_locked) + Ships[m_ship].flags2 &= ~SF2_LOCK_ALL_TURRETS_INITIALLY; + + if (m_afterburner_locked == 1) + Ships[m_ship].flags2 |= SF2_AFTERBURNER_LOCKED; + else if (!m_afterburner_locked) + Ships[m_ship].flags2 &= ~SF2_AFTERBURNER_LOCKED; } @@ -735,8 +820,8 @@ void initial_status::update_docking_info() object *dockee_objp = dock_find_object_at_dockpoint(objp, i); if (dockee_objp != NULL) { - if (dockpoint_array[i].dockee_shipnum != dockee_objp->instance) - { + // check if the dockee ship thinks that this ship is docked to this dock point + if (objp != dock_find_object_at_dockpoint(dockee_objp, dockpoint_array[i].dockee_point) ) { // undock it undock(objp, dockee_objp); } @@ -948,3 +1033,23 @@ void initial_status::OnSecondariesLocked() ((CButton *) GetDlgItem(IDC_SECONDARIES_LOCKED))->SetCheck(m_secondaries_locked); } + +void initial_status::OnTurretsLocked() +{ + if (m_turrets_locked == 1) + m_turrets_locked = 0; + else + m_turrets_locked = 1; + + ((CButton *) GetDlgItem(IDC_TURRETS_LOCKED))->SetCheck(m_turrets_locked); +} + +void initial_status::OnAfterburnersLocked() +{ + if (m_afterburner_locked == 1) + m_afterburner_locked = 0; + else + m_afterburner_locked = 1; + + ((CButton *) GetDlgItem(IDC_AFTERBURNER_LOCKED))->SetCheck(m_afterburner_locked); +} diff --git a/code/fred2/initialstatus.h b/code/fred2/initialstatus.h index 759b25235c..98c0c7614b 100644 --- a/code/fred2/initialstatus.h +++ b/code/fred2/initialstatus.h @@ -54,6 +54,8 @@ public: CString m_cargo_name; int m_primaries_locked; int m_secondaries_locked; + int m_turrets_locked; + int m_afterburner_locked; //}}AFX_DATA @@ -79,6 +81,8 @@ protected: afx_msg void OnLocked(); afx_msg void OnPrimariesLocked(); afx_msg void OnSecondariesLocked(); + afx_msg void OnTurretsLocked(); + afx_msg void OnAfterburnersLocked(); //}}AFX_MSG DECLARE_MESSAGE_MAP() diff --git a/code/fred2/management.cpp b/code/fred2/management.cpp index 79a0494b57..141fa2d9cc 100644 --- a/code/fred2/management.cpp +++ b/code/fred2/management.cpp @@ -714,7 +714,7 @@ void deconvert_multiline_string(char *buf, CString &str, int max_len) CString str2; Assert(max_len > 1); - Assert(buf); + Assert(ptr!=NULL); max_len -= 2; while ((i = str.Find("\r\n")) >= 0) { for (j=0; jnum_secondary_banks; while (j--) - arr[swp->secondary_bank_weapons[j]] += int(ceil(swp->secondary_bank_ammo[j] * swp->secondary_bank_capacity[j] / 100 / Weapon_info[swp->secondary_bank_weapons[j]].cargo_size)); + arr[swp->secondary_bank_weapons[j]] += int(ceil(swp->secondary_bank_ammo[j] * swp->secondary_bank_capacity[j] / 100 / (Weapon_info[swp->secondary_bank_weapons[j]].cargo_size + 0.5f))); } } -void generate_weaponry_usage_list(int *arr) +void generate_weaponry_usage_list(int team, int *arr) { int i; for (i=0; i= 0 && team < MAX_TVT_TEAMS); - // Goober5000 - I have no idea why :V: did things this way (or even what exactly they're doing); - // I'm guessing Zeta needs to be accounted for somewhere but I'm not sure how to do that - for (i=0; iitem.hItem, pTVDispInfo->item.pszText); + *pResult = m_tree.end_label_edit(pTVDispInfo->item); } diff --git a/code/fred2/missiongoalsdlg.cpp b/code/fred2/missiongoalsdlg.cpp index fd82604c7f..8e10532dfe 100644 --- a/code/fred2/missiongoalsdlg.cpp +++ b/code/fred2/missiongoalsdlg.cpp @@ -437,7 +437,7 @@ void CMissionGoalsDlg::OnEndlabeleditGoalsTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_goals_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_goals_tree.end_label_edit(pTVDispInfo->item); } void CMissionGoalsDlg::OnOK() diff --git a/code/fred2/missionsave.cpp b/code/fred2/missionsave.cpp index 4edbcf9d13..9977c7b4a9 100644 --- a/code/fred2/missionsave.cpp +++ b/code/fred2/missionsave.cpp @@ -583,6 +583,8 @@ int CFred_mission_save::save_mission_file(char *pathname) err = -3; // else if (save_briefing_info()) // err = -4; + else if (save_cutscenes()) + err = -4; else if (save_cmd_briefs()) err = -4; else if (save_briefing()) @@ -680,6 +682,8 @@ int CFred_mission_save::autosave_mission_file(char *pathname) // err = -4; else if (save_fiction()) err = -3; + else if (save_cutscenes()) + err = -4; else if (save_cmd_briefs()) err = -4; else if (save_briefing()) @@ -998,6 +1002,22 @@ int CFred_mission_save::save_mission_info() bypass_comment(";;FSO 3.6.0;; $Skybox Model:"); } + // are skybox flags in use? + if (The_mission.skybox_flags != DEFAULT_NMODEL_FLAGS) { + //char out_str[4096]; + if (optional_string_fred("+Skybox Flags:")) { + parse_comments(1); + fout( " %d", The_mission.skybox_flags); + } else { + fso_comment_push(";;FSO 3.6.11;;"); + fout_version("\n+Skybox Flags: %d", The_mission.skybox_flags); + fso_comment_pop(); + } + } + else { + bypass_comment(";;FSO 3.6.11;; +Skybox Flags:"); + } + // Goober5000's AI profile stuff int profile_index = (The_mission.ai_profile - Ai_profiles); Assert(profile_index >= 0 && profile_index < MAX_AI_PROFILES); @@ -1069,6 +1089,71 @@ int CFred_mission_save::save_plot_info() return err; } +int CFred_mission_save::save_cutscenes() +{ + char type[NAME_LENGTH]; + char out[MULTITEXT_LENGTH]; + + // Let's just assume it has them for now - + if (!(The_mission.cutscenes.empty()) ) { + if (Format_fs2_open) { + if (optional_string_fred("#Cutscenes")) { + parse_comments(2); + } + else { + fout_version("\n\n#Cutscenes\n\n"); + } + + for (uint i = 0; i < The_mission.cutscenes.size(); i++) { + if ( strlen(The_mission.cutscenes[i].cutscene_name) ) { + // determine the name of this cutscene type + switch (The_mission.cutscenes[i].type) { + case MOVIE_PRE_FICTION: + strcpy(type, "$Fiction Viewer Cutscene:"); + break; + case MOVIE_PRE_CMD_BRIEF: + strcpy(type, "$Command Brief Cutscene:"); + break; + case MOVIE_PRE_BRIEF: + strcpy(type, "$Briefing Cutscene:"); + break; + case MOVIE_PRE_GAME: + strcpy(type, "$Pre-game Cutscene:"); + break; + case MOVIE_PRE_DEBRIEF: + strcpy(type, "$Debriefing Cutscene:"); + break; + default: + Int3(); + continue; + } + + if (optional_string_fred(type)) { + parse_comments(); + fout(" %s", The_mission.cutscenes[i].cutscene_name); + } + else { + fout_version("%s %s\n", type, The_mission.cutscenes[i].cutscene_name); + } + + required_string_fred("+formula:"); + parse_comments(); + convert_sexp_to_string(The_mission.cutscenes[i].formula, out, SEXP_SAVE_MODE, 4096); + fout(" %s", out); + } + } + required_string_fred("#end"); + parse_comments(); + } + else { + MessageBox(NULL, "Warning: This mission contains cutscene data, but you are saving in the retail mission format. This infomration will be lost", "Incompatibility with retail mission format", MB_OK); + } + } + + fso_comment_pop(true); + return err; +} + int CFred_mission_save::save_fiction() { if (mission_has_fiction()) @@ -1492,9 +1577,27 @@ int CFred_mission_save::save_players() parse_comments(); fout(" (\n"); - for (j=0; j -1 && Team_data[i].ship_list_variables[j] < MAX_SEXP_VARIABLES); + + fout("\t@%s\t", Sexp_variables[Team_data[i].ship_list_variables[j]].variable_name); + } + else { + fout("\t\"%s\"\t", Ship_info[Team_data[i].ship_list[j]].name); + } + + // Now check if we should write a variable or a number for the amount of ships available + if (Team_data[i].ship_count_variables[j] != -1) { + Assert (Team_data[i].ship_count_variables[j] > -1 && Team_data[i].ship_count_variables[j] < MAX_SEXP_VARIABLES); + + fout("@%s\n", Sexp_variables[Team_data[i].ship_count_variables[j]].variable_name); + } + else { + fout("%d\n", Team_data[i].ship_count[j]); + } + } fout(")"); @@ -1505,10 +1608,41 @@ int CFred_mission_save::save_players() } fout(" (\n"); - generate_weaponry_usage_list(used_pool); + generate_weaponry_usage_list(i, used_pool); + for (j=0; j -1 && Team_data[i].weaponry_pool_variable[j] < MAX_SEXP_VARIABLES); + + fout("\t@%s\t", Sexp_variables[Team_data[i].weaponry_pool_variable[j]].variable_name); + } + else { + fout("\t\"%s\"\t", Weapon_info[Team_data[i].weaponry_pool[j]].name); + } + + // now output the amount of this weapon or a variable that sets it. If this weapon is in the used pool and isn't + // set by a variable we should add the amount of weapons used by the wings to it and zero the entry so we know + // that we have dealt with it + if (Team_data[i].weaponry_amount_variable[j] != -1) { + Assert (Team_data[i].weaponry_amount_variable[j] > -1 && Team_data[i].weaponry_amount_variable[j] < MAX_SEXP_VARIABLES); + + fout ("@%s\n", Sexp_variables[Team_data[i].weaponry_amount_variable[j]].variable_name); + } + else { + if (Team_data[i].weaponry_pool_variable[j] != -1) { + fout ("%d\n", Team_data[i].weaponry_count[j]); + } + else { + fout ("%d\n", Team_data[i].weaponry_count[j] + used_pool[Team_data[i].weaponry_pool[j]]); + used_pool[Team_data[i].weaponry_pool[j]] = 0; + } + } + } + + // now we add anything left in the used pool as a static entry for (j=0; j 0){ - fout("\t\"%s\"\t%d\n", Weapon_info[j].name, Team_data[i].weaponry_pool[j] + used_pool[j]); + if (used_pool[j] > 0){ + fout("\t\"%s\"\t%d\n", Weapon_info[j].name, used_pool[j]); } } @@ -1589,6 +1723,27 @@ int CFred_mission_save::save_objects() parse_comments(0); fout(" %s", Ship_info[Ships[i].ship_info_index].name); + //alt classes stuff + if (Format_fs2_open) { + if ((int)Ships[i].s_alt_classes.size()) { + for (k = 0; k < (int)Ships[i].s_alt_classes.size() ; k++) { + // is this a variable? + if (Ships[i].s_alt_classes[k].variable_index != -1) { + fout_version("\n;;FSO 3.6.10;; $Alt Ship Class: @%s", Sexp_variables[Ships[i].s_alt_classes[k].variable_index].variable_name); + } + else { + fout_version("\n;;FSO 3.6.10;; $Alt Ship Class: \"%s\"", Ship_info[Ships[i].s_alt_classes[k].ship_class].name); + } + + // default class? + if (Ships[i].s_alt_classes[k].default_to_this_class) { + fout_version("\n;;FSO 3.6.10;; +Default Class:"); + } + } + + } + } + // optional alternate type name if(strlen(Fred_alt_names[i])){ fout("\n$Alt: %s\n", Fred_alt_names[i]); @@ -1878,6 +2033,12 @@ int CFred_mission_save::save_objects() fout(" \"nav-needslink\""); if (Ships[i].flags2 & SF2_HIDE_SHIP_NAME) fout(" \"hide-ship-name\""); + if (Ships[i].flags2 & SF2_SET_CLASS_DYNAMICALLY) + fout(" \"set-class-dynamically\""); + if (Ships[i].flags2 & SF2_LOCK_ALL_TURRETS_INITIALLY) + fout(" \"lock-all-turrets\""); + if (Ships[i].flags2 & SF2_AFTERBURNER_LOCKED) + fout(" \"afterburners-locked\""); fout(" )"); } // ----------------------------------------------------------- diff --git a/code/fred2/missionsave.h b/code/fred2/missionsave.h index edec032d49..95d63116e1 100644 --- a/code/fred2/missionsave.h +++ b/code/fred2/missionsave.h @@ -157,6 +157,7 @@ private: int save_plot_info(); int save_variables(); // int save_briefing_info(); + int save_cutscenes(); int save_fiction(); int save_cmd_brief(); int save_cmd_briefs(); diff --git a/code/fred2/modifyvariabledlg.cpp b/code/fred2/modifyvariabledlg.cpp index 62c4e3a99b..84d3862e5d 100644 --- a/code/fred2/modifyvariabledlg.cpp +++ b/code/fred2/modifyvariabledlg.cpp @@ -83,12 +83,9 @@ void CModifyVariableDlg::OnDeleteVariable() MessageBox("Can not delete variable. Name has been changed."); return; } - - int num_counts = m_p_sexp_tree->get_variable_count(Sexp_variables[get_sexp_var_index()].variable_name); - if (num_counts > 0) { - char buffer[256]; - sprintf(buffer, "Can not delete variable. Used in %d location(s).", num_counts); - MessageBox(buffer); + + char message[128] = "Can not delete variable."; + if (!IsChangeSafe(message)) { return; } @@ -103,19 +100,39 @@ void CModifyVariableDlg::OnDeleteVariable() } } +// Karajorma - Checks whether it is safe to delete or modify this string +bool CModifyVariableDlg::IsChangeSafe(char *message) +{ + // Can't as there are SEXPs using it. + int num_counts = m_p_sexp_tree->get_variable_count(Sexp_variables[get_sexp_var_index()].variable_name); + if (num_counts > 0) { + char buffer[256]; + sprintf(buffer, "%s Used in %d SEXP(s).", message, num_counts); + MessageBox(buffer); + return false; + } + + // Can't as it is used in the team loadout + num_counts = m_p_sexp_tree->get_loadout_variable_count(get_sexp_var_index()); + if (num_counts > 0) { + char buffer[256]; + sprintf(buffer, "%s Used in %d location(s) in loadout.", message, num_counts); + MessageBox(buffer); + return false; + } + + return true; +} + // Set type to string void CModifyVariableDlg::OnTypeString() { // check if type actually modified if (m_type_number == true) { - // Don't allow type change if in use. - int num_counts = m_p_sexp_tree->get_variable_count(Sexp_variables[get_sexp_var_index()].variable_name); - if (num_counts > 0) { - char buffer[256]; - sprintf(buffer, "Can not modify variable type. Used in %d location(s).", num_counts); - MessageBox(buffer); - + // Don't allow type change if in use. + char message[128] = "Can not modify variable type."; + if (!IsChangeSafe(message)) { m_type_number = true; m_modified_type = false; set_variable_type(); @@ -138,14 +155,10 @@ void CModifyVariableDlg::OnTypeNumber() { // check if type actually modified if (m_type_number == false) { - - // Don't allow type change if in use. - int num_counts = m_p_sexp_tree->get_variable_count(Sexp_variables[get_sexp_var_index()].variable_name); - if (num_counts > 0) { - char buffer[256]; - sprintf(buffer, "Can not modify variable type. Used in %d location(s).", num_counts); - MessageBox(buffer); - + + // Don't allow type change if in use. + char message[128] = "Can not modify variable type."; + if (!IsChangeSafe(message)) { m_type_number = false; m_modified_type = false; set_variable_type(); @@ -365,7 +378,7 @@ void CModifyVariableDlg::OnOK() // validate data validate_data(temp_data, RESET_FOCUS); if (m_data_validated) { - // Dont get OnKillfocusModifyDefaultValue when ok + // Don't get OnKillfocusModifyDefaultValue when ok if (!m_modified_value) { if ( strcmp(Sexp_variables[get_sexp_var_index()].text, temp_data) ) { m_modified_value = true; diff --git a/code/fred2/modifyvariabledlg.h b/code/fred2/modifyvariabledlg.h index cfcf42c9c3..f599585ef5 100644 --- a/code/fred2/modifyvariabledlg.h +++ b/code/fred2/modifyvariabledlg.h @@ -60,6 +60,10 @@ public: //}}AFX_VIRTUAL // Implementation + +private: + bool IsChangeSafe(char *message); + protected: // Generated message map functions diff --git a/code/fred2/playerstarteditor.cpp b/code/fred2/playerstarteditor.cpp index f6c05e4126..c475eb3a34 100644 --- a/code/fred2/playerstarteditor.cpp +++ b/code/fred2/playerstarteditor.cpp @@ -68,6 +68,8 @@ player_start_editor::player_start_editor(CWnd* pParent) : CDialog(player_start_e //}}AFX_DATA_INIT selected_team = 0; + autobalance = false; + previous_team = -1; dlg_inited = 0; } @@ -79,7 +81,13 @@ void player_start_editor::DoDataExchange(CDataExchange* pDX) DDX_Control(pDX, IDC_DELAY_SPIN, m_delay_spin); DDX_Control(pDX, IDC_SPIN1, m_spin1); DDX_Control(pDX, IDC_SHIP_LIST, m_ship_list); - DDX_Control(pDX, IDC_WEAPON_LIST, m_weapon_list); + DDX_Control(pDX, IDC_WEAPON_LIST, m_weapon_list); + DDX_Control(pDX, IDC_SHIP_VARIABLES_LIST, m_ship_variable_list); + DDX_Control(pDX, IDC_WEAPON_VARIABLES_LIST, m_weapon_variable_list); + DDX_Control(pDX, IDC_SHIP_VARIABLES_COMBO, m_ship_quantity_variable); + DDX_Control(pDX, IDC_WEAPON_VARIABLES_COMBO, m_weapon_quantity_variable); + DDX_Control(pDX, IDC_WINGS_SHP_COUNT, m_ships_used_in_wings); + DDX_Control(pDX, IDC_WINGS_WPN_COUNT, m_weapons_used_in_wings); DDX_Text(pDX, IDC_DELAY, m_delay); DDX_Text(pDX, IDC_SHIP_POOL, m_ship_pool); DDX_Text(pDX, IDC_WEAPON_POOL, m_weapon_pool); @@ -90,37 +98,99 @@ BEGIN_MESSAGE_MAP(player_start_editor, CDialog) //{{AFX_MSG_MAP(player_start_editor) ON_WM_INITMENU() ON_LBN_SELCHANGE(IDC_SHIP_LIST, OnSelchangeShipList) - ON_WM_CLOSE() ON_LBN_SELCHANGE(IDC_WEAPON_LIST, OnSelchangeWeaponList) ON_EN_UPDATE(IDC_SHIP_POOL, OnUpdateShipPool) ON_EN_UPDATE(IDC_WEAPON_POOL, OnUpdateWeaponPool) + ON_LBN_SELCHANGE(IDC_SHIP_VARIABLES_LIST, OnSelchangeShipVariablesList) + ON_LBN_SELCHANGE(IDC_WEAPON_VARIABLES_LIST, OnSelchangeWeaponVariablesList) + ON_CBN_SELCHANGE(IDC_SHIP_VARIABLES_COMBO, OnSelchangeShipVariablesCombo) + ON_WM_CLOSE() + ON_CBN_SELCHANGE(IDC_WEAPON_VARIABLES_COMBO, OnSelchangeWeaponVariablesCombo) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // player_start_editor message handlers + BOOL player_start_editor::OnInitDialog() { - int i; + int i, j; int idx; // initialize ship pool data - memset(ship_pool, 0, sizeof(int) * MAX_TVT_TEAMS * MAX_SHIP_CLASSES); + memset(static_ship_pool, -1, sizeof(int) * MAX_TVT_TEAMS * MAX_SHIP_CLASSES); + memset(dynamic_ship_pool, -1, sizeof(int) * MAX_TVT_TEAMS * MAX_SEXP_VARIABLES); + memset(static_ship_variable_pool, -1, sizeof(int) * MAX_TVT_TEAMS * MAX_SHIP_CLASSES); + memset(dynamic_ship_variable_pool, -1, sizeof(int) * MAX_TVT_TEAMS * MAX_SEXP_VARIABLES); for(i=0; i 0) || + (dynamic_ship_variable_pool[selected_team][i] != -1)) + { + m_ship_variable_list.SetCheck(current_entry, TRUE); + } + else + { + m_ship_variable_list.SetCheck(current_entry, FALSE); + } + + // and now for weapons + if((dynamic_weapon_pool[selected_team][i] > 0) || + (dynamic_weapon_variable_pool[selected_team][i] != -1)) + { + m_weapon_variable_list.SetCheck(current_entry, TRUE); + } + else + { + m_weapon_variable_list.SetCheck(current_entry, FALSE); + } + + current_entry++; + } + + // Since we're looping through Sexp_variables amyway we might as well fill the number variable combo boxes + else if (Sexp_variables[i].type & SEXP_VARIABLE_NUMBER) + { + m_ship_quantity_variable.AddString(Sexp_variables[i].variable_name); + m_weapon_quantity_variable.AddString(Sexp_variables[i].variable_name); + } + } // create a checklistbox for each "player" ship type m_ship_list.ResetContent(); @@ -152,8 +298,8 @@ void player_start_editor::reset_controls() if (Ship_info[i].flags & SIF_PLAYER_SHIP) { m_ship_list.AddString(Ship_info[i].name); - // if the ship currently has pool entries, check it - if(ship_pool[selected_team][i] > 0){ + // if the ship currently has pool entries or was set by a variable, check it + if((static_ship_pool[selected_team][i] > 0) || (static_ship_variable_pool[selected_team][i] != -1)) { m_ship_list.SetCheck(ct, TRUE); } else { m_ship_list.SetCheck(ct, FALSE); @@ -171,25 +317,30 @@ void player_start_editor::reset_controls() if (Weapon_info[i].wi_flags & WIF_PLAYER_ALLOWED) { m_weapon_list.AddString(Weapon_info[i].name); - // if the ship currently has pool entries, check it - if(weapon_pool[selected_team][i] > 0){ + // if the ship currently has pool entries or was set by a variable, check it + if((static_weapon_pool[selected_team][i] > 0) || (static_weapon_variable_pool[selected_team][i] != -1)){ m_weapon_list.SetCheck(ct, TRUE); } else { m_weapon_list.SetCheck(ct, FALSE); } ct++; - } else if (weapon_pool[selected_team][i] > 0) { + } else if (static_weapon_pool[selected_team][i] > 0 || (static_weapon_variable_pool[selected_team][i] != -1)) { // not sure if this should be a verbal warning or not, so I'm adding both and making it verbal for now Warning(LOCATION, "Weapon '%s' in weapon pool isn't allowed on player loadout! Resetting count to 0...\n", Weapon_info[i].name); - // mprintf(("Weapon '%s' in weapon pool isn't allowed on player loadout! Resetting to 0 count.\n", Weapon_info[i].name)); - weapon_pool[selected_team][i] = 0; + static_weapon_pool[selected_team][i] = 0; + static_weapon_variable_pool[selected_team][i] = -1; } } // be sure that nothing is selected m_ship_list.SetCurSel(-1); + m_ship_variable_list.SetCurSel(-1); + m_ship_quantity_variable.SetCurSel(-1); m_weapon_list.SetCurSel(-1); + m_weapon_variable_list.SetCurSel(-1); + m_weapon_quantity_variable.SetCurSel(-1); + UpdateData(FALSE); } @@ -213,6 +364,15 @@ void player_start_editor::OnInitMenu(CMenu* pMenu) // put a check next to the currently selected item m->CheckMenuItem(selected_team, MF_BYPOSITION | MF_CHECKED); + + m = pMenu->GetSubMenu(1); + if (Num_teams > 1) { + m->CheckMenuItem(ID_AUTOBALANCE, autobalance ? MF_CHECKED : MF_UNCHECKED); + } + else { + m->EnableMenuItem(ID_AUTOBALANCE, MF_GRAYED); + } + CDialog::OnInitMenu(pMenu); } @@ -225,14 +385,20 @@ BOOL player_start_editor::OnCommand(WPARAM wParam, LPARAM lParam) id = LOWORD(wParam); switch(id){ case ID_TEAM_1: + previous_team = selected_team; selected_team = 0; reset_controls(); break; case ID_TEAM_2: + previous_team = selected_team; selected_team = 1; reset_controls(); break; + + case ID_AUTOBALANCE: + autobalance = !autobalance; + break; } // low level stuff @@ -241,40 +407,167 @@ BOOL player_start_editor::OnCommand(WPARAM wParam, LPARAM lParam) // ship list changed void player_start_editor::OnSelchangeShipList() -{ +{ int selected; int si_index; char ship_name[255] = ""; + char ship_usage_buff[10]; + + // If the ship list is selected the variable ship list should be deselected + m_ship_variable_list.SetCurSel(-1); // determine if we've selected something selected = m_ship_list.GetCurSel(); if (selected != -1) { // lookup the ship - m_ship_list.GetText(m_ship_list.GetCurSel(), ship_name); + m_ship_list.GetText(selected, ship_name); si_index = ship_info_lookup(ship_name); // if we have a valid ship type if(si_index >= 0){ // if this item is checked - if(m_ship_list.GetCheck(selected)) { - if(ship_pool[selected_team][si_index] <= 0){ - ship_pool[selected_team][si_index] = 5; - m_ship_pool = 5; - } else { - m_ship_pool = ship_pool[selected_team][si_index]; + if(m_ship_list.GetCheck(selected)) { + if (static_ship_variable_pool[selected_team][si_index] == -1) { + if (static_ship_pool[selected_team][si_index] <= 0){ + static_ship_pool[selected_team][si_index] = 5; + } + m_ship_pool = static_ship_pool[selected_team][si_index]; + // Set the ship variable ComboBox to reflect that we are not using variables for this ship + m_ship_quantity_variable.SetCurSel(0); + } + // If the number of ships was set by a variable + else { + Assert (Sexp_variables[static_ship_variable_pool[selected_team][si_index]].type & SEXP_VARIABLE_NUMBER); + + m_ship_pool = atoi(Sexp_variables[static_ship_variable_pool[selected_team][si_index]].text); + int selected_variable = sexp_variable_typed_count(static_ship_variable_pool[selected_team][si_index], SEXP_VARIABLE_NUMBER); + m_ship_quantity_variable.SetCurSel(selected_variable + 1); } } // otherwise zero the count else { - ship_pool[selected_team][si_index] = 0; + static_ship_pool[selected_team][si_index] = 0; + static_ship_variable_pool[selected_team][si_index] = -1; m_ship_pool = 0; - } + m_ship_quantity_variable.SetCurSel(0); + } + + // set the number used in wings + sprintf(ship_usage_buff, "%d", ship_usage[selected_team][si_index]); + m_ships_used_in_wings.SetWindowText(ship_usage_buff); + } else { Int3(); } } - // update shtuff + // update stuff + UpdateData(FALSE); +} + +// ship variable list changed +void player_start_editor::OnSelchangeShipVariablesList() +{ + int selection; + + // If the variable list is selected the ship list should be deselected + m_ship_list.SetCurSel(-1); + + //Have we selected something? + selection = m_ship_variable_list.GetCurSel(); + if (selection != -1) { + int sexp_index = get_nth_variable_index(selection+1, SEXP_VARIABLE_STRING); + + if (sexp_index > -1) { + Assert(selection == sexp_variable_typed_count(sexp_index, SEXP_VARIABLE_STRING)); + + // Is this item checked? + if (m_ship_variable_list.GetCheck(selection)) { + if (dynamic_ship_variable_pool[selected_team][sexp_index] == -1) { + if (dynamic_ship_pool[selected_team][sexp_index] <= 0) { + dynamic_ship_pool[selected_team][sexp_index] = 5; + } + m_ship_pool = dynamic_ship_pool[selected_team][sexp_index]; + m_ship_quantity_variable.SetCurSel(0); + } + else { + Assert (Sexp_variables[dynamic_ship_variable_pool[selected_team][sexp_index]].type & SEXP_VARIABLE_NUMBER); + m_ship_pool = atoi(Sexp_variables[dynamic_ship_variable_pool[selected_team][sexp_index]].text); + int selected_variable = sexp_variable_typed_count(dynamic_ship_variable_pool[selected_team][sexp_index], SEXP_VARIABLE_NUMBER); + m_ship_quantity_variable.SetCurSel(selected_variable + 1); + } + } + // We've unselected the tickbox, reset everything + else { + dynamic_ship_pool[selected_team][sexp_index] = -1; + dynamic_ship_variable_pool[selected_team][sexp_index] = -1; + m_ship_pool = 0; + m_ship_quantity_variable.SetCurSel(0); + } + + // It might be nice to have FRED work out if any ships of the class represented by the variable are in the wings + // but for now just set it to zero + m_ships_used_in_wings.SetWindowText("0"); + } + else { + Int3(); + } + + } + + // update stuff + UpdateData(FALSE); +} + +void player_start_editor::OnSelchangeShipVariablesCombo() +{ + // Get the new selection + char variable_name[TOKEN_LENGTH]; + char name[255] = ""; + bool update_static_pool = false; + bool update_dynamic_pool = false; + + m_ship_quantity_variable.GetLBText(m_ship_quantity_variable.GetCurSel(), variable_name); + int sexp_index = get_index_sexp_variable_name(variable_name); + + Assert ((sexp_index > -1) || (!strcmp("Don't Use Variables", variable_name))); + + // See if the ship_list was selected + int ship_index = GetSelectedShipListIndex(); + if (ship_index >= 0) { + static_ship_variable_pool[selected_team][ship_index] = sexp_index; + update_static_pool = true; + } + + // Maybe it's the ship_variables_list that is actually selected + int ship_variable_index = GetSelectedShipVariableListIndex(); + if (ship_variable_index >= 0 ) { + dynamic_ship_variable_pool[selected_team][ship_variable_index] = sexp_index; + update_dynamic_pool = true; + } + + // Somethings gone wrong if they're both marked as true + Assert (! (update_static_pool && update_dynamic_pool)); + + // Update the ship_pool + if (update_static_pool || update_dynamic_pool) { + int new_quantity = 5; + if (sexp_index > -1) { + Assert (Sexp_variables[sexp_index].type & SEXP_VARIABLE_NUMBER); + new_quantity = atoi(Sexp_variables[sexp_index].text); + } + + if (update_static_pool) { + static_ship_pool[selected_team][ship_index] = new_quantity; + } + else { + dynamic_ship_pool[selected_team][ship_variable_index] = new_quantity; + } + + m_ship_pool = new_quantity; + } + + // update stuff UpdateData(FALSE); } @@ -284,36 +577,161 @@ void player_start_editor::OnSelchangeWeaponList() int selected; int wi_index; char weapon_name[255] = ""; + char weapon_usage_buff[10]; + + // If the weapon list is selected the variable weapon list shouldn't be + m_weapon_variable_list.SetCurSel(-1); // determine if we've selected something selected = m_weapon_list.GetCurSel(); if (selected != -1) { // lookup the weapon - m_weapon_list.GetText(m_weapon_list.GetCurSel(), weapon_name); - wi_index = weapon_name_lookup(weapon_name); + m_weapon_list.GetText(selected, weapon_name); + wi_index = weapon_info_lookup(weapon_name); - // if we have a valid weapon type + // if we have a valid ship type if(wi_index >= 0){ // if this item is checked - if(m_weapon_list.GetCheck(selected)) { - if(weapon_pool[selected_team][wi_index] <= 0){ - weapon_pool[selected_team][wi_index] = 100; - m_weapon_pool = 100; - } else { - m_weapon_pool = weapon_pool[selected_team][wi_index]; + if(m_weapon_list.GetCheck(selected)) { + if (static_weapon_variable_pool[selected_team][wi_index] == -1) { + if (static_weapon_pool[selected_team][wi_index] <= 0){ + static_weapon_pool[selected_team][wi_index] = 100; + } + m_weapon_pool = static_weapon_pool[selected_team][wi_index]; + // Set the combo reflect that we are not using variables for this weapon + m_weapon_quantity_variable.SetCurSel(0); + } + // If the number of ships was set by a variable + else { + Assert (Sexp_variables[static_weapon_variable_pool[selected_team][wi_index]].type & SEXP_VARIABLE_NUMBER); + + m_weapon_pool = atoi(Sexp_variables[static_weapon_variable_pool[selected_team][wi_index]].text); + int selected_variable = sexp_variable_typed_count(static_weapon_variable_pool[selected_team][wi_index], SEXP_VARIABLE_NUMBER); + m_weapon_quantity_variable.SetCurSel(selected_variable + 1); } } // otherwise zero the count else { - weapon_pool[selected_team][wi_index] = 0; + static_weapon_pool[selected_team][wi_index] = 0; + static_weapon_variable_pool[selected_team][wi_index] = -1; m_weapon_pool = 0; - } + m_weapon_quantity_variable.SetCurSel(0); + } + + // set the number used in wings + sprintf(weapon_usage_buff, "%d", weapon_usage[selected_team][wi_index]); + m_weapons_used_in_wings.SetWindowText(weapon_usage_buff); + } else { Int3(); } } - // update shtuff + // update stuff + UpdateData(FALSE); +} + +void player_start_editor::OnSelchangeWeaponVariablesList() +{ + int selection; + + // deselect the other list + m_weapon_list.SetCurSel(-1); + + //Have we selected something? + selection = m_weapon_variable_list.GetCurSel(); + if (selection != -1) { + int sexp_index = get_nth_variable_index(selection+1, SEXP_VARIABLE_STRING); + + if (sexp_index > -1) { + Assert(selection == sexp_variable_typed_count(sexp_index, SEXP_VARIABLE_STRING)); + + // Is this item checked? + if (m_weapon_variable_list.GetCheck(selection)) { + if (dynamic_weapon_variable_pool[selected_team][sexp_index] == -1) { + if (dynamic_weapon_pool[selected_team][sexp_index] <= 0) { + dynamic_weapon_pool[selected_team][sexp_index] = 5; + } + m_weapon_pool = dynamic_weapon_pool[selected_team][sexp_index]; + m_weapon_quantity_variable.SetCurSel(0); + } + else { + Assert (Sexp_variables[dynamic_weapon_variable_pool[selected_team][sexp_index]].type & SEXP_VARIABLE_NUMBER); + m_weapon_pool = atoi(Sexp_variables[dynamic_weapon_variable_pool[selected_team][sexp_index]].text); + int selected_variable = sexp_variable_typed_count(dynamic_weapon_variable_pool[selected_team][sexp_index], SEXP_VARIABLE_NUMBER); + m_weapon_quantity_variable.SetCurSel(selected_variable + 1); + } + } + // We've unselected the tickbox, reset everything + else { + dynamic_weapon_pool[selected_team][sexp_index] = -1; + dynamic_weapon_variable_pool[selected_team][sexp_index] = -1; + m_weapon_pool = 0; + m_weapon_quantity_variable.SetCurSel(0); + } + + // It might be nice to have FRED work out if any weapons of this type are in the wings + // but for now just set it to zero + m_weapons_used_in_wings.SetWindowText("0"); + } + else { + Int3(); + } + } + + // update stuff + UpdateData(FALSE); +} + +void player_start_editor::OnSelchangeWeaponVariablesCombo() +{ + // Get the new selection + char variable_name[TOKEN_LENGTH]; + char name[255] = ""; + bool update_static_pool = false; + bool update_dynamic_pool = false; + + m_weapon_quantity_variable.GetLBText(m_weapon_quantity_variable.GetCurSel(), variable_name); + int sexp_index = get_index_sexp_variable_name(variable_name); + + Assert ((sexp_index > -1) || (!strcmp("Don't Use Variables", variable_name))); + + // See if the weapon_list was selected + int weapon_index = GetSelectedWeaponListIndex(); + if (weapon_index >= 0) { + static_weapon_variable_pool[selected_team][weapon_index] = sexp_index; + update_static_pool = true; + } + + // Maybe it's the weapon_variables_list that is actually selected + int weapon_variable_index = GetSelectedWeaponVariableListIndex(); + if (weapon_variable_index >= 0 ) { + dynamic_weapon_variable_pool[selected_team][weapon_variable_index] = sexp_index; + update_dynamic_pool = true; + } + + // Somethings gone wrong if they're both marked as true + Assert (! (update_static_pool && update_dynamic_pool)); + + // Update the weapon_pool + if (update_static_pool || update_dynamic_pool) { + int new_quantity = 100; + if (sexp_index > -1) { + Assert (Sexp_variables[sexp_index].type & SEXP_VARIABLE_NUMBER); + new_quantity = atoi(Sexp_variables[sexp_index].text); + } + + if (update_static_pool) { + static_weapon_pool[selected_team][weapon_index] = new_quantity; + } + else { + dynamic_weapon_pool[selected_team][weapon_variable_index] = new_quantity; + } + + m_weapon_pool = new_quantity; + } + + // update stuff UpdateData(FALSE); } @@ -328,65 +746,287 @@ void player_start_editor::OnCancel() void player_start_editor::OnOK() { int i, idx; + int num_choices; + + int num_sexp_variables = sexp_variable_count(); // store player entry time delay Entry_delay_time = i2f(m_delay); // store ship pools - for(i=0; i 0){ - Team_data[i].ship_count[Team_data[i].number_choices] = ship_pool[i][idx]; - Team_data[i].ship_list[Team_data[i].number_choices++] = idx; + for(i=0; i 0 || static_ship_variable_pool[i][idx] > -1) { + Team_data[i].ship_list[num_choices] = idx; + Team_data[i].ship_list_variables[num_choices] = -1; + + // Now set the number of this class available + if (static_ship_variable_pool[i][idx] == -1) { + Team_data[i].ship_count[num_choices] = static_ship_pool[i][idx]; + Team_data[i].ship_count_variables[num_choices] = -1; + } + else { + Assert (Sexp_variables[static_ship_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER); + + Team_data[i].ship_count_variables[num_choices] = static_ship_variable_pool[i][idx]; + Team_data[i].ship_count[num_choices] = atoi(Sexp_variables[static_ship_variable_pool[i][idx]].text); + } + + num_choices++; + } + } + Team_data[i].num_ship_choices = num_choices; } // store weapon pools for(i=0; i 0 || static_weapon_variable_pool[i][idx] > -1) + { + Team_data[i].weaponry_pool[num_choices] = idx; + Team_data[i].weaponry_pool_variable[num_choices] = -1; + + // Now set the number of this class available + if (static_weapon_variable_pool[i][idx] == -1) + { + Team_data[i].weaponry_count[num_choices] = static_weapon_pool[i][idx]; + Team_data[i].weaponry_amount_variable[num_choices] = -1; + } + else + { + Assert (Sexp_variables[static_weapon_variable_pool[i][idx]].type & SEXP_VARIABLE_NUMBER); + + Team_data[i].weaponry_amount_variable[num_choices] = static_weapon_variable_pool[i][idx]; + Team_data[i].weaponry_count[num_choices] = atoi(Sexp_variables[static_weapon_variable_pool[i][idx]].text); + } + + num_choices++; + } + } + Team_data[i].num_weapon_choices = num_choices; } theApp.record_window_data(&Player_wnd_data, this); CDialog::OnOK(); } +// Returns the ship_info index of the selected and checked ship_list item or -1 if nothing is checked or +// the ship is invalid +int player_start_editor::GetSelectedShipListIndex() +{ + char name[255] = ""; + int selected = m_ship_list.GetCurSel(); + if((selected != -1) && m_ship_list.GetCheck(selected)) + { + // lookup the ship + m_ship_list.GetText(m_ship_list.GetCurSel(), name); + int ship_index = ship_info_lookup(name); + return ship_index; + } + return -1; +} + +// Returns the weapon_info index of the selected and checked ship_list item or -1 if nothing is checked or +// the weapon is invalid +int player_start_editor::GetSelectedWeaponListIndex() +{ + char name[255] = ""; + int selected = m_weapon_list.GetCurSel(); + if((selected != -1) && m_weapon_list.GetCheck(selected)) + { + // lookup the weapon + m_weapon_list.GetText(m_weapon_list.GetCurSel(), name); + int weapon_index = weapon_info_lookup(name); + return weapon_index; + } + return -1; +} + +// Returns the Sexp_variables index of the selected and checked ship_variables_list item or -1 if nothing is checked +// or the ship is invalid +int player_start_editor::GetSelectedShipVariableListIndex() +{ + // Try the ship_variables_list + int selected = m_ship_variable_list.GetCurSel(); + if((selected != -1) && m_ship_variable_list.GetCheck(selected)) + { + //lookup the variable + return get_nth_variable_index(selected+1, SEXP_VARIABLE_STRING); + } + return -1; +} + +// Returns the Sexp_variables index of the selected and checked weapon_variables_list item or -1 if nothing is checked +// or the weapon is invalid +int player_start_editor::GetSelectedWeaponVariableListIndex() +{ + // Try the ship_variables_list + int selected = m_weapon_variable_list.GetCurSel(); + if((selected != -1) && m_weapon_variable_list.GetCheck(selected)) + { + return get_nth_variable_index(selected+1, SEXP_VARIABLE_STRING); + } + return -1; +} + +// Updates the Sexp_variable in a variable combobox to the value supplied +void player_start_editor::UpdateQuantityVariable(CComboBox *variable_list, int pool_value) +{ + char variable_name[TOKEN_LENGTH]; + variable_list->GetLBText(variable_list->GetCurSel(), variable_name); + int variable_index = get_index_sexp_variable_name(variable_name); + if (variable_index > -1) + { + char variable_value[TOKEN_LENGTH]; + sprintf(variable_value, "%d", pool_value); + Assert (Sexp_variables[variable_index].type & SEXP_VARIABLE_NUMBER); + sexp_fred_modify_variable(variable_value, variable_name, variable_index, SEXP_VARIABLE_NUMBER); + } +} + // ship pool count change void player_start_editor::OnUpdateShipPool() { - int selected, si_index; - char ship_name[255] = ""; - + int si_index; if (!dlg_inited){ return; } UpdateData(TRUE); - // if we have a ship selected and checked, update the pool - selected = m_ship_list.GetCurSel(); - if((selected != -1) && m_ship_list.GetCheck(selected)){ - // lookup the ship - m_ship_list.GetText(m_ship_list.GetCurSel(), ship_name); - si_index = ship_info_lookup(ship_name); - - // if we have a valid ship type - if(si_index >= 0){ - ship_pool[selected_team][si_index] = m_ship_pool; - } - }; + si_index = GetSelectedShipListIndex(); + // Update the pool if we have a valid ship type + if(si_index >= 0) + { + static_ship_pool[selected_team][si_index] = m_ship_pool; + // If this value came from a variable we should update its value + UpdateQuantityVariable(&m_ship_quantity_variable, m_ship_pool); + return ; + } + + // Maybe it's the ship_variables_list that is actually selected + int sexp_index = GetSelectedShipVariableListIndex(); + // if we have a valid sexp_variable + if(sexp_index >= 0) + { + dynamic_ship_pool[selected_team][sexp_index] = m_ship_pool; + UpdateQuantityVariable(&m_ship_quantity_variable, m_ship_pool); + } } // weapon pool count change void player_start_editor::OnUpdateWeaponPool() { - int selected, wi_index; - char weapon_name[255] = ""; + int wi_index; if (!dlg_inited){ return; @@ -394,16 +1034,22 @@ void player_start_editor::OnUpdateWeaponPool() UpdateData(TRUE); - // if we have a ship selected and checked, update the pool - selected = m_weapon_list.GetCurSel(); - if((selected != -1) && m_weapon_list.GetCheck(selected)){ - // lookup the ship - m_weapon_list.GetText(m_weapon_list.GetCurSel(), weapon_name); - wi_index = weapon_info_lookup(weapon_name); - - // if we have a valid ship type - if(wi_index >= 0){ - weapon_pool[selected_team][wi_index] = m_weapon_pool; - } - }; + wi_index = GetSelectedWeaponListIndex(); + // Update the pool if we have a valid weapon type + if(wi_index >= 0) + { + static_weapon_pool[selected_team][wi_index] = m_weapon_pool; + // If this value came from a variable we should update its value + UpdateQuantityVariable(&m_weapon_quantity_variable, m_weapon_pool); + return ; + } + + // Maybe it's the ship_variables_list that is actually selected + int sexp_index = GetSelectedWeaponVariableListIndex(); + // if we have a valid sexp_variable + if(sexp_index >= 0) + { + dynamic_weapon_pool[selected_team][sexp_index] = m_weapon_pool; + UpdateQuantityVariable(&m_weapon_quantity_variable, m_weapon_pool); + } } diff --git a/code/fred2/playerstarteditor.h b/code/fred2/playerstarteditor.h index 3a13a6e84b..366a1d9792 100644 --- a/code/fred2/playerstarteditor.h +++ b/code/fred2/playerstarteditor.h @@ -115,9 +115,15 @@ public: CSpinButtonCtrl m_spin1; CCheckListBox m_ship_list; CCheckListBox m_weapon_list; + CCheckListBox m_ship_variable_list; + CCheckListBox m_weapon_variable_list; int m_delay; int m_weapon_pool; int m_ship_pool; + CComboBox m_ship_quantity_variable; + CComboBox m_weapon_quantity_variable; + CStatic m_ships_used_in_wings; + CStatic m_weapons_used_in_wings; //}}AFX_DATA @@ -142,6 +148,10 @@ protected: afx_msg void OnUpdateWeaponPool(); void OnCancel(); void OnOK(); + afx_msg void OnSelchangeShipVariablesList(); + afx_msg void OnSelchangeWeaponVariablesList(); + afx_msg void OnSelchangeShipVariablesCombo(); + afx_msg void OnSelchangeWeaponVariablesCombo(); //}}AFX_MSG DECLARE_MESSAGE_MAP() @@ -151,13 +161,33 @@ private: // team we're currently working with int selected_team; + int previous_team; // The last team we worked with + + bool autobalance; // ship pool info - int ship_pool[MAX_TVT_TEAMS][MAX_SHIP_CLASSES]; + int static_ship_pool[MAX_TVT_TEAMS][MAX_SHIP_CLASSES]; // Holds the number of ships of a class that was set by the team loadout + int dynamic_ship_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES]; + int static_ship_variable_pool[MAX_TVT_TEAMS][MAX_SHIP_CLASSES]; + int dynamic_ship_variable_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES]; // weapon pool info - int weapon_pool[MAX_TVT_TEAMS][MAX_WEAPON_TYPES]; + int static_weapon_pool[MAX_TVT_TEAMS][MAX_WEAPON_TYPES]; + int dynamic_weapon_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES]; + int static_weapon_variable_pool[MAX_TVT_TEAMS][MAX_WEAPON_TYPES]; + int dynamic_weapon_variable_pool[MAX_TVT_TEAMS][MAX_SEXP_VARIABLES]; + + // ship and weapon usage pools + int ship_usage[MAX_TVT_TEAMS][MAX_SHIP_CLASSES]; + int weapon_usage[MAX_TVT_TEAMS][MAX_WEAPON_TYPES]; // regenerate all controls void reset_controls(); + int GetSelectedShipListIndex(); + int GetSelectedShipVariableListIndex(); + int GetSelectedWeaponListIndex(); + int GetSelectedWeaponVariableListIndex(); + + void UpdateQuantityVariable(CComboBox *variable_list, int pool_value); + }; diff --git a/code/fred2/resource.h b/code/fred2/resource.h index d38ca1682d..2041f87fb0 100644 --- a/code/fred2/resource.h +++ b/code/fred2/resource.h @@ -1,6 +1,6 @@ //{{NO_DEPENDENCIES}} -// Microsoft Developer Studio generated include file. -// Used by FRED.rc +// Microsoft Visual C++ generated include file. +// Used by fred.rc // #define IDC_SAVE_DEFAULT_PREFS 3 #define ID_DELETE_VARIABLE 3 @@ -103,6 +103,7 @@ #define IDD_BACKGROUND_CHOOSER 272 #define IDB_DATA_05 277 #define IDB_DATA_10 286 +#define IDD_ALT_SHIP_CLASS 292 #define IDB_DATA_15 296 #define IDB_DATA_00 297 #define IDB_DATA_20 300 @@ -526,17 +527,28 @@ #define IDC_SUN1 1188 #define IDC_SHIP_DEBRIS1 1188 #define IDC_OLD_TEXTURE 1188 +#define IDC_ASCT1_CLASS_COMBO1 1188 +#define IDC_SHIP_VARIABLES_COMBO 1188 #define IDC_SUFFIX 1188 #define IDC_CREATED 1189 #define IDC_DEPARTURE_TARGET 1189 #define IDC_SBITMAP 1189 +#define IDC_ASCT1_VARIABLES_COMBO1 1189 +#define IDC_WEAPON_VARIABLES_COMBO 1189 +#define IDC_ASCT1_CLASS_COMBO2 1190 #define IDC_BACKGROUND_NUM 1190 #define IDC_WING_DISPLAY_FILTER 1191 +#define IDC_ASCT1_VARIABLES_COMBO2 1191 #define IDC_BACKGROUND_SWAP_NUM 1191 #define IDC_SHIP_DEBRIS2 1192 +#define IDC_ASCT1_CLASS_COMBO3 1192 #define IDC_SHIP_LIST 1193 #define IDC_SHIP_DEBRIS3 1193 +#define IDC_ASCT1_VARIABLES_COMBO3 1193 #define IDC_AI_CLASS 1194 +#define IDC_ASCT2_CLASS_COMBO1 1194 +#define IDC_SHIP_VARIABLES_LIST 1194 +#define IDC_ASCT2_VARIABLES_COMBO1 1195 #define IDC_NEW_WING 1197 #define IDC_DELETE_WING 1197 #define IDC_BUTTON2 1198 @@ -549,10 +561,12 @@ #define IDC_COPY_VIEW 1198 #define IDC_LOADING_SCREEN_BUTTON640 1198 #define IDC_FORUMS 1198 +#define IDC_ALT_CLASS_ADD 1198 #define IDC_DELETE_STAGE 1199 #define IDC_DELETE_MSG 1199 #define IDC_TOGGLE_LOOP 1199 #define IDC_DEL_SBITMAP 1199 +#define IDC_ALT_CLASS_DELETE 1199 #define IDC_DELETE2 1200 #define IDC_TREE2 1200 #define IDC_TREE3 1201 @@ -572,12 +586,14 @@ #define IDC_EVENT_MUSIC 1203 #define IDC_NEBPATTERN 1203 #define IDC_SHIP_PERSONA 1203 +#define IDC_SET_FROM_SHIP_CLASS 1203 #define IDC_NEBCOLOR 1204 #define IDC_SUBSTITUTE_EVENT_MUSIC 1205 #define IDC_AI_PROFILE 1207 #define IDC_LIST3 1208 #define IDC_FILELIST 1208 #define IDC_YES_MESSAGE_LIST 1208 +#define IDC_ALT_CLASS_LIST 1208 #define IDC_COMMAND_SENDER 1209 #define IDC_COMMAND_PERSONA 1210 #define IDC_FILTER_WAYPOINTS 1211 @@ -623,6 +639,7 @@ #define IDC_SHIP_TYPE 1244 #define IDC_NEB2_TEXTURE 1244 #define IDC_SHIP_ALT 1244 +#define IDC_SET_FROM_VARIABLES 1244 #define IDC_COMBO4 1245 #define IDC_BEHAVIOR2 1245 #define IDC_PRIORITY 1245 @@ -744,6 +761,7 @@ #define IDC_GOAL_NAME 1342 #define IDC_HOTKEY 1342 #define IDC_SBITMAP_LIST 1342 +#define IDC_WEAPON_VARIABLES_LIST 1342 #define IDC_EDIT2 1343 #define IDC_AMMO2 1343 #define IDC_TEXT 1343 @@ -1085,6 +1103,21 @@ #define IDC_ALT_AS_CALLSIGN 1593 #define IDC_DEACTIVATE_AUTOPILOT 1594 #define IDC_HIDE_SHIP_NAME 1594 +#define IDC_SET_CLASS_DYNAMICALLY 1595 +#define IDC_ALT_SHIP_CLASS 1598 +#define ID_STATIC 1600 +#define IDC_DEFAULT_TO_CLASS 1601 +#define IDC_ALT_CLASS_UP 1602 +#define IDC_ALT_CLASS_DOWN 1603 +#define IDC_ALT_CLASS_INSERT 1604 +#define IDC_SKY_FLAG_NO_LIGHTING 1609 +#define IDC_SKY_FLAG 1610 +#define IDC_SKY_FLAG_XPARENT 1610 +#define IDC_SKY_FLAG_NO_ZBUFF 1611 +#define IDC_SKY_FLAG_NO_CULL 1612 +#define IDC_SKY_FLAG_NO_GLOW 1613 +#define IDC_TURRETS_LOCKED 1615 +#define IDC_AFTERBURNER_LOCKED 1616 #define ID_FILE_MISSIONNOTES 32771 #define ID_DUPLICATE 32774 #define ID_VIEW_ROTATE 32775 @@ -1364,6 +1397,7 @@ #define ID_VIEW_FULL_DETAIL 33090 #define ID_SAVEFORMAT_FS2OPEN 33091 #define ID_FORMAT_FS2_OPEN_COMP 33092 +#define ID_AUTOBALANCE 33093 #define ID_INDICATOR_MODE 59142 #define ID_INDICATOR_LEFT 59143 #define ID_INDICATOR_RIGHT 59144 @@ -1374,9 +1408,9 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 317 -#define _APS_NEXT_COMMAND_VALUE 33093 -#define _APS_NEXT_CONTROL_VALUE 1595 +#define _APS_NEXT_RESOURCE_VALUE 318 +#define _APS_NEXT_COMMAND_VALUE 33098 +#define _APS_NEXT_CONTROL_VALUE 1617 #define _APS_NEXT_SYMED_VALUE 105 #endif #endif diff --git a/code/fred2/sexp_tree.cpp b/code/fred2/sexp_tree.cpp index 8f9fdafd61..89e7c3caa8 100644 --- a/code/fred2/sexp_tree.cpp +++ b/code/fred2/sexp_tree.cpp @@ -521,7 +521,7 @@ * to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it * goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that * will return the subcategory for each sexp that uses it, and the submenu name in the - * op_submenu[] array in sexp_tree.cpp." + * op_submenu[] array in sexp.cpp." * * Please note that I rearranged a whole bunch of sexps in the Operators[] array in sexp.cpp * in order to make the subcategories work better, so if you get a whole bunch of differences @@ -1524,7 +1524,7 @@ void sexp_tree::right_clicked(int mode) int op_type = query_operator_argument_type(op, Replace_count); // check argument type at this position - // special case dont allow replace data for variable names + // special case don't allow replace data for variable names // Goober5000 - why? the only place this happens is when replacing the ambiguous argument in // modify-variable with a variable, which seems legal enough. //if (op_type != OPF_AMBIGUOUS) { @@ -1587,7 +1587,7 @@ void sexp_tree::right_clicked(int mode) } } - // cant modify if no variables + // can't modify if no variables if (sexp_variable_count() == 0) { menu.EnableMenuItem(ID_SEXP_TREE_MODIFY_VARIABLE, MF_GRAYED); } @@ -1835,7 +1835,7 @@ void sexp_tree::right_clicked(int mode) list = get_listing_opf(type, parent, Replace_count); - // special case dont allow replace data for variable names + // special case don't allow replace data for variable names if ( (type != OPF_VARIABLE_NAME) && list) { sexp_list_item *ptr; @@ -2142,9 +2142,23 @@ int sexp_tree::edit_label(HTREEITEM h) */ } -int sexp_tree::end_label_edit(HTREEITEM h, char *str) +// given a tree node, returns the argument type it should be. +int sexp_tree::query_node_argument_type(int node) { - int len, r = 1; + int argnum = 0; + int parent_node = tree_nodes[node].parent; + Assert(parent_node >= 0); + argnum = find_argument_number(parent_node, node); + int op_num = get_operator_index(tree_nodes[parent_node].text); + return query_operator_argument_type(op_num, argnum); +} + +int sexp_tree::end_label_edit(TVITEMA &item) +{ + HTREEITEM h = item.hItem; + char *str = item.pszText; + int len, r = 1; + bool update_node = true; uint node; *modified = 1; @@ -2173,17 +2187,41 @@ int sexp_tree::end_label_edit(HTREEITEM h, char *str) SetItemText(h, str); item_index = node; - add_or_replace_operator(get_operator_index(str), 1); + int op_num = get_operator_index(str); + if (op_num >= 0 ) { + add_or_replace_operator(op_num, 1); + } + else { + update_node = false; + } r = 0; } + // gotta sidestep Goober5000's number hack and check entries are actually positive. + else if (tree_nodes[node].type & SEXPT_NUMBER) { + if (query_node_argument_type(node) == OPF_POSITIVE) { + int val = atoi(str); + if (val < 0) { + MessageBox("Can not enter a negative value", "Invalid Number", MB_ICONEXCLAMATION); + update_node = false; + } + } + } + // Error checking would not hurt here len = strlen(str); if (len >= TOKEN_LENGTH) len = TOKEN_LENGTH - 1; - strncpy(tree_nodes[node].text, str, len); - tree_nodes[node].text[len] = 0; + if (update_node) { + strncpy(tree_nodes[node].text, str, len); + tree_nodes[node].text[len] = 0; + } + else { + strncpy(str, tree_nodes[node].text, len); + return 1; + } + /* node = tree_nodes[node].parent; if (node != -1) { @@ -2394,7 +2432,7 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) int type = get_type(item_handle); Assert( (type & SEXPT_NUMBER) || (type & SEXPT_STRING) ); - // dont do type check for modify-variable + // don't do type check for modify-variable if (Modify_variable) { if (Sexp_variables[var_idx].type & SEXP_VARIABLE_NUMBER) { type = SEXPT_NUMBER; @@ -2479,6 +2517,7 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) if (id == (Operators[op].value | OP_REPLACE_FLAG)) { add_or_replace_operator(op, 1); + expand_branch(item_handle); return 1; } @@ -2560,17 +2599,33 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) } else if (Sexp_nodes[Sexp_clipboard].subtype == SEXP_ATOM_NUMBER) { Assert(Sexp_nodes[Sexp_clipboard].rest == -1); - expand_operator(item_index); - replace_data(CTEXT(Sexp_clipboard), (SEXPT_NUMBER | SEXPT_VALID)); + if (Sexp_nodes[Sexp_clipboard].type & SEXP_FLAG_VARIABLE) { + int var_idx = get_index_sexp_variable_name(Sexp_nodes[Sexp_clipboard].text); + Assert(var_idx > -1); + replace_variable_data(var_idx, (SEXPT_VARIABLE | SEXPT_NUMBER | SEXPT_VALID)); + } + else { + expand_operator(item_index); + replace_data(CTEXT(Sexp_clipboard), (SEXPT_NUMBER | SEXPT_VALID)); + } } else if (Sexp_nodes[Sexp_clipboard].subtype == SEXP_ATOM_STRING) { Assert(Sexp_nodes[Sexp_clipboard].rest == -1); - expand_operator(item_index); - replace_data(CTEXT(Sexp_clipboard), (SEXPT_STRING | SEXPT_VALID)); + if (Sexp_nodes[Sexp_clipboard].type & SEXP_FLAG_VARIABLE) { + int var_idx = get_index_sexp_variable_name(Sexp_nodes[Sexp_clipboard].text); + Assert(var_idx > -1); + replace_variable_data(var_idx, (SEXPT_VARIABLE | SEXPT_STRING | SEXPT_VALID)); + } + else { + expand_operator(item_index); + replace_data(CTEXT(Sexp_clipboard), (SEXPT_STRING | SEXPT_VALID)); + } } else Assert(0); // unknown and/or invalid sexp type + expand_branch(item_handle); + return 1; case ID_EDIT_PASTE_SPECIAL: // add paste, instead of replace. @@ -2603,6 +2658,8 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) } else Assert(0); // unknown and/or invalid sexp type + expand_branch(item_handle); + return 1; /* case ID_SPLIT_LINE: @@ -2624,20 +2681,32 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) } return 1; + + case ID_REPLACE_NUMBER: + expand_operator(item_index); + replace_data("number", (SEXPT_NUMBER | SEXPT_VALID)); + EditLabel(tree_nodes[item_index].handle); + return 1; + + case ID_REPLACE_STRING: + expand_operator(item_index); + replace_data("string", (SEXPT_STRING | SEXPT_VALID)); + EditLabel(tree_nodes[item_index].handle); + return 1; case ID_ADD_STRING: { - int node; + int theNode; - node = add_data("string", (SEXPT_STRING | SEXPT_VALID)); - EditLabel(tree_nodes[node].handle); + theNode = add_data("string", (SEXPT_STRING | SEXPT_VALID)); + EditLabel(tree_nodes[theNode].handle); return 1; } case ID_ADD_NUMBER: { - int node; + int theNode; - node = add_data("number", (SEXPT_NUMBER | SEXPT_VALID)); - EditLabel(tree_nodes[node].handle); + theNode = add_data("number", (SEXPT_NUMBER | SEXPT_VALID)); + EditLabel(tree_nodes[theNode].handle); return 1; } @@ -2652,45 +2721,45 @@ BOOL sexp_tree::OnCommand(WPARAM wParam, LPARAM lParam) // fall through to ID_DELETE case. case ID_DELETE: { - int parent, node; - HTREEITEM h; + int parent, theNode; + HTREEITEM h_parent; if ((m_mode & ST_ROOT_DELETABLE) && (item_index == -1)) { item_index = GetItemData(item_handle); if (m_mode == MODE_GOALS) { Assert(Goal_editor_dlg); - node = Goal_editor_dlg->handler(ROOT_DELETED, item_index); + theNode = Goal_editor_dlg->handler(ROOT_DELETED, item_index); } else if (m_mode == MODE_EVENTS) { Assert(Event_editor_dlg); - node = Event_editor_dlg->handler(ROOT_DELETED, item_index); + theNode = Event_editor_dlg->handler(ROOT_DELETED, item_index); } else { Assert(m_mode == MODE_CAMPAIGN); - node = Campaign_tree_formp->handler(ROOT_DELETED, item_index); + theNode = Campaign_tree_formp->handler(ROOT_DELETED, item_index); } - Assert(node >= 0); - free_node2(node); + Assert(theNode >= 0); + free_node2(theNode); DeleteItem(item_handle); *modified = 1; return 1; } Assert(item_index >= 0); - h = GetParentItem(item_handle); + h_parent = GetParentItem(item_handle); parent = tree_nodes[item_index].parent; if ((parent == -1) && (m_mode == MODE_EVENTS)) Int3(); // no longer used, temporary to check if called still. - Assert(parent != -1 && tree_nodes[parent].handle == h); + Assert(parent != -1 && tree_nodes[parent].handle == h_parent); free_node(item_index); DeleteItem(item_handle); - node = tree_nodes[parent].child; + theNode = tree_nodes[parent].child; /* if (node != -1 && tree_nodes[node].next == -1 && tree_nodes[node].child == -1) { sprintf(buf, "%s %s", tree_nodes[parent].text, tree_nodes[node].text); - SetItem(h, TVIF_TEXT, buf, 0, 0, 0, 0, 0); + SetItem(h_parent, TVIF_TEXT, buf, 0, 0, 0, 0, 0); tree_nodes[parent].flags = OPERAND | EDITABLE; tree_nodes[node].flags = COMBINED; DeleteItem(tree_nodes[node].handle); @@ -2981,7 +3050,7 @@ int sexp_tree::get_default_value(sexp_list_item *item, int op, int i) else if ( (Operators[op].value == OP_EXPLOSION_EFFECT) ) { int temp; - char str[TOKEN_LENGTH]; + char sexp_str_token[TOKEN_LENGTH]; switch (i) { @@ -3015,13 +3084,13 @@ int sexp_tree::get_default_value(sexp_list_item *item, int op, int i) } // Goober5000 - set_data_dup is required if we're passing a variable - sprintf(str, "%d", temp); - item->set_data_dup(str, (SEXPT_NUMBER | SEXPT_VALID)); + sprintf(sexp_str_token, "%d", temp); + item->set_data_dup(sexp_str_token, (SEXPT_NUMBER | SEXPT_VALID)); } else if ( (Operators[op].value == OP_WARP_EFFECT) ) { int temp; - char str[TOKEN_LENGTH]; + char sexp_str_token[TOKEN_LENGTH]; switch (i) { @@ -3043,13 +3112,13 @@ int sexp_tree::get_default_value(sexp_list_item *item, int op, int i) } // Goober5000 - set_data_dup is required if we're passing a variable - sprintf(str, "%d", temp); - item->set_data_dup(str, (SEXPT_NUMBER | SEXPT_VALID)); + sprintf(sexp_str_token, "%d", temp); + item->set_data_dup(sexp_str_token, (SEXPT_NUMBER | SEXPT_VALID)); } else if ((Operators[op].value == OP_ADD_BACKGROUND_BITMAP)) { int temp = 0; - char str[TOKEN_LENGTH]; + char sexp_str_token[TOKEN_LENGTH]; switch (i) { @@ -3064,18 +3133,18 @@ int sexp_tree::get_default_value(sexp_list_item *item, int op, int i) break; } - sprintf(str, "%d", temp); - item->set_data_dup(str, (SEXPT_NUMBER | SEXPT_VALID)); + sprintf(sexp_str_token, "%d", temp); + item->set_data_dup(sexp_str_token, (SEXPT_NUMBER | SEXPT_VALID)); } else if ((Operators[op].value == OP_ADD_SUN_BITMAP)) { int temp = 0; - char str[TOKEN_LENGTH]; + char sexp_str_token[TOKEN_LENGTH]; if (i==4) temp = 100; - sprintf(str, "%d", temp); - item->set_data_dup(str, (SEXPT_NUMBER | SEXPT_VALID)); + sprintf(sexp_str_token, "%d", temp); + item->set_data_dup(sexp_str_token, (SEXPT_NUMBER | SEXPT_VALID)); } else if ((Operators[op].value == OP_MODIFY_VARIABLE)) { if (get_modify_variable_type(index) == OPF_NUMBER) { @@ -4220,7 +4289,7 @@ void sexp_tree::swap_roots(HTREEITEM one, HTREEITEM two) void sexp_tree::OnBegindrag(NMHDR* pNMHDR, LRESULT* pResult) { - UINT flags; + UINT flags = 0; // ScreenToClient(&m_pt); ASSERT(!m_dragging); @@ -4252,8 +4321,8 @@ void sexp_tree::OnLButtonDown(UINT nFlags, CPoint point) void sexp_tree::OnMouseMove(UINT nFlags, CPoint point) { - HTREEITEM hitem; - UINT flags; + HTREEITEM hitem = NULL; + UINT flags = 0; if (m_dragging) { ASSERT(m_p_image_list != NULL); @@ -4694,12 +4763,7 @@ sexp_list_item *sexp_tree::get_listing_opf(int opf, int parent_node, int arg_ind { sexp_list_item head; sexp_list_item *list = NULL; - int i, current_node, w_arg, e_arg; - - // get the current node - current_node = tree_nodes[parent_node].child; - for (i = 0; i < arg_index; i++) - current_node = tree_nodes[current_node].next; + int w_arg, e_arg; switch (opf) { case OPF_NONE: @@ -4954,16 +5018,17 @@ sexp_list_item *sexp_tree::get_listing_opf(int opf, int parent_node, int arg_ind break; } - // skip the special argument if we aren't at the right spot in when-argument or - // every-time-argument... meaning if either w_arg or e_arg is >= 1, we can continue - w_arg = find_ancestral_argument_number(OP_WHEN_ARGUMENT, current_node); - e_arg = find_ancestral_argument_number(OP_EVERY_TIME_ARGUMENT, current_node); - if (w_arg < 1 && e_arg < 1 /* && the same for any future _ARGUMENT sexps */ ) { + + // skip OPF_NONE, also skip for OPF_NULL, because it takes no data (though it can take plenty of operators) + if (opf == OPF_NULL || opf == OPF_NONE) { return list; } - // also skip for OPF_NULL, because it takes no data (though it can take plenty of operators) - if (opf == OPF_NULL) { + // skip the special argument if we aren't at the right spot in when-argument or + // every-time-argument... meaning if either w_arg or e_arg is >= 1, we can continue + w_arg = find_ancestral_argument_number(OP_WHEN_ARGUMENT, parent_node); + e_arg = find_ancestral_argument_number(OP_EVERY_TIME_ARGUMENT, parent_node); + if (w_arg < 1 && e_arg < 1 /* && the same for any future _ARGUMENT sexps */ ) { return list; } @@ -5181,11 +5246,6 @@ sexp_list_item *sexp_tree::get_listing_opf_ship(int parent_node) if ( parent_node >= 0 ) { op = get_operator_const(tree_nodes[parent_node].text); - // prune out to only capital ships - if (!stricmp(tree_nodes[parent_node].text, "cap-subsys-cargo-known-delay")) { - require_cap_ship = 1; - } - // get the dock_ship number of if this goal is an ai dock goal. used to prune out unwanted ships out // of the generated ship list dock_ship = -1; @@ -5212,7 +5272,17 @@ sexp_list_item *sexp_tree::get_listing_opf_ship(int parent_node) if ( (dock_ship != ptr->instance) && ship_docking_valid(dock_ship , ptr->instance) ) head.add_data(Ships[ptr->instance].ship_name ); - } else { + } + else if (op == OP_CAP_SUBSYS_CARGO_KNOWN_DELAY) { + if ( ((Ship_info[Ships[ptr->instance].ship_info_index].flags & SIF_HUGE_SHIP) && // big ship + !(Ships[ptr->instance].flags2 & SF2_TOGGLE_SUBSYSTEM_SCANNING) )|| // which is not flagged OR + ((!(Ship_info[Ships[ptr->instance].ship_info_index].flags & SIF_HUGE_SHIP)) && // small ship + (Ships[ptr->instance].flags2 & SF2_TOGGLE_SUBSYSTEM_SCANNING) ) ) { // which is flagged + + head.add_data(Ships[ptr->instance].ship_name); + } + } + else { if ( !require_cap_ship || (Ship_info[Ships[ptr->instance].ship_info_index].flags & SIF_HUGE_SHIP) ) { head.add_data(Ships[ptr->instance].ship_name); } @@ -6282,3 +6352,36 @@ int sexp_tree::get_variable_count(const char *var_name) return count; } + +// Returns the number of times a variable with this name has been used by player loadout +int sexp_tree::get_loadout_variable_count(int var_index) +{ + // we shouldn't be being passed the index of variables that do not exist + Assert (var_index >= 0 && var_index < MAX_SEXP_VARIABLES); + + int idx; + int count = 0; + + for (int i=0; i < MAX_TVT_TEAMS; i++) { + for(idx=0; idxEnableWindow(m_ship_class >= 0); GetDlgItem(IDC_FLAGS)->EnableWindow(TRUE); GetDlgItem(IDC_TEXTURES)->EnableWindow(TRUE); + GetDlgItem(IDC_ALT_SHIP_CLASS)->EnableWindow(TRUE); } else { GetDlgItem(IDC_SHIP_NAME)->EnableWindow(FALSE); GetDlgItem(IDC_SHIP_CLASS)->EnableWindow(FALSE); @@ -1214,6 +1217,7 @@ void CShipEditorDlg::initialize_data(int full_update) GetDlgItem(IDC_WEAPONS)->EnableWindow(FALSE); GetDlgItem(IDC_FLAGS)->EnableWindow(FALSE); GetDlgItem(IDC_TEXTURES)->EnableWindow(FALSE); + GetDlgItem(IDC_ALT_SHIP_CLASS)->EnableWindow(FALSE); } // disable textures for multiple ships @@ -1350,6 +1354,8 @@ int CShipEditorDlg::update_data(int redraw) update_ship(player_ship); } else if (single_ship >= 0) { // editing a single ship + m_ship_name.TrimLeft(); + m_ship_name.TrimRight(); ptr = GET_FIRST(&obj_used_list); while (ptr != END_OF_LIST(&obj_used_list)) { if (((ptr->type == OBJ_SHIP) || (ptr->type == OBJ_START)) && (cur_object_index != OBJ_INDEX(ptr))) { @@ -1531,18 +1537,19 @@ int CShipEditorDlg::update_ship(int ship) } m_score.save(&Ships[ship].score); - int temp_assist; + int temp_assist = -1; m_assist_score.save(&temp_assist); - Ships[ship].assist_score_pct = ((float)temp_assist)/100; - // value must be a percentage - if (Ships[ship].assist_score_pct < 0) { - Ships[ship].assist_score_pct = 0; - MessageBox("Assist Percentage too low. Set to 0. No score will be granted for an assist"); - } - else if (Ships[ship].assist_score_pct > 1) { - Ships[ship].assist_score_pct = 1; - MessageBox("Assist Percentage too high. Set to 1. Assists well score as many points as a kill"); - + if (temp_assist != -1) { + Ships[ship].assist_score_pct = ((float)temp_assist)/100; + // value must be a percentage + if (Ships[ship].assist_score_pct < 0) { + Ships[ship].assist_score_pct = 0; + MessageBox("Assist Percentage too low. Set to 0. No score will be granted for an assist"); + } + else if (Ships[ship].assist_score_pct > 1) { + Ships[ship].assist_score_pct = 1; + MessageBox("Assist Percentage too high. Set to 1. Assists will score as many points as a kill"); + } } if (m_arrival_location != -1) @@ -1750,7 +1757,7 @@ void CShipEditorDlg::OnEndlabeleditArrivalTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_arrival_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_arrival_tree.end_label_edit(pTVDispInfo->item); editing = 0; } @@ -1758,7 +1765,7 @@ void CShipEditorDlg::OnEndlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_departure_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_departure_tree.end_label_edit(pTVDispInfo->item); editing = 0; } @@ -2100,12 +2107,12 @@ void CShipEditorDlg::show_hide_sexp_help() { CRect rect, help; GetDlgItem(IDC_HELP_BOX)->GetWindowRect(help); - float box_size = (help.bottom - help.top); + float box_size = (float)(help.bottom - help.top); if (Show_sexp_help){ - cue_height += box_size; + cue_height += (int)box_size; } else { - cue_height -= box_size; + cue_height -= (int)box_size; } if (((CButton *) GetDlgItem(IDC_HIDE_CUES)) -> GetCheck()){ @@ -2115,9 +2122,9 @@ void CShipEditorDlg::show_hide_sexp_help() GetWindowRect(rect); if (Show_sexp_help){ - rect.bottom += box_size; + rect.bottom += (LONG)box_size; } else { - rect.bottom -= box_size; + rect.bottom -= (LONG)box_size; } MoveWindow(rect); @@ -2482,6 +2489,12 @@ void CShipEditorDlg::OnSpecialHitpoints() dlg.DoModal(); } +void CShipEditorDlg::OnAltShipClass() +{ + AltShipClassDlg dlg; + dlg.DoModal(); +} + // Goober5000 void CShipEditorDlg::OnSetAsPlayerShip() { diff --git a/code/fred2/shipeditordlg.h b/code/fred2/shipeditordlg.h index 7d543c84ca..24701da0bf 100644 --- a/code/fred2/shipeditordlg.h +++ b/code/fred2/shipeditordlg.h @@ -295,6 +295,7 @@ protected: afx_msg void OnSpecialExp(); afx_msg void OnTextures(); afx_msg void OnSpecialHitpoints(); + afx_msg void OnAltShipClass(); afx_msg void OnSetAsPlayerShip(); afx_msg void OnRestrictArrival(); afx_msg void OnRestrictDeparture(); diff --git a/code/fred2/shipflagsdlg.cpp b/code/fred2/shipflagsdlg.cpp index 93c95925a8..dba55a0a34 100644 --- a/code/fred2/shipflagsdlg.cpp +++ b/code/fred2/shipflagsdlg.cpp @@ -69,6 +69,7 @@ void ship_flags_dlg::DoDataExchange(CDataExchange* pDX) DDX_Control(pDX, IDC_NAV_CARRY, m_nav_carry); DDX_Control(pDX, IDC_NAV_NEEDSLINK, m_nav_needslink); DDX_Control(pDX, IDC_HIDE_SHIP_NAME, m_hide_ship_name); + DDX_Control(pDX, IDC_SET_CLASS_DYNAMICALLY, m_set_class_dynamically); //}}AFX_DATA_MAP if (pDX->m_bSaveAndValidate) { // get dialog control values @@ -125,6 +126,7 @@ BEGIN_MESSAGE_MAP(ship_flags_dlg, CDialog) ON_BN_CLICKED(IDC_NAV_CARRY, OnNavCarry) ON_BN_CLICKED(IDC_NAV_NEEDSLINK, OnNavNeedslink) ON_BN_CLICKED(IDC_HIDE_SHIP_NAME, OnHideShipName) + ON_BN_CLICKED(IDC_SET_CLASS_DYNAMICALLY, OnSetClassDynamically) //}}AFX_MSG_MAP END_MESSAGE_MAP() @@ -145,7 +147,8 @@ BOOL ship_flags_dlg::OnInitDialog() int toggle_subsystem_scanning = 0, scannable = 0, kamikaze = 0, no_dynamic = 0, red_alert_carry = 0; int special_warp = 0, disable_messages = 0, guardian = 0, vaporize = 0, stealth = 0, friendly_stealth_invisible = 0; int no_death_scream = 0, always_death_scream = 0; - int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0; + int nav_carry = 0, nav_needslink = 0, hide_ship_name = 0, set_class_dynamically = 0; + object *objp; ship *shipp; bool ship_in_wing = false; @@ -176,6 +179,7 @@ BOOL ship_flags_dlg::OnInitDialog() cargo_known = (shipp->flags & SF_CARGO_REVEALED) ? 1 : 0; no_dynamic = (Ai_info[shipp->ai_index].ai_flags & AIF_NO_DYNAMIC) ? 1 : 0; disable_messages = (shipp->flags2 & SF2_NO_BUILTIN_MESSAGES) ? 1 : 0; + set_class_dynamically = (shipp->flags2 & SF2_SET_CLASS_DYNAMICALLY) ? 1 : 0; no_death_scream = (shipp->flags2 & SF2_NO_DEATH_SCREAM) ? 1 : 0; always_death_scream = (shipp->flags2 & SF2_ALWAYS_DEATH_SCREAM) ? 1 : 0; guardian = (shipp->ship_guardian_threshold) ? 1 : 0; @@ -228,6 +232,7 @@ BOOL ship_flags_dlg::OnInitDialog() cargo_known = tristate_set(shipp->flags & SF_CARGO_REVEALED, cargo_known); no_dynamic = tristate_set( Ai_info[shipp->ai_index].ai_flags & AIF_NO_DYNAMIC, no_dynamic ); disable_messages = tristate_set(shipp->flags2 & SF2_NO_BUILTIN_MESSAGES, disable_messages); + set_class_dynamically = tristate_set(shipp->flags2 & SF2_SET_CLASS_DYNAMICALLY, set_class_dynamically); no_death_scream = tristate_set(shipp->flags2 & SF2_NO_DEATH_SCREAM, no_death_scream); always_death_scream = tristate_set(shipp->flags2 & SF2_ALWAYS_DEATH_SCREAM, always_death_scream); guardian = tristate_set(shipp->ship_guardian_threshold, guardian); @@ -294,6 +299,7 @@ BOOL ship_flags_dlg::OnInitDialog() m_red_alert_carry.SetCheck(red_alert_carry); m_special_warp.SetCheck(special_warp); m_disable_messages.SetCheck(disable_messages); + m_set_class_dynamically.SetCheck(set_class_dynamically); m_no_death_scream.SetCheck(no_death_scream); m_always_death_scream.SetCheck(always_death_scream); m_guardian.SetCheck(guardian); @@ -715,6 +721,22 @@ void ship_flags_dlg::update_ship(int shipnum) break; } + switch (m_set_class_dynamically.GetCheck()) { + case 1: + if ( !(shipp->flags2 & SF2_SET_CLASS_DYNAMICALLY) ) + set_modified(); + + shipp->flags2 |= SF2_SET_CLASS_DYNAMICALLY; + break; + + case 0: + if ( shipp->flags2 & SF2_SET_CLASS_DYNAMICALLY ) + set_modified(); + + shipp->flags2 &= ~SF2_SET_CLASS_DYNAMICALLY; + break; + } + switch (m_no_death_scream.GetCheck()) { case 1: if ( !(shipp->flags2 & SF2_NO_DEATH_SCREAM) ) @@ -1076,6 +1098,14 @@ void ship_flags_dlg::OnDisableBuiltinShip() } } +void ship_flags_dlg::OnSetClassDynamically() +{ + if (m_set_class_dynamically.GetCheck() == 1) { + m_set_class_dynamically.SetCheck(0); + } else { + m_set_class_dynamically.SetCheck(1); + } +} void ship_flags_dlg::OnNoDeathScream() { if (m_no_death_scream.GetCheck() == 1) { diff --git a/code/fred2/shipflagsdlg.h b/code/fred2/shipflagsdlg.h index df395e6556..0c0fa3a8c9 100644 --- a/code/fred2/shipflagsdlg.h +++ b/code/fred2/shipflagsdlg.h @@ -59,6 +59,7 @@ public: CButton m_nav_carry; CButton m_nav_needslink; CButton m_hide_ship_name; + CButton m_set_class_dynamically; CSpinButtonCtrl m_destroy_spin; numeric_edit_control m_kdamage; numeric_edit_control m_destroy_value; @@ -110,6 +111,7 @@ protected: afx_msg void OnNavNeedslink(); afx_msg void OnAltAsCallsign(); afx_msg void OnHideShipName(); + afx_msg void OnSetClassDynamically(); //}}AFX_MSG DECLARE_MESSAGE_MAP() public: diff --git a/code/fred2/shiptexturesdlg.cpp b/code/fred2/shiptexturesdlg.cpp index 034ebd5575..d54d3b6850 100644 --- a/code/fred2/shiptexturesdlg.cpp +++ b/code/fred2/shiptexturesdlg.cpp @@ -204,7 +204,7 @@ BOOL CShipTexturesDlg::OnInitDialog() // check for duplicate textures in list duplicate = -1; - for (int k=0; k= 0) { for (i=0; iitem.hItem, pTVDispInfo->item.pszText); + *pResult = m_arrival_tree.end_label_edit(pTVDispInfo->item); } void wing_editor::OnEndlabeleditDepartureTree(NMHDR* pNMHDR, LRESULT* pResult) { TV_DISPINFO* pTVDispInfo = (TV_DISPINFO*)pNMHDR; - *pResult = m_departure_tree.end_label_edit(pTVDispInfo->item.hItem, pTVDispInfo->item.pszText); + *pResult = m_departure_tree.end_label_edit(pTVDispInfo->item); } int wing_editor::verify() diff --git a/code/freespace2/freespace.cpp b/code/freespace2/freespace.cpp index d88e2fd714..37cf2eb2ed 100644 --- a/code/freespace2/freespace.cpp +++ b/code/freespace2/freespace.cpp @@ -856,7 +856,7 @@ * * Revision 2.73 2004/02/20 18:04:27 randomtiger * Changed memory leak detection to happen after atexit all other calls. - * This will mean it doesnt report leaks that are cleared by just before the game quits by preset functions. + * This will mean it doesn't report leaks that are cleared by just before the game quits by preset functions. * * Revision 2.72 2004/02/20 04:29:53 bobboau * pluged memory leaks, @@ -867,7 +867,7 @@ * Use _REPORT_MEM_LEAKS compile flag in code.lib to get a report of memory leaks from malloc calls. * * Revision 2.70 2004/02/16 11:47:32 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -890,7 +890,7 @@ * * Revision 2.67 2004/01/24 15:52:25 randomtiger * I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window. - * In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. + * In OGL it works perfectly and in both APIs it doesn't switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. * * Revision 2.66 2004/01/23 00:14:27 randomtiger * Fixed serious memory leak causes by use of -pcx32 flag @@ -906,7 +906,7 @@ * Changed target view not to use lower res texture, hi res one is already chached so might as well use it * * Revision 2.63 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -993,7 +993,7 @@ * * Revision 2.47 2003/10/14 17:39:12 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -1096,12 +1096,12 @@ * * I have also taken the opertunity to fix a few bugs in the launcher and add a new feature to make selecting mods a bit easier. * - * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher wont compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. + * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher won't compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. * * I have also removed the internal launcher from the D3D8 module. * Please contact me if you have any problems. * - * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and cant afford to find out. + * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and can't afford to find out. * * Revision 2.32 2003/05/21 20:26:07 phreak * improved chase camera code.. you can now fight using this camera @@ -1161,7 +1161,7 @@ * --Goober5000 * * Revision 2.16 2002/12/21 13:39:03 DTP - * did bit more house keeping. modfied Phreaks fps cmdline a bit, so that we dont have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe + * did bit more house keeping. modfied Phreak's fps cmdline a bit, so that we don't have to specific build code.libs for fred, but can use the same code.lib for both fs2_open.exe and fred2_open.exe * * Revision 2.15 2002/12/18 22:21:23 phreak * tidied up game_init() a bit.. took out a bunch of unneeded ifdefs like E3_BUILD @@ -6296,6 +6296,7 @@ void bars_do_frame(float frametime) //gr_rect(0, 0, gr_screen.max_w, yborder, false); //gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false); //Set clipping + gr_reset_clip(); gr_set_clip(0, yborder, gr_screen.max_w, gr_screen.max_h - yborder*2, false ); } else if(Cutscene_bar_flags & CUB_CUTSCENE) @@ -6305,6 +6306,7 @@ void bars_do_frame(float frametime) //gr_set_color(0,0,0); //gr_rect(0, 0, gr_screen.max_w, yborder, false); //gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false); + gr_reset_clip(); gr_set_clip(0, yborder, gr_screen.max_w, gr_screen.max_h - (yborder*2), false ); } } @@ -6452,14 +6454,8 @@ void game_frame(int paused) DEBUG_GET_TIME( render3_time1 ) camid cid = game_render_frame_setup(); - if (Time_compression_locked) - { - bars_do_frame(flRealframetime); - } - else - { - bars_do_frame(flFrametime); - } + // WMC's cutscene bars function + bars_do_frame(Time_compression_locked ? flRealframetime : flFrametime); game_render_frame( cid ); @@ -7045,13 +7041,15 @@ int game_poll() return 0; } - // If a popup is running, don't process all the Fn keys -// if( popup_active() ) { -// return k; -// } - state = gameseq_get_state(); + // If a popup is running, don't process all the Fn keys + if( popup_active()) { + if (state != GS_STATE_DEATH_BLEW_UP) { + return k; + } + } + // if ( k ) nprintf(( "General", "Key = %x\n", k )); switch (k) { @@ -7081,8 +7079,8 @@ int game_poll() case GS_STATE_OPTIONS_MENU: case GS_STATE_HUD_CONFIG: case GS_STATE_CONTROL_CONFIG: -// case GS_STATE_DEATH_DIED: -// case GS_STATE_DEATH_BLEW_UP: + case GS_STATE_DEATH_DIED: +// case GS_STATE_DEATH_BLEW_UP: // DEATH_BLEW_UP might be okay but do not comment out DEATH_DIED as otherwise no clean up is performed on the dead ship case GS_STATE_VIEW_MEDALS: break; @@ -8085,7 +8083,7 @@ void game_enter_state( int old_state, int new_state ) // Main_hall_netgame_started = 1; // main_hall_do_multi_ready(); //} DTP commented out to keep original source - if ( (Cmdline_start_netgame || (Cmdline_connect_addr != NULL)) && (!Main_hall_netgame_started) /*&& (Game_mode == GM_MULTIPLAYER)*/) { // DTP added "&& (game_mode == GM_multiplayer)" so that ppl dont get thrown into Multiplayer with a Singleplayer Pilot. + if ( (Cmdline_start_netgame || (Cmdline_connect_addr != NULL)) && (!Main_hall_netgame_started) /*&& (Game_mode == GM_MULTIPLAYER)*/) { // DTP added "&& (game_mode == GM_multiplayer)" so that ppl don't get thrown into Multiplayer with a Singleplayer Pilot. Main_hall_netgame_started = 1; main_hall_do_multi_ready(); } @@ -8128,6 +8126,7 @@ void game_enter_state( int old_state, int new_state ) break; case GS_STATE_FICTION_VIEWER: + common_maybe_play_cutscene(MOVIE_PRE_FICTION); fiction_viewer_init(); break; @@ -8135,6 +8134,7 @@ void game_enter_state( int old_state, int new_state ) if (old_state == GS_STATE_OPTIONS_MENU) { cmd_brief_unhold(); } else { + common_maybe_play_cutscene(MOVIE_PRE_CMD_BRIEF); int team_num = 0; // team number used as index for which cmd brief to use. cmd_brief_init(team_num); } @@ -8142,10 +8142,12 @@ void game_enter_state( int old_state, int new_state ) } case GS_STATE_RED_ALERT: + common_maybe_play_cutscene(MOVIE_PRE_BRIEF); red_alert_init(); break; case GS_STATE_BRIEFING: + common_maybe_play_cutscene(MOVIE_PRE_BRIEF); brief_init(); break; @@ -8153,6 +8155,7 @@ void game_enter_state( int old_state, int new_state ) game_stop_looped_sounds(); mission_goal_fail_incomplete(); // fail all incomplete goals before entering debriefing if ( (old_state != GS_STATE_VIEW_MEDALS) && (old_state != GS_STATE_OPTIONS_MENU) ){ + common_maybe_play_cutscene(MOVIE_PRE_DEBRIEF); debrief_init(); } break; @@ -8208,6 +8211,12 @@ void game_enter_state( int old_state, int new_state ) break; case GS_STATE_GAME_PLAY: + + // maybe play a cutscene + if((old_state == GS_STATE_BRIEFING) || (old_state == GS_STATE_SHIP_SELECT) || + (old_state == GS_STATE_WEAPON_SELECT) || (old_state == GS_STATE_RED_ALERT) ) { + common_maybe_play_cutscene(MOVIE_PRE_GAME); + } // reset time compression to default level so it's right at the beginning of a mission - taylor if(old_state != GS_STATE_GAME_PAUSED) { @@ -10727,7 +10736,7 @@ int find_freespace_cd(char *volume_name) } #if !defined(OEM_BUILD) - // oem not on 80 min cds, so dont check tha size + // oem not on 80 min cds, so don't check tha size // check its size uint used_space = game_get_cd_used_space(path); if(used_space < CD_SIZE_72_MINUTE_MAX){ diff --git a/code/gamesnd/eventmusic.cpp b/code/gamesnd/eventmusic.cpp index 5bac534cae..7d49e3f9a7 100644 --- a/code/gamesnd/eventmusic.cpp +++ b/code/gamesnd/eventmusic.cpp @@ -1080,7 +1080,7 @@ int event_music_enemy_arrival() if ( Current_pattern == SONG_DEAD_1 ) return 0; // death is the last song to play - if ( (Current_pattern == SONG_VICT_1) || (Current_pattern == SONG_VICT_1) ) + if ( (Current_pattern == SONG_VICT_1) || (Current_pattern == SONG_VICT_2) ) return 0; if ( Patterns[Current_pattern].next_pattern != Patterns[Current_pattern].default_next_pattern ) @@ -1174,7 +1174,7 @@ int event_music_friendly_arrival() if ( Current_pattern == SONG_DEAD_1 ) return 0; // death is the last song to play - if ( (Current_pattern == SONG_VICT_1) || (Current_pattern == SONG_VICT_1) ) + if ( (Current_pattern == SONG_VICT_1) || (Current_pattern == SONG_VICT_2) ) return 0; // Goober5000 - to avoid array out-of-bounds @@ -1610,7 +1610,7 @@ void parse_menumusic() if(idx < 0 && (nocreate || Num_music_files >= MAX_SPOOLED_MUSIC)) { if(Num_music_files >= MAX_SPOOLED_MUSIC) { - Warning(LOCATION, "Could not load spooled music file after '%s' as maximum number of spooled music was reached (Max is %d)", Spooled_music[Num_music_files].name, MAX_SPOOLED_MUSIC); + Warning(LOCATION, "Could not load spooled music file after '%s' as maximum number of spooled music was reached (Max is %d)", Spooled_music[Num_music_files - 1].name, MAX_SPOOLED_MUSIC); } if(!skip_to_start_of_string_either("$Name:", "#Menu Music End")) { diff --git a/code/globalincs/def_files.cpp b/code/globalincs/def_files.cpp index d522fdd7fd..09937bc006 100644 --- a/code/globalincs/def_files.cpp +++ b/code/globalincs/def_files.cpp @@ -787,7 +787,11 @@ $Max Turret Target Ownage: 3, 4, 7, 12, 19 \n\ \n\ ;; maximum number of turrets on one ship allowed to be attacking the \n\ ;; player at a given time \n\ -$Max Turret Player Ownage: 3, 4, 7, 12, 19 \n""\ +$Max Turret Player Ownage: 3, 4, 7, 12, 19 \n\ + \n\ +;; time delay after bombs have been fired before they can collide \n\ +;; with other weapons (ie. be shot down) \n\ +$Delay Before Allowing Bombs to Be Shot Down: 1.5, 1.5, 1.5, 1.5, 1.5 \n""\ \n\ ;; the minimum percentage of the total assessed damage a player \n\ ;; must inflict in order to be awarded a kill \n\ @@ -799,11 +803,11 @@ $Percentage Required For Assist Scale: 0.15, 0.15, 0.15, 0.15, 0.15 \n\ \n\ ;; in TvT and Coop missions all teammates will be granted this \n\ ;; percentage of the capships score when someone scores a kill \n\ -$Percentage Awarded For Capship Assist: 0.5, 0.5, 0.5, 0.5, 0.5 \n\ +$Percentage Awarded For Capship Assist: 0.1, 0.2, 0.35, 0.5, 0.6 \n\ \n\ -;; time delay after bombs have been fired before they can collide \n\ -;; with other weapons (ie. be shot down) \n\ -$Delay Before Allowing Bombs to Be Shot Down: 1.5, 1.5, 1.5, 1.5, 1.5 \n\ +;; the amount to subtract from the player's score if they are \n\ +;; repaired by a support ship \n\ +$Repair Penalty: 10, 20, 35, 50, 60 \n\ \n\ \n\ ;; General AI-related flags. These were previously all lumped together \n\ diff --git a/code/globalincs/pstypes.h b/code/globalincs/pstypes.h index 05e440be1d..f5c188df76 100644 --- a/code/globalincs/pstypes.h +++ b/code/globalincs/pstypes.h @@ -600,10 +600,14 @@ typedef struct flag_def_list { //This are defined in MainWin.c extern void _cdecl WinAssert(char * text,char *filename, int line); +void _cdecl WinAssert(char * text, char * filename, int linenum, const char * format, ... ); extern void LuaError(struct lua_State *L, char *format=NULL, ...); extern void _cdecl Error( char * filename, int line, const char * format, ... ); extern void _cdecl Warning( char * filename, int line, const char * format, ... ); +extern int Global_warning_count; +extern int Global_error_count; + #include "osapi/outwnd.h" // To debug printf do this: @@ -632,13 +636,28 @@ extern void _cdecl Warning( char * filename, int line, const char * format, ... // the more likely you are to have problems getting it working again. #if defined(NDEBUG) #define Assert(x) do {} while (0) +#ifndef _MSC_VER // non MS compilers +#define Assertion(x, y, ...) do {} while (0) +#else +#define Assertion(x, y) do {} while (0) +#endif #else void gr_activate(int); #define Assert(x) do { if (!(x)){ WinAssert(#x,__FILE__,__LINE__); } } while (0) -#endif -/*******************NEVER UNCOMMENT Assert ************************************************/ -// Goober5000 - shouldn't the above be never COMMENT (that is, never DISABLE) Assert? +// Assertion can only use its proper fuctionality in compilers that support variadic macro +#ifndef _MSC_VER // non MS compilers +#define Assertion(x, y, ...) do { if (!(x)){ WinAssert(#x,__FILE__,__LINE__, y, __VA_ARGS__ ); } } while (0) +#else +#if _MSC_VER >= 1400 // VC 2005 or greater +#define Assertion(x, y, ...) do { if (!(x)){ WinAssert(#x,__FILE__,__LINE__, y, __VA_ARGS__ ); } } while (0) +#else // everything else +#define Assertion(x, y) do { if (!(x)){ WinAssert(#x,__FILE__,__LINE__); } } while (0) +#endif +#endif + +#endif +/*******************NEVER COMMENT Assert ************************************************/ // Goober5000 - define Verify for use in both release and debug mode #define Verify(x) do { if (!(x)){ Error(LOCATION, "Verify failure: %s\n", #x); } } while(0) diff --git a/code/globalincs/version.h b/code/globalincs/version.h index 35e0288fd9..a63df16bd5 100644 --- a/code/globalincs/version.h +++ b/code/globalincs/version.h @@ -171,7 +171,7 @@ #define FS_VERSION_MAJOR 3 // major version #define FS_VERSION_MINOR 6 // increase by 1 for minor revs -#define FS_VERSION_BUILD 10 // bugfix release +#define FS_VERSION_BUILD 11 // bugfix release #define VERSION_LOC_FNAME "version.nfo" #define MOTD_LOC_FNAME "motd.txt" diff --git a/code/globalincs/windebug.cpp b/code/globalincs/windebug.cpp index b35ff30f37..063eae1eb0 100644 --- a/code/globalincs/windebug.cpp +++ b/code/globalincs/windebug.cpp @@ -284,6 +284,9 @@ extern void gr_activate(int active); bool Messagebox_active = false; +int Global_warning_count = 0; +int Global_error_count = 0; + #ifdef _MSC_VER #include @@ -998,7 +1001,7 @@ static DumpBuffer dumpBuffer ; #endif //SHOW_CALL_STACK -char AssertText1[1024]; +char AssertText1[2048]; char AssertText2[1024]; uint flags = MB_SYSTEMMODAL|MB_SETFOREGROUND; @@ -1079,6 +1082,57 @@ void _cdecl WinAssert(char * text, char * filename, int linenum ) Messagebox_active = false; } +void _cdecl WinAssert(char * text, char * filename, int linenum, const char * format, ... ) +{ + int val; + + va_list args; + + va_start(args, format); + vsprintf(AssertText2, format, args); + va_end(args); + + // this stuff migt be really useful for solving bug reports and user errors. We should output it! + mprintf(("ASSERTION: \"%s\" at %s:%d\n %s\n", text, strrchr(filename, '\\')+1, linenum, AssertText2 )); + + if (Cmdline_nowarn) + return; + + Messagebox_active = true; + + gr_activate(0); + + filename = strrchr(filename, '\\')+1; + sprintf( AssertText1, "Assert: %s\r\nFile: %s\r\nLine: %d\r\n%s\r\n", text, filename, linenum, AssertText2 ); + +#ifdef SHOW_CALL_STACK + dumpBuffer.Clear(); + dumpBuffer.Printf( AssertText1 ); + dumpBuffer.Printf( "\r\n" ); + DumpCallsStack( dumpBuffer ) ; + dump_text_to_clipboard(dumpBuffer.buffer); + + dumpBuffer.Printf( "\r\n[ This info is in the clipboard so you can paste it somewhere now ]\r\n" ); + dumpBuffer.Printf( "\r\n\r\nUse Ok to break into Debugger, Cancel to exit.\r\n"); + + val = MessageBox(NULL, dumpBuffer.buffer, "Assertion Failed!", MB_OKCANCEL|flags ); +#else + val = MessageBox(NULL, AssertText1, "Assertion Failed!", MB_OKCANCEL|flags ); +#endif + + if (val == IDCANCEL) + exit(1); +#ifndef INTERPLAYQA + Int3(); +#else + AsmInt3(); +#endif + + gr_activate(1); + + Messagebox_active = false; +} + void LuaDebugPrint(lua_Debug &ar) { dumpBuffer.Printf( "Name:\t\t%s\r\n", ar.name); @@ -1188,6 +1242,8 @@ void LuaError(struct lua_State *L, char *format, ...) void _cdecl Error( char * filename, int line, const char * format, ... ) { + Global_error_count++; + int val; va_list args; @@ -1241,6 +1297,8 @@ void _cdecl Error( char * filename, int line, const char * format, ... ) void _cdecl Warning( char *filename, int line, const char *format, ... ) { + Global_warning_count++; + #ifndef NDEBUG va_list args; int result; diff --git a/code/graphics/2d.cpp b/code/graphics/2d.cpp index 004a53905f..2000a76a14 100644 --- a/code/graphics/2d.cpp +++ b/code/graphics/2d.cpp @@ -290,7 +290,7 @@ * Set D3D fogging to fall back to vertex fog if table fog not supported. * * Revision 2.16 2004/02/16 11:47:32 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -1624,7 +1624,7 @@ void gr_set_shader(shader *shade) // Set the bitmap for the mouse pointer. This is called by the animating mouse // pointer code. // -// The lock parameter just locks basically disables the next call of this function that doesnt +// The lock parameter just locks basically disables the next call of this function that doesn't // have an unlock feature. If adding in more cursor-changing situations, be aware of // unexpected results. You have been warned. // diff --git a/code/graphics/generic.cpp b/code/graphics/generic.cpp index 428f291c7b..1800140069 100644 --- a/code/graphics/generic.cpp +++ b/code/graphics/generic.cpp @@ -33,7 +33,6 @@ void generic_anim_init(generic_anim *ga, char *filename) ga->filename[0] = '\0'; } else { strncpy(ga->filename, filename, MAX_FILENAME_LEN - 1); - ga->filename[strlen(ga->filename)] = '\0'; } ga->first_frame = -1; @@ -48,7 +47,6 @@ void generic_bitmap_init(generic_bitmap *gb, char *filename) gb->filename[0] = '\0'; } else { strncpy(gb->filename, filename, MAX_FILENAME_LEN - 1); - gb->filename[strlen(gb->filename)] = '\0'; } gb->bitmap_id = -1; diff --git a/code/graphics/grd3d.cpp b/code/graphics/grd3d.cpp index e0ef9efe2d..8c3aba11e7 100644 --- a/code/graphics/grd3d.cpp +++ b/code/graphics/grd3d.cpp @@ -199,7 +199,7 @@ * fixing lighting bug I accedently introduced * * Revision 2.54 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -245,7 +245,7 @@ * Put dithering back in for tgas and jpgs * * Revision 2.46 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -345,7 +345,7 @@ * * Revision 2.26 2003/10/14 17:39:13 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -442,12 +442,12 @@ * * I have also taken the opertunity to fix a few bugs in the launcher and add a new feature to make selecting mods a bit easier. * - * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher wont compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. + * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher won't compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. * * I have also removed the internal launcher from the D3D8 module. * Please contact me if you have any problems. * - * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and cant afford to find out. + * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and can't afford to find out. * * Revision 2.12 2003/07/04 02:27:48 phreak * added support for cloaking. @@ -523,7 +523,7 @@ * Revision 2.2.2.22 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.2.2.21 2002/11/04 16:04:20 randomtiger @@ -568,7 +568,7 @@ * * Revision 2.2.2.14 2002/10/20 22:21:48 randomtiger * Some incomplete code to handle background drawing when message boxes are drawn. - * It doesnt work but its a good base for someone to start from. - RT + * It doesn't work but it's a good base for someone to start from. - RT * * Revision 2.2.2.13 2002/10/19 23:56:40 randomtiger * Changed generic bitmap code to allow maximum dimensions to be determined by 3D's engines maximum texture size query. @@ -600,7 +600,7 @@ * Revision 2.2.2.8 2002/10/04 00:48:42 randomtiger * Fixed video memory leaks * Added code to cope with lost device, not tested - * Got rid of some DX5 stuff we definately dont need + * Got rid of some DX5 stuff we definately don't need * Moved some enum's into internal,h because gr_d3d_set_state should be able to be called from any dx file * Cleaned up some stuff - RT * diff --git a/code/graphics/grd3dinternal.h b/code/graphics/grd3dinternal.h index 332f264028..7dbefd9cf9 100644 --- a/code/graphics/grd3dinternal.h +++ b/code/graphics/grd3dinternal.h @@ -168,7 +168,7 @@ * Fixed setup of center_alpha in OGL which was causing crash. * * Revision 2.22 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -206,7 +206,7 @@ * Changed all builds (demo, OEM) to use retail reg path, this means launcher can set all them up successfully. * * Revision 2.16 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -258,7 +258,7 @@ * * Revision 2.8 2003/10/14 17:39:13 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -310,7 +310,7 @@ * Revision 2.1.2.8 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.1.2.7 2002/10/30 22:57:21 randomtiger @@ -329,7 +329,7 @@ * Revision 2.1.2.4 2002/10/04 00:48:42 randomtiger * Fixed video memory leaks * Added code to cope with lost device, not tested - * Got rid of some DX5 stuff we definately dont need + * Got rid of some DX5 stuff we definately don't need * Moved some enum's into internal,h because gr_d3d_set_state should be able to be called from any dx file * Cleaned up some stuff - RT * diff --git a/code/graphics/grd3drender.cpp b/code/graphics/grd3drender.cpp index f65bc69b01..b02b1db9e8 100644 --- a/code/graphics/grd3drender.cpp +++ b/code/graphics/grd3drender.cpp @@ -223,7 +223,7 @@ * Fixed setup of center_alpha in OGL which was causing crash. * * Revision 2.42 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -249,7 +249,7 @@ * Undid my node fix, it introduced a lot of bugs, update again if you have that version. * * Revision 2.38 2003/11/29 10:52:09 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -335,7 +335,7 @@ * * Revision 2.23 2003/10/14 17:39:13 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -489,7 +489,7 @@ * * Revision 2.3.2.13 2002/10/20 22:21:48 randomtiger * Some incomplete code to handle background drawing when message boxes are drawn. - * It doesnt work but its a good base for someone to start from. - RT + * It doesn't work but it's a good base for someone to start from. - RT * * Revision 2.3.2.12 2002/10/16 00:41:38 randomtiger * Fixed small bug that was stopping unactive text from displaying greyed out @@ -517,7 +517,7 @@ * Revision 2.3.2.8 2002/10/04 00:48:42 randomtiger * Fixed video memory leaks * Added code to cope with lost device, not tested - * Got rid of some DX5 stuff we definately dont need + * Got rid of some DX5 stuff we definately don't need * Moved some enum's into internal,h because gr_d3d_set_state should be able to be called from any dx file * Cleaned up some stuff - RT * diff --git a/code/graphics/grd3dsetup.cpp b/code/graphics/grd3dsetup.cpp index b6f64330e5..93ac88d97d 100644 --- a/code/graphics/grd3dsetup.cpp +++ b/code/graphics/grd3dsetup.cpp @@ -1187,7 +1187,7 @@ bool d3d_init_device() D3DCREATE_SOFTWARE_VERTEXPROCESSING}; // Use a pure device if we can, it really speeds things up - // However it means we cant use Get* functions (aside from GetFrontBuffer, GetCaps, etc) + // However it means we can't use Get* functions (aside from GetFrontBuffer, GetCaps, etc) if(got_caps && GlobalD3DVars::d3d_caps.DevCaps & D3DDEVCAPS_PUREDEVICE) { vptypes[0] |= D3DCREATE_PUREDEVICE; mprintf((" Using PURE D3D Device\n")); @@ -1237,7 +1237,7 @@ bool d3d_init_device() sprintf(Device_init_error, "Failed to get init mode"); - // Lets draw attension to this bug which we dont yet understand + // Let's draw attension to this bug which we don't yet understand if(got_caps == false) { sprintf(Device_init_error, @@ -1382,7 +1382,7 @@ bool d3d_inspect_caps() if ( not_good ) { strcpy(Device_init_error, missing_features); - // return false; I dont think it should fail on this - RT + // return false; I don't think it should fail on this - RT } return true; @@ -1611,7 +1611,7 @@ void gr_d3d_cleanup() d3d_tcache_cleanup(); - // Ensures gamma options dont return to the desktop + // Ensures gamma options don't return to the desktop gr_d3d_set_gamma(1.0); // release surfaces diff --git a/code/graphics/grd3dtexture.cpp b/code/graphics/grd3dtexture.cpp index b2d855c360..34a8be50ba 100644 --- a/code/graphics/grd3dtexture.cpp +++ b/code/graphics/grd3dtexture.cpp @@ -156,7 +156,7 @@ * and posably fixed Turnsky's shinemap bug * * Revision 2.30 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -345,7 +345,7 @@ * Revision 2.1.2.20 2002/11/04 21:24:59 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.1.2.19 2002/11/04 03:02:29 randomtiger @@ -411,7 +411,7 @@ * Revision 2.1.2.8 2002/10/04 00:48:42 randomtiger * Fixed video memory leaks * Added code to cope with lost device, not tested - * Got rid of some DX5 stuff we definately dont need + * Got rid of some DX5 stuff we definately don't need * Moved some enum's into internal,h because gr_d3d_set_state should be able to be called from any dx file * Cleaned up some stuff - RT * @@ -803,7 +803,7 @@ void d3d_tcache_get_adjusted_texture_size(int w_in, int h_in, int *w_out, int *h void *d3d_vimage_to_texture(int bitmap_type, int bpp, void *thandle, ushort *data, int src_w, int src_h, int *tex_w, int *tex_h, float *u_scale, float *v_scale, int reload) { - // Dont prepare + // Don't prepare bool use_mipmapping = (bitmap_type != TCACHE_TYPE_INTERFACE); if(Cmdline_mipmap == 0) { @@ -1247,7 +1247,7 @@ void d3d_tcache_init() D3D_pow2_textures = (GlobalD3DVars::d3d_caps.TextureCaps & D3DPTEXTURECAPS_POW2) ? 1 : 0; - // RT I dont think wide surfaces are supported in D3D8 so we need this code + // RT I don't think wide surfaces are supported in D3D8 so we need this code if(0) { if ( D3D_max_texture_width > gr_screen.max_w ) { diff --git a/code/graphics/grinternal.h b/code/graphics/grinternal.h index a40216005b..b00a4b59a6 100644 --- a/code/graphics/grinternal.h +++ b/code/graphics/grinternal.h @@ -111,7 +111,7 @@ * added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this * * Revision 2.3 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. diff --git a/code/graphics/gropengl.cpp b/code/graphics/gropengl.cpp index 09a8d6ae72..c6d420ed4f 100644 --- a/code/graphics/gropengl.cpp +++ b/code/graphics/gropengl.cpp @@ -620,7 +620,7 @@ * * Revision 2.61 2004/02/13 04:17:12 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -721,7 +721,7 @@ * * Revision 2.35 2003/10/14 17:39:13 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -1799,7 +1799,7 @@ void gr_opengl_fog_set(int fog_mode, int r, int g, int b, float fog_near, float glFogf(GL_FOG_DISTANCE_MODE_NV, GL_EYE_RADIAL_NV); glFogf(GL_FOG_COORDINATE_SOURCE, GL_FRAGMENT_DEPTH); } - // Um.. this is not the correct way to fog in software, probably doesnt matter though + // Um.. this is not the correct way to fog in software, probably doesn't matter though else if ( (OGL_fogmode == 2) && Cmdline_nohtl ) { glFogf(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); fog_near *= fog_near; // it's faster this way @@ -2735,7 +2735,8 @@ int opengl_init_display_device() return 1; } - if ( !(GL_render_context = wglCreateContext(GL_device_context)) ) { + GL_render_context = wglCreateContext(GL_device_context); + if ( !GL_render_context ) { MessageBox(wnd, "Unable to create rendering context for OpenGL W32!", "error", MB_ICONERROR | MB_OK); return 1; } diff --git a/code/graphics/gropengldraw.cpp b/code/graphics/gropengldraw.cpp index 0c7091aed2..55c7e5d1a6 100644 --- a/code/graphics/gropengldraw.cpp +++ b/code/graphics/gropengldraw.cpp @@ -1108,7 +1108,7 @@ void gr_opengl_tmapper(int nverts, vertex **verts, uint flags) #define FIND_SCALED_NUM(x, x0, x1, y0, y1) ( ((((x) - (x0)) * ((y1) - (y0))) / ((x1) - (x0))) + (y0) ) -void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap) +void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap = false) { float x0, y0, x1, y1; float u0, v0, u1, v1; @@ -1234,10 +1234,14 @@ void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap) v[3].spec_g = 0; v[3].spec_b = 0; - if (bw_bitmap == false) - opengl_tmapper_internal(4, vl, TMAP_FLAG_TEXTURED, 1); + if (!bw_bitmap) + { + opengl_tmapper_internal( 4, vl, TMAP_FLAG_TEXTURED, 1 ); + } else - opengl_tmapper_internal(4, vl, ( TMAP_FLAG_TEXTURED | TMAP_FLAG_BW_TEXTURE ), 1); + { + opengl_tmapper_internal( 4, vl,( TMAP_FLAG_TEXTURED | TMAP_FLAG_BW_TEXTURE ), 1 ); + } } diff --git a/code/graphics/gropengldraw.h b/code/graphics/gropengldraw.h index a011f56523..6ccf3b83e0 100644 --- a/code/graphics/gropengldraw.h +++ b/code/graphics/gropengldraw.h @@ -32,7 +32,7 @@ void gr_opengl_pixel(int x, int y, bool resize); void gr_opengl_gradient(int x1, int y1, int x2, int y2, bool resize); void gr_opengl_circle(int xc, int yc, int d, bool resize); void gr_opengl_curve(int xc, int yc, int r, int direction); -void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap = false); +void gr_opengl_scaler(vertex *va, vertex *vb, bool bw_bitmap ); void gr_opengl_cross_fade(int bmap1, int bmap2, int x1, int y1, int x2, int y2, float pct); void gr_opengl_shade(int x, int y, int w, int h, bool resize); void gr_opengl_flash(int r, int g, int b); diff --git a/code/graphics/gropenglstate.cpp b/code/graphics/gropenglstate.cpp index ddeb5777d8..57ebf29f1b 100644 --- a/code/graphics/gropenglstate.cpp +++ b/code/graphics/gropenglstate.cpp @@ -743,19 +743,19 @@ void opengl_setup_render_states(int &r, int &g, int &b, int &alpha, int &tmap_ty tmap_type = TCACHE_TYPE_NORMAL; if (flags & TMAP_FLAG_TEXTURED) { - if (flags & TMAP_FLAG_BW_TEXTURE) { - r = gr_screen.current_color.red; - g = gr_screen.current_color.green; - b = gr_screen.current_color.blue; - } else { - r = g = b = 255; - } + r = g = b = 255; } else { r = gr_screen.current_color.red; g = gr_screen.current_color.green; b = gr_screen.current_color.blue; } + if (flags & TMAP_FLAG_BW_TEXTURE) { + r = gr_screen.current_color.red; + g = gr_screen.current_color.green; + b = gr_screen.current_color.blue; + } + if ( gr_screen.current_alphablend_mode == GR_ALPHABLEND_FILTER ) { if ( (gr_screen.current_bitmap >= 0) && bm_has_alpha_channel(gr_screen.current_bitmap) ) { tmap_type = TCACHE_TYPE_XPARENT; diff --git a/code/graphics/gropengltnl.cpp b/code/graphics/gropengltnl.cpp index 2a5593ebca..c5d9fe3892 100644 --- a/code/graphics/gropengltnl.cpp +++ b/code/graphics/gropengltnl.cpp @@ -1536,11 +1536,11 @@ static bool GL_scale_matrix_set = false; void gr_opengl_push_scale_matrix(vec3d *scale_factor) { - if (GL_scale_matrix_set) - { - Int3(); - return; - } + if (GL_scale_matrix_set) + { + Int3(); + return; + } glMatrixMode(GL_MODELVIEW); glPushMatrix(); @@ -1552,11 +1552,11 @@ void gr_opengl_push_scale_matrix(vec3d *scale_factor) void gr_opengl_pop_scale_matrix() { - if (GL_scale_matrix_set) - { - Int3(); - return; - } + if (GL_scale_matrix_set) + { + Int3(); + return; + } glMatrixMode(GL_MODELVIEW); glPopMatrix(); diff --git a/code/graphics/tmapper.h b/code/graphics/tmapper.h index 385f5f7bb1..904b4cf983 100644 --- a/code/graphics/tmapper.h +++ b/code/graphics/tmapper.h @@ -78,7 +78,7 @@ * --Goober5000 * * Revision 2.6 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -241,7 +241,8 @@ extern void grx_tmapper( int nv, vertex * verts[], uint flags ); #define TMAP_FLAG_QUADSTRIP (1<<17) // use greyscale texture -#define TMAP_FLAG_BW_TEXTURE (1<<16) +#define TMAP_FLAG_BW_TEXTURE (1<<18) + #define TMAP_ADDRESS_WRAP 1 #define TMAP_ADDRESS_MIRROR 2 diff --git a/code/hud/hud.cpp b/code/hud/hud.cpp index bb4839f3f1..b762a46e07 100644 --- a/code/hud/hud.cpp +++ b/code/hud/hud.cpp @@ -649,8 +649,6 @@ #define HUD_NEW_ALPHA_NORMAL_HI 190 #define HUD_NEW_ALPHA_BRIGHT_HI 255 -struct lua_hud_inf lua_hud_info; - // Externals not related to the HUD code itself extern float View_zoom; @@ -1912,10 +1910,6 @@ void HUD_render_2d(float frametime) hud_set_default_color(); } #endif - - // reset the lua show gauge flags - lua_hud_info.ets_drawn = 0; - lua_hud_info.ab_drawn = 0; if (!(Viewer_mode & (VM_EXTERNAL | VM_DEAD_VIEW | VM_WARP_CHASE | VM_PADLOCK_ANY ))) { diff --git a/code/hud/hud.h b/code/hud/hud.h index 990da1e751..c838767cc3 100644 --- a/code/hud/hud.h +++ b/code/hud/hud.h @@ -358,16 +358,6 @@ typedef struct hud_frames { extern int HUD_draw; extern int HUD_contrast; -struct lua_hud_inf { - // ets_data - int ets_drawn; - int ets_engine; - int ets_shield; - int ets_guns; - // ab data - int ab_drawn; - float ab_pct; -}; //Current HUD to use for info -C #ifndef NEW_HUD diff --git a/code/hud/hudbrackets.cpp b/code/hud/hudbrackets.cpp index 3f488d00c0..b0765a90c0 100644 --- a/code/hud/hudbrackets.cpp +++ b/code/hud/hudbrackets.cpp @@ -128,7 +128,7 @@ * * * 6 8/03/99 5:35p Andsager - * Dont draw target dot for instructor in training mission + * Don't draw target dot for instructor in training mission * * 5 6/07/99 4:20p Andsager * Add HUD color for tagged object. Apply to target and radar. @@ -839,7 +839,6 @@ void draw_bounding_brackets(int x1, int y1, int x2, int y2, int w_correction, in char* tinfo_class = NULL; char temp_name[NAME_LENGTH*2+3]; char temp_class[NAME_LENGTH]; - char empty='\0'; switch(t_objp->type) { diff --git a/code/hud/hudets.cpp b/code/hud/hudets.cpp index 205854952f..d73e567597 100644 --- a/code/hud/hudets.cpp +++ b/code/hud/hudets.cpp @@ -269,8 +269,6 @@ typedef struct ets_gauge_info int bottom_coords[2]; } ets_gauge_info; -extern lua_hud_inf lua_hud_info; - ets_gauge_info Ets_gauge_info_german[GR_NUM_RESOLUTIONS][3] = { { // GR_640 @@ -417,36 +415,9 @@ void update_ets(object* objp, float fl_frametime) shield_add_strength(objp, shield_delta); - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - int i; - float total_shield_strength = shield_get_strength(objp); - float max_shield_recharge = ship_p->ship_max_shield_strength * ship_p->max_shield_recharge_pct; - float shield_balance = 1.0f; - - if ((max_shield_recharge > 0) && (total_shield_strength > max_shield_recharge)) - shield_balance = total_shield_strength/max_shield_recharge; - - // prevent any of the segments from going over the limits - for (i = 0; i < n_shd_sections; i++ ) { - if ((total_shield_strength > 0.0f) && (ship_p->ship_max_shield_segment[i] > 0.0f)) { - objp->shield_quadrant[i] /= shield_balance; - if ( (_ss = shield_get_quad(objp,i)) > ship_p->ship_max_shield_segment[i] ){ - objp->shield_quadrant[i] *= ship_p->ship_max_shield_segment[i] / _ss; - } - } else { - objp->shield_quadrant[i] = 0.0f; + if ( (_ss = shield_get_strength(objp)) > ship_p->ship_max_shield_strength ){ + for (int i=0; ishield_quadrant[i] *= ship_p->ship_max_shield_strength / _ss; } } @@ -617,7 +588,6 @@ void hud_show_ets() if (i >= 2) return; hud_set_gauge_color(HUD_ETS_GAUGE); - lua_hud_info.ets_drawn = 1; // draw the letters for the gauges first, before any clipping occurs i = 0; @@ -647,7 +617,6 @@ void hud_show_ets() switch (j) { case 0: index = ship_p->weapon_recharge_index; - lua_hud_info.ets_guns = index; if ( !ship_has_energy_weapons(ship_p) ) { continue; @@ -655,7 +624,6 @@ void hud_show_ets() break; case 1: index = ship_p->shield_recharge_index; - lua_hud_info.ets_shield = index; if ( Player_obj->flags & OF_NO_SHIELDS ) { continue; @@ -663,7 +631,6 @@ void hud_show_ets() break; case 2: index = ship_p->engine_recharge_index; - lua_hud_info.ets_engine = index; if ( !ship_has_engine_power(ship_p) ) { continue; diff --git a/code/hud/hudlock.cpp b/code/hud/hudlock.cpp index 0837b73027..8f9b7c00cd 100644 --- a/code/hud/hudlock.cpp +++ b/code/hud/hudlock.cpp @@ -971,7 +971,7 @@ void hud_draw_lock_triangles(int center_x, int center_y, float frametime) // reset timestamp Lock_gauge_draw_stamp = timestamp(1000 / (2 * LOCK_GAUGE_BLINK_RATE)); - // switch between draw and dont-draw + // switch between draw and don't-draw Lock_gauge_draw = !Lock_gauge_draw; } diff --git a/code/hud/hudparse.cpp b/code/hud/hudparse.cpp index fc71a285df..8ad1edd5e0 100644 --- a/code/hud/hudparse.cpp +++ b/code/hud/hudparse.cpp @@ -205,6 +205,7 @@ #include "hud/hudparse.h" //Duh. #include "ship/ship.h" //for ship struct #include "graphics/font.h" //for gr_force_fit_string +#include "hud/hudtargetbox.h" //Global stuffs @@ -980,6 +981,17 @@ void parse_hud_gauges_tbl(char *filename) } } + if (optional_string("$Wireframe Targetbox:")) { + stuff_int(&Targetbox_wire); + if ((Targetbox_wire < 0) || (Targetbox_wire > 2)) { + Targetbox_wire = 0; + } + } + + if (optional_string("$Lock Wireframe Mode:")) { + stuff_boolean(&Lock_targetbox_mode); + } + if(optional_string("$Reticle Style:")) { int temp = required_string_either("FS1", "FS2"); diff --git a/code/hud/hudshield.cpp b/code/hud/hudshield.cpp index f255650d60..fa9dc87a83 100644 --- a/code/hud/hudshield.cpp +++ b/code/hud/hudshield.cpp @@ -672,7 +672,8 @@ void hud_shield_show(object *objp) // draw the four quadrants // // Draw shield quadrants at one of NUM_SHIELD_LEVELS - + max_shield = get_max_shield_quad(objp); + int j, x_val, y_val, mid_val; for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { @@ -681,24 +682,12 @@ void hud_shield_show(object *objp) break; } - int segment = i; - if (objp->n_shield_segments == 1) { - if (i > 0) - break; - } else if ((objp->n_shield_segments == 2) && (i > 1)) { - break; - } else { - segment = Quadrant_xlate[i]; - } - - if ( objp->shield_quadrant[segment] < 0.1f ) { + if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) { continue; } - max_shield = get_max_shield_quad(objp,segment); - range = MAX(HUD_COLOR_ALPHA_MAX, HUD_color_alpha + 4); - hud_color_index = fl2i( (objp->shield_quadrant[segment] / max_shield) * range); + hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range); Assert(hud_color_index >= 0 && hud_color_index <= range); if ( hud_color_index < 0 ) { @@ -915,26 +904,10 @@ void hud_shield_equalize(object *objp, player *pl) if (objp->flags & OF_NO_SHIELDS) return; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - // are all quadrants equal? all_equal = 1; - for (idx = 0; idx < n_shd_sections - 1; idx++) { - if ((Ships[objp->instance].ship_max_shield_segment[idx] == 0) || (Ships[objp->instance].ship_max_shield_segment[idx + 1] == 0)) { - all_equal = 0; - break; - } - if ((objp->shield_quadrant[idx]/Ships[objp->instance].ship_max_shield_segment[idx]) != (objp->shield_quadrant[idx + 1]/Ships[objp->instance].ship_max_shield_segment[idx + 1])) { + for (idx = 0; idx < MAX_SHIELD_SECTIONS - 1; idx++) { + if (objp->shield_quadrant[idx] != objp->shield_quadrant[idx + 1]) { all_equal = 0; break; } @@ -954,11 +927,8 @@ void hud_shield_equalize(object *objp, player *pl) // reset the penalty timestamp pl->shield_penalty_stamp = timestamp(1000); } - - float shield_str_pct = strength / Ships[objp->instance].ship_max_shield_strength; - for (idx = 0; idx < n_shd_sections; idx++) { - shield_set_quad(objp,idx, shield_str_pct * Ships[objp->instance].ship_max_shield_segment[idx]); - } + + shield_set_strength(objp, strength); // beep if (objp == Player_obj) { @@ -987,28 +957,11 @@ void hud_augment_shield_quadrant(object *objp, int direction) float max_quadrant_val; int i; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return; - case 2: - n_shd_sections = 2; - if (direction == 0) - direction = 4; - direction--; - if (direction > 1) - return; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - Assert(direction >= 0 && direction < n_shd_sections); + Assert(direction >= 0 && direction < MAX_SHIELD_SECTIONS); Assert(objp->type == OBJ_SHIP); xfer_amount = Ships[objp->instance].ship_max_shield_strength * SHIELD_TRANSFER_PERCENT; - max_quadrant_val = get_max_shield_quad(objp,direction); + max_quadrant_val = get_max_shield_quad(objp); if ( (objp->shield_quadrant[direction] + xfer_amount) > max_quadrant_val ) xfer_amount = max_quadrant_val - objp->shield_quadrant[direction]; @@ -1023,7 +976,7 @@ void hud_augment_shield_quadrant(object *objp, int direction) } energy_avail = 0.0f; - for ( i = 0; i < n_shd_sections; i++ ) { + for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { if ( i == direction ) continue; energy_avail += objp->shield_quadrant[i]; @@ -1033,7 +986,7 @@ void hud_augment_shield_quadrant(object *objp, int direction) if ( percent_to_take > 1.0f ) percent_to_take = 1.0f; - for ( i = 0; i < n_shd_sections; i++ ) { + for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { if ( i == direction ) continue; delta = percent_to_take * objp->shield_quadrant[i]; @@ -1143,8 +1096,7 @@ void hud_shield_show_mini(object *objp, int x_force, int y_force, int x_hull_off // draw the four quadrants // Draw shield quadrants at one of NUM_SHIELD_LEVELS - - bool single_segment_flash = false; + max_shield = get_max_shield_quad(objp); for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { @@ -1152,49 +1104,18 @@ void hud_shield_show_mini(object *objp, int x_force, int y_force, int x_hull_off break; } - max_shield = get_max_shield_quad(objp,Quadrant_xlate[i]); - - bool single_segment = false; - if (objp->n_shield_segments == 1) - single_segment = true; - - if (single_segment) { - if ( objp->shield_quadrant[0] < 0.1f ) { - break; - } - } else if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) { + if ( objp->shield_quadrant[Quadrant_xlate[i]] < 0.1f ) { continue; } - int segment = i; - - if (objp->n_shield_segments == 2) { - if (i == 1) - segment = 0; - if (i == 0) - segment = 2; - } - - frame_offset = segment; - - if (single_segment) { - if ( hud_shield_maybe_flash(HUD_TARGET_MINI_ICON, SHIELD_HIT_TARGET, 1) ) { - single_segment_flash = true; - } - if (single_segment_flash) { - frame_offset = i+MAX_SHIELD_SECTIONS; - } - } else if ( hud_shield_maybe_flash(HUD_TARGET_MINI_ICON, SHIELD_HIT_TARGET, i) ) { - frame_offset = segment+MAX_SHIELD_SECTIONS; + if ( hud_shield_maybe_flash(HUD_TARGET_MINI_ICON, SHIELD_HIT_TARGET, i) ) { + frame_offset = i+MAX_SHIELD_SECTIONS; + } else { + frame_offset = i; } range = HUD_color_alpha; - - if (single_segment) - hud_color_index = fl2i( (objp->shield_quadrant[0] / max_shield) * range + 0.5); - else - hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range + 0.5); - + hud_color_index = fl2i( (objp->shield_quadrant[Quadrant_xlate[i]] / max_shield) * range + 0.5); Assert(hud_color_index >= 0 && hud_color_index <= range); if ( hud_color_index < 0 ) { diff --git a/code/hud/hudsquadmsg.cpp b/code/hud/hudsquadmsg.cpp index c531a38019..7acb431685 100644 --- a/code/hud/hudsquadmsg.cpp +++ b/code/hud/hudsquadmsg.cpp @@ -880,6 +880,7 @@ int hud_squadmsg_count_wings( int add_to_menu ) if ( add_to_menu ) { Assert ( Num_menu_items < MAX_MENU_ITEMS ); strcpy( MsgItems[Num_menu_items].text, Wings[wingnum].name ); + end_string_at_first_hash_symbol(MsgItems[Num_menu_items].text); MsgItems[Num_menu_items].instance = wingnum; MsgItems[Num_menu_items].active = 1; Num_menu_items++; @@ -901,6 +902,7 @@ int hud_squadmsg_count_wings( int add_to_menu ) if ( add_to_menu ) { Assert ( Num_menu_items < MAX_MENU_ITEMS ); strcpy( MsgItems[Num_menu_items].text, Wings[i].name ); + end_string_at_first_hash_symbol(MsgItems[Num_menu_items].text); MsgItems[Num_menu_items].instance = i; MsgItems[Num_menu_items].active = 1; Num_menu_items++; @@ -1205,6 +1207,9 @@ void hud_squadmsg_repair_rearm( int toggle_state, object *objp) if (multi_player_num != -1) { multi_player_team = Net_players[multi_player_num].p_info.team; } + else { + multi_player_team = -1; + } } // see if player is already scheduled on arriving support ship. If so, issues appripriate @@ -1410,7 +1415,7 @@ void hud_squadmsg_send_to_all_fighters( int command, int player_num ) { ai_info *aip; ship *shipp, *ordering_shipp; - int i, send_message, special_index = -1; + int i, send_message; object *objp; // quick short circuit here because of actually showing comm menu even though you cannot message. @@ -2254,7 +2259,7 @@ void hud_squadmsg_ship_select() // we must convert the Msg_shortcut_command value to a value that the message // system normally uses to select a command. Since the menu //Assert( Msg_shortcut_command != IGNORE_TARGET_ITEM ); - hud_squadmsg_send_ship_command( MsgItems[First_menu_item+k].instance, Msg_shortcut_command, 1, SQUADMSG_HISTORY_ADD_ENTRY ); + hud_squadmsg_send_ship_command( MsgItems[First_menu_item+k].instance, Msg_shortcut_command, 1, SQUADMSG_HISTORY_ADD_ENTRY); hud_squadmsg_toggle(); } } @@ -2395,6 +2400,7 @@ void hud_squadmsg_reinforcement_select() Assert ( Num_menu_items < MAX_MENU_ITEMS ); strcpy( MsgItems[Num_menu_items].text, rp->name ); + end_string_at_first_hash_symbol(MsgItems[Num_menu_items].text); MsgItems[Num_menu_items].instance = i; MsgItems[Num_menu_items].active = 0; diff --git a/code/hud/hudtarget.cpp b/code/hud/hudtarget.cpp index f91740ae13..6f47c9443a 100644 --- a/code/hud/hudtarget.cpp +++ b/code/hud/hudtarget.cpp @@ -719,8 +719,6 @@ typedef struct _reticle_list { int flags; } reticle_list; -extern lua_hud_inf lua_hud_info; - #define RESET_TARGET_IN_RETICLE 750 int Reticle_save_timestamp; reticle_list Reticle_cur_list; @@ -2088,19 +2086,19 @@ void hud_target_missile(object *source_obj, int next_flag) if ( !target_found ) { // if no bomb is found, search for bombers - ship_obj *start, *so; + ship_obj *startShip, *so; if ( (aip->target_objnum != -1) && (Objects[aip->target_objnum].type == OBJ_SHIP) && ((Ship_info[Ships[Objects[aip->target_objnum].instance].ship_info_index].flags & SIF_BOMBER) || (Objects[aip->target_objnum].flags & OF_TARGETABLE_AS_BOMB))) { int index = Ships[Objects[aip->target_objnum].instance].ship_list_index; - start = get_ship_obj_ptr_from_index(index); + startShip = get_ship_obj_ptr_from_index(index); } else { - start = GET_FIRST(&Ship_obj_list); + startShip = GET_FIRST(&Ship_obj_list); } - for (so=advance_ship(start, next_flag); so!=start; so=advance_ship(so, next_flag)) { + for (so=advance_ship(startShip, next_flag); so!=startShip; so=advance_ship(so, next_flag)) { A = &Objects[so->objnum]; // don't look at header @@ -2771,7 +2769,7 @@ void evaluate_ship_as_closest_target(esct *esct) } // If no turret is attacking, check if objp is actually targetting attacked_objnum - // dont bail if targeting is for player + // don't bail if targeting is for player if ( !targeting_player && !turret_is_attacking ) { ai_info *aip = &Ai_info[esct->shipp->ai_index]; @@ -2968,7 +2966,8 @@ void hud_update_closest_turret() // void hud_target_targets_target() { - object *objp; + object *objp = NULL; + object *tt_objp = NULL; int tt_objnum; if ( Player_ai->target_objnum < 0 || Player_ai->target_objnum >= MAX_OBJECTS ) { @@ -2980,14 +2979,6 @@ void hud_target_targets_target() goto ttt_fail; } - if (hud_target_invalid_awacs(objp)) { - goto ttt_fail; - } - - if ( Ships[objp->instance].flags & TARGET_SHIP_IGNORE_FLAGS ) { - goto ttt_fail; - } - tt_objnum = Ai_info[Ships[objp->instance].ai_index].target_objnum; if ( tt_objnum < 0 || tt_objnum >= MAX_OBJECTS ) { goto ttt_fail; @@ -2997,6 +2988,20 @@ void hud_target_targets_target() goto ttt_fail; } + tt_objp = &Objects[tt_objnum]; + + if (hud_target_invalid_awacs(tt_objp)) { + goto ttt_fail; + } + + if ( tt_objp->type != OBJ_SHIP ) { + goto ttt_fail; + } + + if ( Ships[tt_objp->instance].flags & TARGET_SHIP_IGNORE_FLAGS ) { + goto ttt_fail; + } + // if we've reached here, found player target's target set_target_objnum( Player_ai, tt_objnum ); if (Objects[tt_objnum].type == OBJ_SHIP) { @@ -4307,7 +4312,7 @@ void hud_show_hostile_triangle() aip = &Ai_info[Ships[A->instance].ai_index]; - // dont look at ignore ships + // don't look at ignore ships if ( sp->flags & TARGET_SHIP_IGNORE_FLAGS ) { continue; } @@ -5393,9 +5398,6 @@ void hud_show_afterburner_gauge() if ( percent_left > 1 ) { percent_left = 1.0f; } - - lua_hud_info.ab_drawn = 1; - lua_hud_info.ab_pct = percent_left; clip_h = fl2i( (1.0f - percent_left) * current_hud->Aburn_size[0] + 0.5f ); diff --git a/code/hud/hudtargetbox.cpp b/code/hud/hudtargetbox.cpp index a7e8da85bc..ed852a6b26 100644 --- a/code/hud/hudtargetbox.cpp +++ b/code/hud/hudtargetbox.cpp @@ -330,7 +330,7 @@ * revised the subsystem localization * * 27 9/14/99 11:03p Jefff - * dont draw target names from # on (weapons case) + * don't draw target names from # on (weapons case) * * 26 9/04/99 5:17p Andsager * Make event log record name of destroyed subsytem, and use this name for @@ -664,7 +664,8 @@ int Targetbox_flash_flags; // during the game. int Targetbox_show_extra_info = 1; -int Targetbox_wire=0; +int Targetbox_wire = 0; +bool Lock_targetbox_mode = false; // Different target states. This drives the text display right below the hull integrity on the targetbox. #define TS_DIS 0 @@ -1720,7 +1721,7 @@ void hud_render_target_debris(object *target_objp) hud_render_target_setup(&camera_eye, &camera_orient, 0.5f); model_clear_instance(debrisp->model_num); - // This calls the colour that doesnt get reset + // This calls the colour that doesn't get reset submodel_render( debrisp->model_num, debrisp->submodel_num, &target_objp->orient, &obj_pos, flags | MR_NO_LIGHTING | MR_LOCK_DETAIL | MR_NO_FOGGING ); hud_render_target_close(); } diff --git a/code/hud/hudtargetbox.h b/code/hud/hudtargetbox.h index 30fe12b11e..a9e288c7b1 100644 --- a/code/hud/hudtargetbox.h +++ b/code/hud/hudtargetbox.h @@ -172,6 +172,7 @@ extern int Targetbox_show_extra_info; //used to track if the player has wireframe hud target box turned on extern int Targetbox_wire; +extern bool Lock_targetbox_mode; void hud_targetbox_init(); void hud_targetbox_init_flash(); diff --git a/code/hud/hudwingmanstatus.cpp b/code/hud/hudwingmanstatus.cpp index 2b3af7b67f..19e25ba319 100644 --- a/code/hud/hudwingmanstatus.cpp +++ b/code/hud/hudwingmanstatus.cpp @@ -279,23 +279,6 @@ int HUD_wingman_right_coords[GR_NUM_RESOLUTIONS][5][2] = { } }; -// special coordinates if only one wing is present -int HUD_wingman_status_single_coords[GR_NUM_RESOLUTIONS][4][2] = -{ - { // GR_640 - {589,159}, // where to draw dots 1 - 4 if we have only one wing present (special case) - {582,167}, - {596,167}, - {589,175}, - }, - { // GR_1024 - {971,159}, - {964,167}, - {978,167}, - {971,175}, - } -}; - int HUD_wingman_status_name_coords[GR_NUM_RESOLUTIONS][MAX_SQUADRON_WINGS][2] = { { // GR_640 @@ -314,6 +297,27 @@ int HUD_wingman_status_name_coords[GR_NUM_RESOLUTIONS][MAX_SQUADRON_WINGS][2] = } }; +// special coordinates if only one wing is present +int HUD_wingman_status_single_coords[GR_NUM_RESOLUTIONS][MAX_SHIPS_PER_WING][2] = +{ + { // GR_640 + {589,159}, // where to draw dots if we have only one wing present (special case) + {582,167}, + {596,167}, + {589,175}, + {578,175}, + {600,175}, + }, + { // GR_1024 + {971,159}, + {964,167}, + {978,167}, + {971,175}, + {960,175}, + {982,175}, + } +}; + int HUD_wingman_status_coords[GR_NUM_RESOLUTIONS][MAX_SQUADRON_WINGS][MAX_SHIPS_PER_WING][2] = { // we will only ever display up to 5 wings diff --git a/code/iff_defs/iff_defs.cpp b/code/iff_defs/iff_defs.cpp index 62ff9f5544..b9f1b16d65 100644 --- a/code/iff_defs/iff_defs.cpp +++ b/code/iff_defs/iff_defs.cpp @@ -160,6 +160,9 @@ void iff_init() int num_attack_names[MAX_IFFS]; int num_observed_colors[MAX_IFFS]; + int i = 0; + int j = 0; + int string_idx; int rval; if ((rval = setjmp(parse_abort)) != 0) @@ -223,15 +226,16 @@ void iff_init() // init radar blips colour table - int i,j,k,a_bright,a_dim; + int iLoop,jLoop,kLoop; + int a_bright,a_dim; bool alternate_blip_color; - for (i=0;i<5;i++) + for (iLoop=0;iLoop<5;iLoop++) { - for (j=0;j<2;j++) + for (jLoop=0;jLoop<2;jLoop++) { - for (k=0;k<3;k++) + for (kLoop=0;kLoop<3;kLoop++) { - radar_iff_color[i][j][k] = -1; + radar_iff_color[iLoop][jLoop][kLoop] = -1; } } } @@ -408,24 +412,23 @@ void iff_init() iff->flags = 0; if (optional_string("$Flags:")) { - int i; char flag_strings[MAX_IFF_FLAGS][NAME_LENGTH]; int num_strings = stuff_string_list(flag_strings, MAX_IFF_FLAGS); - for (i = 0; i < num_strings; i++) + for (string_idx = 0; string_idx < num_strings; string_idx++) { - if (!stricmp(NOX("support allowed"), flag_strings[i])) + if (!stricmp(NOX("support allowed"), flag_strings[string_idx])) iff->flags |= IFFF_SUPPORT_ALLOWED; - else if (!stricmp(NOX("exempt from all teams at war"), flag_strings[i])) + else if (!stricmp(NOX("exempt from all teams at war"), flag_strings[string_idx])) iff->flags |= IFFF_EXEMPT_FROM_ALL_TEAMS_AT_WAR; - else if (!stricmp(NOX("orders hidden"), flag_strings[i])) + else if (!stricmp(NOX("orders hidden"), flag_strings[string_idx])) iff->flags |= IFFF_ORDERS_HIDDEN; - else if (!stricmp(NOX("orders shown"), flag_strings[i])) + else if (!stricmp(NOX("orders shown"), flag_strings[string_idx])) iff->flags |= IFFF_ORDERS_SHOWN; - else if (!stricmp(NOX("wing name hidden"), flag_strings[i])) + else if (!stricmp(NOX("wing name hidden"), flag_strings[string_idx])) iff->flags |= IFFF_WING_NAME_HIDDEN; else - Warning(LOCATION, "Bogus string in iff flags: %s\n", flag_strings[i]); + Warning(LOCATION, "Bogus string in iff flags: %s\n", flag_strings[string_idx]); } } @@ -706,4 +709,4 @@ color *iff_get_color_by_team_and_object(int team, int seen_from_team, int is_bri return &Iff_colors[color_index][is_bright]; -} +} \ No newline at end of file diff --git a/code/iff_defs/iff_defs.h b/code/iff_defs/iff_defs.h index 7fe9334ce0..1a2f870e2d 100644 --- a/code/iff_defs/iff_defs.h +++ b/code/iff_defs/iff_defs.h @@ -46,7 +46,6 @@ struct object; - // Goober5000 - new IFF color system #define IFF_COLOR_SELECTION 0 #define IFF_COLOR_MESSAGE 1 @@ -123,4 +122,5 @@ extern int iff_x_attacks_y(int team_x, int team_y); extern int iff_get_mask(int team); extern int iff_matches_mask(int team, int mask); + #endif diff --git a/code/io/joy.cpp b/code/io/joy.cpp index 129b1a1821..20646e18d1 100644 --- a/code/io/joy.cpp +++ b/code/io/joy.cpp @@ -1103,7 +1103,7 @@ int joy_get_unscaled_reading(int raw, int axn) int joy_get_scaled_reading(int raw, int axn) { int x, d, dead_zone, rng; - float percent, sensitivity_percent, non_sensitivity_percent; + float percent; // Make sure it's calibrated properly. if (joystick.axis_center[axn] - joystick.axis_min[axn] < 5) @@ -1132,15 +1132,11 @@ int joy_get_scaled_reading(int raw, int axn) Assert(Joy_sensitivity >= 0 && Joy_sensitivity <= 9); - // compute percentages as a range between 0 and 1 - sensitivity_percent = (float) Joy_sensitivity / 9.0f; - non_sensitivity_percent = (float) (9 - Joy_sensitivity) / 9.0f; - // find percent of max axis is at percent = (float) d / (float) rng; // work sensitivity on axis value - percent = (percent * sensitivity_percent + percent * percent * percent * percent * percent * non_sensitivity_percent); + percent = pow(percent, (3.0f - ((float) Joy_sensitivity / 4.5f))); x = (int) ((float) F1_0 * percent); diff --git a/code/io/keycontrol.cpp b/code/io/keycontrol.cpp index b7df77d90d..13c632afe9 100644 --- a/code/io/keycontrol.cpp +++ b/code/io/keycontrol.cpp @@ -2915,7 +2915,7 @@ int button_function(int n) if ( Players[Player_num].flags & PLAYER_FLAGS_AUTO_MATCH_SPEED ) { snd_play(&Snds[SND_SHIELD_XFER_OK], 1.0f); // HUD_sourced_printf(HUD_SOURCE_HIDDEN, XSTR( "Auto match target speed activated", -1)); - if ( !Player->flags & PLAYER_FLAGS_MATCH_TARGET ) { + if ( !(Player->flags & PLAYER_FLAGS_MATCH_TARGET) ) { player_match_target_speed(); } } @@ -3398,8 +3398,13 @@ int button_function(int n) break; case HUD_TARGETBOX_TOGGLE_WIREFRAME: - gamesnd_play_iface(SND_USER_SELECT); - hud_targetbox_switch_wireframe_mode(); + if (!Lock_targetbox_mode) { + gamesnd_play_iface(SND_USER_SELECT); + hud_targetbox_switch_wireframe_mode(); + } + else { + gamesnd_play_iface(SND_GENERAL_FAIL); + } break; // Autopilot key control diff --git a/code/lab/lab.cpp b/code/lab/lab.cpp index 98b8ad1d5c..80ec733af8 100644 --- a/code/lab/lab.cpp +++ b/code/lab/lab.cpp @@ -630,9 +630,11 @@ void labviewer_add_model_thrusters(ship_info *sip) mst.length.xyz.y = 0.0f; // Add noise to thruster geometry. - mst.length.xyz.z *= (1.0f + frand()/5.0f - 0.1f); - mst.length.xyz.y *= (1.0f + frand()/5.0f - 0.1f); - mst.length.xyz.x *= (1.0f + frand()/5.0f - 0.1f); + if (!(sip->flags2 & SIF2_NO_THRUSTER_GEO_NOISE)) { + mst.length.xyz.z *= (1.0f + frand()/5.0f - 0.1f); + mst.length.xyz.y *= (1.0f + frand()/5.0f - 0.1f); + mst.length.xyz.x *= (1.0f + frand()/5.0f - 0.1f); + } CLAMP(mst.length.xyz.z, -1.0f, 1.0f); CLAMP(mst.length.xyz.y, -1.0f, 1.0f); @@ -1804,7 +1806,7 @@ void labviewer_make_ship_window(Button *caller) Lab_species_nodes[idx]->ClearAllItems(); } - delete Lab_species_nodes; + delete [] Lab_species_nodes; Lab_species_nodes = NULL; } diff --git a/code/lighting/lighting.cpp b/code/lighting/lighting.cpp index ca577137d1..a93f56ded9 100644 --- a/code/lighting/lighting.cpp +++ b/code/lighting/lighting.cpp @@ -53,7 +53,7 @@ * * Revision 2.11 2003/10/14 17:39:14 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -972,8 +972,7 @@ ubyte light_apply( vec3d *pos, vec3d * norm, float static_light_level ) if (Detail.lighting==0) { // No static light - ubyte l = ubyte(fl2i(static_light_level*255.0f)); - return l; + return ubyte(fl2i(static_light_level*255.0f)); } if ( Lighting_off ) return 191; @@ -1033,9 +1032,9 @@ ubyte light_apply( vec3d *pos, vec3d * norm, float static_light_level ) lval += l->intensity*dot; } else if ( dist < l->radb_squared ) { // dist from 0 to - float n = dist - l->rada_squared; - float d = l->radb_squared - l->rada_squared; - float ltmp = (1.0f - n / d )*dot*l->intensity; + float nnum = dist - l->rada_squared; + float dden = l->radb_squared - l->rada_squared; + float ltmp = (1.0f - nnum / dden )*dot*l->intensity; lval += ltmp; } if ( lval > 1.0f ) { @@ -1192,9 +1191,9 @@ void light_apply_specular(ubyte *param_r, ubyte *param_g, ubyte *param_b, vec3d } else if ( dist < l->radb_squared ) { float ratio; // dist from 0 to - float n = dist - l->rada_squared; - float d = l->radb_squared - l->rada_squared; - ratio = (1.0f - n / d)*dot*l->intensity*factor; + float nnum = dist - l->rada_squared; + float dden = l->radb_squared - l->rada_squared; + ratio = (1.0f - nnum / dden)*dot*l->intensity*factor; ratio *= 0.25f; rval += l->spec_r*ratio; gval += l->spec_g*ratio; @@ -1232,10 +1231,10 @@ void light_apply_rgb( ubyte *param_r, ubyte *param_g, ubyte *param_b, vec3d *pos if (Detail.lighting==0) { // No static light - ubyte l = ubyte(fl2i(static_light_level*255.0f)); - *param_r = l; - *param_g = l; - *param_b = l; + ubyte lVal = ubyte(fl2i(static_light_level*255.0f)); + *param_r = lVal; + *param_g = lVal; + *param_b = lVal; return; } @@ -1349,9 +1348,9 @@ void light_apply_rgb( ubyte *param_r, ubyte *param_g, ubyte *param_b, vec3d *pos } else if ( dist < l->radb_squared ) { float ratio; // dist from 0 to - float n = dist - l->rada_squared; - float d = l->radb_squared - l->rada_squared; - ratio = (1.0f - n / d)*dot*l->intensity; + float nnum = dist - l->rada_squared; + float dden = l->radb_squared - l->rada_squared; + ratio = (1.0f - nnum / dden)*dot*l->intensity; ratio *= 0.25f; rval += l->r*ratio; gval += l->g*ratio; diff --git a/code/localization/localize.cpp b/code/localization/localize.cpp index 71e6b25121..97e72d8bcf 100644 --- a/code/localization/localize.cpp +++ b/code/localization/localize.cpp @@ -532,8 +532,8 @@ void lcl_init(int lang_init) // read the language from the registry if(lang_init < 0){ memset(lang_string, 0, 128); - // default to DEFAULT_LANGUAGE (which should be english so we dont have to put German text - // in tstrings in the #default section + // default to DEFAULT_LANGUAGE (which should be English so we don't have to put German text + // in tstrings in the #default section) ret = os_config_read_string(NULL, "Language", DEFAULT_LANGUAGE); if(ret == NULL){ @@ -855,7 +855,7 @@ int lcl_add_dir_to_path_with_filename(char *current_path, uint path_max) // copy rest of filename from temp SAFE_STRCAT(current_path, temp, path_max); - delete temp; + delete [] temp; return 1; } @@ -934,6 +934,28 @@ void lcl_replace_stuff(char *text, unsigned int max_len) } } +#define LCL_NUM_FRED_REPLACEMENTS 2 +void lcl_fred_replace_stuff(char *text, unsigned int max_len) +{ + Assert(text); + + int i; + char replace[LCL_NUM_FRED_REPLACEMENTS][2][NAME_LENGTH]; + + // fill replacements array (this is if we want to add more in the future) + strcpy(replace[0][0], "$quote"); + strcpy(replace[0][1], "\""); + strcpy(replace[1][0], "$semicolon"); + strcpy(replace[1][1], ";"); + + // do all replacements + for (i = 0; i < LCL_NUM_FRED_REPLACEMENTS; i++) + { + // replace all instances of that string + replace_all(text, replace[i][1], replace[i][0], max_len); + } +} + // get the localized version of the string. if none exists, return the original string // valid input to this function includes : // "this is some text" @@ -1604,7 +1626,7 @@ void lcl_fix_polish(char *str) // lcl_translate_wep_name() // // For displaying weapon names in german version -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_wep_name(char *name) { @@ -1623,7 +1645,7 @@ void lcl_translate_wep_name(char *name) // lcl_translate_brief_icon_name() // // For displaying ship names in german version -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_brief_icon_name(char *name) { @@ -1770,7 +1792,7 @@ void lcl_translate_brief_icon_name(char *name) // lcl_translate_brief_icon_name_pl() // // For displaying ship names in polish version -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_brief_icon_name_pl(char *name) { @@ -1858,7 +1880,7 @@ char buf[128]; // lcl_translate_ship_name() // // For displaying ship names in german version in the briefing -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_ship_name(char *name) { @@ -1871,7 +1893,7 @@ void lcl_translate_ship_name(char *name) // lcl_translate_targetbox_name() // // For displaying ship names in german version in the targetbox -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_targetbox_name(char *name) { @@ -1923,7 +1945,7 @@ void lcl_translate_targetbox_name(char *name) // lcl_translate_targetbox_name_pl() // // For displaying ship names in polish version in the targetbox -// since we cant actually just change them outright. +// since we can't actually just change them outright. // void lcl_translate_targetbox_name_pl(char *name) { diff --git a/code/localization/localize.h b/code/localization/localize.h index d8cee53af0..b8650860b3 100644 --- a/code/localization/localize.h +++ b/code/localization/localize.h @@ -156,6 +156,9 @@ void lcl_ext_close(); // Goober5000 void lcl_replace_stuff(char *text, unsigned int max_len); +// Karajorma +void lcl_fred_replace_stuff(char *text, unsigned int max_len); + // get the localized version of the string. if none exists, return the original string // valid input to this function includes : // "this is some text" diff --git a/code/math/vecmat.cpp b/code/math/vecmat.cpp index b58592ab93..ce75b428d9 100644 --- a/code/math/vecmat.cpp +++ b/code/math/vecmat.cpp @@ -116,7 +116,7 @@ * * Revision 2.7 2004/02/13 04:17:13 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -768,14 +768,14 @@ float vm_vec_mag_quick(vec3d *v) c = v->xyz.z; if (a < b) { - float t=a; a=b; b=t; + float temp=a; a=b; b=temp; } if (b < c) { - float t=b; b=c; c=t; + float temp=b; b=c; c=temp; if (a < b) { - float t=a; a=b; b=t; + float temp2=a; a=b; b=temp2; } } @@ -1252,7 +1252,9 @@ bad_vector2: //quicker version of vm_vector_2_matrix() that takes normalized vectors matrix *vm_vector_2_matrix_norm(matrix *m,vec3d *fvec,vec3d *uvec,vec3d *rvec) { - vec3d *xvec=&m->vec.rvec,*yvec=&m->vec.uvec,*zvec=&m->vec.fvec; + vec3d *xvec=&m->vec.rvec; + vec3d *yvec=&m->vec.uvec; + vec3d *zvec=&m->vec.fvec; Assert(fvec != NULL); diff --git a/code/math/vecmat.h b/code/math/vecmat.h index 7cf781c2cd..00aad2b510 100644 --- a/code/math/vecmat.h +++ b/code/math/vecmat.h @@ -730,8 +730,3 @@ void vm_vec2vert(vec3d *vec, vertex *vert); #endif - - - - - diff --git a/code/menuui/credits.cpp b/code/menuui/credits.cpp index 991e77eade..54be51e7f2 100644 --- a/code/menuui/credits.cpp +++ b/code/menuui/credits.cpp @@ -607,7 +607,7 @@ void credits_init() stuff_string_line(line, sizeof(line)); // This is a bit odd but it means if a total conversion uses different credits the - // Volition credit wont happen + // Volition credit won't happen if(first_run == true) { if(strcmp(line, mod_check) == 0) diff --git a/code/menuui/mainhallmenu.cpp b/code/menuui/mainhallmenu.cpp index e37732285d..7cc135675c 100644 --- a/code/menuui/mainhallmenu.cpp +++ b/code/menuui/mainhallmenu.cpp @@ -169,7 +169,7 @@ * Set D3D fogging to fall back to vertex fog if table fog not supported. * * Revision 2.13 2004/02/16 11:47:33 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -188,7 +188,7 @@ * * Revision 2.11 2004/01/24 15:52:26 randomtiger * I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window. - * In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. + * In OGL it works perfectly and in both APIs it doesn't switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. * * Revision 2.10 2003/11/06 21:10:26 randomtiger * Added my batching solution for more efficient d3d_string. @@ -243,7 +243,7 @@ * The big include file move * * Revision 2.1 2002/07/29 07:56:10 DTP - * FIX; Startgame arguement dont go ahead when a singleplayer pilot is selected + * FIX; Startgame arguement don't go ahead when a singleplayer pilot is selected * * Revision 2.0 2002/06/03 04:02:24 penguin * Warpcore CVS sync diff --git a/code/menuui/optionsmenumulti.cpp b/code/menuui/optionsmenumulti.cpp index 2291351055..4913cd736d 100644 --- a/code/menuui/optionsmenumulti.cpp +++ b/code/menuui/optionsmenumulti.cpp @@ -1839,7 +1839,7 @@ void options_multi_gen_button_pressed(int n) } break; - // dont put missions in the multidata directory + // don't put missions in the multidata directory case OM_GEN_XFER_MULTIDATA_NO: if(Om_gen_xfer_multidata){ gamesnd_play_iface(SND_USER_SELECT); diff --git a/code/menuui/playermenu.cpp b/code/menuui/playermenu.cpp index ed89bda740..5a3b24e4dc 100644 --- a/code/menuui/playermenu.cpp +++ b/code/menuui/playermenu.cpp @@ -704,10 +704,21 @@ void demo_title_blit() #endif +// no need to reset this to false because we only ever see player_select once per game run +static bool Startup_warning_dialog_displayed = false; + void player_select_do() { int k; + // Goober5000 - display a popup warning about problems in the mod + if ((Global_warning_count > 10 || Global_error_count > 0) && !Startup_warning_dialog_displayed) { + char text[512]; + sprintf(text, "Warning!\n\nThe currently active mod has generated %d warnings and/or errors during program startup. These could have been caused by anything from incorrectly formated table files to corrupt models. While FreeSpace Open will attempt to compensate for these issues, it cannot guarantee a trouble-free gameplay experience. Source Code Project staff cannot provide assistance or support for these problems, as they are caused by the mod's data files, not FreeSpace Open's source code.", Global_warning_count + Global_error_count); + popup(PF_TITLE_BIG | PF_TITLE_RED, 1, POPUP_OK, text); + Startup_warning_dialog_displayed = true; + } + #ifdef FS2_DEMO if ( Demo_title_active ) { // demo_title_blit(); diff --git a/code/menuui/readyroom.cpp b/code/menuui/readyroom.cpp index a53cdfb16a..3e5e0931d9 100644 --- a/code/menuui/readyroom.cpp +++ b/code/menuui/readyroom.cpp @@ -135,7 +135,7 @@ * Revision 2.1.2.2 2002/11/04 21:25:00 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.1.2.1 2002/09/24 18:56:43 randomtiger @@ -470,7 +470,7 @@ int hash_filename(char *filename) { ulonglong hash_val = 0; char *ptr = filename; - // Dont hash .fsm extension, convert all to upper case + // Don't hash .fsm extension, convert all to upper case for (int i=0; i < ((signed int)(strlen(filename)) - 4); i++) { hash_val = (hash_val << 4) + toupper(*ptr++); } diff --git a/code/menuui/techmenu.cpp b/code/menuui/techmenu.cpp index b53016ff3d..a030d2aa8c 100644 --- a/code/menuui/techmenu.cpp +++ b/code/menuui/techmenu.cpp @@ -774,7 +774,7 @@ void techroom_render_desc(int xo, int yo, int ho) // maybe output 'more' indicator if ( z < Text_size ) { // can be scrolled down - int more_txt_x = Tech_desc_coords[gr_screen.res][0] + (Tech_desc_coords[gr_screen.res][2]/2) - 10; // FIXME should move these to constants since they dont move + int more_txt_x = Tech_desc_coords[gr_screen.res][0] + (Tech_desc_coords[gr_screen.res][2]/2) - 10; // FIXME should move these to constants since they don't move int more_txt_y = Tech_desc_coords[gr_screen.res][1] + Tech_desc_coords[gr_screen.res][3]; // located below brief text, centered int w, h; gr_get_string_size(&w, &h, XSTR("more", 1469), strlen(XSTR("more", 1469))); @@ -1052,7 +1052,7 @@ void tech_scroll_list_down() } } -// this doesnt do a thing... +// this doesn't do a thing... void tech_ship_scroll_capture() { techroom_select_new_entry(); @@ -1249,7 +1249,7 @@ void techroom_change_tab(int num) if (Techroom_show_all || (Weapon_info[i].wi_flags & mask) || (Weapon_info[i].wi_flags2 & mask2)) { //following was commented out to fix the tech room crash bug when modified weapons.tbl is used. Fix by Phreak, implemented by Sesquipedalian. - // note: hack here to exclude dogfight weapons -- dont put weapon in if it has same description as pvs weapon + // note: hack here to exclude dogfight weapons -- don't put weapon in if it has same description as pvs weapon //if ((Weapon_list_size > 0) && (!strcmp(Weapon_info[i].tech_desc, Weapon_list[Weapon_list_size-1].desc))) { // continue; //} @@ -1355,7 +1355,7 @@ void techroom_change_tab(int num) } // index lookup on intel is a pretty pointless, but it keeps everything - // consistent and doesnt really hurt anything + // consistent and doesn't really hurt anything Current_list = Intel_list; Current_list_size = Intel_list_size; @@ -1465,7 +1465,7 @@ int techroom_load_ani(anim **animpp, char *name) char anim_filename[64] = "2_"; // hi-res support - // (i dont think there are any hi-res anims for these tho) + // (i don't think there are any hi-res anims for these tho) if (gr_screen.res == GR_1024) { strcat(anim_filename, name); } else { diff --git a/code/mission/missionbriefcommon.cpp b/code/mission/missionbriefcommon.cpp index de145f307a..ede11bb98f 100644 --- a/code/mission/missionbriefcommon.cpp +++ b/code/mission/missionbriefcommon.cpp @@ -198,7 +198,7 @@ * * Revision 2.7 2004/02/13 04:17:13 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -535,8 +535,9 @@ typedef struct colored_char ubyte color; // index into Brief_text_colors[] } colored_char; -static colored_char Colored_text[MAX_TEXT_STREAMS][MAX_BRIEF_LINES][MAX_BRIEF_LINE_LEN]; -static int Colored_text_len[MAX_TEXT_STREAMS][MAX_BRIEF_LINES]; +typedef std::vector briefing_line; +typedef std::vector briefing_stream; +static briefing_stream Colored_stream[MAX_TEXT_STREAMS]; #define MAX_BRIEF_TEXT_COLORS 9 #define BRIEF_TEXT_WHITE 0 @@ -1607,13 +1608,13 @@ void brief_blit_stage_num(int stage_num, int stage_max) void brief_render_line(int line_num, int x, int y, int instance) { int len, count, next, truncate_len, last_color, offset, w, h, bright_len, i; - colored_char *src; char line[MAX_BRIEF_LINE_LEN]; + std::vector *src; - src = &Colored_text[instance][line_num][0]; - len = Colored_text_len[instance][line_num]; + src = &Colored_stream[instance].at(line_num); + len = src->size(); - if (len <= 0){ + if (len == 0){ return; } @@ -1645,7 +1646,7 @@ void brief_render_line(int line_num, int x, int y, int instance) break; } - line[next] = src[count].letter; + line[next] = src->at(count).letter; if (is_white_space(line[next])) { // end of word reached, blit it @@ -1665,9 +1666,9 @@ void brief_render_line(int line_num, int x, int y, int instance) continue; } - if (src[count].color != last_color) { - brief_set_text_color(src[count].color); - last_color = src[count].color; + if (src->at(count).color != last_color) { + brief_set_text_color(src->at(count).color); + last_color = src->at(count).color; } count++; @@ -1683,7 +1684,7 @@ void brief_render_line(int line_num, int x, int y, int instance) gr_set_color_fast(&Color_bright_white); for (i=0; iat(i).letter; } line[i] = 0; @@ -1696,17 +1697,6 @@ void brief_render_line(int line_num, int x, int y, int instance) } else { gr_string(x, y, line); } - - // JAS: Not needed? - // // now erase the part we don't want to be bright white - // gr_set_color_fast(&Color_black); - // if (i > BRIGHTEN_LEAD) { - // line[i - BRIGHTEN_LEAD] = 0; - // gr_get_string_size(&w, &h, line); - // gr_set_clip(x, y, w, gr_get_font_height()); - // gr_clear(); - // gr_reset_clip(); - // } } } @@ -1934,20 +1924,15 @@ void brief_set_text_color(int color_index) // input: index => Index into Brief_text[] for source text. // instance => Which instance of Colored_text[] to use. // Value is 0 unless multiple text streams are required. -int brief_text_colorize(int index, int instance) +int brief_text_colorize(char *src, int instance) { - char *src; - int len, i, skip_to_next_word, dest_len; - colored_char *dest; - ubyte active_color_index; + int len, i, skip_to_next_word = 0; + colored_char dest; + briefing_line dest_line; + + ubyte active_color_index = BRIEF_TEXT_WHITE; - src = Brief_text[index]; - dest = &Colored_text[instance][index][0]; len = strlen(src); - - skip_to_next_word = 0; - dest_len = 0; - active_color_index = BRIEF_TEXT_WHITE; for (i=0; i max width of line in pixels // instance => optional parameter, used when multiple text streams are required // (default value is 0) -int brief_color_text_init(char *src, int w, int instance) +int brief_color_text_init(char *src, int w, int instance, int max_lines) { int i, n_lines, len; - int n_chars[MAX_BRIEF_LINES]; - char *p_str[MAX_BRIEF_LINES]; - + std::vector n_chars; + std::vector p_str; + char brief_line[MAX_BRIEF_LINE_LEN]; + Assert(src); - n_lines = split_str(src, w, n_chars, p_str, MAX_BRIEF_LINES, BRIEF_META_CHAR); + n_lines = split_str(src, w, &n_chars, &p_str, BRIEF_META_CHAR); Assert(n_lines >= 0); + //for compatability reasons truncate text from everything except the fiction viewer + if ((max_lines > 0) && (n_lines > max_lines)) { + n_lines = max_lines; + } + Max_briefing_line_len = 1; + Colored_stream[instance].clear(); for (i=0; i Max_briefing_line_len) Max_briefing_line_len = len; } @@ -2854,4 +2851,4 @@ int brief_time_to_advance(int stage_num, float frametime) } return advance; -} \ No newline at end of file +} diff --git a/code/mission/missionbriefcommon.h b/code/mission/missionbriefcommon.h index 6a3b68ed5b..f604cdea32 100644 --- a/code/mission/missionbriefcommon.h +++ b/code/mission/missionbriefcommon.h @@ -472,7 +472,7 @@ void brief_voice_pause(int stage_num); void brief_voice_unpause(int stage_num); // fancy briefing style text functions for use in other modules. -int brief_color_text_init(char *src, int w, int instance = 0); +int brief_color_text_init(char *src, int w, int instance = 0, int max_lines = MAX_BRIEF_LINES); int brief_render_text(int line_offset, int x, int y, int h, float frametime, int instance = 0, int line_spacing = 0); void cmd_brief_reset(); diff --git a/code/mission/missioncampaign.cpp b/code/mission/missioncampaign.cpp index 7158bc46d5..e154850452 100644 --- a/code/mission/missioncampaign.cpp +++ b/code/mission/missioncampaign.cpp @@ -270,7 +270,7 @@ * * 20 9/07/99 6:55p Jefff * functionality to break out of a loop. hacked functionality to jump to - * a specific mission in a campaign -- doesnt grant ships/weapons from + * a specific mission in a campaign -- doesn't grant ships/weapons from * skipped missions tho. * * 19 9/07/99 2:19p Jefff diff --git a/code/mission/missioncampaign.h b/code/mission/missioncampaign.h index 7974661bba..ee3d206409 100644 --- a/code/mission/missioncampaign.h +++ b/code/mission/missioncampaign.h @@ -91,7 +91,7 @@ * * 14 9/07/99 6:55p Jefff * functionality to break out of a loop. hacked functionality to jump to - * a specific mission in a campaign -- doesnt grant ships/weapons from + * a specific mission in a campaign -- doesn't grant ships/weapons from * skipped missions tho. * * 13 9/06/99 9:45p Jefff diff --git a/code/mission/missiongoals.cpp b/code/mission/missiongoals.cpp index cad4360342..7752ede961 100644 --- a/code/mission/missiongoals.cpp +++ b/code/mission/missiongoals.cpp @@ -428,6 +428,7 @@ #include "network/multi.h" #include "network/multimsgs.h" #include "network/multi_team.h" +#include "network/multi_sexp.h" @@ -1447,6 +1448,11 @@ void mission_eval_goals() } } + // send and remaining sexp data to the clients + if (MULTIPLAYER_MASTER) { + multi_sexp_flush_packet(); + } + if (The_mission.game_type & MISSION_TYPE_TRAINING){ Mission_goal_timestamp = timestamp(GOAL_TIMESTAMP_TRAINING); } else { diff --git a/code/mission/missionmessage.cpp b/code/mission/missionmessage.cpp index 560fdf3b46..f0ab89e061 100644 --- a/code/mission/missionmessage.cpp +++ b/code/mission/missionmessage.cpp @@ -231,7 +231,7 @@ * * Revision 2.9 2004/02/13 04:17:13 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -657,6 +657,7 @@ #include "network/multiutil.h" +int Valid_builtin_message_types[MAX_BUILTIN_MESSAGE_TYPES]; // here is a text list of the builtin message names. These names are used to match against // names read in for builtin message radio bits to see what message to play. These are // generic names, meaning that there will be the same message type for a number of different @@ -704,7 +705,10 @@ char *Builtin_message_types[MAX_BUILTIN_MESSAGE_TYPES] = "Stray Warning", "Stray Warning Final", "AWACS at 75", - "AWACS at 25" + "AWACS at 25", + "Praise Self", + "High Praise", + "Primaries Low", //XSTR:ON }; @@ -1030,6 +1034,7 @@ void message_parse(bool importing_from_fsm) void parse_msgtbl() { char *p1, *p2, *p3; + int i, j; // open localization lcl_ext_open(); @@ -1081,6 +1086,18 @@ void parse_msgtbl() Num_builtin_avis = Num_message_avis; Num_builtin_waves = Num_message_waves; + + memset(Valid_builtin_message_types, 0, sizeof(int)); + // now cycle through the messages to determine which type of builtins we have messages for + for (i = 0; i < Num_builtin_messages; i++) { + for (j = 0; j < MAX_BUILTIN_MESSAGE_TYPES; j++) { + if (!(stricmp(Messages[i].name, Builtin_message_types[j]))) { + Valid_builtin_message_types[j] = 1; + break; + } + } + } + // close localization lcl_ext_close(); } @@ -2298,7 +2315,6 @@ void message_send_unique_to_player( char *id, void *data, int m_source, int prio if(Game_mode & GM_DEMO_RECORD){ demo_POST_unique_message(id, who_from, m_source, priority); } - // } // send a message packet to a player if destined for everyone or only a specific person if ( MULTIPLAYER_MASTER ){ @@ -2316,8 +2332,25 @@ void message_send_unique_to_player( char *id, void *data, int m_source, int prio // and use a timing to tell how long we should wait before playing this message void message_send_builtin_to_player( int type, ship *shipp, int priority, int timing, int group, int delay, int multi_target, int multi_team_filter ) { - int i, persona_index = -1; + int i, persona_index = -1, message_index = -1; int source; + int matching_builtins[MAX_MISSION_MESSAGES]; + int num_matching_builtins = 0; + char *who_from; + + // builtin type isn't supported by this version of the table + if (!Valid_builtin_message_types[type]) { + // downgrade certain message types to more generic ones more likely to be supported + if (type == MESSAGE_HIGH_PRAISE && Valid_builtin_message_types[MESSAGE_PRAISE] ) { + type = MESSAGE_PRAISE; + } + else if ( type == MESSAGE_PRIMARIES_LOW && Valid_builtin_message_types[MESSAGE_REARM_REQUEST] ) { + type = MESSAGE_REARM_REQUEST; + } + else { + return; + } + } // if we aren't showing builtin msgs, bail if (The_mission.flags & MISSION_FLAG_NO_BUILTIN_MSGS) @@ -2346,16 +2379,14 @@ void message_send_builtin_to_player( int type, ship *shipp, int priority, int ti persona_index = The_mission.command_persona; // use the terran command persona } + char *name = Builtin_message_types[type]; + // try to find a builtin message with the given type for the given persona // make a loop out of this routne since we may try to play a message in the wrong // persona if we can't find the right message for the given persona do { for ( i = 0; i < Num_builtin_messages; i++ ) { - char *name, *who_from; - - name = Builtin_message_types[type]; - - // see if the have the type of message + // check the type of message if ( stricmp(Messages[i].name, name) ){ continue; } @@ -2365,68 +2396,88 @@ void message_send_builtin_to_player( int type, ship *shipp, int priority, int ti if ( (persona_index != -1 ) && (Messages[i].persona_index != persona_index) ){ continue; } + + matching_builtins[num_matching_builtins++] = i; - // get who this message is from -- kind of a hack since we assume Terran Command in the - // absence of a ship. This will be fixed later - if ( shipp ) { - who_from = shipp->ship_name; - source = HUD_team_get_source( shipp->team ); - } else { - who_from = The_mission.command_sender; - - // Goober5000 - if Command is a ship that is present, change the source accordingly - int shipnum = ship_name_lookup(who_from); - if (shipnum >= 0) - source = HUD_team_get_source( Ships[shipnum].team ); - else - source = HUD_SOURCE_TERRAN_CMD; + // if we don't care about the persona we do not need to check for other matching messages, we grab the first one + // of the correct type we find and run + if (persona_index == -1 ) { + break; } - - // maybe change the who from here for special rearm cases (always seems like that is the case :-) ) - if ( !stricmp(who_from, The_mission.command_sender) && (type == MESSAGE_REARM_ON_WAY) ){ - who_from = SUPPORT_NAME; - } - - // determine what we should actually do with this dang message. In multiplayer, we must - // deal with the fact that this message might not get played on my machine if I am a server - - // not multiplayer or this message is for me, then queue it - if ( !(Game_mode & GM_MULTIPLAYER) || ((multi_target == -1) || (multi_target == MY_NET_PLAYER_NUM)) ){ - - // if this filter matches mine - if( (multi_team_filter < 0) || !(Netgame.type_flags & NG_TYPE_TEAM) || ((Net_player != NULL) && (Net_player->p_info.team == multi_team_filter)) ){ - message_queue_message( i, priority, timing, who_from, source, group, delay, type ); - - // post a builtin message - if(Game_mode & GM_DEMO_RECORD){ - demo_POST_builtin_message(type, shipp, priority, timing); - } - } - } - - // send a message packet to a player if destined for everyone or only a specific person - if ( MULTIPLAYER_MASTER ) { - // only send a message if it is of a particular type - if(multi_target == -1){ - if(multi_message_should_broadcast(type)){ - send_mission_message_packet( i, who_from, priority, timing, source, type, -1, multi_team_filter ); - } - } else { - send_mission_message_packet( i, who_from, priority, timing, source, type, multi_target, multi_team_filter ); - } - } - - return; // all done with displaying } - - if ( persona_index >= 0 ) { + + // if we didn't find any matching builtins for a valid persona go round again and just grab the first one of the + // correct type + if ( persona_index >= 0 && num_matching_builtins == 0 ) { nprintf(("messaging", "Couldn't find builtin message %s for persona %d\n", Builtin_message_types[type], persona_index )); nprintf(("messaging", "looking for message for any persona\n")); persona_index = -1; - } else { - persona_index = -999; // used here and the next line only -- hard code bad, but I'm lazy } - } while ( persona_index != -999 ); + // otherwise whether we found valid message(s) or not, we're done with the loop + else { + // exit do-while + break; + } + } while ( true ); + + if (num_matching_builtins <= 0) { + nprintf(("messaging", "Couldn't find any builtin message of type %d\n", type )); + Int3(); + return; + } + + // since we may have multiple builtins we need to pick one at random + message_index = matching_builtins[(int)rand32() % num_matching_builtins]; + + // get who this message is from -- kind of a hack since we assume Terran Command in the + // absence of a ship. This will be fixed later + if ( shipp ) { + who_from = shipp->ship_name; + source = HUD_team_get_source( shipp->team ); + } else { + who_from = The_mission.command_sender; + + // Goober5000 - if Command is a ship that is present, change the source accordingly + int shipnum = ship_name_lookup(who_from); + if (shipnum >= 0) + source = HUD_team_get_source( Ships[shipnum].team ); + else + source = HUD_SOURCE_TERRAN_CMD; + } + + // maybe change the who from here for special rearm cases (always seems like that is the case :-) ) + if ( !stricmp(who_from, The_mission.command_sender) && (type == MESSAGE_REARM_ON_WAY) ){ + who_from = SUPPORT_NAME; + } + + // determine what we should actually do with this dang message. In multiplayer, we must + // deal with the fact that this message might not get played on my machine if I am a server + + // not multiplayer or this message is for me, then queue it + if ( !(Game_mode & GM_MULTIPLAYER) || ((multi_target == -1) || (multi_target == MY_NET_PLAYER_NUM)) ){ + + // if this filter matches mine + if( (multi_team_filter < 0) || !(Netgame.type_flags & NG_TYPE_TEAM) || ((Net_player != NULL) && (Net_player->p_info.team == multi_team_filter)) ){ + message_queue_message( message_index, priority, timing, who_from, source, group, delay, type ); + + // post a builtin message + if(Game_mode & GM_DEMO_RECORD){ + demo_POST_builtin_message(type, shipp, priority, timing); + } + } + } + + // send a message packet to a player if destined for everyone or only a specific person + if ( MULTIPLAYER_MASTER ) { + // only send a message if it is of a particular type + if(multi_target == -1){ + if(multi_message_should_broadcast(type)){ + send_mission_message_packet( message_index, who_from, priority, timing, source, type, -1, multi_team_filter ); + } + } else { + send_mission_message_packet( message_index, who_from, priority, timing, source, type, multi_target, multi_team_filter ); + } + } } // message_is_playing() diff --git a/code/mission/missionmessage.h b/code/mission/missionmessage.h index 563a236a10..6ec8e6cc7b 100644 --- a/code/mission/missionmessage.h +++ b/code/mission/missionmessage.h @@ -312,7 +312,7 @@ extern message_extra Message_waves[MAX_MESSAGE_WAVES]; // probably use these defines. // this number in this define should match the number of elements in the next array -#define MAX_BUILTIN_MESSAGE_TYPES 41 +#define MAX_BUILTIN_MESSAGE_TYPES 44 extern char *Builtin_message_types[MAX_BUILTIN_MESSAGE_TYPES]; @@ -322,12 +322,12 @@ extern char *Builtin_message_types[MAX_BUILTIN_MESSAGE_TYPES]; #define MESSAGE_CHECK_6 3 #define MESSAGE_ENGAGE 4 #define MESSAGE_GAMMA_ARRIVED 5 -#define MESSAGE_HELP 6 +#define MESSAGE_HELP 6 #define MESSAGE_PRAISE 7 -#define MESSAGE_REINFORCEMENTS 8 +#define MESSAGE_REINFORCEMENTS 8 #define MESSAGE_IGNORE 9 #define MESSAGE_NOSIR 10 -#define MESSAGE_OOPS 11 +#define MESSAGE_OOPS 11 #define MESSAGE_PERMISSION 12 #define MESSAGE_STRAY 13 #define MESSAGE_WARP_OUT 14 @@ -337,26 +337,29 @@ extern char *Builtin_message_types[MAX_BUILTIN_MESSAGE_TYPES]; #define MESSAGE_REARM_WARP 18 #define MESSAGE_NO_TARGET 19 #define MESSAGE_DOCK_YES 20 -#define MESSAGE_REPAIR_DONE 21 -#define MESSAGE_REPAIR_ABORTED 22 +#define MESSAGE_REPAIR_DONE 21 +#define MESSAGE_REPAIR_ABORTED 22 #define MESSAGE_HAMMER_SWINE 23 #define MESSAGE_REARM_REQUEST 24 // wingman messages player when he calls a support ship -#define MESSAGE_DISABLE_TARGET 25 +#define MESSAGE_DISABLE_TARGET 25 #define MESSAGE_DISARM_TARGET 26 -#define MESSAGE_PLAYER_DIED 27 // message sent when player starts death roll -#define MESSAGE_WINGMAN_SCREAM 28 -#define MESSAGE_SUPPORT_KILLED 29 +#define MESSAGE_PLAYER_DIED 27 // message sent when player starts death roll +#define MESSAGE_WINGMAN_SCREAM 28 +#define MESSAGE_SUPPORT_KILLED 29 #define MESSAGE_ALL_CLEAR 30 #define MESSAGE_ALL_ALONE 31 // message sent when player is last ship left and primary objectives still exist -#define MESSAGE_REPAIR_REQUEST 32 +#define MESSAGE_REPAIR_REQUEST 32 #define MESSAGE_DELTA_ARRIVED 33 -#define MESSAGE_EPSILON_ARRIVED 34 -#define MESSAGE_INSTRUCTOR_HIT 35 -#define MESSAGE_INSTRUCTOR_ATTACK 36 -#define MESSAGE_STRAY_WARNING 37 +#define MESSAGE_EPSILON_ARRIVED 34 +#define MESSAGE_INSTRUCTOR_HIT 35 +#define MESSAGE_INSTRUCTOR_ATTACK 36 +#define MESSAGE_STRAY_WARNING 37 #define MESSAGE_STRAY_WARNING_FINAL 38 #define MESSAGE_AWACS_75 39 #define MESSAGE_AWACS_25 40 +#define MESSAGE_PRAISE_SELF 41 +#define MESSAGE_HIGH_PRAISE 42 +#define MESSAGE_PRIMARIES_LOW 43 typedef struct MissionMessage { char name[NAME_LENGTH]; // used to identify this message diff --git a/code/mission/missionparse.cpp b/code/mission/missionparse.cpp index 0c3d9e6456..f176b9d5fd 100644 --- a/code/mission/missionparse.cpp +++ b/code/mission/missionparse.cpp @@ -954,7 +954,7 @@ * Knossos warp-in warp-out. * * 52 8/03/99 5:35p Andsager - * Dont draw target dot for instructor in training mission + * Don't draw target dot for instructor in training mission * * 51 7/30/99 7:01p Dave * Dogfight escort gauge. Fixed up laser rendering in Glide. @@ -1294,6 +1294,7 @@ int Fred_num_texture_replacements = 0; int Num_unknown_ship_classes; int Num_unknown_weapon_classes; +int Num_unknown_loadout_classes; ushort Current_file_checksum = 0; ushort Last_file_checksum = 0; @@ -1492,6 +1493,9 @@ char *Parse_object_flags_2[MAX_PARSE_OBJECT_FLAGS_2] = { "always-death-scream", "nav-needslink", "hide-ship-name", + "set-class-dynamically", + "lock-all-turrets", + "afterburners-locked", "force-shields-on", }; @@ -1882,6 +1886,14 @@ void parse_mission_info(mission *pm, bool basic = false) stuff_string(pm->skybox_model, F_NAME, MAX_FILENAME_LEN); } + if (optional_string("+Skybox Flags:")){ + pm->skybox_flags = 0; + stuff_int(&pm->skybox_flags); + // parse_string_flag_list(&pm->skybox_flags, model_render_flags, model_render_flags_size); + }else{ + pm->skybox_flags = DEFAULT_NMODEL_FLAGS; + } + // Goober5000 - AI on a per-mission basis The_mission.ai_profile = &Ai_profiles[Default_ai_profile]; if (optional_string("$AI Profile:")) @@ -1945,13 +1957,12 @@ void parse_player_info(mission *pm) void parse_player_info2(mission *pm) { char str[NAME_LENGTH]; - int nt, i, total, list[MAX_SHIP_CLASSES * 2], list2[MAX_WEAPON_TYPES * 2], num_starting_wings; + int nt, i, total, list[MAX_SHIP_CLASSES * 4], list2[MAX_WEAPON_TYPES * 4]; team_data *ptr; - char starting_wings[MAX_STARTING_WINGS][NAME_LENGTH]; // read in a ship/weapon pool for each team. for ( nt = 0; nt < Num_teams; nt++ ) { - int num_ship_choices; + int num_choices; ptr = &Team_data[nt]; // get the shipname for single player missions @@ -1960,29 +1971,31 @@ void parse_player_info2(mission *pm) stuff_string( Player_start_shipname, F_NAME, NAME_LENGTH ); required_string("$Ship Choices:"); - total = stuff_int_list(list, MAX_SHIP_CLASSES * 2, SHIP_INFO_TYPE); + total = stuff_loadout_list(list, MAX_SHIP_CLASSES * 4, MISSION_LOADOUT_SHIP_LIST); - Assert(!(total & 0x01)); // make sure we have an even count + // make sure we have a count which is divisible by four since four values are added for each ship + Assert((total%4) == 0); - num_ship_choices = 0; - total /= 2; // there are only 1/2 the ships really on the list. - for (i=0; iflags & NETINFO_FLAG_AM_MASTER))) { - if ( !Campaign.ships_allowed[list[i*2]] ) + if ( !Campaign.ships_allowed[list[i]] ) continue; } - ptr->ship_list[num_ship_choices] = list[i * 2]; - ptr->ship_count[num_ship_choices] = list[i * 2 + 1]; - num_ship_choices++; - } - ptr->number_choices = num_ship_choices; + ptr->ship_list[num_choices] = list[i]; + ptr->ship_list_variables[num_choices] = list[i+1]; + ptr->ship_count[num_choices] = list[i+2]; + ptr->loadout_total += list[i+2]; + ptr->ship_count_variables[num_choices] =list[i+3]; - num_starting_wings = 0; - if (optional_string("+Starting Wings:")) - num_starting_wings = stuff_string_list(starting_wings, MAX_STARTING_WINGS); + num_choices++; + } + ptr->num_ship_choices = num_choices; ptr->default_ship = -1; if (optional_string("+Default_ship:")) { @@ -2006,37 +2019,88 @@ void parse_player_info2(mission *pm) if (ptr->default_ship == -1) // invalid or not specified, make first in list ptr->default_ship = ptr->ship_list[0]; - for (i=0; iweaponry_pool[i] = 0; - required_string("+Weaponry Pool:"); - total = stuff_int_list(list2, MAX_WEAPON_TYPES * 2, WEAPON_POOL_TYPE); + total = stuff_loadout_list(list2, MAX_WEAPON_TYPES * 4, MISSION_LOADOUT_WEAPON_LIST); - Assert( !(total & 0x01) ); // make sure we have an even count + // make sure we have a count which is divisible by four since four values are added for each ship + Assert((total%4) == 0); + num_choices = 0; - for (i = 0; i < total; i += 2) { + for (i = 0; i < total; i += 4) { // in a campaign, see if the player is allowed the weapons or not. Remove them from the // pool if they are not allowed if (Game_mode & GM_CAMPAIGN_MODE || ((Game_mode & GM_MULTIPLAYER) && !(Net_player->flags & NETINFO_FLAG_AM_MASTER))) { - if ( !Campaign.weapons_allowed[list2[i]] ) + if ( !Campaign.weapons_allowed[list2[i]] ) { continue; + } } - if ( (list2[i] >= 0) && (list2[i] < MAX_WEAPON_TYPES) ) { + if ( (list2[i] >= 0) && (list2[i] < MAX_WEAPON_TYPES) ) { // always allow the pool to be added in FRED, it is a verbal warning // to let the mission dev know about the problem - if ( (Weapon_info[list2[i]].wi_flags & WIF_PLAYER_ALLOWED) || Fred_running ) - ptr->weaponry_pool[list2[i]] = list2[i+1]; - else + if ( (Weapon_info[list2[i]].wi_flags & WIF_PLAYER_ALLOWED) || Fred_running ) { + ptr->weaponry_pool[num_choices] = list2[i]; + ptr->weaponry_count[num_choices] = list2[i+2]; + ptr->weaponry_pool_variable[num_choices] = list2[i+1]; + ptr->weaponry_amount_variable[num_choices] = list2[i+3]; + num_choices++; + } + else { mprintf(("WARNING: Weapon '%s' in weapon pool isn't allowed on player loadout! Ignoring it ...\n", Weapon_info[i].name)); + } } } + ptr->num_weapon_choices = num_choices; } if ( nt != Num_teams ) Error(LOCATION, "Not enough ship/weapon pools for mission. There are %d teams and only %d pools.", Num_teams, nt); } +// a little helper for the next function +void parse_single_cutscene (mission *pm, int type) +{ + mission_cutscene scene; + + scene.type = type; + stuff_string (scene.cutscene_name, F_NAME, NAME_LENGTH); + + if ( required_string("+formula:") ) { + scene.formula = get_sexp_main(); + } + + pm->cutscenes.push_back(scene); +} + +void parse_cutscenes(mission *pm) +{ + pm->cutscenes.clear(); + + if (optional_string("#Cutscenes")) { + while(!optional_string("#end")){ + if (optional_string("$Fiction Viewer Cutscene:")) { + parse_single_cutscene(pm, MOVIE_PRE_FICTION); + } + + if (optional_string("$Command Brief Cutscene:")) { + parse_single_cutscene(pm, MOVIE_PRE_CMD_BRIEF); + } + + if (optional_string("$Briefing Cutscene:")) { + parse_single_cutscene(pm, MOVIE_PRE_BRIEF); + } + + if (optional_string("$Pre-game Cutscene:")) { + parse_single_cutscene(pm, MOVIE_PRE_GAME); + } + + if (optional_string("$Debriefing Cutscene:")) { + parse_single_cutscene(pm, MOVIE_PRE_DEBRIEF); + } + } + } +} + void parse_plot_info(mission *pm) { if (optional_string("#Plot Info")) @@ -2867,10 +2931,6 @@ int parse_create_object_sub(p_object *p_objp) shipp->special_hitpoint_index = p_objp->special_hitpoint_index; shipp->ship_max_shield_strength = p_objp->ship_max_shield_strength; shipp->ship_max_hull_strength = p_objp->ship_max_hull_strength; - shipp->max_shield_recharge_pct = p_objp->max_shield_recharge_percent; - - for (i=0;iship_max_shield_segment[i] = p_objp->max_shield_segment_strength[i]; // Goober5000 - ugh, this is really stupid having to do this here; if the // ship creation code was better organized this wouldn't be necessary @@ -2984,6 +3044,10 @@ int parse_create_object_sub(p_object *p_objp) } } + // Copy across the alt classes (if any) for FRED + if (Fred_running) { + shipp->s_alt_classes = p_objp->alt_classes; + } // check the parse object's flags for possible things to set on this newly created ship resolve_parse_flags(&Objects[objnum], p_objp->flags, p_objp->flags2); @@ -3184,6 +3248,15 @@ int parse_create_object_sub(p_object *p_objp) } } + if (shipp->flags2 & SF2_LOCK_ALL_TURRETS_INITIALLY) + { + // mark all turrets as locked + if(ptr->system_info->type == SUBSYSTEM_TURRET) + { + ptr->weapons.flags |= SW_FLAG_TURRET_LOCK; + } + } + if (!subsystem_stricmp(ptr->system_info->subobj_name, sssp->name)) { if (Fred_running) @@ -3253,28 +3326,19 @@ int parse_create_object_sub(p_object *p_objp) } else { - int max_allowed_sparks, num_sparks, i; + int max_allowed_sparks, num_sparks, iLoop; polymodel *pm; // shipp->hull_hit_points_taken = (float) p_objp->initial_hull * sip->max_hull_hit_points / 100.0f; Objects[objnum].hull_strength = p_objp->initial_hull * shipp->ship_max_hull_strength / 100.0f; - int n_shd_sections; - switch (Objects[objnum].n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; + for (iLoop = 0; iLoopinitial_shields * get_max_shield_quad(&Objects[objnum]) / 100.0f); } - for (i = 0; imax_shield_recharge_pct * p_objp->initial_shields * get_max_shield_quad(&Objects[objnum],i) / 100.0f); // initial velocities now do not apply to ships which warp in after mission starts - if (!(Game_mode & GM_IN_MISSION)) + //WMC - Make it apply for ships with IN_PLACE_ANIM type + if (!(Game_mode & GM_IN_MISSION) || sip->warpin_type == WT_IN_PLACE_ANIM) { Objects[objnum].phys_info.speed = (float) p_objp->initial_velocity * sip->max_speed / 100.0f; Objects[objnum].phys_info.vel.xyz.z = Objects[objnum].phys_info.speed; @@ -3294,7 +3358,7 @@ int parse_create_object_sub(p_object *p_objp) if (num_sparks > max_allowed_sparks) num_sparks = max_allowed_sparks; - for (i = 0; i < num_sparks; i++) + for (iLoop = 0; iLoop < num_sparks; iLoop++) { vec3d v1, v2; @@ -3457,6 +3521,9 @@ void resolve_parse_flags(object *objp, int parse_flags, int parse_flags2) if (parse_flags2 & P2_SF2_SECONDARIES_LOCKED) shipp->flags2 |= SF2_SECONDARIES_LOCKED; + if (parse_flags2 & P2_SF2_SET_CLASS_DYNAMICALLY) + shipp->flags2 |= SF2_SET_CLASS_DYNAMICALLY; + if (parse_flags2 & P2_SF2_NO_DEATH_SCREAM) shipp->flags2 |= SF2_NO_DEATH_SCREAM; @@ -3468,6 +3535,12 @@ void resolve_parse_flags(object *objp, int parse_flags, int parse_flags2) if (parse_flags2 & P2_SF2_HIDE_SHIP_NAME) shipp->flags2 |= SF2_HIDE_SHIP_NAME; + + if (parse_flags2 & P2_SF2_LOCK_ALL_TURRETS_INITIALLY) + shipp->flags2 |= SF2_LOCK_ALL_TURRETS_INITIALLY; + + if (parse_flags2 & P2_SF2_AFTERBURNER_LOCKED) + shipp->flags2 |= SF2_AFTERBURNER_LOCKED; } // Mp points at the text of an object, which begins with the "$Name:" field. @@ -3503,6 +3576,54 @@ int parse_object(mission *pm, int flag, p_object *p_objp) Num_unknown_ship_classes++; } + // Karajorma - See if there are any alternate classes specified for this ship. + p_objp->alt_classes.clear(); + // The alt class can either be a variable or a ship class name + char alt_ship_class[TOKEN_LENGTH > NAME_LENGTH ? TOKEN_LENGTH : NAME_LENGTH]; + int is_variable; + + while (optional_string("$Alt Ship Class:")) { + alt_class new_alt_class; + + is_variable = get_string_or_variable(alt_ship_class); + + if (is_variable) { + new_alt_class.variable_index = get_index_sexp_variable_name(alt_ship_class); + new_alt_class.ship_class = ship_info_lookup(Sexp_variables[new_alt_class.variable_index].text); + } + else { + new_alt_class.variable_index = -1; + new_alt_class.ship_class = ship_info_lookup(alt_ship_class); + } + + if (new_alt_class.ship_class < 0 ) { + if (!Fred_running) { + Warning(LOCATION, "Ship \"%s\" has an invalid Alternate Ship Class type (ships.tbl probably changed). Skipping this entry", p_objp->name); + continue; + } + else { + // incorrect initial values for a variable can be fixed in FRED + if (new_alt_class.variable_index != -1) { + Warning(LOCATION, "Ship \"%s\" has an invalid Alternate Ship Class type.", p_objp->name); + } + // but there is little we can do if someone spelled a ship class incorrectly + else { + Warning(LOCATION, "Ship \"%s\" has an invalid Alternate Ship Class type. Skipping this entry", p_objp->name); + continue; + } + } + } + + if (optional_string("+Default Class:")) { + new_alt_class.default_to_this_class = true; + } + else { + new_alt_class.default_to_this_class = false; + } + + p_objp->alt_classes.push_back(new_alt_class); + } + // if this is a multiplayer dogfight mission, skip support ships if((Game_mode & GM_MULTIPLAYER) && (Netgame.type_flags & NG_TYPE_DOGFIGHT) && (Ship_info[p_objp->ship_class].flags & SIF_SUPPORT)) return 0; @@ -3779,24 +3900,38 @@ int parse_object(mission *pm, int flag, p_object *p_objp) if (optional_string("+Special Hitpoint index:")) stuff_int(&p_objp->special_hitpoint_index); - p_objp->max_shield_recharge_percent = Ship_info[p_objp->ship_class].max_shield_recharge; - // get hitpoint values + // set max hitpoint values + p_objp->ship_max_shield_strength = Ship_info[p_objp->ship_class].max_shield_strength; + p_objp->ship_max_hull_strength = Ship_info[p_objp->ship_class].max_hull_strength; + + // swap to the special hitpoint ones if they were set if (p_objp->special_hitpoint_index != -1) { - p_objp->ship_max_shield_strength = (float) atoi(Sexp_variables[p_objp->special_hitpoint_index+SHIELD_STRENGTH].text); - p_objp->ship_max_hull_strength = (float) atoi(Sexp_variables[p_objp->special_hitpoint_index+HULL_STRENGTH].text); - } - else - { - p_objp->ship_max_shield_strength = Ship_info[p_objp->ship_class].max_shield_strength; - p_objp->ship_max_hull_strength = Ship_info[p_objp->ship_class].max_hull_strength; + bool reset_index = false; + + if ((Sexp_variables[p_objp->special_hitpoint_index+SHIELD_STRENGTH].type & SEXP_VARIABLE_SET) && + (Sexp_variables[p_objp->special_hitpoint_index+SHIELD_STRENGTH].type & SEXP_VARIABLE_BLOCK) ) { + p_objp->ship_max_shield_strength = (float) atoi(Sexp_variables[p_objp->special_hitpoint_index+SHIELD_STRENGTH].text); + } + else { + Warning(LOCATION, "Special shield hitpoints used for variable number %d. But no variable with this number exists!", p_objp->special_hitpoint_index+SHIELD_STRENGTH); + reset_index = true; + } + + if ((Sexp_variables[p_objp->special_hitpoint_index+HULL_STRENGTH].type & SEXP_VARIABLE_SET) && + (Sexp_variables[p_objp->special_hitpoint_index+HULL_STRENGTH].type & SEXP_VARIABLE_BLOCK) ) { + p_objp->ship_max_hull_strength = (float) atoi(Sexp_variables[p_objp->special_hitpoint_index+HULL_STRENGTH].text); + } + else { + Warning(LOCATION, "Special hitpoints used for variable number %d. But no variable with this number exists!", p_objp->special_hitpoint_index+HULL_STRENGTH); + reset_index = true; + } + + if (reset_index) { + p_objp->special_hitpoint_index = -1; + } } - if (Ship_info[p_objp->ship_class].max_shield_strength > 0.0f) { - float shield_mult = p_objp->ship_max_shield_strength / Ship_info[p_objp->ship_class].max_shield_strength; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - p_objp->max_shield_segment_strength[i] = Ship_info[p_objp->ship_class].max_shield_segment_strength[i] * shield_mult; - } Assert(p_objp->ship_max_hull_strength > 0.0f); // Goober5000: div-0 check (not shield because we might not have one) // if the kamikaze flag is set, we should have the next flag @@ -4097,7 +4232,7 @@ void mission_parse_maybe_create_parse_object(p_object *pobjp) debris *db; db = &Debris[i]; - if (!db->flags & DEBRIS_USED) // not used, move onto the next one. + if (!(db->flags & DEBRIS_USED)) // not used, move onto the next one. continue; if (db->source_objnum != real_objnum) // not from this ship, move to next one continue; @@ -4182,6 +4317,160 @@ void parse_common_object_data(p_object *objp) } } + +// Karajorma - Checks if any ships of a certain ship class are still available in the team loadout +// Returns the index of the ship in team_data->ship_list if found or -1 if it isn't +int get_reassigned_index(team_data *current_team, int ship_class) +{ + // Search through the available ships to see if there is a matching ship class in the loadout + for (int i=0; i < current_team->num_ship_choices; i++) + { + if (ship_class == current_team->ship_list[i]) + { + if (current_team->ship_count[i] > 0) { + return i; + } + else { + return -1; + } + } + } + + return -1; +} + +// Karajorma - Updates the loadout quanities for a ship class. +void update_loadout_totals(team_data *current_team, int loadout_index) +{ + // Fix the loadout variables to show that the class has less available if there are still ships available + if (current_team->ship_count[loadout_index] > 0) + { + Assert (current_team->loadout_total > 0); + + current_team->ship_count[loadout_index]--; + current_team->loadout_total--; + } +} + +// Karajorma - Attempts to set the class of this ship based which ship classes still remain unassigned in the ship loadout +// The ship class specified by the mission file itself is tested first. Followed by the list of alt classes. +// If an alt class flagged as default_to_this_class is reached the ship will be assigned to that class. +// If the class can't be assigned because no ships of that class remain the function returns false. +bool is_ship_assignable(p_object *p_objp) +{ + int loadout_index = -1, i; + + team_data *data_for_team = &Team_data[p_objp->team]; + + // First lets check if the ship specified in the mission file is of an assignable class + loadout_index = get_reassigned_index(data_for_team, p_objp->ship_class); + if (loadout_index != -1 ) + { + Assert (data_for_team->loadout_total > 0); + + update_loadout_totals(data_for_team, loadout_index); + + // Since the ship in the mission file matched one available in the loadout we need go no further + return true; + } + + // Now we check the alt_classes (if there are any) + for (i = 0; i < (int)p_objp->alt_classes.size(); i++) { + // we don't check availability unless we are asked to + if (p_objp->alt_classes[i].default_to_this_class == false) { + loadout_index = p_objp->alt_classes[i].ship_class; + break; + } + else { + loadout_index = get_reassigned_index(data_for_team, p_objp->alt_classes[i].ship_class); + if (loadout_index != -1 ) { + update_loadout_totals(data_for_team, loadout_index); + break; + } + } + } + + // If we managed to assign a class we'd may need to actually swap to it + if (loadout_index != -1 ) { + if (p_objp->ship_class != data_for_team->ship_list[loadout_index]) + { + swap_parse_object(p_objp, data_for_team->ship_list[loadout_index]); + } + return true; + } + + return false; +} + +// Karajorma - Checks the list of Parse_objects to see if any of them should be reassigned based on the +// number of ships of that class that were present in the loadout. +void process_loadout_objects() +{ + std::vector reassignments; + + // Loop through all the Parse_objects looking for ships that should be affected by the loadout code. + for (int i=0; i < (int)Parse_objects.size(); i++) + { + p_object *p_objp = &Parse_objects[i]; + if (p_objp->flags2 & P2_SF2_SET_CLASS_DYNAMICALLY) + { + if (!(is_ship_assignable(p_objp))) + { + // store the ship so we can come back to it later. + reassignments.push_back(i); + } + } + } + + // Now we go though the ships we were unable to assign earlier and reassign them on a first come first + // served basis. + for (int m=0; m < (int)reassignments.size(); m++) + { + p_object *p_objp = &Parse_objects[reassignments[m]]; + team_data *current_team = &Team_data[p_objp->team]; + bool loadout_assigned = false; + Assert (p_objp->flags2 & P2_SF2_SET_CLASS_DYNAMICALLY); + + // First thing to check is whether we actually have any ships left to assign + if (current_team->loadout_total == 0) + { + /* We'll do this code once the default ship code can be used to set a global default. Till then it's much better + // to simply use the ship that the mission designer specified. + // Check that the team default ship and this ship aren't the same (this may be a different ship + // from any of the alt ship classes). We don't need to do anything if it is the same. + if (p_obj->ship_class != current_team->default_ship) + { + swap_parse_object(p_obj, current_team->default_ship); + }*/ + + // If there is nothing left to assign we should use the ship in the mission file + loadout_assigned = true; + } + // We do have ships left in the team loadout that we can assign + else + { + // Go through the loadout until we find an unassigned ship + for (int j=0; j < current_team->num_ship_choices; j++) + { + if (current_team->ship_count[j] > 0) + { + update_loadout_totals(current_team, j); + // We will need to assign a new class too (if a p_object the same class was available + // it should have been assigned by attempt_loadout_assignation_from_defaults() + Assert (p_objp->ship_class != current_team->ship_list[j]); + swap_parse_object(p_objp, current_team->ship_list[j]); + + loadout_assigned = true; + break ; + } + } + } + + // We should never reach here with an unassigned loadout + Assert (loadout_assigned); + } +} + extern int Multi_ping_timestamp; void parse_objects(mission *pm, int flag) { @@ -4221,7 +4510,15 @@ void parse_objects(mission *pm, int flag) // Goober5000 - I moved the docking stuff to post_process_ships_wings because of interdependencies // between ships and wings. Neither docking stuff nor ship stuff (for ships present at mission start) // will be valid until after post_process_ships_wings is run. + + // Karajorma - Now that we've parsed all the objects we can set the class of those which were flagged + // to be set based on the number of ships available in the loadout. + if (!Fred_running) + { + process_loadout_objects(); + } } + // Karajorma - Replaces a p_object with a new one based on a Ship_info index. void swap_parse_object(p_object *p_obj, int new_ship_class) { @@ -4245,8 +4542,6 @@ void swap_parse_object(p_object *p_obj, int new_ship_class) // Shields - int i; - p_obj->max_shield_recharge_percent = new_ship_info->max_shield_recharge; // Again we have to watch out for special hitpoints but this time we can't assume that there will be a // shield. So first lets see if there is one. if ((p_obj->ship_max_shield_strength != old_ship_info->max_shield_strength) && @@ -4256,22 +4551,18 @@ void swap_parse_object(p_object *p_obj, int new_ship_class) // This ship is using special hitpoints to alter the shield strength float shield_multiplier = p_obj->ship_max_shield_strength / i2fl(old_ship_info->max_shield_strength); p_obj->ship_max_shield_strength = new_ship_info->max_shield_strength * shield_multiplier; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - p_obj->max_shield_segment_strength[i] = new_ship_info->max_shield_segment_strength[i] * shield_multiplier; } // Not using special hitpoints or a class which has a shield strength of zero else { p_obj->ship_max_shield_strength = new_ship_info->max_shield_strength; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - p_obj->max_shield_segment_strength[i] = new_ship_info->max_shield_segment_strength[i]; } // Primary weapons // First find out what is the correct number for a ship of this class int num_pbanks = new_ship_info->num_primary_banks; // Now cycle through the primary banks looking for banks that were added or removed - for (i=0; i < MAX_SHIP_PRIMARY_BANKS; i++) + for (int i=0; i < MAX_SHIP_PRIMARY_BANKS; i++) { // If we're dealing with a primary bank that actually should exist on this ship if ( i < num_pbanks ) @@ -5905,6 +6196,9 @@ void parse_variables() int parse_mission(mission *pm, int flags) { + int saved_warning_count = Global_warning_count; + int saved_error_count = Global_error_count; + int i; Player_starts = Num_cargo = Num_waypoint_lists = Num_goals = Num_wings = 0; @@ -5944,6 +6238,7 @@ int parse_mission(mission *pm, int flags) parse_plot_info(pm); parse_variables(); parse_briefing_info(pm); // TODO: obsolete code, keeping so we don't obsolete existing mission files + parse_cutscenes(pm); parse_fiction(pm); parse_cmd_briefs(pm); parse_briefing(pm, flags); @@ -5961,7 +6256,7 @@ int parse_mission(mission *pm, int flags) parse_music(pm, flags); // if we couldn't load some mod data - if ((Num_unknown_ship_classes > 0) /*|| (Num_unknown_weapon_classes > 0)*/) { + if ((Num_unknown_ship_classes > 0) || ( Num_unknown_loadout_classes > 0 )/*|| (Num_unknown_weapon_classes > 0)*/) { // if running on standalone server, just print to the log if (Game_mode & GM_STANDALONE_SERVER) { mprintf(("Warning! Could not load %d ship classes!", Num_unknown_ship_classes)); @@ -5972,7 +6267,12 @@ int parse_mission(mission *pm, int flags) // build up the prompt... char text[1024]; - sprintf(text, "Warning!\n\nFreeSpace was unable to find %d ship class%s while loading this mission. This can happen if you try to play a %s that is incompatible with the current mod.\n\n", Num_unknown_ship_classes, (Num_unknown_ship_classes > 1) ? "es" : "", (Game_mode & GM_CAMPAIGN_MODE) ? "campaign" : "mission"); + if (Num_unknown_ship_classes > 0) { + sprintf(text, "Warning!\n\nFreeSpace was unable to find %d ship class%s while loading this mission. This can happen if you try to play a %s that is incompatible with the current mod.\n\n", Num_unknown_ship_classes, (Num_unknown_ship_classes > 1) ? "es" : "", (Game_mode & GM_CAMPAIGN_MODE) ? "campaign" : "mission"); + } + else { + sprintf(text, "Warning!\n\nFreeSpace was unable to find %d ship class%s while loading this mission. This can happen if you try to play a %s that is incompatible with the current mod.\n\n", Num_unknown_loadout_classes, (Num_unknown_loadout_classes > 1) ? "es" : "", (Game_mode & GM_CAMPAIGN_MODE) ? "campaign" : "mission"); + } if (Game_mode & GM_CAMPAIGN_MODE) { strcat(text, "(The current campaign is \""); @@ -6010,6 +6310,12 @@ int parse_mission(mission *pm, int flags) post_process_mission(); + if ((saved_warning_count - Global_warning_count) > 10 || (saved_error_count - Global_error_count) > 0) { + char text[512]; + sprintf(text, "Warning!\n\nThe current mission has generated %d warnings and/or errors during load. These are usually caused by corrupted ship models or syntax errors in the mission file. While FreeSpace Open will attempt to compensate for these issues, it cannot guarantee a trouble-free gameplay experience. Source Code Project staff cannot provide assistance or support for these problems, as they are caused by the mission's data files, not FreeSpace Open's source code.", (saved_warning_count - Global_warning_count) + (saved_error_count - Global_error_count)); + popup(PF_TITLE_BIG | PF_TITLE_RED, 1, POPUP_OK, text); + } + // success return 0; } @@ -6256,7 +6562,10 @@ void post_process_mission() int get_mission_info(char *filename, mission *mission_p, bool basic) { char real_fname[MAX_FILENAME_LEN]; - strcpy(real_fname, filename); + + strncpy(real_fname, filename, MAX_FILENAME_LEN-1); + real_fname[sizeof(real_fname)-1] = '\0'; + char *p = strrchr(real_fname, '.'); if (p) *p = 0; // remove any extension strcat(real_fname, FS_MISSION_FILE_EXT); // append mission extension @@ -6328,6 +6637,7 @@ int parse_main(char *mission_name, int flags) // reset parse error stuff Num_unknown_ship_classes = 0; Num_unknown_weapon_classes = 0; + Num_unknown_loadout_classes =0; // fill in Ship_class_names array with the names from the ship_info struct; Num_parse_names = 0; @@ -7896,9 +8206,6 @@ void mission_bring_in_support_ship( object *requester_objp ) // set support ship hitpoints pobj->ship_max_hull_strength = Ship_info[i].max_hull_strength; pobj->ship_max_shield_strength = Ship_info[i].max_shield_strength; - pobj->max_shield_recharge_percent = Ship_info[i].max_shield_recharge; - for (j = 0; j < MAX_SHIELD_SECTIONS; j++) - pobj->max_shield_segment_strength[j] = Ship_info[i].max_shield_segment_strength[j]; pobj->team = requester_shipp->team; @@ -8357,4 +8664,4 @@ void clear_texture_replacements() memset(Fred_texture_replacements, '\0', sizeof(texture_replace)); } Fred_num_texture_replacements = 0; -} \ No newline at end of file +} diff --git a/code/mission/missionparse.h b/code/mission/missionparse.h index c3a305c6e1..43c9b258b4 100644 --- a/code/mission/missionparse.h +++ b/code/mission/missionparse.h @@ -581,7 +581,6 @@ #include #include "ai/ai.h" #include "ai/ai_profiles.h" -#include "iff_defs/iff_defs.h" #include "model/model.h" #include "object/object.h" #include "graphics/2d.h" @@ -672,6 +671,22 @@ typedef struct support_ship_info { int support_available_for_species; // whether support is available for a given species (this is a bitfield) } support_ship_info; +// movie type defines +#define MOVIE_PRE_FICTION 0 +#define MOVIE_PRE_CMD_BRIEF 1 +#define MOVIE_PRE_BRIEF 2 +#define MOVIE_PRE_GAME 3 +#define MOVIE_PRE_DEBRIEF 4 + +// defines a mission cutscene. +typedef struct mission_cutscene { + int type; + char cutscene_name[NAME_LENGTH]; + int formula; + + mission_cutscene() { memset(this, 0, sizeof(mission_cutscene)); formula = -1; }; +} mission_cutscene; + typedef struct mission { char name[NAME_LENGTH]; char author[NAME_LENGTH]; @@ -690,6 +705,7 @@ typedef struct mission { char loading_screen[GR_NUM_RESOLUTIONS][MAX_FILENAME_LEN]; char skybox_model[MAX_FILENAME_LEN]; char envmap_name[MAX_FILENAME_LEN]; + int skybox_flags; int contrail_threshold; int ambient_light_level; @@ -705,6 +721,8 @@ typedef struct mission { // Goober5000 ai_profile_t *ai_profile; + + std::vector cutscenes; } mission; // cargo defines @@ -798,6 +816,7 @@ extern int Loading_screen_bm_index; extern int Num_unknown_ship_classes; extern int Num_unknown_weapon_classes; +extern int Num_unknown_loadout_classes; extern ushort Current_file_checksum; extern int Current_file_length; @@ -830,6 +849,11 @@ typedef struct texture_replace { extern texture_replace *Fred_texture_replacements; +typedef struct alt_class { + int ship_class; + int variable_index; // if set allows the class to be set by a variable + bool default_to_this_class; +}alt_class; #define MAX_OBJECT_STATUS 10 @@ -908,13 +932,12 @@ typedef struct p_object { float ship_max_hull_strength; float ship_max_shield_strength; - float max_shield_recharge_percent; - float max_shield_segment_strength[MAX_SHIELD_SECTIONS]; - // Goober5000 int num_texture_replacements; texture_replace replacement_textures[MAX_REPLACEMENT_TEXTURES]; // replacement textures - Goober5000 + std::vector alt_classes; + int alt_iff_color[MAX_IFFS][MAX_IFFS]; } p_object; @@ -963,7 +986,7 @@ typedef struct p_object { // same caveat: This list of bitfield indicators MUST correspond EXACTLY // (i.e., order and position must be the same) to its counterpart in MissionParse.cpp!!!! -#define MAX_PARSE_OBJECT_FLAGS_2 14 +#define MAX_PARSE_OBJECT_FLAGS_2 17 #define P2_SF2_PRIMITIVE_SENSORS (1<<0) #define P2_SF2_NO_SUBSPACE_DRIVE (1<<1) @@ -978,7 +1001,10 @@ typedef struct p_object { #define P2_SF2_ALWAYS_DEATH_SCREAM (1<<10) #define P2_SF2_NAV_NEEDSLINK (1<<11) #define P2_SF2_HIDE_SHIP_NAME (1<<12) -#define P2_OF_FORCE_SHIELDS_ON (1<<13) +#define P2_SF2_SET_CLASS_DYNAMICALLY (1<<13) +#define P2_SF2_LOCK_ALL_TURRETS_INITIALLY (1<<14) +#define P2_SF2_AFTERBURNER_LOCKED (1<<15) +#define P2_OF_FORCE_SHIELDS_ON (1<<16) // and again: these flags do not appear in the array //#define blah (1<<29) @@ -993,13 +1019,22 @@ extern std::vector Parse_objects; extern p_object Support_ship_pobj, *Arriving_support_ship; extern p_object Ship_arrival_list; - typedef struct { + // ships int default_ship; // default ship type for player start point (recommended choice) - int number_choices; // number of ship choices inside ship_list + int num_ship_choices; // number of ship choices inside ship_list + int loadout_total; // Total number of ships available of all classes int ship_list[MAX_SHIP_CLASSES]; + int ship_list_variables[MAX_SHIP_CLASSES]; int ship_count[MAX_SHIP_CLASSES]; + int ship_count_variables[MAX_SHIP_CLASSES]; + + // weapons + int num_weapon_choices; int weaponry_pool[MAX_WEAPON_TYPES]; + int weaponry_count[MAX_WEAPON_TYPES]; + int weaponry_pool_variable[MAX_WEAPON_TYPES]; + int weaponry_amount_variable[MAX_WEAPON_TYPES]; } team_data; #define MAX_P_WINGS 16 @@ -1107,7 +1142,3 @@ subsys_status *parse_get_subsys_status(p_object *pobjp, char *subsys_name); #endif - - - - diff --git a/code/missionui/chatbox.cpp b/code/missionui/chatbox.cpp index b9ce4e3445..36a045820e 100644 --- a/code/missionui/chatbox.cpp +++ b/code/missionui/chatbox.cpp @@ -694,17 +694,52 @@ void chatbox_set_mode(int mode_flags) } } +int chatbox_get_msg_target_type(char *msg ) +{ + if (msg[0] != '/') { + return MULTI_MSG_ALL; + } + + if (!strnicmp (msg, "/f:", 3)) { + return MULTI_MSG_FRIENDLY; + } + + if (!strnicmp (msg, "/h:", 3)) { + return MULTI_MSG_HOSTILE; + } + + return MULTI_MSG_EXPR; +} + +int chatbox_get_msg_target_length(char *msg) +{ + if ((msg[0] != '/') && (strchr(msg, ':') != NULL) ) { + return -1; + } + + // find the first space + return strcspn(msg, ":") + 1 ; + +} + // automatically split up any input text, send it, and leave the remainder void chatbox_autosplit_line() { char *remainder,msg[150]; + char temp[150]; int msg_pixel_width; + int target, target_length = -1; // if the chat line is getting too long, fire off the message, putting the last // word on the next input line. memset(msg,0,150); Chat_inputbox.get_text(msg); remainder = ""; + + // check if this message is supposed to have a recipient + target = chatbox_get_msg_target_type(msg); + target_length = chatbox_get_msg_target_length(msg); + // determine if the width of the string in pixels is > than the inputbox width -- if so, // then send the message gr_get_string_size(&msg_pixel_width, NULL, msg); @@ -719,20 +754,49 @@ void chatbox_autosplit_line() } // if I'm the server, then broadcast the packet chatbox_recall_add(msg); - send_game_chat_packet(Net_player, msg, MULTI_MSG_ALL,NULL); + + if (target != MULTI_MSG_EXPR) { + send_game_chat_packet(Net_player, msg, target); + } + else { + // copy the name of the player the message is being sent to + strncpy(temp, msg+1, target_length-2); + temp[target_length-2] = '\0'; + send_game_chat_packet(Net_player, msg, target, NULL, temp); + } chatbox_add_line(msg, MY_NET_PLAYER_NUM); - // display any remainder of text on the next line - Chat_inputbox.set_text(remainder); + if (target != MULTI_MSG_ALL) { + // we need to add the target the message is going to before we add the rest of the string + strncpy(temp, msg, target_length); + temp[target_length] = ' '; + temp[target_length+1] = '\0'; + strcat(temp, remainder); + Chat_inputbox.set_text(temp); + } + else { + // display any remainder of text on the next line + Chat_inputbox.set_text(remainder); + } } else if((Chat_inputbox.pressed() && (strlen(msg) > 0)) || (strlen(msg) >= CHATBOX_MAX_LEN)) { // tack on the null terminator in the boundary case int x = strlen(msg); if(x >= CHATBOX_MAX_LEN){ msg[CHATBOX_MAX_LEN-1] = '\0'; - } + } + // if I'm the server, then broadcast the packet chatbox_recall_add(msg); - send_game_chat_packet(Net_player, msg, MULTI_MSG_ALL,NULL); + if (target != MULTI_MSG_EXPR) { + send_game_chat_packet(Net_player, msg, target); + } + else { + // copy the name of the player the message is being sent to + strncpy(temp, msg+1, target_length-2); + temp[target_length-2] = '\0'; + send_game_chat_packet(Net_player, msg, target, NULL, temp); + } + chatbox_add_line(msg, MY_NET_PLAYER_NUM); // display any remainder of text on the next line diff --git a/code/missionui/fictionviewer.cpp b/code/missionui/fictionviewer.cpp index 9955724ad3..341496afcd 100644 --- a/code/missionui/fictionviewer.cpp +++ b/code/missionui/fictionviewer.cpp @@ -231,7 +231,7 @@ void fiction_viewer_init() Fiction_viewer_buttons[gr_screen.res][FVW_BUTTON_SCROLL_DOWN].button.set_hotkey(KEY_DOWN); // init brief text - brief_color_text_init(Fiction_viewer_text, Fiction_viewer_text_coordinates[gr_screen.res][2]); + brief_color_text_init(Fiction_viewer_text, Fiction_viewer_text_coordinates[gr_screen.res][2], 0, 0); // if the story is going to overflow the screen, add a slider if (Num_brief_text_lines[0] > Fiction_viewer_text_max_lines[gr_screen.res]) diff --git a/code/missionui/missiondebrief.cpp b/code/missionui/missiondebrief.cpp index ca159c13f2..9ce4cc1012 100644 --- a/code/missionui/missiondebrief.cpp +++ b/code/missionui/missiondebrief.cpp @@ -218,7 +218,7 @@ * The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can. * * Revision 2.6 2003/01/27 00:51:46 DTP - * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. + * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still can't join. narrowing it down. * * Revision 2.5 2003/01/14 04:00:16 Goober5000 * allowed for up to 256 main halls @@ -1336,7 +1336,9 @@ int debrief_set_stages_and_multi_stuff() // traitor debriefing. Only done in single player debriefp = Debriefing; if ( !(Game_mode & GM_MULTIPLAYER) ) { - if (Player_ship->team == Iff_traitor) + // although the no traitor flag check seems redundant it allows the mission designer to turn the traitor + // debriefing off before the mission ends and supply one themselves + if ((Player_ship->team == Iff_traitor) && !(The_mission.flags & MISSION_FLAG_NO_TRAITOR)) debriefp = &Traitor_debriefing; } @@ -1897,7 +1899,7 @@ void debrief_accept(int ok_to_post_start_game_event) if ( Game_mode & GM_CAMPAIGN_MODE ) { // check for possible mission loop - // check for (1) mission loop available, (2) dont have to repeat last mission + // check for (1) mission loop available, (2) don't have to repeat last mission if(!(Game_mode & GM_MULTIPLAYER)){ int cur = Campaign.current_mission; bool require_repeat_mission = (Campaign.current_mission == Campaign.next_mission); @@ -2857,7 +2859,7 @@ void debrief_draw_award_text() } } -// clears out text array so we dont have old award text showing up on new awards. +// clears out text array so we don't have old award text showing up on new awards. void debrief_award_text_clear() { int i; @@ -3177,7 +3179,7 @@ void debrief_do_frame(float frametime) gr_flip(); - // dont let dude skip 3-09. hack. + // don't let dude skip 3-09. hack. if(Game_mode & GM_CAMPAIGN_MODE){ if((Campaign.current_mission >= 0) && (Campaign.current_mission < MAX_CAMPAIGN_MISSIONS)){ if ((Campaign.missions[Campaign.current_mission].name != NULL) && !stricmp(Campaign.missions[Campaign.current_mission].name, "sm3-09.fs2")) { @@ -3203,7 +3205,7 @@ void debrief_do_frame(float frametime) gameseq_post_event(GS_EVENT_START_GAME); break; case 2: - // dont show this again + // don't show this again Player->show_skip_popup = 0; break; } diff --git a/code/missionui/missionscreencommon.cpp b/code/missionui/missionscreencommon.cpp index 253eb98300..2d7dd6a13a 100644 --- a/code/missionui/missionscreencommon.cpp +++ b/code/missionui/missionscreencommon.cpp @@ -436,8 +436,9 @@ #include "network/multiteamselect.h" #include "network/multi_endgame.h" #include "missionui/chatbox.h" - - +#include "cutscene/movie.h" +#include "cutscene/cutscenes.h" +#include "parse/sexp.h" ////////////////////////////////////////////////////////////////// @@ -732,6 +733,23 @@ void common_music_close() briefing_stop_music(); } +void common_maybe_play_cutscene(int movie_type) +{ + for (uint i = 0; i < The_mission.cutscenes.size(); i++) { + if (movie_type == The_mission.cutscenes[i].type) { + if (!eval_sexp( The_mission.cutscenes[i].formula )) { + continue; + } + + if ( strlen(The_mission.cutscenes[i].cutscene_name) ) { + common_music_close(); + movie_play( The_mission.cutscenes[i].cutscene_name ); //Play the movie! + cutscene_mark_viewable( The_mission.cutscenes[i].cutscene_name ); + } + } + } +} + // function that sets the current palette to the interface palette. This function // needs to be followed by common_free_interface_palette() to restore the game palette. void common_set_interface_palette(char *filename) diff --git a/code/missionui/missionscreencommon.h b/code/missionui/missionscreencommon.h index 856a5ffba4..851585571d 100644 --- a/code/missionui/missionscreencommon.h +++ b/code/missionui/missionscreencommon.h @@ -117,6 +117,8 @@ void common_music_init( int score_index ); void common_music_do(); void common_music_close(); +void common_maybe_play_cutscene(int movie_type); + int common_scroll_down_pressed(int *start, int size, int max_show); int common_scroll_up_pressed(int *start, int size, int max_show); diff --git a/code/missionui/missionshipchoice.cpp b/code/missionui/missionshipchoice.cpp index 15196e77fc..094600c9fa 100644 --- a/code/missionui/missionshipchoice.cpp +++ b/code/missionui/missionshipchoice.cpp @@ -3400,7 +3400,7 @@ int ss_fixup_team_data(team_data *tdata) p_team_data = tdata; ship_in_parse_player = 0; - list_size = p_team_data->number_choices; + list_size = p_team_data->num_ship_choices; for ( i = 0; i < MAX_STARTING_WINGS; i++ ) { wing *wp; @@ -3410,7 +3410,7 @@ int ss_fixup_team_data(team_data *tdata) for ( j = 0; j < wp->current_count; j++ ) { ship_in_parse_player = 0; - for ( k = 0; k < p_team_data->number_choices; k++ ) { + for ( k = 0; k < p_team_data->num_ship_choices; k++ ) { Assert( p_team_data->ship_count[k] >= 0 ); if ( p_team_data->ship_list[k] == Ships[wp->ship_index[j]].ship_info_index ) { ship_in_parse_player = 1; @@ -3421,7 +3421,7 @@ int ss_fixup_team_data(team_data *tdata) if ( !ship_in_parse_player ) { p_team_data->ship_count[list_size] = 0; p_team_data->ship_list[list_size] = Ships[wp->ship_index[j]].ship_info_index; - p_team_data->number_choices++; + p_team_data->num_ship_choices++; list_size++; } } // end for, go get next ship in wing @@ -3432,7 +3432,7 @@ int ss_fixup_team_data(team_data *tdata) if ( p_objp->wingnum == WING_INDEX(wp) ) { ship_in_parse_player = 0; - for ( k = 0; k < p_team_data->number_choices; k++ ) { + for ( k = 0; k < p_team_data->num_ship_choices; k++ ) { Assert( p_team_data->ship_count[k] >= 0 ); if ( p_team_data->ship_list[k] == p_objp->ship_class ) { ship_in_parse_player = 1; @@ -3443,7 +3443,7 @@ int ss_fixup_team_data(team_data *tdata) if ( !ship_in_parse_player ) { p_team_data->ship_count[list_size] = 0; p_team_data->ship_list[list_size] = p_objp->ship_class; - p_team_data->number_choices++; + p_team_data->num_ship_choices++; list_size++; } } @@ -3454,7 +3454,7 @@ int ss_fixup_team_data(team_data *tdata) if ( list_size == 0 ) { // ensure that the default player ship is in the ship_list too ship_in_parse_player = 0; - for ( k = 0; k < p_team_data->number_choices; k++ ) { + for ( k = 0; k < p_team_data->num_ship_choices; k++ ) { Assert( p_team_data->ship_count[k] >= 0 ); if ( p_team_data->ship_list[k] == p_team_data->default_ship ) { ship_in_parse_player = 1; @@ -3464,7 +3464,7 @@ int ss_fixup_team_data(team_data *tdata) if ( !ship_in_parse_player ) { p_team_data->ship_count[list_size] = 0; p_team_data->ship_list[list_size] = p_team_data->default_ship; - p_team_data->number_choices++; + p_team_data->num_ship_choices++; list_size++; } } @@ -3484,8 +3484,11 @@ void ss_init_pool(team_data *pteam) } // set number of available ships based on counts in team_data - for ( i = 0; i < pteam->number_choices; i++ ) { - Ss_pool[pteam->ship_list[i]] = pteam->ship_count[i]; + for ( i = 0; i < pteam->num_ship_choices; i++ ) { + if (Ss_pool[pteam->ship_list[i]] == -1) { + Ss_pool[pteam->ship_list[i]] = 0; + } + Ss_pool[pteam->ship_list[i]] += pteam->ship_count[i]; } } diff --git a/code/missionui/missionweaponchoice.cpp b/code/missionui/missionweaponchoice.cpp index c25f12dd54..8a3d8c7495 100644 --- a/code/missionui/missionweaponchoice.cpp +++ b/code/missionui/missionweaponchoice.cpp @@ -987,7 +987,7 @@ static int Wl_bank_coords[GR_NUM_RESOLUTIONS][MAX_SHIP_WEAPONS][2] = { }; static int Wl_bank_count_draw_flags[MAX_SHIP_WEAPONS] = { - 0, 0, 0, // primaries -- dont draw counts + 0, 0, 0, // primaries -- don't draw counts 1, 1, 1, 1 // secondaries -- do draw counts }; @@ -1943,14 +1943,12 @@ void wl_init_pool(team_data *td) Assert( Wl_pool != NULL ); - /* Goober5000 - isn't this superfluous? for ( i = 0; i < MAX_WEAPON_TYPES; i++ ) { - Wl_pool[i] = -1; + Wl_pool[i] = 0; } - */ - for ( i = 0; i < MAX_WEAPON_TYPES; i++ ) { - Wl_pool[i] = td->weaponry_pool[i]; // read from mission + for ( i = 0; i < td->num_weapon_choices; i++ ) { + Wl_pool[td->weaponry_pool[i]] += td->weaponry_count[i]; // read from mission } } @@ -5058,7 +5056,7 @@ void wl_apply_current_loadout_to_all_ships_in_current_wing() // display error messages if (error_flag) { - int i, j; + int j; bool is_duplicate; char error_msg[MAX_WING_SLOTS * MAX_SHIP_WEAPONS * (50 + NAME_LENGTH * 2) + 40]; strcpy(error_msg, "The following errors were encountered:\n\n"); diff --git a/code/missionui/redalert.cpp b/code/missionui/redalert.cpp index addce2f28f..d7aba3ed3b 100644 --- a/code/missionui/redalert.cpp +++ b/code/missionui/redalert.cpp @@ -895,7 +895,7 @@ void red_alert_store_wingman_status() } // store exited ships that did not die - for (int idx=0; idx= MAX_RED_ALERT_SLOTS ) { Int3(); // ran out of red alert slots diff --git a/code/model/model.h b/code/model/model.h index 0d7e33bbd1..3f35a0b0b4 100644 --- a/code/model/model.h +++ b/code/model/model.h @@ -690,6 +690,8 @@ struct object; +extern flag_def_list model_render_flags[]; +extern int model_render_flags_size; #define MAX_DEBRIS_OBJECTS 32 #define MAX_MODEL_DETAIL_LEVELS 8 @@ -772,6 +774,7 @@ typedef struct submodel_instance_info { #define MSS_FLAG_NO_SS_TARGETING (1 << 16) // toggles the subsystem targeting for the turret #define MSS_FLAG_TURRET_RESET_IDLE (1 << 17) // makes turret reset to their initial position if the target is out of field of view #define MSS_FLAG_TURRET_ALT_MATH (1 << 18) // tells the game to use additional calculations should turret have a defined y fov +#define MSS_FLAG_DUM_ROTATES (1 << 19) // Bobboau // definition of stepped rotation struct typedef struct stepped_rotation { @@ -826,6 +829,7 @@ typedef struct model_subsystem { /* contains rotation rate info */ int turret_gun_rotation_snd; // Sound to make when the turret moves float turret_gun_rotation_snd_mult; // Volume multiplier for the turret sounds + //Sound stuff int alive_snd; //Sound to make while the subsystem is not-dead int dead_snd; //Sound to make when the subsystem is dead. @@ -860,7 +864,6 @@ typedef struct model_subsystem { /* contains rotation rate info */ // target priority setting for turrets int target_priority[32]; int num_target_priorities; - } model_subsystem; typedef struct model_special { @@ -975,6 +978,7 @@ typedef struct bsp_info { bool gun_rotation;//for animated weapon models bool no_collisions; // for $no_collisions property - kazan + float dumb_turn_rate; } bsp_info; void parse_triggersint(int &n_trig, queued_animation **triggers, char *props); @@ -1761,4 +1765,5 @@ int decal_make_model(polymodel * pm); void model_setup_cloak(vec3d *shift, int full_cloak, int alpha); void model_finish_cloak(int full_cloak); +void model_do_dumb_rotation(int modelnum); //Bobboau #endif // _MODEL_H diff --git a/code/model/modelinterp.cpp b/code/model/modelinterp.cpp index a6a44090d9..b015175a6b 100644 --- a/code/model/modelinterp.cpp +++ b/code/model/modelinterp.cpp @@ -508,7 +508,7 @@ * * Revision 2.67 2004/02/13 04:17:14 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -652,7 +652,7 @@ * * Revision 2.36 2003/10/14 17:39:15 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -1787,9 +1787,9 @@ vec3d Interp_offset; void interp_compute_environment_mapping( vec3d *nrm, vertex * pnt) { return; - vec3d R; +/* vec3d R; float a; -// matrix * m = &View_matrix; + matrix * m = &View_matrix; vm_vec_rotate( &R, nrm, &View_matrix ); vm_vec_normalize(&R); @@ -1803,6 +1803,7 @@ void interp_compute_environment_mapping( vec3d *nrm, vertex * pnt) pnt->u2 = (float)atan2( R.xyz.x, -R.xyz.z) / (2.0f * 3.14159f); if (pnt->u2 < 0.0) pnt->u2 += 1.0f; pnt->v2 = 1.0f - (float)atan2( a, R.xyz.y) / 3.14159f; + */ } @@ -3407,6 +3408,10 @@ void model_render(int model_num, matrix *orient, vec3d * pos, uint flags, int ob polymodel *pm = model_get(model_num); + + model_do_dumb_rotation(model_num); + + int time = timestamp(); for (int i = 0; i < pm->n_glow_point_banks; i++ ) { //glow point blink code -Bobboau glow_point_bank *bank = &pm->glow_point_banks[i]; @@ -4258,16 +4263,16 @@ void model_render_thrusters(polymodel *pm, int objnum, ship *shipp, matrix *orie vm_vec_sub(&fvec, &norm2, &pnt); vm_vec_normalize(&fvec); - float w = gpt->radius * scale * 2; + float wVal = gpt->radius * scale * 2; - vm_vec_scale_add(&norm2, &pnt, &fvec, w * 2 * Interp_thrust_glow_len_factor); + vm_vec_scale_add(&norm2, &pnt, &fvec, wVal * 2 * Interp_thrust_glow_len_factor); if (The_mission.flags & MISSION_FLAG_FULLNEB) { vm_vec_add(&npnt, &pnt, pos); d *= fog_int; } - secondary_thruster_batcher.draw_beam(&pnt, &norm2, w*Interp_secondary_thrust_glow_rad_factor*0.5f, d); + secondary_thruster_batcher.draw_beam(&pnt, &norm2, wVal*Interp_secondary_thrust_glow_rad_factor*0.5f, d); } } // end secondary glows diff --git a/code/model/modelread.cpp b/code/model/modelread.cpp index 6624904ffe..220408b8ae 100644 --- a/code/model/modelread.cpp +++ b/code/model/modelread.cpp @@ -396,7 +396,7 @@ * * Revision 2.30 2004/02/13 04:17:14 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -423,7 +423,7 @@ * * Revision 2.25 2003/10/14 17:39:15 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -1243,6 +1243,16 @@ #include "gamesnd/gamesnd.h" +flag_def_list model_render_flags[] = +{ + {"no lighting", MR_NO_LIGHTING}, + {"transparent", MR_ALL_XPARENT}, + {"no Zbuffer", MR_NO_ZBUFFER}, + {"no cull", MR_NO_CULL}, + {"no glowmaps", MR_NO_GLOWMAPS} +}; + +int model_render_flags_size = sizeof(model_render_flags)/sizeof(flag_def_list); #define MAX_SUBMODEL_COLLISION_ROT_ANGLE (PI / 6.0f) // max 30 degrees per frame @@ -2428,6 +2438,14 @@ int read_model_file(polymodel * pm, char *filename, int n_subsystems, model_subs } } + + if(( p = strstr(props, "$dumb_rotate:"))!= NULL ){ //Iyojj skybox 4 + pm->submodel[n].movement_type = MSS_FLAG_DUM_ROTATES; + pm->submodel[n].dumb_turn_rate = (float)atof(p+13); + }else{ + pm->submodel[n].dumb_turn_rate = 0.0f; + } + if ( pm->submodel[n].name[0] == '\0' ) { strcpy(pm->submodel[n].name, "unknown object name"); } @@ -3069,7 +3087,7 @@ int read_model_file(polymodel * pm, char *filename, int n_subsystems, model_subs n = cfread_int(fp); pm->n_textures = n; - // Dont overwrite memory!! + // Don't overwrite memory!! Assert(n <= MAX_MODEL_TEXTURES); //mprintf(0," num textures = %d\n",n); for (i=0; irotation_timestamp = timestamp(turret->turret_reset_delay); - base_delta = vm_interp_angle(&base_angles->h, desired_angles.h, step_size); - gun_delta = vm_interp_angle(&gun_angles->p, desired_angles.p, step_size); - // reset these two ss->base_rotation_rate_pct = 0.0f; ss->gun_rotation_rate_pct = 0.0f; + base_delta = vm_interp_angle(&base_angles->h, desired_angles.h, step_size); + gun_delta = vm_interp_angle(&gun_angles->p, desired_angles.p, step_size); + if (turret->turret_base_rotation_snd != -1) { if (step_size > 0) @@ -5044,6 +5062,47 @@ void model_set_instance(int model_num, int sub_model_num, submodel_instance_info } + +void model_do_childeren_dumb_rotation(polymodel * pm, int mn){ + while ( mn >= 0 ) { + + bsp_info * sm = &pm->submodel[mn]; + + if ( sm->movement_type == MSS_FLAG_DUM_ROTATES ){ + float *ang; + int axis = sm->movement_axis; + switch(axis){ + case MOVEMENT_AXIS_X: + ang = &sm->angs.p; + break; + case MOVEMENT_AXIS_Z: + ang = &sm->angs.b; + break; + default: + case MOVEMENT_AXIS_Y: + ang = &sm->angs.h; + break; + } + *ang = sm->dumb_turn_rate * float(timestamp())/1000.0f; + *ang = ((*ang/(PI*2.0f))-float(int(*ang/(PI*2.0f))))*(PI*2.0f); + //this keeps ang from getting bigger than 2PI + } + + if(pm->submodel[mn].first_child >-1)model_do_childeren_dumb_rotation(pm, pm->submodel[mn].first_child); + + mn = pm->submodel[mn].next_sibling; + } +} +void model_do_dumb_rotation(int pn){ + polymodel * pm; + + pm = model_get(pn); + int mn = pm->detail[0]; + + model_do_childeren_dumb_rotation(pm,mn); +} + + // Finds a point on the rotation axis of a submodel, used in collision, generally find rotational velocity void model_init_submodel_axis_pt(submodel_instance_info *sii, int model_num, int submodel_num) { diff --git a/code/nebula/neb.cpp b/code/nebula/neb.cpp index ada85b7249..05896fcfcd 100644 --- a/code/nebula/neb.cpp +++ b/code/nebula/neb.cpp @@ -164,7 +164,7 @@ * * Revision 2.17 2004/02/13 04:17:14 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -179,7 +179,7 @@ * Added fix for fogging debris in D3D htl. * * Revision 2.14 2003/11/29 10:52:10 randomtiger - * Turned off D3D file mapping, its using too much memory which may be hurting older systems and doesnt seem to be providing much of a speed benifit. + * Turned off D3D file mapping, it's using too much memory which may be hurting older systems and doesn't seem to be providing much of a speed benifit. * Added stats command for ingame stats on memory usage. * Trys to play intro.mve and intro.avi, just to be safe since its not set by table. * Added fix for fonts wrapping round in non standard hi res modes. @@ -217,7 +217,7 @@ * * Revision 2.8 2003/10/14 17:39:16 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * diff --git a/code/nebula/neb.h b/code/nebula/neb.h index aad86da089..076578f5bb 100644 --- a/code/nebula/neb.h +++ b/code/nebula/neb.h @@ -42,7 +42,7 @@ * * Revision 2.2 2003/10/14 17:39:16 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * diff --git a/code/network/chat_api.cpp b/code/network/chat_api.cpp index d050b398fb..d5d66ed408 100644 --- a/code/network/chat_api.cpp +++ b/code/network/chat_api.cpp @@ -444,7 +444,7 @@ char *GetChatUserList() // You can't be in more than one channel at a time with this API, so you // leave the current channel before trying to join // a new one. Because of this if the join fails, make sure you try to join -// another channel, or the user wont be able to chat +// another channel, or the user won't be able to chat //-1 Failed to join // 0 joining // 1 successfully joined diff --git a/code/network/multi.cpp b/code/network/multi.cpp index a0ae2f0388..0cbfeb3a47 100644 --- a/code/network/multi.cpp +++ b/code/network/multi.cpp @@ -434,7 +434,7 @@ net_player *Net_player; // pointer to console's net_player entry // netgame vars netgame_info Netgame; // netgame information -int Multi_mission_loaded = 0; // flag, so that we dont' load the mission more than once client side +int Multi_mission_loaded = 0; // flag, so that we don't load the mission more than once client side int Ingame_join_net_signature = -1; // signature for the player obj for use when joining ingame int Multi_button_info_ok = 0; // flag saying it is ok to apply critical button info on a client machine int Multi_button_info_id = 0; // identifier of the stored button info to be applying @@ -1251,6 +1251,10 @@ void process_packet_normal(ubyte* data, header *header_info) process_self_destruct_packet(data, header_info); break; + case SEXP: + process_sexp_packet(data, header_info); + break; + default: nprintf(("Network", "Received packet with unknown type %d\n", data[0] )); header_info->bytes_processed = 10000; diff --git a/code/network/multi.h b/code/network/multi.h index 82738869e5..e9c2cee5fb 100644 --- a/code/network/multi.h +++ b/code/network/multi.h @@ -604,7 +604,8 @@ extern int Om_tracker_flag; // for both ships and subsystems #define VARIABLE_UPDATE 0xF0 // Karajorma - a variable update packet from server to all clients #define WEAPON_OR_AMMO_CHANGED 0xF1 // Karajorma - The weapon or ammo of a fighter/bomber has been changed -#define CHANGE_IFF_COLOR 0xF2 // Wanderer - change iff color +#define SEXP 0xF2 // Karajorma - a general packet which can be used to update clients with changes caused by SEXPs +#define CHANGE_IFF_COLOR 0xF3 // Wanderer - change iff color #define MAX_TYPE_ID 0xFF // better not try to send > 255 in a single byte buddy @@ -1091,7 +1092,7 @@ extern ushort Next_debris_signature; // next debris signature // netgame vars extern netgame_info Netgame; // netgame information -extern int Multi_mission_loaded; // flag, so that we dont' load the mission more than once client side +extern int Multi_mission_loaded; // flag, so that we don't load the mission more than once client side extern ushort Multi_ingame_join_sig; // signature for the player obj for use when joining ingame extern int Multi_button_info_ok; // flag saying it is ok to apply critical button info on a client machine extern int Multi_button_info_id; // identifier of the stored button info to be applying diff --git a/code/network/multi_kick.cpp b/code/network/multi_kick.cpp index b18a786656..cd7adc21b1 100644 --- a/code/network/multi_kick.cpp +++ b/code/network/multi_kick.cpp @@ -297,6 +297,7 @@ void multi_kick_get_text(net_player *pl, int reason, char *str) // safety net if((pl == NULL) || (pl->m_player == NULL)){ strcpy(str, NOX("")); + return; } switch(reason){ diff --git a/code/network/multi_obj.cpp b/code/network/multi_obj.cpp index e2b1780fc8..cb9e84aae6 100644 --- a/code/network/multi_obj.cpp +++ b/code/network/multi_obj.cpp @@ -452,24 +452,24 @@ int multi_oo_pack_data(net_player *pl, object *objp, ubyte oo_flags, ubyte *data PACK_PERCENT(temp); multi_rate_add(NET_PLAYER_NUM(pl), "hul", 1); - float max_shield = shipp->ship_max_shield_strength; + float quad = get_max_shield_quad(objp); // pack 2 shield values into each byte // pack quadrant 1 - temp = (objp->shield_quadrant[0] / max_shield); + temp = (objp->shield_quadrant[0] / quad); PACK_PERCENT(temp); // pack quadrant 2 - temp = (objp->shield_quadrant[1] / max_shield); + temp = (objp->shield_quadrant[1] / quad); PACK_PERCENT(temp); // pack quadrant 3 - temp = (objp->shield_quadrant[2] / max_shield); + temp = (objp->shield_quadrant[2] / quad); PACK_PERCENT(temp); // pack quadrant 2 - temp = (objp->shield_quadrant[3] / max_shield); + temp = (objp->shield_quadrant[3] / quad); PACK_PERCENT(temp); multi_rate_add(NET_PLAYER_NUM(pl), "shl", 4); @@ -878,12 +878,12 @@ int multi_oo_unpack_data(net_player *pl, ubyte *data) UNPACK_PERCENT(shield_2); UNPACK_PERCENT(shield_3); - float max_shield = shipp->ship_max_shield_strength; + float quad = get_max_shield_quad(pobjp); - pobjp->shield_quadrant[0] = (shield_0 * max_shield); - pobjp->shield_quadrant[1] = (shield_1 * max_shield); - pobjp->shield_quadrant[2] = (shield_2 * max_shield); - pobjp->shield_quadrant[3] = (shield_3 * max_shield); + pobjp->shield_quadrant[0] = (shield_0 * quad); + pobjp->shield_quadrant[1] = (shield_1 * quad); + pobjp->shield_quadrant[2] = (shield_2 * quad); + pobjp->shield_quadrant[3] = (shield_3 * quad); } if ( oo_flags & OO_SUBSYSTEMS_AND_AI_NEW ) { diff --git a/code/network/multi_pmsg.cpp b/code/network/multi_pmsg.cpp index fec3832fad..62d0ed244a 100644 --- a/code/network/multi_pmsg.cpp +++ b/code/network/multi_pmsg.cpp @@ -469,32 +469,12 @@ void multi_msg_display_mission_text(char *msg,int player_index) // if the passed net_player's callsign matches the reg expression of the passed expr int multi_msg_matches_expr(net_player *np,char *expr) { - char callsign[CALLSIGN_LEN+1]; - int len,idx; - // some error checking if((np == NULL) || (expr == NULL) || (strlen(expr) <= 0)){ return 0; } - // get the completely lowercase callsign - memset(callsign,0,CALLSIGN_LEN+1); - len = strlen(np->m_player->callsign); - for(idx=0;idxm_player->callsign[idx]); - } - - // see if this guy's callsign matches the expr - len = strlen(expr); - for(idx=0;idxm_player->callsign) ? 0 : 1 ; } // if text input mode is active, clear it diff --git a/code/network/multimsgs.cpp b/code/network/multimsgs.cpp index 62f37f75f2..92b4c5360a 100644 --- a/code/network/multimsgs.cpp +++ b/code/network/multimsgs.cpp @@ -641,7 +641,7 @@ #include "cmeasure/cmeasure.h" #include "parse/sexp.h" #include "fs2netd/fs2netd_client.h" - +#include "network/multi_sexp.h" // #define _MULTI_SUPER_WACKY_COMPRESSION @@ -1189,6 +1189,7 @@ void send_game_chat_packet(net_player *from, char *msg, int msg_mode, net_player { ubyte data[MAX_PACKET_SIZE],mode; int packet_size,idx; + bool undeliverable = true; BUILD_HEADER(GAME_CHAT); @@ -1255,10 +1256,27 @@ void send_game_chat_packet(net_player *from, char *msg, int msg_mode, net_player for(idx=0;idxinstance].flags & (SF_DEPARTING | SF_DYING) ) return; - // possibly docked (multi only supports one docked object) - object *docked_objp = dock_get_first_docked_object(objp); + switch( what ) { + + case AI_UPDATE_DOCK: + case AI_UPDATE_UNDOCK: + Assert (other_objp != NULL); + if (other_objp == NULL) { + return; + } + break; + + default: + Assert (other_objp == NULL); + break; + } BUILD_HEADER( AI_INFO_UPDATE ); ADD_USHORT( objp->net_signature ); @@ -5516,12 +5546,12 @@ void send_ai_info_update_packet( object *objp, char what ) case AI_UPDATE_DOCK: // for docking ships, add the signature of the ship that we are docked with. - Assert( docked_objp != NULL ); - other_signature = docked_objp->net_signature; + Assert( other_objp != NULL ); + other_signature = other_objp->net_signature; // Goober5000 - this is sort of weird, but it's the best way to do it - docker_index = (ubyte) dock_find_dockpoint_used_by_object(objp, docked_objp); - dockee_index = (ubyte) dock_find_dockpoint_used_by_object(docked_objp, objp); + docker_index = (ubyte) dock_find_dockpoint_used_by_object(objp, other_objp); + dockee_index = (ubyte) dock_find_dockpoint_used_by_object(other_objp, objp); ADD_USHORT( other_signature ); ADD_DATA( docker_index ); @@ -5530,8 +5560,8 @@ void send_ai_info_update_packet( object *objp, char what ) case AI_UPDATE_UNDOCK: // same for undocking ships - Assert( docked_objp != NULL ); - other_signature = docked_objp->net_signature; + Assert( other_objp != NULL ); + other_signature = other_objp->net_signature; ADD_USHORT( other_signature ); break; @@ -7582,7 +7612,7 @@ void send_client_update_packet(net_player *pl) ADD_DATA( percent ); for (i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { - percent = (ubyte)(objp->shield_quadrant[i] / shipp->ship_max_shield_segment[i] * 100.0f); + percent = (ubyte)(objp->shield_quadrant[i] / get_max_shield_quad(objp) * 100.0f); ADD_DATA( percent ); } @@ -7699,24 +7729,9 @@ void process_client_update_packet(ubyte *data, header *hinfo) fl_val = hull_percent * shipp->ship_max_hull_strength / 100.0f; objp->hull_strength = fl_val; - - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } + for ( i = 0; i < MAX_SHIELD_SECTIONS; i++ ) { - fl_val = (shield_percent[i] * shipp->ship_max_shield_segment[i] / 100.0f); - if (i >= n_shd_sections){ - fl_val = 0.0f; - } + fl_val = (shield_percent[i] * get_max_shield_quad(objp) / 100.0f); objp->shield_quadrant[i] = fl_val; } @@ -9249,3 +9264,52 @@ void process_self_destruct_packet(ubyte *data, header *hinfo) // do eet ship_self_destruct(&Objects[Net_players[np_index].m_player->objnum]); } + +void send_sexp_packet(ubyte *sexp_packet, int num_ubytes) +{ + ubyte data[MAX_PACKET_SIZE]; + int packet_size = 0; + int i; + ushort val; + + Assert (MULTIPLAYER_MASTER); + // must have a bare minimum of OP, COUNT and TERMINATOR + if (num_ubytes < 9) { + Warning(LOCATION, "Invalid call to send_sexp_packet. Not enough data included!"); + return; + } + + BUILD_HEADER(SEXP); + + val = (ushort)num_ubytes; + ADD_USHORT(val); + + for (i =0; i < num_ubytes; i++) { + data[packet_size] = sexp_packet[i]; + packet_size++; + + Assert (packet_size <= MAX_PACKET_SIZE); + } + + // send to all + multi_io_send_to_all_reliable(data, packet_size); +} + +void process_sexp_packet(ubyte *data, header *hinfo) +{ + int offset = HEADER_LENGTH; + int i; + ushort num_ubytes; + ubyte received_packet[MAX_PACKET_SIZE]; + + // get the number of bytes of data in the packet + GET_USHORT(num_ubytes); + + for (i=0; i < num_ubytes; i++) { + GET_DATA(received_packet[i]); + } + + PACKET_SET_SIZE(); + + sexp_packet_received(received_packet, num_ubytes); +} \ No newline at end of file diff --git a/code/network/multimsgs.h b/code/network/multimsgs.h index 19e8f098e3..fcea634d1c 100644 --- a/code/network/multimsgs.h +++ b/code/network/multimsgs.h @@ -682,7 +682,7 @@ void send_client_update_packet(net_player *pl); // send information about this currently active game to the specified address void send_game_active_packet(net_addr* addr); -void send_ai_info_update_packet(object *objp, char what); +void send_ai_info_update_packet(object *objp, char what, object * other_objp = NULL); void process_ai_info_update_packet(ubyte *data, header *hinfo); void send_asteroid_create(object *new_objp, object *parent_objp, int asteroid_type, vec3d *relvec); @@ -785,4 +785,7 @@ void process_host_captain_change_packet(ubyte *data, header *hinfo); void send_self_destruct_packet(); void process_self_destruct_packet(ubyte *data, header *hinfo); +void send_sexp_packet(ubyte *sexp_packet, int num_ubytes); +void process_sexp_packet(ubyte *data, header *hinfo); + #endif diff --git a/code/network/multiui.cpp b/code/network/multiui.cpp index 46c846bead..cfa9667603 100644 --- a/code/network/multiui.cpp +++ b/code/network/multiui.cpp @@ -4332,8 +4332,8 @@ void multi_create_game_do() Multi_sync_mode = MULTI_SYNC_PRE_BRIEFING; //DTP must be set before a call to gameseq_post_event(GS_EVENT_MULTI_MISSION_SYNC) is done as it is below. gameseq_post_event(GS_EVENT_MULTI_MISSION_SYNC);//DTP STart game - Cmdline_almission = NULL; // we dont want to autoload anymore do we, we will be able to quit. halleluja. Startgame has already been disabled, so no need to turn of "Cmdline_start_netgame" - return; // we dont need to check or set regarding ships/weapons anything as we are already progressing into mission so return + Cmdline_almission = NULL; // we don't want to autoload anymore do we, we will be able to quit. halleluja. Startgame has already been disabled, so no need to turn of "Cmdline_start_netgame" + return; // we don't need to check or set regarding ships/weapons anything as we are already progressing into mission so return } else { popup(PF_BODY_BIG | PF_USE_AFFIRMATIVE_ICON,1,POPUP_OK,XSTR(" Not a multi player-mission",9999)); //DTP startgame popup pilot error @@ -9416,7 +9416,7 @@ void multi_maybe_set_mission_loop() } bool require_repeat_mission = (Campaign.current_mission == Campaign.next_mission); - // check for (1) mission loop available, (2) dont have to repeat last mission + // check for (1) mission loop available, (2) don't have to repeat last mission if ( (Campaign.missions[cur].has_mission_loop && (Campaign.loop_mission != -1)) && !require_repeat_mission ) { char buffer[512]; diff --git a/code/network/psnet.cpp b/code/network/psnet.cpp index 02466aa2d9..d8ab121dab 100644 --- a/code/network/psnet.cpp +++ b/code/network/psnet.cpp @@ -113,7 +113,7 @@ * infinate loop * * 99 7/06/98 5:05p Allender - * dont use default port to send UDP data to. Use port stored in address + * don't use default port to send UDP data to. Use port stored in address * * 98 6/13/98 9:32p Mike * Kill last character in file which caused "Find in Files" to report the diff --git a/code/network/psnet2.cpp b/code/network/psnet2.cpp index 02cf186c10..4d397d1607 100644 --- a/code/network/psnet2.cpp +++ b/code/network/psnet2.cpp @@ -2564,7 +2564,7 @@ unsigned int psnet_ras_status() for (i = 0; i < num_connections; i++ ) { RASCONNSTATUS status; - unsigned long size; + unsigned long dummySize; // don't count VPNs with the non-LAN connections if ( !stricmp(rasbuffer[i].szDeviceType, "RASDT_Vpn") ) { @@ -2589,7 +2589,7 @@ unsigned int psnet_ras_status() // get the projection informatiom size = sizeof(projection); projection.dwSize = size; - rval = pRasGetProjectionInfo(rasbuffer[i].hrasconn, RASP_PppIp, &projection, &size ); + rval = pRasGetProjectionInfo(rasbuffer[i].hrasconn, RASP_PppIp, &projection, &dummySize ); if ( rval != 0 ) { FreeLibrary( ras_handle ); return INADDR_ANY; diff --git a/code/object/collidedebrisship.cpp b/code/object/collidedebrisship.cpp index 2066270c1a..5a83cf86cd 100644 --- a/code/object/collidedebrisship.cpp +++ b/code/object/collidedebrisship.cpp @@ -487,7 +487,7 @@ int collide_asteroid_ship( obj_pair * pair ) // nprintf(("AI", "Time = %7.3f, asteroid #%i applying %7.3f damage to ship %s\n", f2fl(Missiontime), pasteroid-Objects, ship_damage, Ships[asteroid_hit_info.heavy->instance].ship_name)); //} } else { - // dont draw sparks (using sphere hitpos) + // don't draw sparks (using sphere hitpos) ship_apply_local_damage(asteroid_hit_info.light, asteroid_hit_info.heavy, &hitpos, ship_damage, MISS_SHIELDS, NO_SPARKS); //if (asteroid_hit_info.light->type == OBJ_SHIP) { // nprintf(("AI", "Time = %7.3f, asteroid #%i applying %7.3f damage to ship %s\n", f2fl(Missiontime), pasteroid-Objects, ship_damage, Ships[asteroid_hit_info.light->instance].ship_name)); diff --git a/code/object/collideshipship.cpp b/code/object/collideshipship.cpp index e003f8ad93..29fef153e5 100644 --- a/code/object/collideshipship.cpp +++ b/code/object/collideshipship.cpp @@ -1120,7 +1120,7 @@ int ship_ship_check_collision(collision_info_struct *ship_ship_hit_info, vec3d * return valid_hit_occured; } -// gets modified mass of cruiser in cruiser/asteroid collision so cruisers dont get bumped so hard. +// gets modified mass of cruiser in cruiser/asteroid collision so cruisers don't get bumped so hard. // modified mass is 10x, 4x, or 2x larger than asteroid mass // returns 1 if modified mass is larger than given mass, 0 otherwise int check_special_cruiser_asteroid_collision(object *heavy, object *light, float *cruiser_mass, int *cruiser_light) @@ -1510,7 +1510,7 @@ int get_ship_quadrant_from_global(vec3d *global_pos, object *objp) vm_vec_sub(&tpos, global_pos, &objp->pos); vm_vec_rotate(&rotpos, &tpos, &objp->orient); - return get_quadrant(&rotpos, objp); + return get_quadrant(&rotpos); } #define MIN_REL_SPEED_FOR_LOUD_COLLISION 50 // relative speed of two colliding objects at which we play the "loud" collide sound diff --git a/code/object/collideshipweapon.cpp b/code/object/collideshipweapon.cpp index 0db314371d..db536d0888 100644 --- a/code/object/collideshipweapon.cpp +++ b/code/object/collideshipweapon.cpp @@ -492,12 +492,12 @@ int ship_weapon_check_collision(object *ship_objp, object *weapon_objp, float ti { // pick out the shield quadrant if (shield_collision) - quadrant_num = get_quadrant(&mc_shield.hit_point, ship_objp); + quadrant_num = get_quadrant(&mc_shield.hit_point); else if (hull_collision && (sip->flags2 & SIF2_SURFACE_SHIELDS)) { vec3d local_pos, local_pos_rot; vm_vec_sub(&local_pos, &mc_hull.hit_point_world, &ship_objp->pos); vm_vec_rotate(&local_pos_rot, &local_pos, &ship_objp->orient); - quadrant_num = get_quadrant(&local_pos_rot, ship_objp); + quadrant_num = get_quadrant(&local_pos_rot); } // make sure that the shield is active in that quadrant diff --git a/code/object/objcollide.cpp b/code/object/objcollide.cpp index 39f10e8f82..2fb8d1dbda 100644 --- a/code/object/objcollide.cpp +++ b/code/object/objcollide.cpp @@ -542,6 +542,7 @@ void obj_add_pair( object *A, object *B, int check_time, int add_to_end ) } } /* + if (awip->subtype != WP_LASER || bwip->subtype != WP_LASER) { if (awip->subtype == WP_LASER) { if ( bwip->wi_flags & WIF_BOMB ) { @@ -1025,7 +1026,11 @@ int weapon_will_never_hit( object *weapon, object *other, obj_pair * current_pai //vector max_vel; //maximum foward velocity in x,y,z float max_vel_weapon, max_vel_other; - max_vel_weapon = weapon->phys_info.max_vel.xyz.z; + + if (The_mission.ai_profile->flags & AIPF_USE_ADDITIVE_WEAPON_VELOCITY) + max_vel_weapon = vm_vec_mag(&weapon->phys_info.vel); + else + max_vel_weapon = weapon->phys_info.max_vel.xyz.z; if ((Weapons[weapon->instance].lssm_stage==5)) { @@ -1052,7 +1057,8 @@ int weapon_will_never_hit( object *weapon, object *other, obj_pair * current_pai float root1, root2, root, earliest_time; vm_vec_sub( &delta_x, &weapon->pos, &other->pos ); - vm_vec_copy_scale( &laser_vel, &weapon->orient.vec.fvec, max_vel_weapon ); + laser_vel = weapon->phys_info.vel; + // vm_vec_copy_scale( &laser_vel, &weapon->orient.vec.fvec, max_vel_weapon ); delta_t = (other->radius + 10.0f) / max_vel_other; // time to get from center to radius of other obj delta_x_dot_vl = vm_vec_dotprod( &delta_x, &laser_vel ); diff --git a/code/object/object.cpp b/code/object/object.cpp index 0e0e480d96..da97c471f5 100644 --- a/code/object/object.cpp +++ b/code/object/object.cpp @@ -894,32 +894,14 @@ int free_object_slots(int num_used) } // Goober5000 -float get_max_shield_quad(object *objp, int segment) +float get_max_shield_quad(object *objp) { Assert(objp); if(objp->type != OBJ_SHIP) { return 0.0f; } - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return Ships[objp->instance].ship_max_shield_strength; - case 2: - n_shd_sections = 2; - if (segment > 1) - return 0.0f; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - if (segment != -1) { - return Ships[objp->instance].ship_max_shield_segment[segment]; - } else { - return Ships[objp->instance].ship_max_shield_strength / n_shd_sections; - } + return Ships[objp->instance].ship_max_shield_strength / MAX_SHIELD_SECTIONS; } // Goober5000 @@ -1252,10 +1234,10 @@ void obj_delete(int objnum) asteroid_delete(objp); break; /* case OBJ_CMEASURE: - cmeasure_delete( objp );*/ - break; + cmeasure_delete( objp ); + break;*/ case OBJ_GHOST: - if((!Game_mode & GM_MULTIPLAYER)){ + if(!(Game_mode & GM_MULTIPLAYER)){ mprintf(("Warning: Tried to delete a ghost!\n")); objp->flags &= ~OF_SHOULD_BE_DEAD; return; @@ -2465,7 +2447,7 @@ int obj_team(object *objp) case OBJ_GHOST: case OBJ_SHOCKWAVE: case OBJ_BEAM: - nprintf(("Warning","Warning => Asking for a team for object type %d\n", Object_type_names[objp->type])); + nprintf(("Warning","Warning => Asking for a team for object type %s\n", Object_type_names[objp->type])); team = -1; break; @@ -2676,4 +2658,4 @@ int object_get_model(object *objp) } return -1; -} +} \ No newline at end of file diff --git a/code/object/object.h b/code/object/object.h index 8c09972906..7320bb2dfe 100644 --- a/code/object/object.h +++ b/code/object/object.h @@ -513,6 +513,7 @@ extern char *Object_type_names[MAX_OBJECT_TYPES]; #define OF_REFERENCED (1<<19) // (Fred) Object is referenced by something somewhere #define OF_HIDDEN (1<<20) // Object is hidden (not shown) and can't be manipulated + // max # of object sounds per object //WMC - bumped this to 32 :D #define MAX_OBJECT_SOUNDS 32 @@ -550,8 +551,6 @@ typedef struct object { dock_instance *dock_list; // Goober5000 - objects this object is docked to dock_instance *dead_dock_list; // Goober5000 - objects this object was docked to when destroyed; replaces dock_objnum_when_dead - - int n_shield_segments; } object; struct object_h { @@ -655,7 +654,7 @@ void obj_init_all_ships_physics(); float get_hull_pct(object *objp); float get_sim_hull_pct(object *objp); float get_shield_pct(object *objp); -float get_max_shield_quad(object *objp, int segment = -1); +float get_max_shield_quad(object *objp); // returns the average 3-space position of all ships. useful to find "center" of battle (sort of) void obj_get_average_ship_pos(vec3d *pos); diff --git a/code/object/objectshield.cpp b/code/object/objectshield.cpp index e672495120..2cfe2b6cec 100644 --- a/code/object/objectshield.cpp +++ b/code/object/objectshield.cpp @@ -49,20 +49,7 @@ float shield_get_strength(object *objp) int i; float strength = 0.0f; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - for (i = 0; i < n_shd_sections; i++) + for (i = 0; i < MAX_SHIELD_SECTIONS; i++) strength += shield_get_quad(objp, i); return strength; @@ -72,21 +59,8 @@ void shield_set_strength(object *objp, float strength) { int i; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - for (i = 0; i < n_shd_sections; i++) - shield_set_quad(objp, i, strength / n_shd_sections); + for (i = 0; i < MAX_SHIELD_SECTIONS; i++) + shield_set_quad(objp, i, strength / MAX_SHIELD_SECTIONS); } // Recharge whole shield. @@ -97,31 +71,15 @@ void shield_add_strength(object *objp, float delta) if (delta == 0.0f) return; - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - float shield_str = shield_get_strength(objp); - float shield_recharge_limit = Ships[objp->instance].ship_max_shield_strength * Ships[objp->instance].max_shield_recharge_pct; - if (!(The_mission.ai_profile->flags & AIPF_SMART_SHIELD_MANAGEMENT)) { - if ((delta > 0.0f) && ((shield_str + delta) > shield_recharge_limit)) - delta = shield_recharge_limit - shield_str; - for (int i = 0; i < n_shd_sections; i++) - shield_add_quad(objp, i, delta / n_shd_sections); + for (int i = 0; i < MAX_SHIELD_SECTIONS; i++) + shield_add_quad(objp, i, delta / MAX_SHIELD_SECTIONS); } else { + float section_max = shield_get_max_quad(objp); + // smart shield repair while (delta > 0.0f) { @@ -130,11 +88,10 @@ void shield_add_strength(object *objp, float delta) int weakest_idx = -1; // find weakest shield quadrant - for (int i = 0; i < n_shd_sections; i++) + for (int i = 0; i < MAX_SHIELD_SECTIONS; i++) { float quad = shield_get_quad(objp, i); - float max_quad = Ships[objp->instance].ship_max_shield_segment[i]; - if (weakest_idx < 0 || quad < weakest || (quad < max_quad)) + if (weakest_idx < 0 || quad < weakest) { weakest = quad; weakest_idx = i; @@ -142,23 +99,14 @@ void shield_add_strength(object *objp, float delta) } // all quads are at full strength - if (weakest_idx == -1) + if (weakest >= section_max) break; - - // combined shield strength is at the limit - if (shield_str >= shield_recharge_limit) - break; - - // set the limit for the shield recharge - if ((delta > 0.0f) && ((shield_str + delta) > shield_recharge_limit)) - delta = shield_recharge_limit - shield_str; // throw all possible shield power at this quadrant // if there's any left over then apply it to the next weakest on the next pass float xfer_amount; - float segment_max = Ships[objp->instance].ship_max_shield_segment[weakest_idx]; - if (weakest + delta > segment_max) - xfer_amount = segment_max - weakest; + if (weakest + delta > section_max) + xfer_amount = section_max - weakest; else xfer_amount = delta; @@ -205,12 +153,6 @@ float shield_get_quad(object *objp, int quadrant_num) if (objp->type != OBJ_SHIP && objp->type != OBJ_START) return 0.0f; - if ((objp->n_shield_segments == 1) && (quadrant_num > 0)) - return 0.0f; - - if ((objp->n_shield_segments == 2) && (quadrant_num > 1)) - return 0.0f; - //WMC - I removed SUBSYSTEM_SHIELD_GENERATOR to prevent pilot file // corruption, so comment all this out... /* @@ -262,16 +204,10 @@ void shield_set_quad(object *objp, int quadrant_num, float strength) if (quadrant_num < 0 || quadrant_num >= MAX_SHIELD_SECTIONS) return; - if ((objp->n_shield_segments == 1) && (quadrant_num > 0)) - return; - - if ((objp->n_shield_segments == 2) && (quadrant_num > 1)) - return; - // check range if (strength < 0.0f) strength = 0.0f; - float max_quad = shield_get_max_quad(objp, quadrant_num); + float max_quad = shield_get_max_quad(objp); if (strength > max_quad) strength = max_quad; @@ -296,7 +232,7 @@ void shield_add_quad(object *objp, int quadrant_num, float delta) // check range if (strength < 0.0f) strength = 0.0f; - float max_quad = shield_get_max_quad(objp, quadrant_num); + float max_quad = shield_get_max_quad(objp); if (strength > max_quad) strength = max_quad; @@ -321,27 +257,9 @@ void shield_set_max_strength(object *objp, float newmax) } // Goober5000 -float shield_get_max_quad(object *objp, int segment) +float shield_get_max_quad(object *objp) { - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - return shield_get_max_strength(objp); - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - - if (segment != -1) { - if (objp->type != OBJ_SHIP && objp->type != OBJ_START) - return 0.0f; - return Ships[objp->instance].ship_max_shield_segment[segment]; - } else { - return shield_get_max_strength(objp) / n_shd_sections; - } + return shield_get_max_strength(objp) / MAX_SHIELD_SECTIONS; } // ***** This is the version that works on a quadrant basis. diff --git a/code/object/objectshield.h b/code/object/objectshield.h index c48c17cb8e..21d3df7590 100644 --- a/code/object/objectshield.h +++ b/code/object/objectshield.h @@ -27,7 +27,7 @@ void shield_add_quad(object *objp, int quadrant_num, float strength); float shield_get_max_strength(object *objp); void shield_set_max_strength(object *objp, float newmax); -float shield_get_max_quad(object *objp, int segment = -1); +float shield_get_max_quad(object *objp); float shield_apply_damage(object *objp, int quadrant, float damage); int shield_is_up(object *objp, int quadrant_num); diff --git a/code/object/objectsnd.cpp b/code/object/objectsnd.cpp index 1aa5ed8d55..54ddb1ef66 100644 --- a/code/object/objectsnd.cpp +++ b/code/object/objectsnd.cpp @@ -1011,6 +1011,7 @@ int obj_snd_assign(int objnum, int sndnum, vec3d *pos, int main, int flags, ship if(main){ snd->flags |= OS_MAIN; } + if(flags > 0){ snd->flags |= flags; } diff --git a/code/object/objectsort.cpp b/code/object/objectsort.cpp index 680a559677..05ccecb283 100644 --- a/code/object/objectsort.cpp +++ b/code/object/objectsort.cpp @@ -56,7 +56,7 @@ * * Revision 2.2 2003/10/14 17:39:17 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * diff --git a/code/osapi/osapi.cpp b/code/osapi/osapi.cpp index b0808adede..f78de342b6 100644 --- a/code/osapi/osapi.cpp +++ b/code/osapi/osapi.cpp @@ -113,7 +113,7 @@ * * Revision 2.13 2004/01/24 15:52:26 randomtiger * I have submitted the new movie playing code despite the fact in D3D it sometimes plays behind the main window. - * In OGL it works perfectly and in both API's it doesnt switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. + * In OGL it works perfectly and in both APIs it doesn't switch to the desktop anymore so hopefully people will not experience the crashes etc that the old system used to suffer from. * * Revision 2.12 2004/01/17 21:59:54 randomtiger * Some small changes to the main codebase that allow Fred_open OGL to compile. @@ -145,12 +145,12 @@ * * I have also taken the opertunity to fix a few bugs in the launcher and add a new feature to make selecting mods a bit easier. * - * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher wont compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. + * The launcher now uses some files in the freespace project so it should be put into CVS with the rest of the code inside the 'code' directory (still in its 'Launcher' dir of course). Currently the launcher won't compile since speech.cpp and speech.h arent in cvs yet. But once Roee has checked in that will be sorted. * * I have also removed the internal launcher from the D3D8 module. * Please contact me if you have any problems. * - * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and cant afford to find out. + * When trying to run the exe after updating I get an error parsing 'rank.tbl' but im fairly sure thats nothing to do with me so I'll just have to leave it for now because I'm still using a 56K modem and can't afford to find out. * * Revision 2.7 2003/03/18 10:07:05 unknownplayer * The big DX/main line merge. This has been uploaded to the main CVS since I can't manage to get it to upload to the DX branch. Apologies to all who may be affected adversely, but I'll work to debug it as fast as I can. @@ -458,7 +458,7 @@ uint os_get_dc() // Returns the handle to the main window void os_set_window(uint new_handle) { - hwndApp = (HWND) new_handle; + hwndApp = (HWND)new_handle; } diff --git a/code/osapi/osregistry.cpp b/code/osapi/osregistry.cpp index 55bdfd9be4..0fe6cb9980 100644 --- a/code/osapi/osregistry.cpp +++ b/code/osapi/osregistry.cpp @@ -37,8 +37,8 @@ char *Osreg_title = "FreeSpace 2 OEM"; */ // RT Lets make all versions use the same registry location -// If we dont the launcher either needs to handle somehow telling what release type a -// FS2 exe is or it wont work. Its far similar to just use one default location. +// If we don't the launcher either needs to handle somehow telling what release type a +// FS2 exe is or it won't work. Its far similar to just use one default location. // The Launcher will set up everything needed char *Osreg_app_name = "FreeSpace2"; char *Osreg_title = "FreeSpace 2"; diff --git a/code/osapi/outwnd.cpp b/code/osapi/outwnd.cpp index cabecfd8d3..f9d2b25c3d 100644 --- a/code/osapi/outwnd.cpp +++ b/code/osapi/outwnd.cpp @@ -99,7 +99,7 @@ * Revision 2.1.2.2 2002/11/04 21:25:00 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.1.2.1 2002/10/08 14:33:27 randomtiger diff --git a/code/osapi/outwnd_unix.cpp b/code/osapi/outwnd_unix.cpp index 26bafafc3c..efdb2bb713 100644 --- a/code/osapi/outwnd_unix.cpp +++ b/code/osapi/outwnd_unix.cpp @@ -47,7 +47,7 @@ * Revision 2.2.2.1 2002/11/04 21:25:00 randomtiger * * When running in D3D all ani's are memory mapped for speed, this takes up more memory but stops gametime locking of textures which D3D8 hates. - * Added new command line tag Cmdline_d3dlowmem for people who dont want to make use of this because they have no memory. + * Added new command line tag Cmdline_d3dlowmem for people who don't want to make use of this because they have no memory. * Cleaned up some more texture stuff enabled console debug for D3D. * * Revision 2.2 2002/08/01 01:41:09 penguin diff --git a/code/palman/palman.cpp b/code/palman/palman.cpp index 5b1b88a735..09bb8f3ca8 100644 --- a/code/palman/palman.cpp +++ b/code/palman/palman.cpp @@ -40,7 +40,7 @@ * * Revision 2.1.2.1 2002/10/20 22:21:48 randomtiger * Some incomplete code to handle background drawing when message boxes are drawn. - * It doesnt work but its a good base for someone to start from. - RT + * It doesn't work but it's a good base for someone to start from. - RT * * Revision 2.1 2002/08/01 01:41:09 penguin * The big include file move diff --git a/code/parse/lua.cpp b/code/parse/lua.cpp index a082330d55..4c2633355d 100644 --- a/code/parse/lua.cpp +++ b/code/parse/lua.cpp @@ -11,11 +11,12 @@ #include "graphics/font.h" #include "globalincs/linklist.h" #include "globalincs/pstypes.h" -#include "hud/hud.h" +#include "hud/hudbrackets.h" #include "iff_defs/iff_defs.h" #include "io/key.h" #include "io/mouse.h" #include "io/timer.h" +#include "jumpnode/jumpnode.h" #include "lighting/lighting.h" #include "mission/missioncampaign.h" #include "mission/missiongoals.h" @@ -893,13 +894,13 @@ static flag_def_list Enumerations[] = { { "MISSION_REPEAT", LE_MISSION_REPEAT, 0}, #define LE_NORMAL_CONTROLS 48 - { "NORMAL_CONTROLS", LE_NORMAL_CONTROLS, 0}, + { "NORMAL_CONTROLS", LE_NORMAL_CONTROLS, 0}, #define LE_LUA_STEERING_CONTROLS 49 - { "LUA_STEERING_CONTROLS", LE_LUA_STEERING_CONTROLS, 0}, + { "LUA_STEERING_CONTROLS", LE_LUA_STEERING_CONTROLS, 0}, #define LE_LUA_FULL_CONTROLS 50 - { "LUA_FULL_CONTROLS", LE_LUA_FULL_CONTROLS, 0}, + { "LUA_FULL_CONTROLS", LE_LUA_FULL_CONTROLS, 0}, }; //DO NOT FORGET to increment NEXT INDEX: !!!!!!!!!!!!! @@ -1853,7 +1854,6 @@ ADE_INDEXER(l_ShipOrders, "number Index/string TextureFilename", "Array of ship if (!objh->IsValid() || s==NULL) return ade_set_error(L, "o", l_Order.Set(order_h())); - ship *shipp = &Ships[objh->objp->instance]; ai_info *aip = &Ai_info[Ships[objh->objp->instance].ai_index]; //Determine index @@ -2283,6 +2283,22 @@ ADE_FUNC(getForwardSpeed, l_Physics, NULL, "Gets total speed in the ship's 'forw return ade_set_args(L, "f", pih->pi->fspeed); } +// Nuke's afterburner function +ADE_FUNC(isAfterburnerActive, l_Physics, NULL, "True if Afterburners are on, false or nil if not", "boolean", "Detects whether afterburner is active") +{ + physics_info_h *pih; + if(!ade_get_args(L, "o", l_Physics.GetPtr(&pih))) + return ADE_RETURN_NIL; + + if(!pih->IsValid()) + return ade_set_error(L, "b", false); + + if (pih->pi->flags & PF_AFTERBURNER_ON) + return ade_set_args(L, "b", true); + else + return ade_set_args(L, "b", false); +} + //**********HANDLE: sexpvariable struct sexpvar_h { @@ -2405,12 +2421,12 @@ ADE_VIRTVAR(Value, l_SEXPVariable, "number/string", "SEXP variable value", "stri if(ADE_SETTING_VAR && newvalue) { - sexp_modify_variable(newvalue, svh->idx); + sexp_modify_variable(newvalue, svh->idx, false); } - if(sv->type && SEXP_VARIABLE_NUMBER) + if(sv->type & SEXP_VARIABLE_NUMBER) return ade_set_args(L, "i", atoi(sv->text)); - else if(sv->type && SEXP_VARIABLE_STRING) + else if(sv->type & SEXP_VARIABLE_STRING) return ade_set_args(L, "s", sv->text); else return ADE_RETURN_NIL; @@ -3834,19 +3850,7 @@ ADE_VIRTVAR(Shields, l_Object, "shields", "Shields", "shields", "Shields handle, //WMC - copy shields if(ADE_SETTING_VAR && sobjh != NULL && sobjh->IsValid()) { - int n_shd_sections; - switch (objh->objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - for(int i = 0; i < n_shd_sections; i++) + for(int i = 0; i < MAX_SHIELD_SECTIONS; i++) shield_set_quad(objh->objp, i, shield_get_quad(sobjh->objp, i)); } @@ -4388,6 +4392,71 @@ ADE_FUNC(renderTechModel, l_Shipclass, "X1, Y1, X2, Y2, [Rotation %, Pitch %, Ba return ade_set_args(L, "b", true); } +// Nuke's alternate tech model rendering function +ADE_FUNC(renderTechModel2, l_Shipclass, "X1, Y1, X2, Y2, orientation Orientation=null, [Zoom multiplier]", "Draws ship model as if in techroom", "boolean", "Whether ship was rendered") +{ + int x1,y1,x2,y2; + int idx; + float zoom = 1.3f; + matrix_h *mh = NULL; + if(!ade_get_args(L, "oiiiio|f", l_Shipclass.Get(&idx), &x1, &y1, &x2, &y2, l_Matrix.GetPtr(&mh), &zoom)) + return ade_set_error(L, "b", false); + + if(idx < 0 || idx > Num_ship_classes) + return ade_set_args(L, "b", false); + + if(x2 < x1 || y2 < y1) + return ade_set_args(L, "b", false); + + ship_info *sip = &Ship_info[idx]; + + //Make sure model is loaded + sip->model_num = model_load(sip->pof_file, sip->n_subsystems, &sip->subsystems[0], 0); + + if(sip->model_num < 0) + return ade_set_args(L, "b", false); + + //Handle angles + matrix *orient = mh->GetMatrix(); + + //Clip + gr_set_clip(x1,y1,x2-x1,y2-y1,false); + + //Handle 3D init stuff + g3_start_frame(1); + g3_set_view_matrix(&sip->closeup_pos, &vmd_identity_matrix, sip->closeup_zoom * zoom); + + if (!Cmdline_nohtl) { + gr_set_proj_matrix( Proj_fov, gr_screen.clip_aspect, Min_draw_distance, Max_draw_distance); + gr_set_view_matrix(&Eye_position, &Eye_matrix); + } + + //Handle light + light_reset(); + vec3d light_dir = vmd_zero_vector; + light_dir.xyz.y = 1.0f; + light_add_directional(&light_dir, 0.65f, 1.0f, 1.0f, 1.0f); + light_rotate_all(); + + //Draw the ship!! + model_clear_instance(sip->model_num); + model_set_detail_level(0); + model_render(sip->model_num, orient, &vmd_zero_vector, MR_LOCK_DETAIL | MR_AUTOCENTER | MR_NO_FOGGING); + + //OK we're done + if (!Cmdline_nohtl) + { + gr_end_view_matrix(); + gr_end_proj_matrix(); + } + + //Bye!! + g3_end_frame(); + gr_reset_clip(); + + return ade_set_args(L, "b", true); +} + //**********HANDLE: Waypoint ade_obj l_Waypoint("waypoint", "waypoint handle", &l_Object); @@ -6084,6 +6153,24 @@ ADE_FUNC(warpOut, l_Ship, NULL, "Warps ship out", "boolean", "True if successful return ADE_RETURN_TRUE; } +// Aardwolf's function for finding if a ship should be drawn as blue on the radar/minimap +ADE_FUNC(isWarpingIn, l_Ship, NULL, "Checks if ship is warping in", "boolean", "True if the ship is warping in, false or nil otherwise") +{ + object_h *objh; + if(!ade_get_args(L, "o", l_Ship.GetPtr(&objh))) + return ADE_RETURN_NIL; + + if(!objh->IsValid()) + return ADE_RETURN_NIL; + + ship *shipp = &Ships[objh->objp->instance]; + if(shipp->flags & SF_ARRIVING_STAGE_1){ + return ADE_RETURN_TRUE; + } + + return ADE_RETURN_FALSE; +} + //**********HANDLE: Weapon ade_obj l_Weapon("weapon", "Weapon handle", &l_Object); @@ -6957,77 +7044,6 @@ ADE_VIRTVAR(Forward, l_Control_Info, "number", "Forward control of the player sh return ade_set_args(L, "f", Player->lua_ci.forward); } -extern lua_hud_inf lua_hud_info; - -//**********HANDLE: HUD -ade_obj l_HUD_Info("HUD info", "HUD info handle"); - -ADE_VIRTVAR(EngineLevel, l_HUD_Info, NULL, "", "number", "Engine energy level ETS gauge") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - return ade_set_args(L, "i", lua_hud_info.ets_engine); -} - -ADE_VIRTVAR(ShieldLevel, l_HUD_Info, NULL, "", "number", "Shield energy level ETS gauge") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - return ade_set_args(L, "i", lua_hud_info.ets_shield); -} - -ADE_VIRTVAR(GunsLevel, l_HUD_Info, NULL, "", "number", "Gun energy level ETS gauge") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - return ade_set_args(L, "i", lua_hud_info.ets_guns); -} - -ADE_FUNC(isETSDrawn, l_HUD_Info, NULL, "", "boolean", "If ETS is drawn or not") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - if (lua_hud_info.ets_drawn == 0) - return ADE_RETURN_FALSE; - else - return ADE_RETURN_TRUE; -} - -ADE_VIRTVAR(ABFuelLevel, l_HUD_Info, NULL, "", "number", "AB fuel level gauge") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - return ade_set_args(L, "f", lua_hud_info.ab_pct); -} - -ADE_FUNC(isABDrawn, l_HUD_Info, NULL, "", "boolean", "If AB is drawn or not") -{ - int idx; - - if(!ade_get_args(L, "o", l_HUD_Info.Get(&idx))) - return ADE_RETURN_FALSE; - - if (lua_hud_info.ab_drawn == 0) - return ADE_RETURN_FALSE; - else - return ADE_RETURN_TRUE; -} - //**********LIBRARY: Audio ade_lib l_Audio("Audio", NULL, "ad", "Sound/Music Library"); @@ -7240,15 +7256,6 @@ ADE_FUNC(getControlInfo, l_Base, NULL, "Gets the control info handle.", "control return ade_set_args(L, "o", l_Control_Info.Set(1)); } -ADE_FUNC(getCurrentViewerMode, l_Base, NULL, "Gets the current view mode identifier", "number", "identifier") -{ - return ade_set_args(L, "i", Viewer_mode); -} - -ADE_FUNC(getHUD_Info, l_Base, NULL, "Gets the HUD ingo handle.", "HUD info", "HUD info handle") -{ - return ade_set_args(L, "o", l_HUD_Info.Set(1)); -} /* ADE_FUNC(getStateNameByIndex, l_Base, "Index of state (number)", "Gets the name of a state type by its index; this function may be used to list all state types.", "string", "State name, or an empty string if index is invalid") { @@ -7563,7 +7570,6 @@ ADE_FUNC(fileExists, l_CFile, "string Filename, [string Path = \"\", boolean Che return ade_set_error(L, "b", false); const char *ext_list[] = {".ogg", ".txt", ".*"}; - int ext_list_num = sizeof(ext_list)/sizeof(char *); if(!check_vps) return ade_set_args(L, "b", cf_exists(n_filename, path) != 0); else @@ -7750,31 +7756,20 @@ ADE_FUNC(forceMousePosition, l_Mouse, "number, number (coordinates)", "function if (!((y >= 0) && (y <= gr_screen.max_h))) return ADE_RETURN_FALSE; - mouse_force_pos(x, y); + mouse_set_pos(x, y); return ADE_RETURN_TRUE; } -ADE_FUNC(getMouseControlStatus, l_Mouse, NULL, "Gets the retail mouse control status", "boolean", "if the mouse is on or off") -{ - if(!mouse_inited) - return ADE_RETURN_NIL; - - bool mouse_status = false; - - if (Use_mouse_to_fly) - mouse_status = true; - - return ade_set_args(L, "b", mouse_status); -} - -ADE_FUNC(setMouseControlStatus, l_Mouse, "boolean", "Sets the retail mouse control status", NULL, NULL) +ADE_VIRTVAR(MouseControlStatus, l_Mouse, "boolean", "Gets and sets the retail mouse control status", "boolean", "if the retail mouse is on or off") { if(!mouse_inited) return ADE_RETURN_NIL; bool mouse_io; - ade_get_args(L, "b", &mouse_io); + bool mouse_status = false; + if(!(ade_get_args(L, "*|b", &mouse_io))) + return ADE_RETURN_NIL; if(mouse_io) { Use_mouse_to_fly = 1; @@ -7782,7 +7777,10 @@ ADE_FUNC(setMouseControlStatus, l_Mouse, "boolean", "Sets the retail mouse contr Use_mouse_to_fly = 0; } - return ADE_RETURN_NIL; + if (Use_mouse_to_fly) + mouse_status = true; + + return ade_set_args(L, "b", mouse_status); } //**********LIBRARY: Graphics @@ -8356,6 +8354,147 @@ ADE_FUNC(drawSphere, l_Graphics, "[number Radius = 1.0, vector Position]", "Draw return ADE_RETURN_TRUE; } +// Aardwolf's test code to render a model, supposed to emulate WMC's gr.drawModel function +ADE_FUNC(drawModel, l_Graphics, "model, position, orientation", "Draws the given model with the specified position and orientation", "int", "Zero if successful, otherwise an integer error code") +{ + model_h *mdl = NULL; + vec3d *v = &vmd_zero_vector; + matrix_h *mh = NULL; + if(!ade_get_args(L, "ooo", l_Model.GetPtr(&mdl), l_Vector.GetPtr(&v), l_Matrix.GetPtr(&mh))) + return ade_set_args(L, "i", 1); + + if(mdl == NULL) + return ade_set_args(L, "i", 2); + + int model_num = mdl->GetID(); + if(model_num < 0) + return ade_set_args(L, "i", 3); + + //Handle angles + matrix *orient = mh->GetMatrix(); + + //Clip + gr_set_clip(0, 0, gr_screen.max_w, gr_screen.max_h, false); + + //Handle 3D init stuff + g3_start_frame(1); + + vec3d cam_pos; + matrix cam_orient; + + camid cid = cam_get_current(); + cid.getCamera()->get_info(&cam_pos, &cam_orient); + + g3_set_view_matrix(&cam_pos, &cam_orient, View_zoom); + + if (!Cmdline_nohtl) { + gr_set_proj_matrix( Proj_fov, gr_screen.clip_aspect, Min_draw_distance, Max_draw_distance); + gr_set_view_matrix(&Eye_position, &Eye_matrix); + } + + //Draw the ship!! + model_clear_instance(model_num); + model_set_detail_level(0); + model_render(model_num, orient, v, MR_NORMAL); + + //OK we're done + if (!Cmdline_nohtl) { + gr_end_view_matrix(); + gr_end_proj_matrix(); + } + + //Bye!! + g3_end_frame(); + gr_reset_clip(); + + return ade_set_args(L, "i", 0); +} + +// Aardwolf's targeting brackets function +ADE_FUNC(drawTargetingBrackets, l_Graphics, "object Object, [boolean draw=true, int padding=5]", + "Gets the edge positions of targeting brackets for the specified object. The brackets will only be drawn if draw is true or the default value of draw is used. Brackets are drawn with the current color. The brackets will have a padding (distance from the actual bounding box); the default value (used elsewhere in FS2) is 5.", + "number,number,number,number", + "Left, top, right, and bottom positions of the brackets, or nil if invalid") +{ + if(!Gr_inited) { + return ADE_RETURN_NIL; + } + + object_h *objh = NULL; + bool draw_box = true; + int padding = 5; + + if( !ade_get_args(L, "o|bi", l_Object.GetPtr(&objh), &draw_box, &padding) ) { + return ADE_RETURN_NIL; + } + + // The following code is mostly copied from + // void hud_show_brackets(object *targetp, vertex *projected_v) + // in hudtarget.cpp + + if( !objh->IsValid()) { + return ADE_RETURN_NIL; + } + + object *targetp = objh->objp; + + int x1,x2,y1,y2; + int bound_rc, pof; + int modelnum; + + switch ( targetp->type ) { + case OBJ_SHIP: + modelnum = Ship_info[Ships[targetp->instance].ship_info_index].model_num; + bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 ); + if ( bound_rc != 0 ) { + return ADE_RETURN_NIL; + } + break; + case OBJ_DEBRIS: + modelnum = Debris[targetp->instance].model_num; + bound_rc = submodel_find_2d_bound_min( modelnum, Debris[targetp->instance].submodel_num, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 ); + if ( bound_rc != 0 ) { + return ADE_RETURN_NIL; + } + break; + case OBJ_WEAPON: + Assert(Weapon_info[Weapons[targetp->instance].weapon_info_index].subtype == WP_MISSILE); + modelnum = Weapon_info[Weapons[targetp->instance].weapon_info_index].model_num; + bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 ); + break; + case OBJ_ASTEROID: + pof = Asteroids[targetp->instance].asteroid_subtype; + modelnum = Asteroid_info[Asteroids[targetp->instance].asteroid_type].model_num[pof]; + bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 ); + break; + case OBJ_JUMP_NODE: + modelnum = targetp->jnp->get_modelnum(); + bound_rc = model_find_2d_bound_min( modelnum, &targetp->orient, &targetp->pos,&x1,&y1,&x2,&y2 ); + break; + default: + // should never happen + Int3(); + return ADE_RETURN_NIL; + } + + x1 -= padding; + x2 += padding; + y1 -= padding; + y2 += padding; + if ( draw_box ) { + if( !(g3_in_frame() > 0) ) { + g3_start_frame(0); + draw_brackets_square(x1, y1, x2, y2, false); + g3_end_frame(); + } + else { + draw_brackets_square(x1, y1, x2, y2, false); + } + } + + return ade_set_args(L, "iiii", x1, y1, x2, y2); +} + #define MAX_TEXT_LINES 256 static char *BooleanValues[] = {"False", "True"}; static const int NextDrawStringPosInitial[] = {0, 0}; @@ -8958,10 +9097,7 @@ ADE_INDEXER(l_Mission_SEXPVariables, "number Index/string Name", "Array of SEXP { if(ADE_SETTING_VAR && newval != NULL) { - if ( (Sexp_variables[idx].type & SEXP_VARIABLE_NETWORK) && MULTIPLAYER_MASTER ) { - send_variable_update_packet(idx, newval); - } - sexp_modify_variable(newval, idx); + sexp_modify_variable(newval, idx, false); } } diff --git a/code/parse/parselo.cpp b/code/parse/parselo.cpp index 3889bf8610..f9dd7d1992 100644 --- a/code/parse/parselo.cpp +++ b/code/parse/parselo.cpp @@ -8,14 +8,19 @@ */ /* - * $Source: /cvs/cvsroot/fs2open/fs2_open/code/parse/parselo.cpp,v $ + * $Source: /home/fs2source/cvsroot/fs2_open/code/parse/parselo.cpp,v $ * $Revision: 2.73.2.13 $ * $Author: Kazan $ - * $Date: 2007-10-20 23:28:49 $ + * $Date: 2007/10/20 23:28:49 $ * * low level parse routines common to all types of parsers * - * $Log: not supported by cvs2svn $ + * $Log: parselo.cpp,v $ + * Revision 2.73.2.13 2007/10/20 23:28:49 Kazan + * Enemy cargo containers should not prevent autopilot. + * Fix build problem in parselo (strrchr returns const char* not char*, need to explicitly cast - raises error in MSVC2005) + * Update MSVC2005 "code" project to reflect removal/addition of fs2netd related files + * * Revision 2.73.2.12 2007/10/15 06:43:20 taylor * FS2NetD v.2 (still a work in progress, but is ~98% complete) * @@ -1307,6 +1312,41 @@ char* alloc_block(char* startstr, char* endstr, int extra_chars) return rval; } +// Karajorma - Stuffs the provided char array with either the contents of a quoted string or the name of a string +// variable. Returns PARSING_FOUND_STRING if a string was found or PARSING_FOUND_VARIABLE if a variable was present. +int get_string_or_variable (char *str) +{ + int result = -1; + + ignore_white_space(); + + // Variable + if (*Mp == '@') + { + Mp++; + stuff_string_white(str); + int sexp_variable_index = get_index_sexp_variable_name(str); + + // We only want String variables + Assert (Sexp_variables[sexp_variable_index].type & SEXP_VARIABLE_STRING); + + result = PARSING_FOUND_VARIABLE; + } + // Quoted string + else if (*Mp == '"') + { + get_string(str); + result = PARSING_FOUND_STRING; + } + else + { + get_string(str); + Error(LOCATION, "Invalid entry \"%s\" found in get_string_or_variable. Must be a quoted string or a string variable name.", str); + } + + return result; +} + // Stuff a string into a string buffer. // Supports various FreeSpace primitive types. If 'len' is supplied, it will override // the default string length if using the F_NAME case. @@ -2222,6 +2262,110 @@ void stuff_int(int *i) diag_printf("Stuffed int: %i\n", *i); } +int stuff_int_or_variable (int &i, bool positive_value = false); +int stuff_int_or_variable (int *ilp, int count, bool positive_value = false); + + +// Stuffs an int value or the value of a number variable. Returns the index of the variable or NOT_SET_BY_SEXP_VARIABLE. +int stuff_int_or_variable (int &i, bool positive_value) +{ + int index = NOT_SET_BY_SEXP_VARIABLE; + + if (*Mp == '@') + { + Mp++; + int value = -1; + char str[128]; + stuff_string(str, F_NAME, sizeof(str)); + + index = get_index_sexp_variable_name(str); + + if (index > -1 && index < MAX_SEXP_VARIABLES) + { + if (Sexp_variables[index].type & SEXP_VARIABLE_NUMBER) + { + value = atoi(Sexp_variables[index].text); + } + else + { + Error(LOCATION, "Invalid variable type \"%s\" found in mission. Variable must be a number variable!", str); + } + } + else + { + + Error(LOCATION, "Invalid variable name \"%s\" found.", str); + } + + // zero negative values if requested + if (positive_value && value < 0) + { + value = 0; + } + + + // Record the value of the index for FreeSpace + i = value; + } + else + { + stuff_int(&i); + } + return index; +} + +// Stuff an integer value pointed at by Mp.If a variable is found instead stuff the value of that variable and record the +// index of the variable in the following slot. +int stuff_int_or_variable (int *ilp, int count, bool positive_value) +{ + if (*Mp == '@') + { + Mp++; + int value = -1; + char str[128]; + stuff_string(str, F_NAME, sizeof(str)); + + int index = get_index_sexp_variable_name(str); + + if (index > -1 && index < MAX_SEXP_VARIABLES) + { + if (Sexp_variables[index].type & SEXP_VARIABLE_NUMBER) + { + value = atoi(Sexp_variables[index].text); + } + else + { + Error(LOCATION, "Invalid variable type \"%s\" found in mission. Variable must be a number variable!", str); + } + } + else + { + + Error(LOCATION, "Invalid variable name \"%s\" found.", str); + } + + // zero negative values if requested + if (positive_value && value < 0) + { + value = 0; + } + + + // Record the value of the index for FreeSpace + ilp[count++] = value; + // Record the index itself because we may need it later. + ilp[count++] = index; + } + else + { + stuff_int(&ilp[count++]); + // Since we have a numerical value we don't have a SEXP variable index to add for next slot. + ilp[count++] = NOT_SET_BY_SEXP_VARIABLE; + } + return count; +} + + //Stuffs boolean value. //Passes things off to stuff_boolean(bool) void stuff_boolean(int *i, bool a_to_eol) @@ -2550,6 +2694,114 @@ int stuff_int_list(int *ilp, int max_ints, int lookup_type) return count; } +// helper for the next function. Removes a broken entry from ship or weapon lists and advances to the next one +void clean_loadout_list_entry() +{ + int dummy; + + // clean out the broken entry + ignore_white_space(); + stuff_int_or_variable(dummy); + ignore_white_space(); +} + +// Karajorma - Stuffs an int list by parsing a list of ship or weapon choices. +// Unlike stuff_int_list it can deal with variables and it also has better error reporting. +int stuff_loadout_list (int *ilp, int max_ints, int lookup_type) +{ + int count = 0; + int index, sexp_variable_index, variable_found; + char str[128]; + + ignore_white_space(); + + if (*Mp != '(') { + error_display(1, "Reading loadout list. Found [%c]. Expecting '('.\n", *Mp); + longjmp(parse_abort, 6); + } + + Mp++; + ignore_white_space(); + + while (*Mp != ')') { + if (count >= max_ints) { + Error(LOCATION, "Loadout contains too many entries.\n"); + } + + index = -1; + sexp_variable_index = NOT_SET_BY_SEXP_VARIABLE; + variable_found = get_string_or_variable (str); + + // if we've got a variable get the variable index and copy it's value into str so that regardless of whether we found + // a variable or not it now holds the name of the ship or weapon we're interested in. + if (variable_found) { + Assert (lookup_type != CAMPAIGN_LOADOUT_SHIP_LIST ); + sexp_variable_index = get_index_sexp_variable_name(str); + strcpy (str, Sexp_variables[sexp_variable_index].text); + } + + switch (lookup_type) { + case MISSION_LOADOUT_SHIP_LIST: + case CAMPAIGN_LOADOUT_SHIP_LIST: + index = ship_info_lookup(str); + break; + + case MISSION_LOADOUT_WEAPON_LIST: + case CAMPAIGN_LOADOUT_WEAPON_LIST: + index = weapon_info_lookup(str); + break; + + default: + Int3(); + } + + // Complain if this isn't a valid ship or weapon and we are loading a mission. Campaign files can be loading containing + // no ships from the current tables (when swapping mods) so don't report that as an error. + if (index < 0 && (lookup_type == MISSION_LOADOUT_SHIP_LIST || lookup_type == MISSION_LOADOUT_WEAPON_LIST)) { + // print a warning in debug mode + Warning(LOCATION, "Invalid type \"%s\" found in loadout of mission file...skipping", str); + // increment counter for release FRED builds. + Num_unknown_loadout_classes++; + + clean_loadout_list_entry(); + continue; + } + + // similarly, complain if this is a valid ship or weapon class that the player can't use + if ((lookup_type == MISSION_LOADOUT_SHIP_LIST) & (!(Ship_info[index].flags & SIF_PLAYER_SHIP)) ) { + clean_loadout_list_entry(); + Warning(LOCATION, "Ship type \"%s\" found in loadout of mission file. This class is not marked as a player ship...skipping", str); + continue; + } + else if ((lookup_type == MISSION_LOADOUT_WEAPON_LIST) & (!(Weapon_info[index].wi_flags & WIF_PLAYER_ALLOWED)) ) { + clean_loadout_list_entry(); + Warning(LOCATION, "Weapon type \"%s\" found in loadout of mission file. This class is not marked as a player allowed weapon...skipping", str); + continue; + } + + // we've found a real item. Add its index to the list. + ilp[count++] = index; + + ignore_white_space(); + + // Campaign lists need go no further + if (lookup_type == CAMPAIGN_LOADOUT_SHIP_LIST || lookup_type == CAMPAIGN_LOADOUT_WEAPON_LIST) { + continue; + } + + // record the index of the variable that gave us this item if any + ilp[count++] = sexp_variable_index; + + // Now read in the number of this type available. The number must be positive + count = stuff_int_or_variable(ilp, count, true); + + ignore_white_space(); + } + + Mp++; + return count; +} + //Stuffs an integer list like stuff_int_list. int stuff_float_list(float* flp, int max_floats) { @@ -3060,6 +3312,113 @@ int split_str(char *src, int max_pixel_w, int *n_chars, char **p_str, int max_li return line_num; } +int split_str(char *src, int max_pixel_w, std::vector *n_chars, std::vector *p_str, char ignore_char) +{ + char buffer[SPLIT_STR_BUFFER_SIZE]; + char *breakpoint = NULL; + int sw, new_line = 1, line_num = 0, last_was_white = 0; + int ignore_until_whitespace = 0, buf_index = 0; + + // check our assumptions.. + Assert(src != NULL); + Assert(n_chars != NULL); + Assert(p_str != NULL); + Assert(max_pixel_w > 0); + + memset(buffer, 0, SPLIT_STR_BUFFER_SIZE); + + // get rid of any leading whitespace + while (is_white_space(*src)) + src++; + + p_str->clear(); + + // iterate through chars in line, keeping track of most recent "white space" location that can be used + // as a line splitting point if necessary + for (; *src; src++) { + + // starting a new line of text, init stuff for that + if (new_line) { + if (is_gray_space(*src)) + continue; + + p_str->push_back(src); + breakpoint = NULL; + new_line = 0; + } + + // maybe skip leading whitespace + if (ignore_until_whitespace) { + if ( is_white_space(*src) ) + ignore_until_whitespace = 0; + + continue; + } + + // if we have a newline, split the line here + if (*src == '\n') { + n_chars->push_back(src - p_str->at(line_num)); // track length of line + line_num++; + new_line = 1; + + memset(buffer, 0, SPLIT_STR_BUFFER_SIZE); + buf_index = 0; + continue; + } + + if (*src == ignore_char) { + ignore_until_whitespace = 1; + continue; + } + + if (is_gray_space(*src)) { + if (!last_was_white) // track at first whitespace in a series of whitespace + breakpoint = src; + + last_was_white = 1; + + } else { + // indicate next time around that this wasn't a whitespace character + last_was_white = 0; + } + + // throw it in our buffer + buffer[buf_index] = *src; + buf_index++; + buffer[buf_index] = 0; // null terminate it + + gr_get_string_size(&sw, NULL, buffer); + if (sw >= max_pixel_w) { + char *end; + + if (breakpoint) { + end = src = breakpoint; + + } else { + end = src; // force a split here since to whitespace + src--; // reuse this character in next line + } + + n_chars->push_back(end - p_str->at(line_num)); // track length of line + Assert(n_chars->at(line_num)); + line_num++; + new_line = 1; + + memset(buffer, 0, SPLIT_STR_BUFFER_SIZE); + buf_index = 0; + continue; + } + } // end for + + if (!new_line && p_str->at(line_num)) { + n_chars->push_back(src - p_str->at(line_num)); // track length of line + Assert(n_chars->at(line_num)); + line_num++; + } + + return line_num; +} + // Goober5000 // accounts for the dumb communications != communication, etc. int subsystem_stricmp(const char *str1, const char *str2) @@ -3103,8 +3462,8 @@ char *stristr(const char *str, const char *substr) return NULL; // save both a lowercase and an uppercase version of the first character of substr - char substr_ch_lower = tolower(*substr); - char substr_ch_upper = toupper(*substr); + char substr_ch_lower = (char)tolower(*substr); + char substr_ch_upper = (char)toupper(*substr); // find the maximum distance to search char *upper_bound = (char *)str + strlen(str) - strlen(substr); @@ -3235,14 +3594,16 @@ int replace_one(char *str, char *oldstr, char *newstr, uint max_len, int range) // Goober5000 int replace_all(char *str, char *oldstr, char *newstr, uint max_len, int range) { - int val, tally(0); + int val, tally = 0; while ((val = replace_one(str, oldstr, newstr, max_len, range)) > 0) { tally++; - // adjust range, because the text length might have changed - range += strlen(newstr) - strlen(oldstr); + // adjust range (if we have one), because the text length might have changed + if (range) { + range += strlen(newstr) - strlen(oldstr); + } } return (val < 0) ? val : tally; diff --git a/code/parse/parselo.h b/code/parse/parselo.h index 7660a67fde..997d9035cd 100644 --- a/code/parse/parselo.h +++ b/code/parse/parselo.h @@ -8,16 +8,19 @@ */ /* - * $Source: /cvs/cvsroot/fs2open/fs2_open/code/parse/parselo.h,v $ + * $Source: /home/fs2source/cvsroot/fs2_open/code/parse/parselo.h,v $ * $Revision: 2.42.2.6 $ * $Author: taylor $ - * $Date: 2007-10-15 06:43:20 $ + * $Date: 2007/10/15 06:43:20 $ * * Header for parselo.c * 20-07-02 21:20 DTP * Bumped MISSION_TEXT_SIZE from 390000 to 1000000 * - * $Log: not supported by cvs2svn $ + * $Log: parselo.h,v $ + * Revision 2.42.2.6 2007/10/15 06:43:20 taylor + * FS2NetD v.2 (still a work in progress, but is ~98% complete) + * * Revision 2.42.2.5 2007/08/17 03:29:49 Goober5000 * generalize the way radar ranges are handled (inspired by Shade's fix) * @@ -466,6 +469,14 @@ extern jmp_buf parse_abort; #define RAW_INTEGER_TYPE 3 // to parse a list of integers #define WEAPON_POOL_TYPE 4 +// Karajorma - Used by the stuff_ship_list and stuff_weapon_list SEXPs +#define NOT_SET_BY_SEXP_VARIABLE -1 + +#define MISSION_LOADOUT_SHIP_LIST 0 +#define MISSION_LOADOUT_WEAPON_LIST 1 +#define CAMPAIGN_LOADOUT_SHIP_LIST 2 +#define CAMPAIGN_LOADOUT_WEAPON_LIST 3 + #define SEXP_SAVE_MODE 1 #define SEXP_ERROR_CHECK_MODE 2 @@ -573,6 +584,7 @@ extern void debug_show_mission_text(); extern void convert_sexp_to_string(int cur_node, char *outstr, int mode, int max_len); char *split_str_once(char *src, int max_pixel_w); int split_str(char *src, int max_pixel_w, int *n_chars, char **p_str, int max_lines, char ignore_char = -1); +int split_str(char *src, int max_pixel_w, std::vector *n_chars, std::vector *p_str, char ignore_char); // fred extern int required_string_fred(char *pstr, char *end = NULL); @@ -609,5 +621,11 @@ extern int parse_modular_table(char *name_check, void (*parse_callback)(char *fi // to know that we are parsing a modular table extern bool Parsing_modular_table; +//Karajorma - Parses mission and campaign ship loadouts. +int stuff_loadout_list (int *ilp, int max_ints, int lookup_type); +int get_string_or_variable (char *str); +#define PARSING_FOUND_STRING 0 +#define PARSING_FOUND_VARIABLE 1 + #endif diff --git a/code/parse/sexp.cpp b/code/parse/sexp.cpp index 5af038b237..e4aebefc3d 100644 --- a/code/parse/sexp.cpp +++ b/code/parse/sexp.cpp @@ -1227,7 +1227,7 @@ * to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it * goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that * will return the subcategory for each sexp that uses it, and the submenu name in the - * op_submenu[] array in sexp_tree.cpp." + * op_submenu[] array in sexp.cpp." * * Please note that I rearranged a whole bunch of sexps in the Operators[] array in sexp.cpp * in order to make the subcategories work better, so if you get a whole bunch of differences @@ -1624,6 +1624,7 @@ #include "parse/scripting.h" #include "object/objcollide.h" #include "object/waypoint.h" +#include "graphics/2d.h" #include "object/objectsnd.h" #ifndef NDEBUG @@ -1631,6 +1632,8 @@ #endif #include "autopilot/autopilot.h" +#include "object/objectshield.h" +#include "network/multi_sexp.h" @@ -1723,14 +1726,16 @@ sexp_oper Operators[] = { { "shield-recharge-pct", OP_SHIELD_RECHARGE_PCT, 1, 1 }, { "engine-recharge-pct", OP_ENGINE_RECHARGE_PCT, 1, 1 }, { "weapon-recharge-pct", OP_WEAPON_RECHARGE_PCT, 1, 1 }, - { "shield-quad-low", OP_SHIELD_QUAD_LOW, 2, 2 }, + { "shield-quad-low", OP_SHIELD_QUAD_LOW, 2, 2 }, { "primary-ammo-pct", OP_PRIMARY_AMMO_PCT, 2, 2 }, { "secondary-ammo-pct", OP_SECONDARY_AMMO_PCT, 2, 2 }, { "get-primary-ammo", OP_GET_PRIMARY_AMMO, 2, 2 }, // Karajorma { "get-secondary-ammo", OP_GET_SECONDARY_AMMO, 2, 2 }, // Karajorma { "is-primary-selected", OP_IS_PRIMARY_SELECTED, 2, 2 }, { "is-secondary-selected", OP_IS_SECONDARY_SELECTED, 2, 2 }, - { "shields-left", OP_SHIELDS_LEFT, 1, 1, }, + { "afterburner-energy-pct", OP_AFTERBURNER_LEFT, 1, 1 }, + { "weapon-energy-pct", OP_WEAPON_ENERGY_LEFT, 1, 1 }, + { "shields-left", OP_SHIELDS_LEFT, 1, 1, }, { "hits-left", OP_HITS_LEFT, 1, 1, }, { "hits-left-subsystem", OP_HITS_LEFT_SUBSYSTEM, 2, 3, }, { "sim-hits-left", OP_SIM_HITS_LEFT, 1, 1, }, // Turey @@ -1738,6 +1743,7 @@ sexp_oper Operators[] = { { "distance-ship-subsystem", OP_DISTANCE_SUBSYSTEM, 3, 3 }, // Goober5000 { "num-within-box", OP_NUM_WITHIN_BOX, 7, INT_MAX}, //WMC { "special-warp-dist", OP_SPECIAL_WARP_DISTANCE, 1, 1, }, + { "get-damage-caused", OP_GET_DAMAGE_CAUSED, 2, INT_MAX }, { "set-object-speed-x", OP_SET_OBJECT_SPEED_X, 2, 3 }, // WMC { "set-object-speed-y", OP_SET_OBJECT_SPEED_Y, 2, 3 }, // WMC @@ -1766,6 +1772,8 @@ sexp_oper Operators[] = { { "was-promotion-granted", OP_WAS_PROMOTION_GRANTED, 0, 1, }, { "was-medal-granted", OP_WAS_MEDAL_GRANTED, 0, 1, }, { "current-speed", OP_CURRENT_SPEED, 1, 1}, + { "primary-fired-since", OP_PRIMARY_FIRED_SINCE, 3, 3}, // Karajorma + { "secondary-fired-since", OP_SECONDARY_FIRED_SINCE, 3, 3}, // Karajorma { "time-ship-destroyed", OP_TIME_SHIP_DESTROYED, 1, 1, }, { "time-ship-arrived", OP_TIME_SHIP_ARRIVED, 1, 1, }, @@ -1777,18 +1785,20 @@ sexp_oper Operators[] = { { "time-docked", OP_TIME_DOCKED, 3, 3, }, { "time-undocked", OP_TIME_UNDOCKED, 3, 3, }, - { "cond", OP_COND, 1, INT_MAX, }, - { "when", OP_WHEN, 2, INT_MAX, }, - { "when-argument", OP_WHEN_ARGUMENT, 3, INT_MAX, }, // Goober5000 - { "every-time", OP_EVERY_TIME, 2, INT_MAX, }, // Goober5000 - { "every-time-argument", OP_EVERY_TIME_ARGUMENT, 3, INT_MAX, }, // Goober5000 - { "any-of", OP_ANY_OF, 1, INT_MAX, }, // Goober5000 - { "every-of", OP_EVERY_OF, 1, INT_MAX, }, // Goober5000 - { "random-of", OP_RANDOM_OF, 1, INT_MAX, }, // Goober5000 - { "random-multiple-of", OP_RANDOM_MULTIPLE_OF, 1, INT_MAX, }, // Karajorma - { "number-of", OP_NUMBER_OF, 2, INT_MAX, }, // Goober5000 - { "in-sequence", OP_IN_SEQUENCE, 1, INT_MAX, }, // Karajorma - { "invalidate-argument", OP_INVALIDATE_ARGUMENT, 1, INT_MAX, }, // Goober5000 + { "cond", OP_COND, 1, INT_MAX, }, + { "when", OP_WHEN, 2, INT_MAX, }, + { "when-argument", OP_WHEN_ARGUMENT, 3, INT_MAX, }, // Goober5000 + { "every-time", OP_EVERY_TIME, 2, INT_MAX, }, // Goober5000 + { "every-time-argument", OP_EVERY_TIME_ARGUMENT, 3, INT_MAX, }, // Goober5000 + { "any-of", OP_ANY_OF, 1, INT_MAX, }, // Goober5000 + { "every-of", OP_EVERY_OF, 1, INT_MAX, }, // Goober5000 + { "random-of", OP_RANDOM_OF, 1, INT_MAX, }, // Goober5000 + { "random-multiple-of", OP_RANDOM_MULTIPLE_OF, 1, INT_MAX, }, // Karajorma + { "number-of", OP_NUMBER_OF, 2, INT_MAX, }, // Goober5000 + { "in-sequence", OP_IN_SEQUENCE, 1, INT_MAX, }, // Karajorma + { "invalidate-argument", OP_INVALIDATE_ARGUMENT, 1, INT_MAX, }, // Goober5000 + { "validate-argument", OP_VALIDATE_ARGUMENT, 1, INT_MAX, }, // Karajorma + { "do-for-valid-arguments", OP_DO_FOR_VALID_ARGUMENTS, 1, INT_MAX, }, // Karajorma { "send-message-list", OP_SEND_MESSAGE_LIST, 4, INT_MAX }, { "send-message", OP_SEND_MESSAGE, 3, 3, }, @@ -1850,6 +1860,10 @@ sexp_oper Operators[] = { { "change-subsystem-name", OP_CHANGE_SUBSYSTEM_NAME, 3, INT_MAX }, // Karajorma { "lock-afterburner", OP_LOCK_AFTERBURNER, 1, INT_MAX }, // KeldorKatarn { "unlock-afterburner", OP_UNLOCK_AFTERBURNER, 1, INT_MAX }, // KeldorKatarn + { "set-afterburner-energy", OP_SET_AFTERBURNER_ENERGY, 2, INT_MAX }, // Karajorma + { "set-weapon-energy", OP_SET_WEAPON_ENERGY, 2, INT_MAX }, // Karajorma + { "set-shield-energy", OP_SET_SHIELD_ENERGY, 2, INT_MAX }, // Karajorma + { "set-ambient-light", OP_SET_AMBIENT_LIGHT, 3, 3 }, // Karajorma { "ship-invulnerable", OP_SHIP_INVULNERABLE, 1, INT_MAX }, { "ship-vulnerable", OP_SHIP_VULNERABLE, 1, INT_MAX }, @@ -1893,6 +1907,7 @@ sexp_oper Operators[] = { { "turret-subsys-target-disable", OP_TURRET_SUBSYS_TARGET_DISABLE, 2, INT_MAX }, { "turret-subsys-target-enable", OP_TURRET_SUBSYS_TARGET_ENABLE, 2, INT_MAX }, + { "red-alert", OP_RED_ALERT, 0, 0 }, { "end-mission", OP_END_MISSION, 0, 0 }, //-Sesquipedalian { "force-jump", OP_FORCE_JUMP, 0, 0 }, // Goober5000 @@ -1967,6 +1982,7 @@ sexp_oper Operators[] = { { "ship-change-alt-name", OP_SHIP_CHANGE_ALT_NAME, 2, INT_MAX }, // Goober5000 { "ship-copy-damage", OP_SHIP_COPY_DAMAGE, 2, INT_MAX }, // Goober5000 { "set-death-message", OP_SET_DEATH_MESSAGE, 1, 1 }, // Goober5000 + { "set-respawns", OP_SET_RESPAWNS, 2, INT_MAX }, // Karajorma //background and nebula sexps { "mission-set-nebula", OP_MISSION_SET_NEBULA, 1, 1 }, //-Sesquipedalian @@ -2172,6 +2188,8 @@ sexp_node *Sexp_nodes = NULL; sexp_variable Sexp_variables[MAX_SEXP_VARIABLES]; +std::vector Current_sexp_operator; + int Players_target = UNINITIALIZED; int Players_mlocked = UNINITIALIZED; // for is-missile-locked - Sesquipedalian ship_subsys *Players_targeted_subsys; @@ -2192,6 +2210,7 @@ int eval_num(int node); std::vector Sexp_replacement_arguments; int Sexp_current_argument_nesting_level; +std::vector Applicable_arguments_temp; // Goober5000 arg_item Sexp_applicable_argument_list; @@ -2201,6 +2220,7 @@ bool is_blank_of_op(int op_const); //Karajorma bool is_generic_subsys(char *subsy_name); bool ship_class_unchanged(int ship_index); +void multi_sexp_modify_variable(); // Goober5000 - arg_item class stuff, borrowed from sexp_list_item class stuff ------------- void arg_item::add_data(char *str) @@ -2321,6 +2341,7 @@ void init_sexp() Sexp_replacement_arguments.clear(); Sexp_applicable_argument_list.expunge(); Sexp_current_argument_nesting_level = 0; + initalise_sexp_packet(); static bool done_sexp_atexit = false; if (!done_sexp_atexit) @@ -4577,6 +4598,28 @@ void convert_sexp_to_string(int cur_node, char *outstr, int mode, int max_len) strcpy(Sexp_string, "( )"); } +// given a node, returns a pointer to the ship or NULL if this isn't the name of a ship +ship * sexp_get_ship_from_node(int node) +{ + int sindex; + ship *shipp = NULL; + + sindex = ship_name_lookup( CTEXT(node) ); + + if (sindex < 0) { + return shipp; + } + + if (Ships[sindex].objnum < 0) { + return shipp; + } + + shipp = &Ships[sindex]; + return shipp; +} + + + // determine if the named ship or wing hasn't arrived yet (wing or ship must be on arrival list) int sexp_query_has_yet_to_arrive(char *name) { @@ -6099,6 +6142,148 @@ int sexp_time_wing_departed(int n) return f2i(time); } +void sexp_set_energy_pct (int node, int op_num) +{ + int sindex; + float new_pct; + char *shipname; + ship * shipp; + ship_info * sip; + + Assert (node > -1); + new_pct = eval_num(node) / 100.0f; + + // deal with ridiculous percentages + if (new_pct > 1.0f) { + new_pct = 1.0f; + } + else if (new_pct < 0.0f) { + new_pct = 0.0f; + } + + // only need to send a packet for afterburners because shields and weapon energy are sent from server to clients + if (MULTIPLAYER_MASTER && (op_num == OP_SET_AFTERBURNER_ENERGY)) { + multi_start_packet(); + multi_send_float(new_pct); + } + + node = CDR(node); + + while (node > -1) { + // get the ship + shipname = CTEXT(node); + + sindex = ship_name_lookup( shipname ); + if ( sindex == -1 ){ // hmm.. if true, must not have arrived yet + continue; + } + + shipp = &Ships[sindex]; + sip = &Ship_info[Ships[sindex].ship_info_index]; + + switch (op_num) { + case OP_SET_AFTERBURNER_ENERGY: + shipp->afterburner_fuel = sip->afterburner_fuel_capacity * new_pct; + break; + + case OP_SET_WEAPON_ENERGY: + if (!(ship_has_energy_weapons(shipp)) ) { + node = CDR(node); + continue; + } + + shipp->weapon_energy = sip->max_weapon_reserve * new_pct; + break; + + case OP_SET_SHIELD_ENERGY: + if (shipp->ship_max_shield_strength == 0.0f) { + node = CDR(node); + continue; + } + + shield_set_strength(&Objects[shipp->objnum], (shipp->ship_max_shield_strength * new_pct)); + break; + } + + if (MULTIPLAYER_MASTER && (op_num == OP_SET_AFTERBURNER_ENERGY)) { + multi_send_ship(shipp); + } + + node = CDR(node); + } + + if (MULTIPLAYER_MASTER && (op_num == OP_SET_AFTERBURNER_ENERGY)) { + multi_end_packet(); + } +} + +void multi_sexp_set_energy_pct() +{ + ship *shipp; + float new_pct; + ship_info * sip; + + int op_num = multi_sexp_get_operator(); + + multi_get_float(new_pct); + while (multi_get_ship(shipp)) { + sip = &Ship_info[shipp->ship_info_index]; + + switch (op_num) { + case OP_SET_AFTERBURNER_ENERGY: + shipp->afterburner_fuel = sip->afterburner_fuel_capacity * new_pct; + break; + + case OP_SET_WEAPON_ENERGY: + shipp->weapon_energy = sip->max_weapon_reserve * new_pct; + break; + + case OP_SET_SHIELD_ENERGY: + shield_set_strength(&Objects[shipp->objnum], (shipp->ship_max_shield_strength * new_pct)); + break; + } + } +} + + +int sexp_get_energy_pct (int node, int op_num) +{ + int sindex; + float maximum = 0.0f, current = 0.0f; + ship * shipp; + ship_info * sip; + char *shipname; + + // get the ship + shipname = CTEXT(node); + + sindex = ship_name_lookup( shipname ); + if ( sindex == -1 ){ // has either not arrived yet or has departed + return SEXP_NAN; + } + + shipp = &Ships[sindex]; + sip = &Ship_info[Ships[sindex].ship_info_index]; + + switch (op_num) { + case OP_AFTERBURNER_LEFT: + maximum = sip->afterburner_fuel_capacity; + current = shipp->afterburner_fuel; + break; + case OP_WEAPON_ENERGY_LEFT: + if (ship_has_energy_weapons(shipp)) { + maximum = sip->max_weapon_reserve; + current = shipp->weapon_energy; + } + break; + } + if (maximum < WEAPON_RESERVE_THRESHOLD || current < WEAPON_RESERVE_THRESHOLD) { + return 0; + } + + return (int)(100 * (current/maximum)); +} + // function to return the remaining shields as a percentage of the given ship. int sexp_shields_left(int n) { @@ -7204,6 +7389,93 @@ int sexp_was_medal_granted(int n) return SEXP_FALSE; } +float get_damage_caused(int damaged_ship, int attacker ) +{ + int sindex, idx; + float damage_total = 0.0f; + + + // is the ship that took damage in the mission still? + sindex = ship_get_by_signature(damaged_ship); + + if (sindex >= 0 ) { + for(idx=0; idx -1) && (ship_class < MAX_SHIP_CLASSES)); + return (int) ((damage_caused/Ship_info[ship_class].max_hull_strength) * 100.0f); +} + // function which returns true if the percentage of ships (and ships in wings) departed is at // least the percentage given. what determine if we should check destroyed or departed status // Goober5000 - added disarm and disable @@ -7798,7 +8070,6 @@ void eval_when_for_each_special_argument( int cur_node ) // execute sexp... CTEXT will insert the argument as necessary - // (since these are all actions, they don't return any meaningful values) eval_sexp(cur_node); // clean up any special sexp stuff @@ -7883,7 +8154,7 @@ int special_argument_appears_in_sexp_list(int node) // eval_when evaluates the when conditional int eval_when(int n, int use_arguments) { - int arg_handler, cond, val, actions, exp, op_num; + int arg_handler, cond, val, actions, exp, op_num, do_node; arg_item *ptr; Assert( n >= 0 ); @@ -7939,6 +8210,19 @@ int eval_when(int n, int use_arguments) } break; + case OP_DO_FOR_VALID_ARGUMENTS: + if (special_argument_appears_in_sexp_tree(exp)) { + Warning(LOCATION, " used within Do-for-valid-arguments SEXP. Skipping entire SEXP"); + break; + } + + do_node = CDR(exp); + while (do_node != -1) { + do_action_for_each_special_argument(do_node); + do_node = CDR(do_node); + } + break; + case OP_WHEN_ARGUMENT: case OP_EVERY_TIME_ARGUMENT: eval_sexp(exp); @@ -8026,6 +8310,7 @@ int test_argument_list_for_condition(int n, int condition_node, int *num_true, i // ensure special argument list is empty Sexp_applicable_argument_list.clear_nesting_level(); + Applicable_arguments_temp.clear(); // ditto for counters num_valid_arguments = 0; @@ -8051,7 +8336,7 @@ int test_argument_list_for_condition(int n, int condition_node, int *num_true, i { case SEXP_TRUE: (*num_true)++; - Sexp_applicable_argument_list.add_data(Sexp_nodes[n].text); + Applicable_arguments_temp.push_back(Sexp_nodes[n].text); break; case SEXP_FALSE: @@ -8060,7 +8345,7 @@ int test_argument_list_for_condition(int n, int condition_node, int *num_true, i case SEXP_KNOWN_TRUE: (*num_known_true)++; - Sexp_applicable_argument_list.add_data(Sexp_nodes[n].text); + Applicable_arguments_temp.push_back(Sexp_nodes[n].text); break; case SEXP_KNOWN_FALSE: @@ -8079,6 +8364,13 @@ int test_argument_list_for_condition(int n, int condition_node, int *num_true, i n = CDR(n); } + // now we write from the temporary store into the real one, reversing the order. We do this because + // Sexp_applicable_argument_list is a stack and we want the first argument in the list to be the first one out + while(!Applicable_arguments_temp.empty()) { + Sexp_applicable_argument_list.add_data(Applicable_arguments_temp.back()); + Applicable_arguments_temp.pop_back(); + } + return num_valid_arguments; } @@ -8293,10 +8585,10 @@ int eval_in_sequence(int arg_handler_node, int condition_node) } // Goober5000 -void sexp_invalidate_argument(int n) +void sexp_change_argument_validity(int n, bool invalidate) { int conditional, arg_handler, arg_n; - bool invalidated; + bool toggled; conditional = n; do { @@ -8315,17 +8607,17 @@ void sexp_invalidate_argument(int n) // loop through arguments while (n != -1) { - invalidated = false; + toggled = false; // first we must check if the arg_handler marks a selection. At the moment random-of is the only one that does this arg_n = CDR(arg_handler); - while (arg_n != -1) { + while (invalidate && (arg_n != -1)) { if (Sexp_nodes[arg_n].flags & SNF_ARGUMENT_SELECT) { // now check if the selected argument matches the one we want to invalidate if (!strcmp(CTEXT(n), CTEXT(arg_n))) { // set it as invalid Sexp_nodes[arg_n].flags &= ~SNF_ARGUMENT_VALID; - invalidated = true; + toggled = true; } } @@ -8333,7 +8625,7 @@ void sexp_invalidate_argument(int n) arg_n = CDR(arg_n); } - if (!invalidated) { + if (!toggled) { // search for argument in arg_handler list arg_n = CDR(arg_handler); while (arg_n != -1) @@ -8341,13 +8633,24 @@ void sexp_invalidate_argument(int n) // match? if (!strcmp(CTEXT(n), CTEXT(arg_n))) { - // we need to check if the argument is already invalid as some argument lists may contain duplicates - if (Sexp_nodes[arg_n].flags & SNF_ARGUMENT_VALID) { - // set it as invalid - Sexp_nodes[arg_n].flags &= ~SNF_ARGUMENT_VALID; + if (invalidate) { + // we need to check if the argument is already invalid as some argument lists may contain duplicates + if (Sexp_nodes[arg_n].flags & SNF_ARGUMENT_VALID) { + // set it as invalid + Sexp_nodes[arg_n].flags &= ~SNF_ARGUMENT_VALID; - // exit inner loop - break; + // exit inner loop + break; + } + } + else { + if (!(Sexp_nodes[arg_n].flags & SNF_ARGUMENT_VALID)) { + // set it as valid + Sexp_nodes[arg_n].flags |= SNF_ARGUMENT_VALID; + + // exit inner loop + break; + } } } @@ -8600,7 +8903,7 @@ void sexp_change_iff_color(int n) case OSWPT_TYPE_WING: { // current ships - for (int i = 0; i < oswpt.wingp->current_count; i++) + for (i = 0; i < oswpt.wingp->current_count; i++) sexp_ingame_ship_change_iff_color(&Ships[oswpt.wingp->ship_index[i]], observer_team, observed_team, alternate_iff_color); // ships yet to arrive @@ -9035,6 +9338,21 @@ void sexp_allow_treason (int n) { void sexp_change_soundtrack(int n) { event_sexp_change_soundtrack(CTEXT(n)); + + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_string(CTEXT(n)); + multi_end_packet(); + } +} + +void multi_sexp_change_soundtrack() +{ + char new_track[NAME_LENGTH]; + + if (multi_get_string(new_track)) { + event_sexp_change_soundtrack(new_track); + } } // Goober5000 @@ -9075,25 +9393,14 @@ void sexp_load_music(char* fname) } // Goober5000 -void sexp_start_music(int node) +void sexp_start_music(int loop) { - int n=CDR(node); - int loop=0; - - if (n>0) - { - if (eval_num(n) > 0) - { - loop=1; - } - } - if ( Sexp_music_handle != -1 ) { if ( !audiostream_is_playing(Sexp_music_handle) ) audiostream_play(Sexp_music_handle, Master_event_music_volume, loop); } else { - nprintf(("Warning", "No file exists to play sound via sexp-play-sound-from-file!\n")); + nprintf(("Warning", "Can not play music. sexp_start_music called when no music file is set for Sexp_music_handle!\n")); } } @@ -9117,12 +9424,52 @@ void sexp_play_sound_from_table(int n) // play sound effect --------------------------- snd_play_3d( &Snds[sound_index], &origin, &View_position, 0.0f, NULL, 0, 1.0f, SND_PRIORITY_MUST_PLAY ); + + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_float(origin.xyz.x); + multi_send_float(origin.xyz.y); + multi_send_float(origin.xyz.z); + multi_send_int(sound_index); + multi_end_packet(); + } +} + +void multi_sexp_play_sound_from_table() +{ + vec3d origin; + int sound_index = -1; + + multi_get_float(origin.xyz.x); + multi_get_float(origin.xyz.y); + multi_get_float(origin.xyz.z); + multi_get_int(sound_index); + + if (sound_index != -1) { + // play sound effect --------------------------- + snd_play_3d( &Snds[sound_index], &origin, &View_position, 0.0f, NULL, 0, 1.0f, SND_PRIORITY_MUST_PLAY ); + } } // Goober5000 void sexp_close_sound_from_file(int n) { - sexp_stop_music(is_sexp_true(n)); + int fade = is_sexp_true(n); + sexp_stop_music(fade); + + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_bool(fade ? true : false); + multi_end_packet(); + } +} + +void multi_sexp_close_sound_from_file() +{ + bool fade; + if (multi_get_bool(fade)) { + sexp_stop_music(fade); + } } // Goober5000 @@ -9130,9 +9477,35 @@ void sexp_play_sound_from_file(int n) { // load sound file ----------------------------- sexp_load_music(CTEXT(n)); + + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_string(CTEXT(n)); + } + + n = CDR(n); + int loop = is_sexp_true(n); // play sound file ----------------------------- - sexp_start_music(n); + sexp_start_music(loop); + + if (MULTIPLAYER_MASTER) { + multi_send_bool(loop ? true : false); + multi_end_packet(); + } +} + +void multi_sexp_play_sound_from_file() +{ + char filename[NAME_LENGTH]; + bool (loop); + if (!multi_get_string(filename)) { + return; + } + sexp_load_music(filename); + + multi_get_bool(loop); + sexp_start_music(loop); } // Goober5000 @@ -9673,7 +10046,7 @@ void sexp_sabotage_subsystem(int n) int percentage, shipnum, index, subsys_type; float sabotage_hits; ship *shipp; - ship_subsys *ss, *ss_start; + ship_subsys *ss = NULL, *ss_start; bool is_generic, do_loop = true; shipname = CTEXT(n); @@ -9776,7 +10149,7 @@ void sexp_repair_subsystem(int n) int percentage, shipnum, index, do_submodel_repair, subsys_type; float repair_hits; ship *shipp; - ship_subsys *ss, *ss_start; + ship_subsys *ss = NULL, *ss_start; bool generic, do_loop = true; shipname = CTEXT(n); @@ -9881,7 +10254,7 @@ void sexp_set_subsystem_strength(int n) char *shipname, *subsystem; int percentage, shipnum, index, do_submodel_repair, subsys_type; ship *shipp; - ship_subsys *ss, *ss_start; + ship_subsys *ss = NULL, *ss_start; bool generic_subsys; bool do_loop = true; @@ -10855,11 +11228,25 @@ void sexp_allow_weapon(int n) // Goober5000 // generic function for all those sexps that set flags -void sexp_deal_with_ship_flag(int node, int object_flag, int object_flag2, int ship_flag, int ship_flag2, int p_object_flag, int p_object_flag2, int set_it, int include_players_in_ship_lookup = 0) +void sexp_deal_with_ship_flag(int node, int object_flag, int object_flag2, int ship_flag, int ship_flag2, int p_object_flag, int p_object_flag2, int set_it, bool send_multiplayer = false, bool include_players_in_ship_lookup = false) { char *ship_name; int ship_index; + if (send_multiplayer && MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_int(object_flag); + /* Uncommenting this will break compatibility with earlier builds but it is pointless to send it until object_flag2 + is actually used by the engine + */ + // multi_send_int(object_flag2); + multi_send_int(ship_flag); + multi_send_int(ship_flag2); + multi_send_int(p_object_flag); + multi_send_int(p_object_flag2); + multi_send_bool(set_it ? true : false); + } + // loop for all ships in the sexp for (; node >= 0; node = CDR(node)) { @@ -10917,6 +11304,18 @@ void sexp_deal_with_ship_flag(int node, int object_flag, int object_flag2, int s else Ships[ship_index].flags2 &= ~ship_flag2; } + + // the lock afterburner SEXP also needs to set a physics flag + if (ship_flag2 == SF2_AFTERBURNER_LOCKED) { + if (set_it) { + Objects[Ships[ship_index].objnum].phys_info.flags &= ~PF_AFTERBURNER_ON; + } + } + + if (send_multiplayer && MULTIPLAYER_MASTER) { + multi_send_bool(true); + multi_send_ship(ship_index); + } } // if it's not in-mission else @@ -10948,6 +11347,99 @@ void sexp_deal_with_ship_flag(int node, int object_flag, int object_flag2, int s else p_objp->flags2 &= ~p_object_flag2; } + + if (send_multiplayer && MULTIPLAYER_MASTER) { + multi_send_bool(false); + multi_send_parse_object(p_objp); + } + } + } + + if (send_multiplayer && MULTIPLAYER_MASTER) { + multi_end_packet(); + } +} + +void multi_sexp_deal_with_ship_flag() +{ + int object_flag = 0; + // int object_flag2 = 0; + int ship_flag = 0; + int ship_flag2 = 0; + int p_object_flag = 0; + int p_object_flag2 = 0; + bool set_it = false; + bool ship_arrived = true; + ship *shipp = NULL; + p_object *pobjp = NULL; + + multi_get_int(object_flag); + // multi_get_int(object_flag2); + multi_get_int(ship_flag); + multi_get_int(ship_flag2); + multi_get_int(p_object_flag); + multi_get_int(p_object_flag2); + multi_get_bool(set_it); + + // if any of the above failed so will this one + if (!multi_get_bool(ship_arrived)) { + Int3(); + return; + } + + if (ship_arrived) { + multi_get_ship(shipp); + if (shipp != NULL) { + if (set_it) { + Objects[shipp->objnum].flags |= object_flag; + // Objects[shipp->objnum].flags2 |= object_flag2; + shipp->flags |= ship_flag; + shipp->flags2 |= ship_flag2; + } + else { + Objects[shipp->objnum].flags &= ~object_flag; + // Objects[shipp->objnum].flags2 &= ~object_flag2; + shipp->flags &= ~ship_flag; + shipp->flags2 &= ~ship_flag2; + } + } + + // deal with side effects of these flags + if (ship_flag2 == SF2_AFTERBURNER_LOCKED) { + if (set_it) { + Objects[shipp->objnum].phys_info.flags &= ~PF_AFTERBURNER_ON; + } + } + + if (ship_flag2 == SF2_STEALTH && !set_it) { + if (shipp->flags & SF_ESCORT) { + hud_add_ship_to_escort(shipp->objnum, 1); + } + } + if ((ship_flag2 == SF2_FRIENDLY_STEALTH_INVIS) || (ship_flag == SF_HIDDEN_FROM_SENSORS)) { + if (set_it) { + if (Player_ai->target_objnum == shipp->objnum) { + hud_cease_targeting(); + } + } + else { + if (shipp->flags & SF_ESCORT) { + hud_add_ship_to_escort(shipp->objnum, 1); + } + } + } + } + else { + multi_get_parse_object(pobjp); + if (pobjp != NULL) { + if (set_it) { + pobjp->flags |= p_object_flag; + pobjp->flags2 |= p_object_flag2; + } + else { + pobjp->flags &= ~p_object_flag; + pobjp->flags2 &= ~p_object_flag2; + } } } } @@ -11101,6 +11593,11 @@ void sexp_set_persona (int node) node = CDR(node); Assert (node >=0); + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_int(persona_index); + } + // now loop through the list of ships while (node >= 0) { sindex = ship_name_lookup( CTEXT(node) ); @@ -11115,9 +11612,91 @@ void sexp_set_persona (int node) Ships[sindex].persona_index = persona_index; + if (MULTIPLAYER_MASTER) { + multi_send_ship(sindex); + } + node = CDR(node); } + if (MULTIPLAYER_MASTER) { + multi_end_packet(); + } +} + +void multi_sexp_set_persona() +{ + ship *shipp = NULL; + int persona_index = -1; + + if (!multi_get_int(persona_index) ) { + return; + } + + while (multi_get_ship(shipp)) { + Assert(persona_index != -1); + if (shipp != NULL) { + shipp->persona_index = persona_index; + } + } +} + +int sexp_weapon_fired_delay(int node, int op_num) +{ + ship *shipp; + weapon_info * wip; + + int requested_bank; + int delay; + int last_fired = -1; + + shipp = sexp_get_ship_from_node(node); + if (shipp == NULL) { + return SEXP_FALSE; + } + + // Get the bank to check + node = CDR(node); + requested_bank = eval_num(node); + if (requested_bank < 0) { + return SEXP_FALSE; + } + + // get the delay + node = CDR(node); + delay = eval_num(node); + if (delay <= 0 ) { + return SEXP_FALSE; + } + + switch (op_num) { + case OP_PRIMARY_FIRED_SINCE: + if (requested_bank >= shipp->weapons.num_primary_banks) { + return SEXP_FALSE; + } + wip = &Weapon_info[shipp->weapons.primary_bank_weapons[requested_bank]]; + last_fired = shipp->weapons.next_primary_fire_stamp[requested_bank] - (int)(wip->fire_wait * 1000); + break; + + case OP_SECONDARY_FIRED_SINCE: + if (requested_bank >= shipp->weapons.num_secondary_banks) { + return SEXP_FALSE; + } + wip = &Weapon_info[shipp->weapons.secondary_bank_weapons[requested_bank]]; + last_fired = shipp->weapons.next_secondary_fire_stamp[requested_bank] - (int)(wip->fire_wait * 1000); + break; + } + + if (last_fired < 0) { + // weapon was never fired + return SEXP_FALSE; + } + + if (timestamp() - delay < last_fired) { + return SEXP_TRUE; + } + + return SEXP_FALSE; } // function to deal with getting status of goals for previous missions (in the current campaign). @@ -11460,7 +12039,7 @@ void sexp_beam_protect_ships(int n, int flag ) // Goober5000 - sets the "dont collide invisible" flag on a list of ships void sexp_dont_collide_invisible(int n, int dont_collide) { - sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_DONT_COLLIDE_INVIS, P_SF2_DONT_COLLIDE_INVIS, 0, dont_collide); + sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_DONT_COLLIDE_INVIS, 0, P_SF2_DONT_COLLIDE_INVIS, dont_collide); } // Goober5000 - sets the vaporize flag on a list of ships @@ -11473,7 +12052,7 @@ void sexp_ships_vaporize(int n, int vaporize) // when making ships visible, false otherwise void sexp_ships_visible(int n, int visible) { - sexp_deal_with_ship_flag(n, 0, 0, SF_HIDDEN_FROM_SENSORS, 0, P_SF_HIDDEN_FROM_SENSORS, 0, !visible); + sexp_deal_with_ship_flag(n, 0, 0, SF_HIDDEN_FROM_SENSORS, 0, P_SF_HIDDEN_FROM_SENSORS, 0, !visible, true); // we also have to add any escort ships that were made visible for (; n >= 0; n = CDR(n)) @@ -11495,7 +12074,7 @@ void sexp_ships_visible(int n, int visible) // Goober5000 void sexp_ships_stealthy(int n, int stealthy) { - sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_STEALTH, P_SF2_STEALTH, 0, stealthy); + sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_STEALTH, 0, P_SF2_STEALTH, stealthy, true); // we also have to add any escort ships that were made visible if (!stealthy) @@ -11515,7 +12094,7 @@ void sexp_ships_stealthy(int n, int stealthy) // Goober5000 void sexp_friendly_stealth_invisible(int n, int invisible) { - sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_FRIENDLY_STEALTH_INVIS, P_SF2_FRIENDLY_STEALTH_INVIS, 0, invisible); + sexp_deal_with_ship_flag(n, 0, 0, 0, SF2_FRIENDLY_STEALTH_INVIS, 0, P_SF2_FRIENDLY_STEALTH_INVIS, invisible, true); // we also have to add any escort ships that were made visible if (!invisible) @@ -11578,7 +12157,7 @@ void sexp_ship_subsys_untargetable(int n, int untargetable) void sexp_ship_tag( int n, int tag ) { int ship_num, tag_level, tag_time, ssm_index(0); - int ssm_team; + int ssm_team = 0; // check to see if ship destroyed or departed. In either case, do nothing. if ( mission_log_get_time(LOG_SHIP_DEPARTED, CTEXT(n), NULL, NULL) || mission_log_get_time(LOG_SHIP_DESTROYED, CTEXT(n), NULL, NULL) ) @@ -11652,7 +12231,7 @@ void sexp_ships_invulnerable( int n, int invulnerable ) void sexp_ships_bomb_targetable(int n, int targetable) { - sexp_deal_with_ship_flag(n, OF_TARGETABLE_AS_BOMB, 0, 0, 0, 0, P2_OF_TARGETABLE_AS_BOMB, targetable); + sexp_deal_with_ship_flag(n, OF_TARGETABLE_AS_BOMB, 0, 0, 0, 0, P2_OF_TARGETABLE_AS_BOMB, targetable, true); } // Goober5000 @@ -12384,9 +12963,6 @@ int sexp_order(int n) char *order_to = CTEXT(n); char *order = CTEXT(CDR(n)); char *target = NULL; - char *order_from = NULL; - char *special = NULL; - int timestamp = 0; //target n = CDDR(n); @@ -12573,25 +13149,13 @@ int sexp_shield_quad_low(int node) if(!(sip->flags & SIF_SMALL_SHIP)){ return SEXP_FALSE; } - + max_quad = get_max_shield_quad(objp); + // shield pct check = (float)eval_num(CDR(node)); - int n_shd_sections; - switch (objp->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } // check his quadrants - for(idx=0; idxshield_quadrant[idx] / max_quad) * 100.0f) <= check ){ return SEXP_TRUE; } @@ -12837,7 +13401,7 @@ void set_primary_ammo (int ship_index, int requested_bank, int requested_ammo, i } // Check that this isn't a non-ballistic bank as it's pointless to set the amount of ammo for those - if (!Weapon_info[shipp->weapons.primary_bank_weapons[requested_bank]].wi_flags2 & WIF2_BALLISTIC) + if (!(Weapon_info[shipp->weapons.primary_bank_weapons[requested_bank]].wi_flags2 & WIF2_BALLISTIC)) { return ; } @@ -13117,97 +13681,23 @@ void sexp_set_weapon (int node, bool primary) // KeldorKatarn - Locks or unlocks the afterburner on the requested ship void sexp_deal_with_afterburner_lock (int node, bool lock) { - ship *shipp; - int ship_index; - Assert (node != -1); - - do { - // Check that a ship has been supplied - ship_index = ship_name_lookup(CTEXT(node)); - if (ship_index < 0) { - node = CDR (node); - continue ; - } - - // Check that it's valid - if((Ships[ship_index].objnum < 0) || (Ships[ship_index].objnum >= MAX_OBJECTS)) { - node = CDR (node); - continue ; - } - shipp = &Ships[ship_index]; - - // Set the flag - if (lock){ - shipp->flags2 |= SF2_AFTERBURNER_LOCKED; - Objects[shipp->objnum].phys_info.flags &= ~PF_AFTERBURNER_ON; - } - else { - shipp->flags2 &= ~SF2_AFTERBURNER_LOCKED; - } - - // Go to the next ship. - node = CDR (node); - } while (node != -1); + sexp_deal_with_ship_flag(node, 0, 0, 0, SF2_AFTERBURNER_LOCKED, 0, 0, (lock ? 1:0), true); } -// Karajorma - Locks or unlocks the primary or secondary banks on the requested ship -void sexp_deal_with_weapons_lock (int node, bool primary, bool lock) +// Karajorma - locks or unlocks primary weapons on the requested ship +void sexp_deal_with_primary_lock (int node, bool lock) { - ship *shipp; - int ship_index; + Assert (node != -1); + sexp_deal_with_ship_flag(node, 0, 0, 0, SF2_PRIMARIES_LOCKED, 0, P2_SF2_PRIMARIES_LOCKED, (lock ? 1:0), true); - Assert (node != -1); +} - do - { - // Check that a ship has been supplied - ship_index = ship_name_lookup(CTEXT(node)); - if (ship_index < 0) - { - node = CDR (node); - continue ; - } +void sexp_deal_with_secondary_lock (int node, bool lock) +{ + Assert (node != -1); + sexp_deal_with_ship_flag(node, 0, 0, 0, SF2_SECONDARIES_LOCKED, 0, P2_SF2_SECONDARIES_LOCKED, (lock ? 1:0), true); - // Check that it's valid - if((Ships[ship_index].objnum < 0) || (Ships[ship_index].objnum >= MAX_OBJECTS)) - { - node = CDR (node); - continue ; - } - shipp = &Ships[ship_index]; - - // primary weapon? - if (primary) - { - // Set the flag - if (lock) - { - shipp->flags2 |= SF2_PRIMARIES_LOCKED; - } - else - { - shipp->flags2 &= ~SF2_PRIMARIES_LOCKED; - } - } - - //Secondary weapon - else - { - // Set the flag - if (lock) - { - shipp->flags2 |= SF2_SECONDARIES_LOCKED; - } - else - { - shipp->flags2 &= ~SF2_SECONDARIES_LOCKED; - } - } - - // Go to the next ship. - node = CDR (node); - } while (node != -1); } //Karajorma - Changes the subsystem name displayed on the HUD. @@ -13236,6 +13726,12 @@ void sexp_change_subsystem_name(int node) new_name = CTEXT(node); node = CDR(node); + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_ship(shipp); + multi_send_string(new_name); + } + // loop through all the subsystems the SEXP has provided while (node >= 0) { @@ -13243,10 +13739,35 @@ void sexp_change_subsystem_name(int node) subsystem_to_rename = ship_get_subsys(&Ships[ship_index], CTEXT(node)); if (subsystem_to_rename != NULL) { ship_subsys_set_name(subsystem_to_rename, new_name); + + if (MULTIPLAYER_MASTER) { + multi_send_string(CTEXT(node)); + } } node = CDR(node); } + + if (MULTIPLAYER_MASTER) { + multi_end_packet(); + } +} + +void multi_sexp_change_subsystem_name() +{ + ship *shipp = NULL; + char new_name[TOKEN_LENGTH]; + char subsys_name[MAX_NAME_LEN]; + ship_subsys *subsystem_to_rename; + + multi_get_ship(shipp); + multi_get_string(new_name); + while (multi_get_string(subsys_name)) { + subsystem_to_rename = ship_get_subsys(shipp, subsys_name); + if (subsystem_to_rename != NULL) { + ship_subsys_set_name(subsystem_to_rename, new_name); + } + } } // Goober5000 @@ -13256,23 +13777,17 @@ void sexp_change_ship_class(int n) Assert(class_num != -1); n = CDR(n); + + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_int(class_num); + } + // all ships in the sexp for ( ; n != -1; n = CDR(n)) { ship_num = ship_name_lookup(CTEXT(n), 1); - /* Karajorma - Changed so that the SEXP will now deal with ships that haven't arrived yet - - // don't change unless it's currently in the mission - if (ship_num != -1) - { - // don't mess with a ship that's occupied - if (!(Ships[ship_num].flags & (SF_DYING | SF_ARRIVING | SF_DEPARTING))) - { - change_ship_type(ship_num, class_num, 1); - } - }*/ - // If the ship hasn't arrived we still want the ability to change its class. if (ship_num == -1) { @@ -13295,6 +13810,11 @@ void sexp_change_ship_class(int n) if (match_found) { swap_parse_object(pobj, class_num); + + if (MULTIPLAYER_MASTER) { + multi_send_bool(false); + multi_send_parse_object(pobj); + } } } // If the ship is already in the mission @@ -13304,9 +13824,42 @@ void sexp_change_ship_class(int n) if (!(Ships[ship_num].flags & (SF_DYING | SF_ARRIVING | SF_DEPARTING))) { change_ship_type(ship_num, class_num, 1); + + if (MULTIPLAYER_MASTER) { + multi_send_bool(true); + multi_send_ship(ship_num); + } } } } + + if (MULTIPLAYER_MASTER) { + multi_end_packet(); + } +} + +void multi_sexp_change_ship_class() +{ + int class_num = -1; + int ship_num = -1; + bool ship_arrived; + p_object *pobjp = NULL; + + multi_get_int(class_num); + multi_get_bool(ship_arrived); + + if (ship_arrived) { + multi_get_ship(ship_num); + if ((class_num >= 0) && (ship_num >= 0)) { + change_ship_type(ship_num, class_num, 1); + } + } + else { + multi_get_parse_object(pobjp); + if ((class_num >= 0) && (pobjp != NULL)) { + swap_parse_object(pobjp, class_num); + } + } } // Goober5000 @@ -13331,10 +13884,9 @@ void ship_copy_damage(ship *target_shipp, ship *source_shipp) // ...and shields target_shipp->ship_max_shield_strength = source_shipp->ship_max_shield_strength; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) { - target_shipp->ship_max_shield_segment[i] = source_shipp->ship_max_shield_segment[i]; + for (i = 0; i < MAX_SHIELD_SECTIONS; i++) target_objp->shield_quadrant[i] = source_objp->shield_quadrant[i]; - } + // search through all subsystems on source ship and map them onto target ship for (source_ss = GET_FIRST(&source_shipp->subsys_list); source_ss != GET_LAST(&source_shipp->subsys_list); source_ss = GET_NEXT(source_ss)) @@ -13374,7 +13926,6 @@ void parse_copy_damage(p_object *target_pobjp, ship *source_shipp) // ...and shields target_pobjp->ship_max_shield_strength = source_shipp->ship_max_shield_strength; target_pobjp->initial_shields = fl2i(get_shield_pct(source_objp) * 100.0f); - target_pobjp->max_shield_recharge_percent = source_shipp->max_shield_recharge_pct; // search through all subsystems on source ship and map them onto target ship @@ -13491,6 +14042,59 @@ void sexp_activate_deactivate_glow_maps(int n, int activate) } } +void sexp_set_ambient_light(int node) +{ + int red, green, blue; + int level = 0; + + Assert(node > -1); + red = eval_num(node); + if (red < 0 || red > 255) { + red = 0; + } + + node = CDR(node); + Assert(node > -1); + green = eval_num(node); + if (green < 0 || green > 255) { + green = 0; + } + + node = CDR(node); + Assert(node > -1); + blue = eval_num(node); + if (blue < 0 || blue > 255) { + blue = 0; + } + + level |= red; + level |= green << 8; + level |= blue << 16; + + // setting the ambient light level for the mission won't actually do anything as it is parsed at mission + // start but it should be updated in case someone changes that later + The_mission.ambient_light_level = level; + + // call the graphics function to actually set the level + gr_set_ambient_light(red, green, blue); + + // do the multiplayer callback + if (MULTIPLAYER_MASTER) { + multi_start_packet(); + multi_send_int(level); + multi_end_packet(); + } +} + +void multi_sexp_set_ambient_light() +{ + int level = 0; + if (multi_get_int(level)) { + The_mission.ambient_light_level = level; + gr_set_ambient_light((level & 0xff),((level >> 8) & 0xff), ((level >> 16) & 0xff)); + } +} + // taylor - load and set a skybox model void sexp_set_skybox_model(int n) { @@ -14197,8 +14801,13 @@ void sexp_set_subsys_rotation_lock(int node, int locked) rotate->subsys_snd_flags &= ~SSSF_ROTATE; } } - else + else { rotate->system_info->flags |= MSS_FLAG_ROTATES; + if (rotate->system_info->rotation_snd != -1) { + obj_snd_assign(Ships[ship_num].objnum, rotate->system_info->rotation_snd, &rotate->system_info->pnt, 0, OS_SUBSYS_ROTATION, rotate); + rotate->subsys_snd_flags |= SSSF_ROTATE; + } + } // iterate node = CDR(node); @@ -15092,6 +15701,55 @@ int sexp_is_player (int node) } } +void sexp_set_respawns(int node) +{ + int num_respawns; + p_object *p_objp; + + // we're wasting our time if you can't respawn + if (!(Game_mode & GM_MULTIPLAYER)) { + return; + } + + num_respawns = eval_num(node); + + node = CDR(node); + + // send the information to clients + multi_start_packet(); + multi_send_int(num_respawns); + + while (node != -1) { + // get the parse object for the ship + p_objp = mission_parse_get_arrival_ship(CTEXT(node)); + if (p_objp != NULL) { + p_objp->respawn_count = num_respawns; + } + + multi_send_string(CTEXT(node)); + + node = CDR(node); + } + + multi_end_packet(); +} + +void multi_sexp_set_respawns() +{ + p_object *p_objp; + int num_respawns; + char parse_name[NAME_LENGTH]; + + multi_get_int(num_respawns); + while (multi_get_string(parse_name)) { + // get the parse object for the ship + p_objp = mission_parse_get_arrival_ship(parse_name); + if (p_objp != NULL) { + p_objp->respawn_count = num_respawns; + } + } +} + int sexp_return_player_data(int node, int type) { int sindex, np_index = -1; @@ -15439,7 +16097,7 @@ int shield_quad_near_max(int quadnum) remaining += Player_obj->shield_quadrant[i]; } - if ((remaining < 2.0f) || (Player_obj->shield_quadrant[quadnum] > get_max_shield_quad(Player_obj, quadnum) - 5.0f)) { + if ((remaining < 2.0f) || (Player_obj->shield_quadrant[quadnum] > get_max_shield_quad(Player_obj) - 5.0f)) { return SEXP_TRUE; } else { return SEXP_FALSE; @@ -15512,8 +16170,8 @@ int process_special_sexps(int index) apply_damage_to_shield(Player_obj, FRONT_QUAD, -flFrametime*200.0f); - if (Player_obj->shield_quadrant[FRONT_QUAD] > get_max_shield_quad(Player_obj, FRONT_QUAD)) - Player_obj->shield_quadrant[FRONT_QUAD] = get_max_shield_quad(Player_obj, FRONT_QUAD); + if (Player_obj->shield_quadrant[FRONT_QUAD] > get_max_shield_quad(Player_obj)) + Player_obj->shield_quadrant[FRONT_QUAD] = get_max_shield_quad(Player_obj); //hud_shield_quadrant_hit(Player_obj, FRONT_QUAD); if (Player_obj->shield_quadrant[FRONT_QUAD] > Player_obj->shield_quadrant[(FRONT_QUAD+1)%MAX_SHIELD_SECTIONS] - 2.0f) @@ -16397,7 +17055,11 @@ int eval_sexp(int cur_node, int referenced_node) node = CDR(cur_node); // makes reading the next bit of code a little easier. - op_num = get_operator_const(CTEXT(cur_node)); + op_num = get_operator_const(CTEXT(cur_node)); + // add the op_num to the stack if it is an actual operator rather than a number + if (op_num) { + Current_sexp_operator.push_back(op_num); + } switch ( op_num ) { // arithmetic operators will always return just their value case OP_PLUS: @@ -16659,7 +17321,14 @@ int eval_sexp(int cur_node, int referenced_node) sexp_val = sexp_time_undocked(node); break; - // info based sexpressions (like shields, hits + case OP_AFTERBURNER_LEFT: + sexp_val = sexp_get_energy_pct(node, op_num); + break; + + case OP_WEAPON_ENERGY_LEFT: + sexp_val = sexp_get_energy_pct(node, op_num); + break; + case OP_SHIELDS_LEFT: sexp_val = sexp_shields_left(node); break; @@ -16741,6 +17410,10 @@ int eval_sexp(int cur_node, int referenced_node) sexp_val = sexp_was_medal_granted(node); break; + case OP_GET_DAMAGE_CAUSED: + sexp_val = sexp_get_damage_caused(node); + break; + case OP_PERCENT_SHIPS_DEPARTED: case OP_PERCENT_SHIPS_DESTROYED: case OP_PERCENT_SHIPS_DISARMED: @@ -16803,10 +17476,16 @@ int eval_sexp(int cur_node, int referenced_node) // Goober5000 case OP_INVALIDATE_ARGUMENT: - sexp_invalidate_argument(node); + case OP_VALIDATE_ARGUMENT: + sexp_change_argument_validity(node, (op_num == OP_INVALIDATE_ARGUMENT)); sexp_val = SEXP_TRUE; break; + case OP_DO_FOR_VALID_ARGUMENTS: + // do-for-valid-arguments should only ever be called within eval_when() + Int3(); + break; + // sexpressions with side effects case OP_CHANGE_IFF: sexp_change_iff(node); @@ -17463,6 +18142,11 @@ int eval_sexp(int cur_node, int referenced_node) sexp_val = sexp_return_player_data(node, op_num); break; + case OP_SET_RESPAWNS: + sexp_set_respawns(node); + sexp_val = SEXP_TRUE; + break; + case OP_NUM_TYPE_KILLS: sexp_val = sexp_num_type_kills(node); break; @@ -17721,14 +18405,13 @@ int eval_sexp(int cur_node, int referenced_node) // Karajorma case OP_LOCK_PRIMARY_WEAPON: case OP_UNLOCK_PRIMARY_WEAPON: - sexp_deal_with_weapons_lock(node, true, op_num == OP_LOCK_PRIMARY_WEAPON); + sexp_deal_with_primary_lock(node, op_num == OP_LOCK_PRIMARY_WEAPON); sexp_val = SEXP_TRUE; break; - case OP_LOCK_SECONDARY_WEAPON: case OP_UNLOCK_SECONDARY_WEAPON: - sexp_deal_with_weapons_lock(node, false, op_num == OP_LOCK_SECONDARY_WEAPON); + sexp_deal_with_secondary_lock(node, op_num == OP_LOCK_SECONDARY_WEAPON); sexp_val = SEXP_TRUE; break; @@ -17739,6 +18422,23 @@ int eval_sexp(int cur_node, int referenced_node) sexp_val = SEXP_TRUE; break; + case OP_SET_AFTERBURNER_ENERGY: + case OP_SET_WEAPON_ENERGY: + case OP_SET_SHIELD_ENERGY: + sexp_set_energy_pct(node, op_num); + sexp_val = SEXP_TRUE; + break; + + case OP_SET_AMBIENT_LIGHT: + sexp_set_ambient_light(node); + sexp_val = SEXP_TRUE; + break; + + case OP_PRIMARY_FIRED_SINCE: + case OP_SECONDARY_FIRED_SINCE: + sexp_val = sexp_weapon_fired_delay(node, op_num); + break; + case OP_CHANGE_SUBSYSTEM_NAME: sexp_change_subsystem_name(node); sexp_val = SEXP_TRUE; @@ -17970,6 +18670,8 @@ int eval_sexp(int cur_node, int referenced_node) Error(LOCATION, "Looking for SEXP operator, found '%s'.\n", CTEXT(cur_node)); break; } + Assert(!Current_sexp_operator.empty()); + Current_sexp_operator.pop_back(); Assert(sexp_val != UNINITIALIZED); @@ -18038,6 +18740,103 @@ int eval_sexp(int cur_node, int referenced_node) } } + +void multi_sexp_eval() +{ + int op_num; + + Assert (MULTIPLAYER_CLIENT); + + while (Multi_sexp_bytes_left > 0) { + op_num = multi_sexp_get_next_operator(); + + Assert (Multi_sexp_bytes_left); + + if (op_num < 0) { + Warning(LOCATION, "Received invalid SEXP packet from host. Entire packet may be corrupt. Discarding packet"); + Int3(); + return; + } + + switch(op_num) { + + case OP_CHANGE_SOUNDTRACK: + multi_sexp_change_soundtrack(); + break; + + case OP_SET_PERSONA: + multi_sexp_set_persona(); + break; + + case OP_CHANGE_SUBSYSTEM_NAME: + multi_sexp_change_subsystem_name(); + break; + + case OP_SET_RESPAWNS: + multi_sexp_set_respawns(); + break; + + case OP_CHANGE_SHIP_CLASS: + multi_sexp_change_ship_class(); + break; + + case OP_PLAY_SOUND_FROM_TABLE: + multi_sexp_play_sound_from_table(); + break; + + case OP_PLAY_SOUND_FROM_FILE: + multi_sexp_play_sound_from_file(); + break; + + case OP_CLOSE_SOUND_FROM_FILE: + multi_sexp_close_sound_from_file(); + break; + + case OP_SHIP_BOMB_TARGETABLE: + case OP_SHIP_BOMB_UNTARGETABLE: + case OP_SHIP_INVISIBLE: + case OP_SHIP_VISIBLE: + case OP_SHIP_STEALTHY: + case OP_SHIP_UNSTEALTHY: + case OP_FRIENDLY_STEALTH_INVISIBLE: + case OP_FRIENDLY_STEALTH_VISIBLE: + case OP_LOCK_AFTERBURNER: + case OP_UNLOCK_AFTERBURNER: + case OP_LOCK_PRIMARY_WEAPON: + case OP_UNLOCK_PRIMARY_WEAPON: + case OP_LOCK_SECONDARY_WEAPON: + case OP_UNLOCK_SECONDARY_WEAPON: + multi_sexp_deal_with_ship_flag(); + break; + + case OP_SET_AFTERBURNER_ENERGY: + multi_sexp_set_energy_pct(); + break; + + case OP_SET_AMBIENT_LIGHT: + multi_sexp_set_ambient_light(); + break; + + case OP_MODIFY_VARIABLE: + multi_sexp_modify_variable(); + break; + + // bad sexp in the packet + default: + // probably just a version error where the host supports a SEXP but a client does not + if (multi_sexp_discard_operator()) { + Warning(LOCATION, "Received invalid SEXP operator number from host. Operator number %d is not supported by this version.", op_num); + } + // a more major problem + else { + Warning(LOCATION, "Received invalid SEXP packet from host. Function involving operator %d lacks termination. Entire packet may be corrupt. Discarding remaining packet"); + Int3(); + return; + } + } + } +} + // Still a debug-level system. // get_sexp_main reads and builds the internal representation for a // symbolic expression. @@ -18185,6 +18984,8 @@ int query_operator_return_type(int op) case OP_NAV_IS_VISITED: case OP_NAV_ISLINKED: case OP_IS_PLAYER: + case OP_PRIMARY_FIRED_SINCE: + case OP_SECONDARY_FIRED_SINCE: return OPR_BOOL; case OP_PLUS: @@ -18215,6 +19016,8 @@ int query_operator_return_type(int op) case OP_MISSION_TIME: case OP_TIME_DOCKED: case OP_TIME_UNDOCKED: + case OP_AFTERBURNER_LEFT: + case OP_WEAPON_ENERGY_LEFT: case OP_SHIELDS_LEFT: case OP_HITS_LEFT: case OP_HITS_LEFT_SUBSYSTEM: @@ -18244,6 +19047,7 @@ int query_operator_return_type(int op) case OP_NUM_SHIPS_IN_WING: case OP_CURRENT_SPEED: case OP_NAV_DISTANCE: + case OP_GET_DAMAGE_CAUSED: return OPR_POSITIVE; case OP_COND: @@ -18252,6 +19056,8 @@ int query_operator_return_type(int op) case OP_EVERY_TIME: case OP_EVERY_TIME_ARGUMENT: case OP_INVALIDATE_ARGUMENT: + case OP_VALIDATE_ARGUMENT: + case OP_DO_FOR_VALID_ARGUMENTS: case OP_CHANGE_IFF: case OP_CHANGE_AI_CLASS: case OP_CLEAR_SHIP_GOALS: @@ -18472,6 +19278,11 @@ int query_operator_return_type(int op) case OP_RESET_ORDERS: case OP_SET_PERSONA: case OP_CHANGE_SUBSYSTEM_NAME: + case OP_SET_RESPAWNS: + case OP_SET_AFTERBURNER_ENERGY: + case OP_SET_WEAPON_ENERGY: + case OP_SET_SHIELD_ENERGY: + case OP_SET_AMBIENT_LIGHT: case OP_CHANGE_IFF_COLOR: return OPR_NULL; @@ -18610,6 +19421,8 @@ int query_operator_argument_type(int op, int argnum) case OP_TIME_SHIP_DESTROYED: case OP_TIME_SHIP_ARRIVED: case OP_TIME_SHIP_DEPARTED: + case OP_AFTERBURNER_LEFT: + case OP_WEAPON_ENERGY_LEFT: case OP_SHIELDS_LEFT: case OP_HITS_LEFT: case OP_SIM_HITS_LEFT: @@ -18642,6 +19455,7 @@ int query_operator_argument_type(int op, int argnum) case OP_IS_SHIP_VISIBLE: case OP_IS_SHIP_STEALTHY: case OP_IS_FRIENDLY_STEALTH_VISIBLE: + case OP_GET_DAMAGE_CAUSED: return OPF_SHIP; case OP_SHIP_CREATE: @@ -18927,6 +19741,9 @@ int query_operator_argument_type(int op, int argnum) return OPF_BOOL; else return OPF_NULL; + + case OP_DO_FOR_VALID_ARGUMENTS: + return OPF_NULL; case OP_ANY_OF: case OP_EVERY_OF: @@ -18942,6 +19759,7 @@ int query_operator_argument_type(int op, int argnum) return OPF_ANYTHING; case OP_INVALIDATE_ARGUMENT: + case OP_VALIDATE_ARGUMENT: return OPF_ANYTHING; case OP_AI_DISABLE_SHIP: @@ -19406,6 +20224,14 @@ int query_operator_argument_type(int op, int argnum) case OP_RESPAWNS_LEFT: return OPF_SHIP; + case OP_SET_RESPAWNS: + if (argnum == 0 ) { + return OPF_POSITIVE; + } + else { + return OPF_SHIP; + } + case OP_NUM_TYPE_KILLS: if(argnum == 0){ return OPF_SHIP; @@ -19586,6 +20412,21 @@ int query_operator_argument_type(int op, int argnum) case OP_UNLOCK_AFTERBURNER: return OPF_SHIP; + + case OP_SET_AFTERBURNER_ENERGY: + case OP_SET_WEAPON_ENERGY: + case OP_SET_SHIELD_ENERGY: + if (argnum == 0) { + return OPF_POSITIVE; + } + else { + return OPF_SHIP; + } + + case OP_SET_AMBIENT_LIGHT: + return OPF_POSITIVE; + + case OP_CHANGE_SUBSYSTEM_NAME: if (argnum == 0) { return OPF_SHIP; @@ -19674,6 +20515,13 @@ int query_operator_argument_type(int op, int argnum) case OP_CURRENT_SPEED: return OPF_SHIP_WING; + + case OP_PRIMARY_FIRED_SINCE: + case OP_SECONDARY_FIRED_SINCE: + if (argnum == 0) + return OPF_SHIP; + else + return OPF_POSITIVE; case OP_NAV_IS_VISITED: //Kazan case OP_NAV_DISTANCE: //kazan @@ -19838,6 +20686,7 @@ int query_operator_argument_type(int op, int argnum) case OP_SCRIPT_EVAL_STRING: case OP_SCRIPT_EVAL: return OPF_STRING; + case OP_CHANGE_IFF_COLOR: if ((argnum == 0) || (argnum == 1)) return OPF_IFF; @@ -20470,7 +21319,7 @@ int sexp_add_variable(const char *text, const char *var_name, int type, int inde // Modifies and Sexp_variable to be used in a mission // This should be called in mission when an sexp_variable is to be modified -void sexp_modify_variable(char *text, int index) +void sexp_modify_variable(char *text, int index, bool sexp_callback) { Assert(index >= 0 && index < MAX_SEXP_VARIABLES); Assert(Sexp_variables[index].type & SEXP_VARIABLE_SET); @@ -20480,13 +21329,36 @@ void sexp_modify_variable(char *text, int index) Sexp_variables[index].type |= SEXP_VARIABLE_MODIFIED; // do multi_callback_here - // send a network packet if we need to - if((Game_mode & GM_MULTIPLAYER) && (Net_player != NULL) && (Net_player->flags & NETINFO_FLAG_AM_MASTER) && (Sexp_variables[index].type & SEXP_VARIABLE_NETWORK)) - { + // if we're called from the sexp code send a SEXP packet (more efficient) + if( MULTIPLAYER_MASTER && (Sexp_variables[index].type & SEXP_VARIABLE_NETWORK) && sexp_callback) { + multi_start_packet(); + multi_send_int(index); + multi_send_string(Sexp_variables[index].text); + multi_end_packet(); + } + // otherwise send a SEXP variable packet + else if ( MULTIPLAYER_MASTER && (Sexp_variables[index].type & SEXP_VARIABLE_NETWORK) ) { send_variable_update_packet(index, Sexp_variables[index].text); } } +void multi_sexp_modify_variable() +{ + char value[TOKEN_LENGTH]; + int variable_index = -1; + + // get the data + multi_get_int(variable_index); + if (!multi_get_string(value)) { + return; + } + + // set the sexp_variable + if ( (variable_index >= 0) && (variable_index < sexp_variable_count()) ) { + strcpy(Sexp_variables[variable_index].text, value); + } +} + void sexp_modify_variable(int n) { int sexp_variable_index; @@ -20638,6 +21510,24 @@ bool sexp_replace_variable_names_with_values(char *text, int max_len) return replaced_anything; } +// returns the index of the nth variable of the type given or -1 if there aren't that many +// NOTE : Not 0th order. If you want the 4th string variable call it as get_nth_variable_index(4, SEXP_VARIABLE_STRING) +int get_nth_variable_index(int nth, int variable_type) +{ + // Loop through Sexp_variables until we have found the one corresponding to the argument + Assert ((nth > 0) && (nth < MAX_SEXP_VARIABLES)); + for (int i=0; i < MAX_SEXP_VARIABLES; i++) { + if ((Sexp_variables[i].type & variable_type)) { + nth--; + } + + if (!nth) { + return i; + } + } + return -1; +} + // counts number of sexp_variables that are set int sexp_variable_count() { @@ -20666,6 +21556,27 @@ int sexp_campaign_persistent_variable_count() return count; } +// given an index in Sexp_variables, returns the number variables of a type in the array until this point +int sexp_variable_typed_count(int sexp_variables_index, int variable_type) +{ + Assert ((sexp_variables_index >= 0) && (sexp_variables_index < MAX_SEXP_VARIABLES)); + // Loop through Sexp_variables until we have found the one corresponding to the argument + int count = 0; + for (int i=0; i < MAX_SEXP_VARIABLES; i++) { + if (!(Sexp_variables[i].type & variable_type)) { + continue; + } + + if (i == sexp_variables_index) { + return count ; + } + count++; + } + // shouldn't ever get here + Int3(); + return -1; +} + // deletes sexp_variable from active void sexp_variable_delete(int index) { @@ -20755,7 +21666,7 @@ int sexp_variable_allocate_block(const char* block_name, int block_type) // squeeze all blocks to top of array void sexp_variable_condense_block() { - int temp_idx, idx, var_count; + int temp_idx, idx, var_count, i; var_count = sexp_variable_count(); temp_idx = MAX_SEXP_VARIABLES-1; @@ -20765,6 +21676,16 @@ void sexp_variable_condense_block() if (temp_idx > idx) { Sexp_variables[temp_idx] = Sexp_variables[idx]; Sexp_variables[idx].type = SEXP_VARIABLE_NOT_USED; + + // now we need to check that nothing actually used this block + for (i = 0; i < MAX_SHIPS; i++) { + if (Ships[i].special_exp_index == idx) { + Ships[i].special_exp_index = temp_idx; + } + if (Ships[i].special_hitpoint_index == idx) { + Ships[i].special_hitpoint_index = temp_idx; + } + } } temp_idx--; } @@ -20843,7 +21764,7 @@ int get_subcategory(int sexp_id) case OP_NOT_KAMIKAZE: case OP_PLAYER_USE_AI: case OP_PLAYER_NOT_USE_AI: - case OP_ALLOW_TREASON: + case OP_ALLOW_TREASON: case OP_CHANGE_IFF_COLOR: return CHANGE_SUBCATEGORY_AI_AND_IFF; @@ -20874,6 +21795,9 @@ int get_subcategory(int sexp_id) case OP_CHANGE_SUBSYSTEM_NAME: case OP_LOCK_AFTERBURNER: // KeldorKatarn case OP_UNLOCK_AFTERBURNER: // KeldorKatarn + case OP_SET_AFTERBURNER_ENERGY: + case OP_SET_WEAPON_ENERGY: + case OP_SET_SHIELD_ENERGY: return CHANGE_SUBCATEGORY_SUBSYSTEMS_AND_CARGO; @@ -20992,6 +21916,7 @@ int get_subcategory(int sexp_id) case OP_REMOVE_SUN_BITMAP: case OP_NEBULA_CHANGE_STORM: case OP_NEBULA_TOGGLE_POOF: + case OP_SET_AMBIENT_LIGHT: return CHANGE_SUBCATEGORY_BACKGROUND_AND_NEBULA; case OP_HUD_DISABLE: @@ -21032,7 +21957,66 @@ int get_subcategory(int sexp_id) case OP_JUMP_NODE_SHOW_JUMPNODE: case OP_JUMP_NODE_HIDE_JUMPNODE: return CHANGE_SUBCATEGORY_JUMP_NODES; + + case OP_NUM_PLAYERS: + case OP_TEAM_SCORE: + case OP_SHIP_DEATHS: + case OP_RESPAWNS_LEFT: + case OP_IS_PLAYER: + return STATUS_SUBCATEGORY_MULTIPLAYER; + + case OP_SHIELD_RECHARGE_PCT: + case OP_ENGINE_RECHARGE_PCT: + case OP_WEAPON_RECHARGE_PCT: + case OP_SHIELD_QUAD_LOW: + case OP_PRIMARY_AMMO_PCT: + case OP_SECONDARY_AMMO_PCT: + case OP_IS_PRIMARY_SELECTED: + case OP_IS_SECONDARY_SELECTED: + case OP_GET_PRIMARY_AMMO: + case OP_GET_SECONDARY_AMMO: + case OP_AFTERBURNER_LEFT: + case OP_WEAPON_ENERGY_LEFT: + case OP_PRIMARY_FIRED_SINCE: + case OP_SECONDARY_FIRED_SINCE: + return STATUS_SUBCATEGORY_SHIELDS_ENGINES_AND_WEAPONS; + + case OP_CARGO_KNOWN_DELAY: + case OP_CAP_SUBSYS_CARGO_KNOWN_DELAY: + case OP_IS_CARGO: + return STATUS_SUBCATEGORY_CARGO; + + case OP_HAS_BEEN_TAGGED_DELAY: + case OP_IS_TAGGED: + case OP_IS_SHIP_VISIBLE: + case OP_IS_SHIP_STEALTHY: + case OP_IS_FRIENDLY_STEALTH_VISIBLE: + return STATUS_SUBCATEGORY_SHIP_STATUS; + + case OP_SHIELDS_LEFT: + case OP_HITS_LEFT: + case OP_HITS_LEFT_SUBSYSTEM: + case OP_SIM_HITS_LEFT: + case OP_GET_DAMAGE_CAUSED: + return STATUS_SUBCATEGORY_DAMAGE; + case OP_DISTANCE: + case OP_DISTANCE_SUBSYSTEM: + case OP_GET_OBJECT_X: + case OP_GET_OBJECT_Y: + case OP_GET_OBJECT_Z: + case OP_NUM_WITHIN_BOX: + return STATUS_SUBCATEGORY_DISTANCE_AND_COORDINATES; + + case OP_WAS_PROMOTION_GRANTED: + case OP_WAS_MEDAL_GRANTED: + case OP_NUM_KILLS: + case OP_NUM_ASSISTS: + case OP_NUM_TYPE_KILLS: + case OP_NUM_CLASS_KILLS: + case OP_SHIP_SCORE: + return STATUS_SUBCATEGORY_KILLS_AND_SCORING; + default: return -1; // sexp doesn't have a subcategory } @@ -21522,6 +22506,14 @@ sexp_help_struct Sexp_help[] = { "\t2:\tThe name of the dockee ship.\r\n" "\t3:\tThe number of times they must have undocked to be true." }, + { OP_AFTERBURNER_LEFT, "Afterburner left\r\n" + "\tReturns a ship's current engine energy as a percentage.\r\n" + "\t1: Ship name\r\n" }, + + { OP_WEAPON_ENERGY_LEFT, "Weapon energy left\r\n" + "\tReturns a ship's current weapon energy as a percentage.\r\n" + "\t1: Ship name\r\n" }, + { OP_SHIELDS_LEFT, "Shields left (Status operator)\r\n" "\tReturns the current level of the specified ship's shields as a percentage.\r\n\r\n" "Returns a numeric value. Takes 1 argument...\r\n" @@ -21570,6 +22562,12 @@ sexp_help_struct Sexp_help[] = { "\t6: Box depth\r\n" "\tRest:\tShips or wings to check" }, + { OP_GET_DAMAGE_CAUSED, "Get damage caused (Status operator)\r\n" + "\tReturns the amount of damage one or more ships have done to a ship.\r\n\r\n" + "Takes 2 or more arguments...\r\n" + "\t1:\tShip that has been damaged.\r\n" + "\t2:\tName of ships that may have damaged it." }, + { OP_LAST_ORDER_TIME, "Last order time (Status operator)\r\n" "\tReturns true if seconds have elapsed since one or more ships have received " "a meaningful order from the player. A meaningful order is currently any order that " @@ -21615,6 +22613,15 @@ sexp_help_struct Sexp_help[] = { "\t2:\tBoolean expression that must be true for actions to take place.\r\n" "\tRest:\tActions to take when the boolean expression becomes true." }, + // Karajorma + { OP_DO_FOR_VALID_ARGUMENTS, "Do-for-valid-arguments (Conditional operator)\r\n" + "\tPerforms specified actions once for each valid " SEXP_ARGUMENT_STRING " in the parent conditional.\r\n" + "\tMust not be used for any SEXP that actually contains " SEXP_ARGUMENT_STRING " as these are already being executed\r\n" + "\tmultiple times without using Do-for-valid-arguments. Any use of " SEXP_ARGUMENT_STRING " and will \r\n" + "\tprevent execution of the entire SEXP unless it is nested inside another when(or every-time)-argument SEXP.\r\n\r\n" + "Takes 1 or more arguments...\r\n" + "\tAll:\tActions to take." }, + // Goober5000 { OP_ANY_OF, "Any-of (Conditional operator)\r\n" "\tSupplies arguments for the " SEXP_ARGUMENT_STRING " special data item. Any of the supplied arguments can satisfy the expression(s) " @@ -21664,6 +22671,13 @@ sexp_help_struct Sexp_help[] = { "Takes 1 or more arguments...\r\n" "\tAll:\tThe argument to remove from the preceding argument list." }, + // Karajorma + { OP_VALIDATE_ARGUMENT, "Validate-argument (Conditional operator)\r\n" + "\tRestores an argument for future consideration as a " SEXP_ARGUMENT_STRING " special data item.\r\n" + "\tIf the argument hasn't been previously invalidated, it will do nothing.\r\n" + "Takes 1 or more arguments...\r\n" + "\tAll:\tThe argument to restore to the preceding argument list." }, + // Goober5000 - added wing capability { OP_CHANGE_IFF, "Change IFF (Action operator)\r\n" "\tSets the specified ship(s) or wing(s) to the specified team.\r\n" @@ -21741,12 +22755,12 @@ sexp_help_struct Sexp_help[] = { "\tAll:\tName of ship to allow to talk." }, // Karajorma - { OP_DISABLE_BUILTIN_MESSAGES, "Enable builtin messages (Action operator)\r\n" + { OP_DISABLE_BUILTIN_MESSAGES, "Disable builtin messages (Action operator)\r\n" "\tTurns the built in messages sent by command or pilots off\r\n" "Takes 0 or more arguments....\r\n" "If no arguments are supplied all built in messages are disabled.\r\n" "Using the Any Wingman option silences for all ships in wings.\r\n" - "\tAll:\tName of ship to allow to talk." }, + "\tAll:\tName of ship to be silenced." }, // Karajorma { OP_SET_PERSONA, "Set Persona (Action operator)\r\n" @@ -22690,6 +23704,12 @@ sexp_help_struct Sexp_help[] = { "\tThe ship specified in the first field should be the player start.\r\n" "\tOnly really useful for multiplayer."}, + { OP_SET_RESPAWNS, "set-respawns\r\n" + "\tSet the # respawns a player (or AI that could have been a player) has used.\r\n" + "\t1: Number of respawns used up\r\n" + "\tRest: The player start ship to operate on.\r\n" + "\tOnly really useful for multiplayer."}, + { OP_NUM_TYPE_KILLS, "num-type-kills\r\n" "\tReturns the # of kills a player has on a given ship type (fighter, bomber, cruiser, etc).\r\n" "The ship specified in the first field should be the ship the player is in.\r\n" @@ -22788,7 +23808,7 @@ sexp_help_struct Sexp_help[] = { "\t1:\tName of who the message is from.\r\n" "\t2:\tPriority of message (\"Low\", \"Normal\" or \"High\").\r\n" "\t3:\tName of message (from message editor).\r\n" - "\t4:\tDelay in ms\r\n" + "\t4:\tDelay from previous message in list (if any) in ms\r\n" "Use Add-Data for multiple messages" "IMPORTANT : each additional message in the list MUST HAVE 4 entries;\r\n" "any message without the 4 proper fields will be ignored, as will any\r\n" @@ -22828,6 +23848,10 @@ sexp_help_struct Sexp_help[] = { { OP_SUPERNOVA_START, "supernova-start\r\n" "\t1: Time in seconds until the supernova shockwave hits the player\r\n"}, + { OP_WEAPON_RECHARGE_PCT, "weapon-recharge-pct\r\n" + "\tReturns a percentage from 0 to 100\r\n" + "\t1: Ship name\r\n" }, + { OP_SHIELD_RECHARGE_PCT, "shield-recharge-pct\r\n" "\tReturns a percentage from 0 to 100\r\n" "\t1: Ship name\r\n" }, @@ -22836,10 +23860,6 @@ sexp_help_struct Sexp_help[] = { "\tReturns a percentage from 0 to 100\r\n" "\t1: Ship name\r\n" }, - { OP_WEAPON_RECHARGE_PCT, "weapon-recharge-pct\r\n" - "\tReturns a percentage from 0 to 100\r\n" - "\t1: Ship name\r\n" }, - { OP_CARGO_NO_DEPLETE, "cargo-no-deplete\r\n" "\tCauses the named ship to have unlimited cargo.\r\n" "\tNote: only applies to BIG or HUGE ships\r\n" @@ -23181,6 +24201,35 @@ sexp_help_struct Sexp_help[] = { }, // Karajorma + { OP_SET_AFTERBURNER_ENERGY, "set-afterburner-energy\r\n" + "\tSets the afterburner energy for the specified ship(s)\r\n" + "\tTakes 2 or more arguments\r\n" + "\t1: percentage of maximum afterburner energy.\r\n" + "\t(rest): Name(s) of ship(s)" + }, + + { OP_SET_WEAPON_ENERGY, "set-weapon-energy\r\n" + "\tSets the weapon energy for the specified ship(s)\r\n" + "\tTakes 2 or more arguments\r\n" + "\t1: percentage of maximum weapon energy.\r\n" + "\t(rest): Name(s) of ship(s)" + }, + + { OP_SET_SHIELD_ENERGY, "set-shield-energy\r\n" + "\tSets the shield energy for the specified ship(s)\r\n" + "\tTakes 2 or more arguments\r\n" + "\t1: percentage of maximum shield energy.\r\n" + "\t(rest): Name(s) of ship(s)" + }, + + { OP_SET_AMBIENT_LIGHT, "set-ambient-light\r\n" + "\tSets the ambient light level for the mission\r\n" + "\tTakes 3 arguments\r\n" + "\t1: Red (0 - 255).\r\n" + "\t2: Green (0 - 255).\r\n" + "\t3: Blue (0 - 255)." + }, + { OP_CHANGE_SUBSYSTEM_NAME, "change-subsystem-name\r\n" "\tChanges the name of the specified subsystem on the specified ship\r\n" "\tTakes 3 or more arguments\r\n" @@ -23278,6 +24327,22 @@ sexp_help_struct Sexp_help[] = { "\t1:\tHUD gauge to be modified" }, + // Karajora + { OP_PRIMARY_FIRED_SINCE, "primary-fired-since\r\n" + "\tReturns true if the primary weapon bank specified has been fired within the supplied time. Takes 3 arguments...\r\n\r\n" + "\t1:\tShip name\r\n" + "\t2:\tWeapon bank number\r\n" + "\t3:\tDelay (in millieconds)\r\n" + }, + + // Karajora + { OP_SECONDARY_FIRED_SINCE, "primary-fired-since\r\n" + "\tReturns true if the primary weapon bank specified has been fired within the supplied time. Takes 3 arguments...\r\n\r\n" + "\t1:\tShip name\r\n" + "\t2:\tWeapon bank number\r\n" + "\t3:\tDelay (in millieconds)\r\n" + }, + //phreak { OP_SCRAMBLE_MESSAGES, "scramble-messages\r\n" "\tCauses messages to be sent as if the player has sustained communications subsystem or EMP damage. Takes no arguments.\r\n" @@ -23308,7 +24373,7 @@ sexp_help_struct Sexp_help[] = { }, { OP_CUTSCENES_FADE_OUT, "fade-out\r\n" - "\tFades in " + "\tFades out " "Takes 0 to 2 arguments...\r\n" "\t1:\tTime to fade in (in milliseconds)\r\n" "\t2:\tColor to fade to - 1 for white, 2 for red, default is black\r\n" @@ -23600,6 +24665,13 @@ op_menu_struct op_submenu[] = { "Jump Nodes", CHANGE_SUBCATEGORY_JUMP_NODES }, { "Special", CHANGE_SUBCATEGORY_SPECIAL }, { "Backgrounds and Nebula", CHANGE_SUBCATEGORY_BACKGROUND_AND_NEBULA }, + { "Multiplayer", STATUS_SUBCATEGORY_MULTIPLAYER }, + { "Weapons, Shields, and Engines", STATUS_SUBCATEGORY_SHIELDS_ENGINES_AND_WEAPONS }, + { "Cargo", STATUS_SUBCATEGORY_CARGO }, + { "Ship Status", STATUS_SUBCATEGORY_SHIP_STATUS }, + { "Damage", STATUS_SUBCATEGORY_DAMAGE }, + { "Distance and Coordinates", STATUS_SUBCATEGORY_DISTANCE_AND_COORDINATES }, + { "Kills and Scoring", STATUS_SUBCATEGORY_KILLS_AND_SCORING }, }; int Num_sexp_help = sizeof(Sexp_help) / sizeof(sexp_help_struct); int Num_op_menus = sizeof(op_menu) / sizeof(op_menu_struct); diff --git a/code/parse/sexp.h b/code/parse/sexp.h index c674e42c51..15bfe28b17 100644 --- a/code/parse/sexp.h +++ b/code/parse/sexp.h @@ -540,7 +540,7 @@ * to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it * goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that * will return the subcategory for each sexp that uses it, and the submenu name in the - * op_submenu[] array in sexp_tree.cpp." + * op_submenu[] array in sexp.cpp." * * Please note that I rearranged a whole bunch of sexps in the Operators[] array in sexp.cpp * in order to make the subcategories work better, so if you get a whole bunch of differences @@ -848,6 +848,7 @@ */ #include "globalincs/pstypes.h" // for NULL +#include #ifndef _SEXP_H #define _SEXP_H @@ -1011,7 +1012,7 @@ struct ship_subsys; // to add a #define here (a number from 0x0000 to 0x00ff ORred with the category that it // goes under), some appropriate case statements in get_subcategory() (in sexp.cpp) that // will return the subcategory for each sexp that uses it, and the submenu name in the -// op_submenu[] array in sexp_tree.cpp. +// op_submenu[] array in sexp.cpp. #define SUBCATEGORY_MASK 0x00ff #define CHANGE_SUBCATEGORY_MESSAGING_AND_MISSION_GOALS (0x0000 | OP_CATEGORY_CHANGE) #define CHANGE_SUBCATEGORY_AI_AND_IFF (0x0001 | OP_CATEGORY_CHANGE) @@ -1027,6 +1028,13 @@ struct ship_subsys; #define CHANGE_SUBCATEGORY_CUTSCENES (0x000b | OP_CATEGORY_CHANGE) #define CHANGE_SUBCATEGORY_JUMP_NODES (0x000c | OP_CATEGORY_CHANGE) #define CHANGE_SUBCATEGORY_BACKGROUND_AND_NEBULA (0x000d | OP_CATEGORY_CHANGE) +#define STATUS_SUBCATEGORY_MULTIPLAYER (0x000e | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_SHIELDS_ENGINES_AND_WEAPONS (0x000f | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_CARGO (0x0010 | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_SHIP_STATUS (0x0011 | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_DAMAGE (0x0012 | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_DISTANCE_AND_COORDINATES (0x0013 | OP_CATEGORY_STATUS) +#define STATUS_SUBCATEGORY_KILLS_AND_SCORING (0x0014 | OP_CATEGORY_STATUS) #define OP_PLUS (0x0000 | OP_CATEGORY_ARITHMETIC) @@ -1145,6 +1153,11 @@ struct ship_subsys; #define OP_SHIP_DEATHS (0x0031 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma #define OP_RESPAWNS_LEFT (0x0032 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma #define OP_IS_PLAYER (0x0033 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_GET_DAMAGE_CAUSED (0x0034 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_AFTERBURNER_LEFT (0x0035 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_WEAPON_ENERGY_LEFT (0x0036 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_PRIMARY_FIRED_SINCE (0x0037 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_SECONDARY_FIRED_SINCE (0x0038 | OP_CATEGORY_STATUS | OP_NONCAMPAIGN_FLAG) // Karajorma // conditional sexpressions @@ -1159,6 +1172,9 @@ struct ship_subsys; #define OP_INVALIDATE_ARGUMENT (0x0008 | OP_CATEGORY_CONDITIONAL) // Goober5000 #define OP_RANDOM_MULTIPLE_OF (0x0009 | OP_CATEGORY_CONDITIONAL) // Karajorma #define OP_IN_SEQUENCE (0x000a | OP_CATEGORY_CONDITIONAL) // Karajorma +#define OP_VALIDATE_ARGUMENT (0x000b | OP_CATEGORY_CONDITIONAL) // Karajorma +#define OP_DO_FOR_VALID_ARGUMENTS (0x000c | OP_CATEGORY_CONDITIONAL) // Karajorma + // sexpressions with side-effects #define OP_CHANGE_IFF (0x0000 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) @@ -1363,10 +1379,14 @@ struct ship_subsys; #define OP_CUTSCENES_SET_CAMERA_TARGET (0x00bc | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // WMC #define OP_LOCK_AFTERBURNER (0x00bd | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // KeldorKatarn #define OP_UNLOCK_AFTERBURNER (0x00bf | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // KeldorKatarn - -#define OP_CHANGE_IFF_COLOR (0x00c0 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer -#define OP_TURRET_SUBSYS_TARGET_DISABLE (0x00c1 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer -#define OP_TURRET_SUBSYS_TARGET_ENABLE (0x00c2 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer +#define OP_SET_RESPAWNS (0x00c0 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_SET_AFTERBURNER_ENERGY (0x00c1 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_SET_WEAPON_ENERGY (0x00c2 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_SET_SHIELD_ENERGY (0x00c3 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_SET_AMBIENT_LIGHT (0x00c4 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Karajorma +#define OP_CHANGE_IFF_COLOR (0x00c5 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer +#define OP_TURRET_SUBSYS_TARGET_DISABLE (0x00c6 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer +#define OP_TURRET_SUBSYS_TARGET_ENABLE (0x00c7 | OP_CATEGORY_CHANGE | OP_NONCAMPAIGN_FLAG) // Wanderer /* made obsolete by Goober5000 // debugging sexpressions @@ -1717,6 +1737,8 @@ extern int Players_target_timestamp; extern int Players_mlocked_timestamp; extern int Sexp_clipboard; // used by Fred +extern std::vector Current_sexp_operator; + extern void init_sexp(); extern int alloc_sexp(char *text, int type, int subtype, int first, int rest); extern int find_free_sexp(); @@ -1767,13 +1789,15 @@ void flush_sexp_tree(int node); // sexp_variable void sexp_modify_variable(int); -void sexp_modify_variable(char *text, int index); +void sexp_modify_variable(char *text, int index, bool sexp_callback = true); int get_index_sexp_variable_from_node (int node); int get_index_sexp_variable_name(const char *temp_name); int get_index_sexp_variable_name_special(const char *text); // Goober5000 bool sexp_replace_variable_names_with_values(char *text, int max_len); // Goober5000 +int get_nth_variable_index(int nth, int variable_type); // Karajorma int sexp_variable_count(); int sexp_campaign_persistent_variable_count(); // Goober5000 +int sexp_variable_typed_count(int sexp_variables_index, int variable_type); // Karajorma void sexp_variable_delete(int index); void sexp_variable_sort(); void sexp_fred_modify_variable(const char *text, const char *var_name, int index, int type); @@ -1821,4 +1845,7 @@ extern int Num_submenus; //Outputs sexp.html file bool output_sexps(char *filepath); + +void multi_sexp_eval(); + #endif diff --git a/code/physics/physics.cpp b/code/physics/physics.cpp index 4073500660..e2dda39a98 100644 --- a/code/physics/physics.cpp +++ b/code/physics/physics.cpp @@ -92,7 +92,7 @@ * * 5 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 4 7/03/99 5:50p Dave * Make rotated bitmaps draw properly in padlock views. diff --git a/code/physics/physics.h b/code/physics/physics.h index 3f23e73d28..1e60dc27ae 100644 --- a/code/physics/physics.h +++ b/code/physics/physics.h @@ -66,7 +66,7 @@ * * 6 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 5 7/03/99 5:50p Dave * Make rotated bitmaps draw properly in padlock views. diff --git a/code/playerman/playercontrol.cpp b/code/playerman/playercontrol.cpp index 1012d34f93..f91f75864a 100644 --- a/code/playerman/playercontrol.cpp +++ b/code/playerman/playercontrol.cpp @@ -1582,11 +1582,11 @@ void read_player_controls(object *objp, float frametime) // Wait at least 3 seconds before making sure warp speed is set. if ( Warpout_time > MINIMUM_PLAYER_WARPOUT_TIME ) { // If we are going around 5% of the target speed, progress to next stage - float diff = objp->phys_info.fspeed; + float diffSpeed = objp->phys_info.fspeed; if(target_warpout_speed != 0.0f) { - diff = fl_abs(objp->phys_info.fspeed - target_warpout_speed )/target_warpout_speed; + diffSpeed = fl_abs(objp->phys_info.fspeed - target_warpout_speed )/target_warpout_speed; } - if ( diff < TARGET_WARPOUT_MATCH_PERCENT ) { + if ( diffSpeed < TARGET_WARPOUT_MATCH_PERCENT ) { gameseq_post_event( GS_EVENT_PLAYER_WARPOUT_DONE_STAGE1 ); } } @@ -1601,7 +1601,6 @@ void read_player_controls(object *objp, float frametime) if(objp->type != OBJ_OBSERVER){ objp->phys_info.max_vel.xyz.z = Ships[objp->instance].current_max_speed; } - if(Player_obj->type == OBJ_SHIP && !Player_use_ai){ // only read player control info if player ship is not dead // or if Player_use_ai is disabed @@ -1993,7 +1992,12 @@ int player_process_pending_praise() if ( ship_index >= 0 ) { // Only praise if above 50% integrity if ( get_hull_pct(&Objects[Ships[ship_index].objnum]) > 0.5f ) { - message_send_builtin_to_player(MESSAGE_PRAISE, &Ships[ship_index], MESSAGE_PRIORITY_HIGH, MESSAGE_TIME_SOON, 0, 0, -1, -1); + if (Player->stats.m_kill_count_ok > 10) { // this number should probably be in the AI profile or mission file rather than hardcoded + message_send_builtin_to_player(MESSAGE_HIGH_PRAISE, &Ships[ship_index], MESSAGE_PRIORITY_HIGH, MESSAGE_TIME_SOON, 0, 0, -1, -1); + } + else { + message_send_builtin_to_player(MESSAGE_PRAISE, &Ships[ship_index], MESSAGE_PRIORITY_HIGH, MESSAGE_TIME_SOON, 0, 0, -1, -1); + } Player->allow_praise_timestamp = timestamp(PLAYER_ALLOW_PRAISE_INTERVAL*(Game_skill_level+1) ); Player->allow_scream_timestamp = timestamp(20000); // prevent death scream following praise Player->praise_count++; @@ -2151,7 +2155,7 @@ int player_inspect_cap_subsys_cargo(float frametime, char *outstr) return 0; } - // dont scan cargo on turrets, radar, etc. only the majors: fighterbay, sensor, engines, weapons, nav, comm + // don't scan cargo on turrets, radar, etc. only the majors: fighterbay, sensor, engines, weapons, nav, comm if (!valid_cap_subsys_cargo_list(subsys->system_info->subobj_name)) { return 0; } diff --git a/code/popup/popup.cpp b/code/popup/popup.cpp index b8cef2c04d..c3fe862d57 100644 --- a/code/popup/popup.cpp +++ b/code/popup/popup.cpp @@ -545,7 +545,7 @@ int popup_process_keys(popup_info *pi, int k, int flags) masked_k = k & ~KEY_CTRLED; // take out CTRL modifier only - if ( (PF_ALLOW_DEAD_KEYS) && (Game_mode & GM_IN_MISSION) ) { + if ( (Game_mode & GM_IN_MISSION) ) { process_set_of_keys(masked_k, Dead_key_set_size, Dead_key_set); button_info_do(&Player->bi); // call functions based on status of button_info bit vectors } @@ -677,7 +677,7 @@ int popup_init(popup_info *pi, int flags) } // anytime in single player, and multiplayer, not in mission, go ahead and stop time - if ( (Game_mode & GM_NORMAL) || ((Game_mode && GM_MULTIPLAYER) && !(Game_mode & GM_IN_MISSION)) ){ + if ( (Game_mode & GM_NORMAL) || ((Game_mode & GM_MULTIPLAYER) && !(Game_mode & GM_IN_MISSION)) ){ game_stop_time(); } @@ -778,7 +778,7 @@ void popup_close(popup_info *pi, int screen_id) Popup_running_state = 0; // anytime in single player, and multiplayer, not in mission, go ahead and stop time - if ( (Game_mode & GM_NORMAL) || ((Game_mode && GM_MULTIPLAYER) && !(Game_mode & GM_IN_MISSION)) ) + if ( (Game_mode & GM_NORMAL) || ((Game_mode & GM_MULTIPLAYER) && !(Game_mode & GM_IN_MISSION)) ) game_start_time(); } diff --git a/code/popup/popupdead.cpp b/code/popup/popupdead.cpp index 781dc4b02e..4a263ad90f 100644 --- a/code/popup/popupdead.cpp +++ b/code/popup/popupdead.cpp @@ -543,7 +543,7 @@ int popupdead_do_frame(float frametime) return -1; } - // dont let dude skip 3-09. hack. + // don't let dude skip 3-09. hack. if(Game_mode & GM_CAMPAIGN_MODE){ if((Campaign.current_mission >= 0) && (Campaign.current_mission < MAX_CAMPAIGN_MISSIONS)){ if ((Campaign.missions[Campaign.current_mission].name != NULL) && !stricmp(Campaign.missions[Campaign.current_mission].name, "sm3-09.fs2")) { @@ -570,7 +570,7 @@ int popupdead_do_frame(float frametime) gameseq_post_event(GS_EVENT_START_GAME); return -1; case 2: - // dont show this again + // don't show this again Player->show_skip_popup = 0; break; } diff --git a/code/radar/radar.h b/code/radar/radar.h index 00d973a6c7..a4bf21af2c 100644 --- a/code/radar/radar.h +++ b/code/radar/radar.h @@ -98,8 +98,3 @@ void radar_draw_image_std( int x, int y, int rad, int idx, int size); #endif - - - - - diff --git a/code/radar/radarorb.cpp b/code/radar/radarorb.cpp index 3331bbdbb9..4cc81b552d 100644 --- a/code/radar/radarorb.cpp +++ b/code/radar/radarorb.cpp @@ -181,7 +181,6 @@ static const int NUM_ORB_RING_SLICES = 16; vec3d orb_ring_yz[NUM_ORB_RING_SLICES]; vec3d orb_ring_xy[NUM_ORB_RING_SLICES]; vec3d orb_ring_xz[NUM_ORB_RING_SLICES]; - vec3d vec_extents[]= { { { { 1.0f, 0.0f, 0.0f } } }, @@ -201,7 +200,7 @@ static matrix view_perturb = { { { { { { 1.0f, 0.0f, 0.0f } } }, { { { 0.0f, -1.0f, 0.0f } } }, { { { 0.0f, 0.0f, -1.0f } } } } } }; -static vec3d Orb_eye_position = { { { 0.0f, 0.0f, -2.5f } } }; +static vec3d Orb_eye_position = { { { 0.0f, 0.0f, -3.0f } } }; // forward declarations void draw_radar_blips_orb(int blip_type, int bright, int distort = 0); @@ -648,14 +647,14 @@ void radar_blip_draw_distorted_orb(blip *b) vm_vec_random_cone(&out,&b->position,distortion_angle); vm_vec_scale(&out,dist); - if (Cmdline_nohtl) - { - radar_orb_draw_contact(&out,b->rad); - } - else - { - radar_orb_draw_contact_htl(&out,b->rad); - } + if (Cmdline_nohtl) + { + radar_orb_draw_contact(&out,b->rad); + } + else + { + radar_orb_draw_contact_htl(&out,b->rad); + } } // blip is for a target immune to sensors, so cause to flicker in/out with mild distortion @@ -695,13 +694,13 @@ void radar_blip_draw_flicker_orb(blip *b) vm_vec_scale(&out,dist); if (Cmdline_nohtl) - { - radar_orb_draw_contact(&out,b->rad); - } - else - { - radar_orb_draw_contact_htl(&out,b->rad); - } + { + radar_orb_draw_contact(&out,b->rad); + } + else + { + radar_orb_draw_contact_htl(&out,b->rad); + } } // Draw all the active radar blips @@ -750,19 +749,19 @@ void draw_radar_blips_orb(int blip_type, int bright, int distort) } else { - if (Cmdline_nohtl) - { - radar_orb_draw_contact(&b->position,b->rad); - } - else if (b->radar_image_2d >= 0) + if (Cmdline_nohtl) + { + radar_orb_draw_contact(&b->position,b->rad); + } + else if (b->radar_image_2d >= 0) { radar_orb_draw_image(&b->position, b->rad, b->radar_image_2d, b->radar_projection_size); } - else - { - radar_orb_draw_contact_htl(&b->position,b->rad); - } - } + else + { + radar_orb_draw_contact_htl(&b->position,b->rad); + } + } } } @@ -1081,43 +1080,43 @@ void radar_page_in_orb() void radar_orb_draw_image(vec3d *pnt, int rad, int idx, float mult) { - int tmap_flags = 0; - int h, w; - float aspect_mp; + int tmap_flags = 0; + int h, w; + float aspect_mp; - // need to get bitmap info - bm_get_info(idx, &w, &h); + // need to get bitmap info + bm_get_info(idx, &w, &h); - Assert(w > 0); + Assert(w > 0); - // get multiplier - if (h == w) { - aspect_mp = 1.0f; - } else { - aspect_mp = (((float) h) / ((float) w)); - } + // get multiplier + if (h == w) { + aspect_mp = 1.0f; + } else { + aspect_mp = (((float) h) / ((float) w)); + } - gr_set_bitmap(idx,GR_ALPHABLEND_NONE,GR_BITBLT_MODE_NORMAL,1.0f); + gr_set_bitmap(idx,GR_ALPHABLEND_NONE,GR_BITBLT_MODE_NORMAL,1.0f); - float sizef = fl_sqrt(vm_vec_dist(&Orb_eye_position, pnt) * 8.0f); + float sizef = fl_sqrt(vm_vec_dist(&Orb_eye_position, pnt) * 8.0f); - // might need checks unless the targeted blip is always wanted to be larger - float radius = (float) Current_radar_global->Radar_blip_radius_normal[gr_screen.res]; - - if (sizef < radius) - sizef = radius; + // might need checks unless the targeted blip is always wanted to be larger + float radius = (float) Current_radar_global->Radar_blip_radius_normal[gr_screen.res]; - //Make so no evil things happen - Assert(mult > 0.0f); - - //modify size according to value from tables - sizef *= mult; + if (sizef < radius) + sizef = radius; - tmap_flags = TMAP_FLAG_TEXTURED | TMAP_FLAG_BW_TEXTURE | TMAP_HTL_3D_UNLIT; + //Make so no evil things happen + Assert(mult > 0.0f); - g3_draw_polygon(pnt, &vmd_identity_matrix, sizef/35.0f, aspect_mp*sizef/35.0f, tmap_flags); - if (rad == Current_radar_global->Radar_blip_radius_target[gr_screen.res]) - { - g3_draw_polygon(pnt, &vmd_identity_matrix, sizef/35.0f, aspect_mp*sizef/35.0f, tmap_flags); - } + //modify size according to value from tables + sizef *= mult; + + tmap_flags = TMAP_FLAG_TEXTURED | TMAP_FLAG_BW_TEXTURE | TMAP_HTL_3D_UNLIT; + + g3_draw_polygon(pnt, &vmd_identity_matrix, sizef/35.0f, aspect_mp*sizef/35.0f, tmap_flags); + if (rad == Current_radar_global->Radar_blip_radius_target[gr_screen.res]) + { + g3_draw_polygon(pnt, &vmd_identity_matrix, sizef/35.0f, aspect_mp*sizef/35.0f, tmap_flags); + } } diff --git a/code/radar/radarorb.h b/code/radar/radarorb.h index e62349041c..129cff51b7 100644 --- a/code/radar/radarorb.h +++ b/code/radar/radarorb.h @@ -60,5 +60,3 @@ void radar_orb_draw_image(vec3d *out, int rad, int idx, float mult); #endif - - diff --git a/code/radar/radarsetup.cpp b/code/radar/radarsetup.cpp index 2d8d605a98..f90e9affbc 100644 --- a/code/radar/radarsetup.cpp +++ b/code/radar/radarsetup.cpp @@ -80,7 +80,7 @@ rcol Radar_color_rgb[MAX_RADAR_COLORS][MAX_RADAR_LEVELS] = // navbuoy or cargo (gray) { { 0x40, 0x40, 0x40 }, // dim - { 0x7f, 0x7f, 0x7f }, // bright + { 0x7f, 0x7f, 0x7f }, // bright }, // warping ship (blue) diff --git a/code/render/3ddraw.cpp b/code/render/3ddraw.cpp index 938962ab18..a5249ec1ae 100644 --- a/code/render/3ddraw.cpp +++ b/code/render/3ddraw.cpp @@ -185,7 +185,7 @@ * * Revision 2.14 2004/02/13 04:17:14 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. diff --git a/code/render/3dsetup.cpp b/code/render/3dsetup.cpp index 667b58e51e..c3e185257a 100644 --- a/code/render/3dsetup.cpp +++ b/code/render/3dsetup.cpp @@ -41,7 +41,7 @@ * * Revision 2.15 2004/02/13 04:17:14 randomtiger * Turned off fog in OGL for Fred. - * Simulated speech doesnt say tags marked by $ now. + * Simulated speech doesn't say tags marked by $ now. * The following are fixes to issues that came up testing TBP in fs2_open and fred2_open: * Changed vm_vec_mag and parse_tmap to fail gracefully on bad data. * Error now given on missing briefing icon and bad ship normal data. @@ -84,7 +84,7 @@ * * Revision 2.5 2003/10/14 17:39:18 randomtiger * Implemented hardware fog for the HT&L code path. - * It doesnt use the backgrounds anymore but its still an improvement. + * It doesn't use the backgrounds anymore but it's still an improvement. * Currently it fogs to a brighter colour than it should because of Bob specular code. * I will fix this after discussing it with Bob. * @@ -259,7 +259,7 @@ void g3_start_frame_func(int zbuffer_flag, char * filename, int lineno) //Uncomment this to figure out who called g3_start_frame without calling g3_end_frame. - //mprintf(( "g3_start_frame called from %s, line %d\n", filename, lineno )); +// mprintf(( "g3_start_frame called from %s, line %d\n", filename, lineno )); Assert( G3_count == 0 ); G3_count++; diff --git a/code/ship/shield.cpp b/code/ship/shield.cpp index 8962cf1be3..7a05855e60 100644 --- a/code/ship/shield.cpp +++ b/code/ship/shield.cpp @@ -1398,26 +1398,15 @@ int ship_is_shield_up( object *obj, int quadrant ) {return 0;} // / \. // / 2 \. // Note: This is in the object's local reference frame. Do _not_ pass a vector in the world frame. -int get_quadrant(vec3d *hit_pnt, object *objp) +int get_quadrant(vec3d *hit_pnt) { int result = 0; - switch (objp->n_shield_segments) { - case 1: - // segment '0' is only one in use - break; - case 2: - // segment '0' front, segment '1' rear - if (hit_pnt->xyz.z < 0) - result |= 1; - break; - default: - if (hit_pnt->xyz.x < hit_pnt->xyz.z) - result |= 1; - if (hit_pnt->xyz.x < -hit_pnt->xyz.z) - result |= 2; - break; - } + if (hit_pnt->xyz.x < hit_pnt->xyz.z) + result |= 1; + + if (hit_pnt->xyz.x < -hit_pnt->xyz.z) + result |= 2; return result; } diff --git a/code/ship/ship.cpp b/code/ship/ship.cpp index ced71eeac6..89939eab06 100644 --- a/code/ship/ship.cpp +++ b/code/ship/ship.cpp @@ -1154,7 +1154,7 @@ * and posably fixed Turnsky's shinemap bug * * Revision 2.107 2004/02/16 11:47:34 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. @@ -1734,7 +1734,7 @@ * * 124 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 123 8/05/99 6:19p Dave * New demo checksums. @@ -2423,8 +2423,7 @@ void ship_reset_disabled_physics(object *objp, int ship_class); // information for ships which have exited the game -exited_ship Ships_exited[MAX_EXITED_SHIPS]; -int Num_exited_ships; +std::vector Ships_exited; int Num_engine_wash_types; int Num_ship_classes; @@ -2504,8 +2503,8 @@ flag_def_list Subsystem_flags[] = { { "check hull", MSS_FLAG_TURRET_HULL_CHECK, 0 }, { "fixed firingpoints", MSS_FLAG_TURRET_FIXED_FP, 0 }, { "salvo mode", MSS_FLAG_TURRET_SALVO, 0 }, - { "fire on target", MSS_FLAG_FIRE_ON_TARGET, 0 }, { "no subsystem targeting", MSS_FLAG_NO_SS_TARGETING, 0}, + { "fire on target", MSS_FLAG_FIRE_ON_TARGET, 0 }, { "reset when idle", MSS_FLAG_TURRET_RESET_IDLE, 0 } }; @@ -2551,6 +2550,7 @@ flag_def_list Ship_flags[] = { { "generate icon", SIF2_GENERATE_HUD_ICON, 1 }, { "no weapon damage scaling", SIF2_DISABLE_WEAPON_DAMAGE_SCALING, 1 }, { "gun convergence", SIF2_GUN_CONVERGENCE, 1 }, + { "no thruster geometry noise", SIF2_NO_THRUSTER_GEO_NOISE, 1 }, { "intrinsic no shields", SIF2_INTRINSIC_NO_SHIELDS, 1 }, // to keep things clean, obsolete options go last @@ -2560,11 +2560,11 @@ flag_def_list Ship_flags[] = { const int Num_ship_flags = sizeof(Ship_flags) / sizeof(flag_def_list); /* -+Here be dragons.. err.. begins the section for the ai targeting revision -+ First flag_def_list (& its size) for object types (ship/asteroid/weapon) -+ List of reasonable object flags (from object.h) -+ List of potentially useful ship class flags -+ List of potentially useful weapon class flags +++Here be dragons.. err.. begins the section for the ai targeting revision +++ First flag_def_list (& its size) for object types (ship/asteroid/weapon) +++ List of reasonable object flags (from object.h) +++ List of potentially useful ship class flags +++ List of potentially useful weapon class flags */ flag_def_list ai_tgt_objects[] = { { "ship", OBJ_SHIP, 0 }, @@ -2983,12 +2983,9 @@ void init_ship_entry(ship_info *sip) } sip->max_shield_strength = 0.0f; - sip->max_shield_recharge = 1.0f; sip->shield_color[0] = 255; sip->shield_color[1] = 255; sip->shield_color[2] = 255; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - sip->max_shield_segment_strength[i] = 0.0f; sip->power_output = 0.0f; sip->max_overclocked_speed = 0.0f; @@ -3079,6 +3076,10 @@ void init_ship_entry(ship_info *sip) sip->model_num = -1; sip->model_num_hud = -1; + sip->radar_image_2d_idx = -1; + sip->radar_image_size = -1; + sip->radar_projection_size_mult = 1.0f; + for (i=0;iship_iff_info[i][j] = -1; } } - - sip->radar_image_2d_idx = -1; - sip->radar_image_size = -1; - sip->radar_projection_size_mult = 1.0f; - - sip->num_shield_segments = MAX_SHIELD_SECTIONS; - + sip->emp_resistance_mod = 0.0f; } @@ -3668,7 +3663,7 @@ int parse_ship_values(ship_info* sip, bool isTemplate, bool first_time, bool rep sip->aiming_flags |= AIM_FLAG_AUTOAIM; sip->autoaim_fov = (float)fov_temp * PI / 180.0f; - + if(optional_string("+Converging Autoaim")) sip->aiming_flags |= AIM_FLAG_AUTOAIM_CONVERGENCE; @@ -3707,7 +3702,7 @@ int parse_ship_values(ship_info* sip, bool isTemplate, bool first_time, bool rep } parse_sound("$Warpin Start Sound:", &sip->warpin_snd_start, sip->name); - parse_sound("$Warpin End Sound:", &sip->warpin_snd_start, sip->name); + parse_sound("$Warpin End Sound:", &sip->warpin_snd_end, sip->name); if(optional_string("$Warpin speed:")) { @@ -3755,7 +3750,7 @@ int parse_ship_values(ship_info* sip, bool isTemplate, bool first_time, bool rep } parse_sound("$Warpout Start Sound:", &sip->warpout_snd_start, sip->name); - parse_sound("$Warpout End Sound:", &sip->warpout_snd_start, sip->name); + parse_sound("$Warpout End Sound:", &sip->warpout_snd_end, sip->name); if(optional_string("$Warpout speed:")) { @@ -3949,9 +3944,8 @@ strcpy(parse_error_text, temp_error); strcpy(parse_error_text, temp_error); // error checking - for ( i = 0; i < sip->num_primary_banks; i++ ) - { - Assert(sip->primary_bank_weapons[i] >= 0); + for ( i = 0; i < sip->num_primary_banks; i++ ) { + Assertion((sip->primary_bank_weapons[i] >= 0), "%s. No $Default PBanks supplied for bank %d", parse_error_text, i); } } @@ -4091,12 +4085,8 @@ strcpy(parse_error_text, temp_error); stuff_bool_list(sip->draw_secondary_models, sip->num_secondary_banks); } - if(optional_string("$Shields:")) { + if(optional_string("$Shields:")) stuff_float(&sip->max_shield_strength); - sip->num_shield_segments = MAX_SHIELD_SECTIONS; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - sip->max_shield_segment_strength[i] = sip->max_shield_strength / 4; - } // optional shield color if(optional_string("$Shield Color:")){ @@ -4104,55 +4094,7 @@ strcpy(parse_error_text, temp_error); stuff_ubyte(&sip->shield_color[1]); stuff_ubyte(&sip->shield_color[2]); } - - if(optional_string("$Number of Shield Segments:")){ - stuff_int(&sip->num_shield_segments); - if (sip->max_shield_strength > 0.0f) { - switch(sip->num_shield_segments) { - case 1: - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) { - if (i == 0) - sip->max_shield_segment_strength[i] = sip->max_shield_strength; - else - sip->max_shield_segment_strength[i] = 0.0f; - } - break; - case 2: - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) { - if (i < 2) - sip->max_shield_segment_strength[i] = sip->max_shield_strength / 2; - else - sip->max_shield_segment_strength[i] = 0.0f; - } - break; - default: - sip->num_shield_segments = MAX_SHIELD_SECTIONS; - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) - sip->max_shield_segment_strength[i] = sip->max_shield_strength / 4; - break; - } - } - } - if(optional_string("$Shield Segments:")) { - float tempf[4]; - float tempf_sum = 0.0f; - stuff_float_list(tempf, 4); - for (i = 0; i < MAX_SHIELD_SECTIONS; i++) { - if (i < sip->num_shield_segments) - sip->max_shield_segment_strength[i] = tempf[i]; - else - sip->max_shield_segment_strength[i] = 0.0f; - tempf_sum += tempf[i]; - } - sip->max_shield_strength = tempf_sum; - } - - if(optional_string("$Maximum Shield Recharge Percent:")){ - stuff_float(&sip->max_shield_recharge); - CLAMP(sip->max_shield_recharge, 0.0f, 1.0f); - } - // The next five fields are used for the ETS if (optional_string("$Power Output:")) stuff_float(&sip->power_output); @@ -4380,12 +4322,12 @@ strcpy(parse_error_text, temp_error); trails_warning = false; stuff_float(&sip->afterburner_trail_life); } - + if ( optional_string("+Faded Out Sections:") ) { trails_warning = false; stuff_int(&sip->afterburner_trail_faded_out_sections); } - + if (trails_warning) Warning(LOCATION, "Ship %s entry has $Trails field specified, but no properties given.", sip->name); } @@ -4595,7 +4537,7 @@ strcpy(parse_error_text, temp_error); sip->max_decals = 50; }else if(sip->flags & SIF_BIG_SHIP){ sip->max_decals = 100; - }else if(SIF_HUGE_SHIP){ + }else if(sip->flags & SIF_HUGE_SHIP){ sip->max_decals = 300; }else{ sip->max_decals = 10; @@ -4608,6 +4550,7 @@ strcpy(parse_error_text, temp_error); memset(&sip->ct_info, 0, sizeof(trail_info) * MAX_SHIP_CONTRAILS); sip->ct_count = 0; } + // this means you've reached the max # of contrails for a ship if (sip->ct_count >= MAX_SHIP_CONTRAILS) { Warning(LOCATION, "%s has more contrails than the max of %d", sip->name, MAX_SHIP_CONTRAILS); @@ -4713,6 +4656,18 @@ strcpy(parse_error_text, temp_error); parse_sound("+StopSnd:", &mtp->stop_snd, sip->name); } + if (optional_string("$Radar Image 2D:")) + { + stuff_string(name_tmp, F_NAME, NAME_LENGTH); + sip->radar_image_2d_idx = bm_load(name_tmp); + + if (optional_string("$Radar Image Size:")) + stuff_int(&sip->radar_image_size); + + if (optional_string("$3D Radar Blip Size Multiplier:")) + stuff_float(&sip->radar_projection_size_mult); + } + // Alternate - per ship class - IFF colors while((optional_string("$Ship IFF Colors:")) || (optional_string("$Ship IFF Colours:"))) { @@ -4736,18 +4691,6 @@ strcpy(parse_error_text, temp_error); sip->ship_iff_info[iff_data[0]][iff_data[1]] = iff_init_color(iff_color_data[0],iff_color_data[1],iff_color_data[2]); } - if (optional_string("$Radar Image 2D:")) - { - stuff_string(name_tmp, F_NAME, NAME_LENGTH); - sip->radar_image_2d_idx = bm_load(name_tmp); - - if (optional_string("$Radar Image Size:")) - stuff_int(&sip->radar_image_size); - - if (optional_string("$3D Radar Blip Size Multiplier:")) - stuff_float(&sip->radar_projection_size_mult); - } - if (optional_string("$Target Priority Groups:") ) { std::vector target_group_strings, *target_group_string_p; target_group_string_p = &target_group_strings; @@ -4854,7 +4797,6 @@ strcpy(parse_error_text, temp_error); sp->alive_snd = -1; sp->dead_snd = -1; sp->rotation_snd = -1; - sp->turret_gun_rotation_snd = -1; sp->turret_gun_rotation_snd_mult = 1.0f; sp->turret_base_rotation_snd = -1; @@ -4872,6 +4814,7 @@ strcpy(parse_error_text, temp_error); sp->turret_reset_delay = 2000; + sp->num_target_priorities = 0; for (i = 0; i < 32; i++) { sp->target_priority[i] = -1; } @@ -4972,18 +4915,18 @@ strcpy(parse_error_text, temp_error); } if(optional_string("$Maximum Barrel Elevation:")){ - int i; - stuff_int(&i); - CAP(i, 0, 90); - float angle = ANG_TO_RAD((float) (90 - i)); + int value; + stuff_int(&value); + CAP(value, 0, 90); + float angle = ANG_TO_RAD((float) (90 - value)); sp->turret_max_fov = (float)cos(angle); } if(optional_string("$Turret Base FOV:")) { - int i; - stuff_int(&i); - CAP(i, 0, 359); - float angle = ANG_TO_RAD((float) i)/2.0f; + int value; + stuff_int(&value); + CAP(value, 0, 359); + float angle = ANG_TO_RAD((float) value)/2.0f; sp->turret_y_fov = (float)cos(angle); sp->flags |= MSS_FLAG_TURRET_ALT_MATH; } @@ -5387,7 +5330,7 @@ void parse_ship_type() if(optional_string("$Warp Pushable:")) { stuff_boolean_flag(&stp->ship_bools, STI_SHIP_WARP_PUSHABLE); } - + if(optional_string("$Turrets prioritize ship target:")) { stuff_boolean_flag(&stp->ship_bools, STI_TURRET_TGT_SHIP_TGT); } @@ -5894,18 +5837,14 @@ void ship_level_init() // Reset everything between levels // mwa removed 11/24/97 num_ships = 0; - Num_exited_ships = 0; + Ships_exited.clear(); + Ships_exited.reserve(100); for (i=0; iship_name ); - Ships_exited[entry].obj_signature = Objects[sp->objnum].signature; - Ships_exited[entry].ship_class = sp->ship_info_index; - Ships_exited[entry].team = sp->team; - Ships_exited[entry].flags = reason; + strcpy(entry.ship_name, sp->ship_name ); + entry.obj_signature = Objects[sp->objnum].signature; + entry.ship_class = sp->ship_info_index; + entry.team = sp->team; + entry.ship_class = sp->ship_info_index; + entry.flags = reason; // if ship is red alert, flag as such if (sp->flags & SF_RED_ALERT_STORE_STATUS) { - Ships_exited[entry].flags |= SEF_RED_ALERT_CARRY; + entry.flags |= SEF_RED_ALERT_CARRY; } - Ships_exited[entry].time = Missiontime; - Ships_exited[entry].hull_strength = int(Objects[sp->objnum].hull_strength); + entry.time = Missiontime; + entry.hull_strength = int(Objects[sp->objnum].hull_strength); - Ships_exited[entry].cargo1 = sp->cargo1; + entry.cargo1 = sp->cargo1; - Ships_exited[entry].time_cargo_revealed = (fix)0; + entry.time_cargo_revealed = (fix)0; if ( sp->flags & SF_CARGO_REVEALED ) { - Ships_exited[entry].flags |= SEF_CARGO_KNOWN; - Ships_exited[entry].time_cargo_revealed = sp->time_cargo_revealed; + entry.flags |= SEF_CARGO_KNOWN; + entry.time_cargo_revealed = sp->time_cargo_revealed; } if ( sp->time_first_tagged > 0 ) - Ships_exited[entry].flags |= SEF_BEEN_TAGGED; + entry.flags |= SEF_BEEN_TAGGED; + + //copy across the damage_ship arrays + for (int i = 0; i < MAX_DAMAGE_SLOTS ; i++) { + entry.damage_ship_id[i] = sp->damage_ship_id[i] ; + entry.damage_ship[i] = sp->damage_ship[i] ; + } + + if ( (Ships_exited.capacity() - Ships_exited.size() ) < 5u ) { + Ships_exited.reserve((int)(Ships_exited.capacity() + 100)); + } + Ships_exited.push_back(entry); } // function which attempts to find information about an exited ship based on shipname @@ -6014,7 +5948,7 @@ int ship_find_exited_ship_by_name( char *name ) { int i; - for (i = 0; i < Num_exited_ships; i++) { + for (i = 0; i < (int)Ships_exited.size(); i++) { if ( !stricmp(name, Ships_exited[i].ship_name) ) return i; } @@ -6027,7 +5961,7 @@ int ship_find_exited_ship_by_signature( int signature ) { int i; - for (i = 0; i < Num_exited_ships; i++) { + for (i = 0; i < (int)Ships_exited.size(); i++) { if ( signature == Ships_exited[i].obj_signature ) return i; } @@ -6260,7 +6194,7 @@ void ship_cam_chase_custom_position(camera *cam, vec3d *c_pos) void ship_set(int ship_index, int objnum, int ship_type) { - int i,j; + int i, j; object *objp = &Objects[objnum]; ship *shipp = &Ships[ship_index]; @@ -6362,8 +6296,6 @@ void ship_set(int ship_index, int objnum, int ship_type) shipp->ship_max_hull_strength = sip->max_hull_strength; } objp->hull_strength = shipp->ship_max_hull_strength; - - objp->n_shield_segments = sip->num_shield_segments; shipp->afterburner_fuel = sip->afterburner_fuel_capacity; @@ -6467,8 +6399,6 @@ void ship_set(int ship_index, int objnum, int ship_type) ets_init_ship(objp); // init ship fields that are used for the ETS - shipp->max_shield_recharge_pct = sip->max_shield_recharge; - physics_ship_init(objp); if (Fred_running) { shipp->ship_max_shield_strength = 100.0f; @@ -6477,10 +6407,7 @@ void ship_set(int ship_index, int objnum, int ship_type) } else { shipp->ship_max_shield_strength = sip->max_shield_strength; shipp->ship_max_hull_strength = sip->max_hull_strength; - for (i = 0;i < MAX_SHIELD_SECTIONS; i++) { - shipp->ship_max_shield_segment[i] = sip->max_shield_segment_strength[i]; - shield_set_quad(objp, i, shipp->ship_max_shield_segment[i] * shipp->max_shield_recharge_pct); - } + shield_set_strength(objp, shipp->ship_max_shield_strength); } shipp->target_shields_delta = 0.0f; @@ -6621,7 +6548,10 @@ void ship_set(int ship_index, int objnum, int ship_type) shipp->thrusters_start[i] = 0; shipp->thrusters_sounds[i] = -1; } - + + // Alt classes + shipp->s_alt_classes.clear(); + // Make sure these get set to -1 for(i=0;iship_iff_color[i][j] = -1; } } - } // function which recalculates the overall strength of subsystems. Needed because @@ -6852,6 +6781,7 @@ void subsys_set(int objnum, int ignore_subsys_info) // Goober5000 if (model_system->flags & MSS_FLAG_UNTARGETABLE) ship_system->flags |= SSF_UNTARGETABLE; + // Wanderer if (model_system->flags & MSS_FLAG_NO_SS_TARGETING) ship_system->flags |= SSF_NO_SS_TARGETING; @@ -7494,10 +7424,12 @@ void ship_render(object * obj) mst.length.xyz.x = obj->phys_info.side_thrust; mst.length.xyz.y = obj->phys_info.vert_thrust; - // Add noise to thruster geometry. - mst.length.xyz.z *= (1.0f + frand()/5.0f - 0.1f); - mst.length.xyz.y *= (1.0f + frand()/5.0f - 0.1f); - mst.length.xyz.x *= (1.0f + frand()/5.0f - 0.1f); + // Maybe add noise to thruster geometry. + if (!(sip->flags2 & SIF2_NO_THRUSTER_GEO_NOISE)) { + mst.length.xyz.z *= (1.0f + frand()/5.0f - 0.1f); + mst.length.xyz.y *= (1.0f + frand()/5.0f - 0.1f); + mst.length.xyz.x *= (1.0f + frand()/5.0f - 0.1f); + } CLAMP(mst.length.xyz.z, -1.0f, 1.0f); CLAMP(mst.length.xyz.y, -1.0f, 1.0f); @@ -8577,7 +8509,7 @@ void ship_dying_frame(object *objp, int ship_num) } for (int zz=0; zz<6; zz++ ) { - // dont make sequence of fireballs for knossos + // don't make sequence of fireballs for knossos if (knossos_ship) { break; } @@ -9183,7 +9115,7 @@ void ship_check_player_distance_sub(player *p, int multi_target=-1) } if ( !(p->flags & PLAYER_FLAGS_FORCE_MISSION_OVER) && ((p->distance_warning_count > PLAYER_DISTANCE_MAX_WARNINGS) || (dist > PLAYER_MAX_DIST_END)) ) { -// DKA 5/17/99 - DONT force warpout. Won't work multiplayer. Blow up ship. +// DKA 5/17/99 - DON'T force warpout. Won't work multiplayer. Blow up ship. if ( !(p->flags & PLAYER_FLAGS_DIST_TO_BE_KILLED) ) { message_send_builtin_to_player( MESSAGE_STRAY_WARNING_FINAL, NULL, MESSAGE_PRIORITY_HIGH, MESSAGE_TIME_IMMEDIATE, 0, 0, multi_target, -1 ); p->flags |= PLAYER_FLAGS_DIST_TO_BE_KILLED; @@ -9553,7 +9485,12 @@ void ship_process_post(object * obj, float frametime) // JAS -- if the ship is warping out, just move it forward at a speed // fast enough to move 2x its radius in SHIP_WARP_TIME seconds. shipfx_warpout_frame( obj, frametime ); - } else { + } + + if ( (!(shipp->flags & SF_ARRIVING) || (Ai_info[shipp->ai_index].mode == AIM_BAY_EMERGE) + || ((sip->warpin_type == WT_IN_PLACE_ANIM) && (shipp->flags & SF_ARRIVING_STAGE_2)) ) + && !(shipp->flags & SF_DEPART_WARP)) + { // Do AI. // for multiplayer people. return here if in multiplay and not the host @@ -9999,8 +9936,9 @@ int ship_create(matrix *orient, vec3d *pos, int ship_type, char *ship_name) pm->detail_depth[i] = i2fl(sip->detail_distance[i]); } - if ( sip->flags & SIF_NAVBUOY ) { - // JAS: Nav buoys don't need to do collisions! + // JAS: Nav buoys don't need to do collisions! + // G5K: Corrected to apply specifically for ships with the no-collide flag. (In retail, navbuoys already have this flag, so this doesn't break anything.) + if ( sip->flags & SIF_NO_COLLIDE ) { objnum = obj_create(OBJ_SHIP, -1, n, orient, pos, model_get_radius(sip->model_num), OF_RENDERS | OF_PHYSICS ); } else { objnum = obj_create(OBJ_SHIP, -1, n, orient, pos, model_get_radius(sip->model_num), OF_RENDERS | OF_COLLIDES | OF_PHYSICS ); @@ -10297,7 +10235,6 @@ void change_ship_type(int n, int ship_type, int by_sexp) objp->hull_strength = hull_pct * sp->ship_max_hull_strength; } - sp->max_shield_recharge_pct = sip->max_shield_recharge; // set the correct shield strength if (Fred_running) { @@ -10310,17 +10247,8 @@ void change_ship_type(int n, int ship_type, int by_sexp) } else { sp->ship_max_shield_strength = sip->max_shield_strength; } - objp->n_shield_segments = sip->num_shield_segments; - // clear the old shield data - int i; - float shield_mult; - for (i=0;ishield_quadrant[i] = 0.0f; - shield_mult = sp->ship_max_shield_strength / sip->max_shield_strength; - sp->ship_max_shield_segment[i] = sip->max_shield_segment_strength[i] * shield_mult; - shield_set_quad(objp, i, sp->ship_max_shield_segment[i] * sp->max_shield_recharge_pct); - } + shield_set_strength(objp, shield_pct * sp->ship_max_shield_strength); } // Goober5000: div-0 checks @@ -10470,7 +10398,7 @@ int ship_fire_primary_debug(object *objp) shipp->weapons.next_primary_fire_stamp[0] = timestamp(250); // Debug code! Make the single laser fire only one bolt and from the object center! - for (i=0; iexternal_model_num >= 0){ weapon_model = model_get(winfo_p->external_model_num); -// if(weapon_model->n_guns)sub_shots = weapon_model->gun_banks[0].num_slots; + // Use 0 instead of bank_to_fire as index when checking the number of external weapon model firingpoints if (weapon_model->n_guns) - sub_shots = weapon_model->gun_banks[bank_to_fire].num_slots; + sub_shots = weapon_model->gun_banks[0].num_slots; } for(int s = 0; sgun_banks[bank_to_fire].pnt[pt]; -// if(weapon_model && weapon_model->n_guns)vm_vec_add2(&pnt, &weapon_model->gun_banks[0].pnt[s]); + // Use 0 instead of bank_to_fire as index to external weapon model firingpoints if (weapon_model && weapon_model->n_guns) - vm_vec_add2(&pnt, &weapon_model->gun_banks[bank_to_fire].pnt[s]); + vm_vec_add2(&pnt, &weapon_model->gun_banks[0].pnt[s]); vm_vec_unrotate(&gun_point, &pnt, &obj->orient); vm_vec_add(&firing_pos, &gun_point, &obj->pos); @@ -11307,16 +11235,17 @@ int ship_fire_primary(object * obj, int stream_weapons, int force) dist_mult = sip->minimum_convergence_distance / dist_to_target; vm_vec_scale_add(&predicted_target_pos, &obj->pos, &plr_to_target_vec, dist_mult); } - + // setting to autoaim to converge on to the target. if (sip->aiming_flags & AIM_FLAG_AUTOAIM_CONVERGENCE) vm_vec_sub(&firing_vec, &predicted_target_pos, &firing_pos); else vm_vec_sub(&firing_vec, &predicted_target_pos, &obj->pos); + // Deactivate autoaiming if the target leaves the autoaim-FOV cone player_forward_vec = obj->orient.vec.fvec; - angle_to_target = vm_vec_delta_ang(&player_forward_vec, &firing_vec, NULL); + angle_to_target = vm_vec_delta_ang(&player_forward_vec, &plr_to_target_vec, NULL); if (angle_to_target < sip->autoaim_fov) { @@ -11327,67 +11256,67 @@ int ship_fire_primary(object * obj, int stream_weapons, int force) firing_orient = obj->orient; } } + else if ((sip->aiming_flags & AIM_FLAG_AUTO_CONVERGENCE) && (aip->target_objnum != -1)) + { + //Write automatic convergence code here! + //If set, switch to manual if automatic fails + //better idea.. mix it with the above... assume autoaim takes precedence + + // Fire weapon in target direction + vec3d target_position, target_vec; + vec3d firing_vec, player_forward_vec, convergence_offset; + float dist_to_target; + + // If a subsystem is targeted, fire in that direction instead + if (aip->targeted_subsys != NULL) + { + get_subsystem_world_pos(&Objects[aip->target_objnum], aip->targeted_subsys, &target_position); + } + else + { + target_position = Objects[aip->target_objnum].pos; + } + + dist_to_target = vm_vec_dist_quick(&target_position, &firing_pos); + + if (sip->minimum_convergence_distance > dist_to_target) + dist_to_target = sip->minimum_convergence_distance; + + player_forward_vec = obj->orient.vec.fvec; + // make sure vector is of the set length + vm_vec_copy_normalize(&target_vec, &player_forward_vec); + vm_vec_scale(&target_vec, dist_to_target); + // if there is convergence offset then make use of it) + vm_vec_unrotate(&convergence_offset, &sip->convergence_offset, &obj->orient); + vm_vec_add2(&target_vec, &convergence_offset); + vm_vec_add2(&target_vec, &obj->pos); + vm_vec_sub(&firing_vec, &target_vec, &firing_pos); + + // set orientation + vm_vector_2_matrix(&firing_orient, &firing_vec, NULL, NULL); + + } + else if (sip->aiming_flags & AIM_FLAG_STD_CONVERGENCE) + { + vec3d player_forward_vec, target_vec, firing_vec, convergence_offset; + player_forward_vec = obj->orient.vec.fvec; + // make sure vector is of the set length + vm_vec_copy_normalize(&target_vec, &player_forward_vec); + vm_vec_scale(&target_vec, sip->convergence_distance); + // if there is convergence offset then make use of it) + vm_vec_unrotate(&convergence_offset, &sip->convergence_offset, &obj->orient); + vm_vec_add2(&target_vec, &convergence_offset); + vm_vec_add2(&target_vec, &obj->pos); + vm_vec_sub(&firing_vec, &target_vec, &firing_pos); + + // set orientation + vm_vector_2_matrix(&firing_orient, &firing_vec, NULL, NULL); + } else { firing_orient = obj->orient; } } - else if ((sip->aiming_flags & AIM_FLAG_AUTO_CONVERGENCE) && (aip->target_objnum != -1)) - { - //Write automatic convergence code here! - //If set, switch to manual if automatic fails - //better idea.. mix it with the above... assume autoaim takes precedence - - // Fire weapon in target direction - vec3d target_position, target_vec; - vec3d firing_vec, player_forward_vec, convergence_offset; - float dist_to_target; - - // If a subsystem is targeted, fire in that direction instead - if (aip->targeted_subsys != NULL) - { - get_subsystem_world_pos(&Objects[aip->target_objnum], aip->targeted_subsys, &target_position); - } - else - { - target_position = Objects[aip->target_objnum].pos; - } - - dist_to_target = vm_vec_dist_quick(&target_position, &firing_pos); - - if (sip->minimum_convergence_distance > dist_to_target) - dist_to_target = sip->minimum_convergence_distance; - - player_forward_vec = obj->orient.vec.fvec; - // make sure vector is of the set length - vm_vec_copy_normalize(&target_vec, &player_forward_vec); - vm_vec_scale(&target_vec, dist_to_target); - // if there is convergence offset then make use of it) - vm_vec_unrotate(&convergence_offset, &sip->convergence_offset, &obj->orient); - vm_vec_add2(&target_vec, &convergence_offset); - vm_vec_add2(&target_vec, &obj->pos); - vm_vec_sub(&firing_vec, &target_vec, &firing_pos); - - // set orientation - vm_vector_2_matrix(&firing_orient, &firing_vec, NULL, NULL); - - } - else if (sip->aiming_flags & AIM_FLAG_STD_CONVERGENCE) - { - vec3d player_forward_vec, target_vec, firing_vec, convergence_offset; - player_forward_vec = obj->orient.vec.fvec; - // make sure vector is of the set length - vm_vec_copy_normalize(&target_vec, &player_forward_vec); - vm_vec_scale(&target_vec, sip->convergence_distance); - // if there is convergence offset then make use of it) - vm_vec_unrotate(&convergence_offset, &sip->convergence_offset, &obj->orient); - vm_vec_add2(&target_vec, &convergence_offset); - vm_vec_add2(&target_vec, &obj->pos); - vm_vec_sub(&firing_vec, &target_vec, &firing_pos); - - // set orientation - vm_vector_2_matrix(&firing_orient, &firing_vec, NULL, NULL); - } else { vec3d firing_vec; @@ -12191,7 +12120,7 @@ done_secondary: // if ( (obj->flags & OF_PLAYER_SHIP) && (swp->secondary_bank_ammo[bank] <= 0) ) { //int fire_wait = (int)(Weapon_info[weapon].fire_wait * 1000.0f); //DTP commented out, mistake, takes our current firewait time for our current weapon, it should have been our next valid weapon, but the weapon_info contains no Var for NEXT valid bank - if ( ship_select_next_valid_secondary_bank(swp) ) { //DTP here we switch to the next valid bank, but we cant call weapon_info on next fire_wait + if ( ship_select_next_valid_secondary_bank(swp) ) { //DTP here we switch to the next valid bank, but we can't call weapon_info on next fire_wait //swp->next_secondary_fire_stamp[swp->current_secondary_bank] = MAX(timestamp(250),timestamp(fire_wait)); // 1/4 second delay until can fire //DTP, Commented out mistake, here AL put the wroung firewait into the correct next_firestamp if ( timestamp_elapsed(shipp->weapons.next_secondary_fire_stamp[shipp->weapons.current_secondary_bank]) ) { //DTP, this is simply a copy of the manual cycle functions shipp->weapons.next_secondary_fire_stamp[shipp->weapons.current_secondary_bank] = timestamp(1000); //Bumped from 250 to 1000 because some people seem to be to triggerhappy :). @@ -12865,8 +12794,8 @@ void ship_model_start(object *objp) if ( (psub->subobj_num != psub->turret_gun_sobj) && (psub->turret_gun_sobj >= 0) ) { model_set_instance(model_num, psub->turret_gun_sobj, &pss->submodel_info_2 ); } - } + model_do_dumb_rotation(model_num); } //========================================================== @@ -13349,7 +13278,7 @@ float ship_calculate_rearm_duration( object *objp ) sip = &Ship_info[sp->ship_info_index]; //find out time to repair shields - shield_rep_time = ((sp->ship_max_shield_strength * sp->max_shield_recharge_pct) - shield_get_strength(objp)) / (sp->max_shield_recharge_pct * sp->ship_max_shield_strength * SHIELD_REPAIR_RATE); + shield_rep_time = (sp->ship_max_shield_strength - shield_get_strength(objp)) / (sp->ship_max_shield_strength * SHIELD_REPAIR_RATE); max_hull_repair = sp->ship_max_hull_strength * (The_mission.support_ships.max_hull_repair_val * 0.01f); //calculate hull_repair_time; @@ -13486,7 +13415,7 @@ int ship_do_rearm_frame( object *objp, float frametime ) if ( !(objp->flags & OF_NO_SHIELDS) ) { shield_str = shield_get_strength(objp); - if ( shield_str < (shipp->ship_max_shield_strength * shipp->max_shield_recharge_pct) ) { + if ( shield_str < shipp->ship_max_shield_strength ) { if ( objp == Player_obj ) { player_maybe_start_repair_sound(); } @@ -14923,11 +14852,10 @@ ship_subsys *ship_get_closest_subsys_in_sight(ship *sp, int subsys_type, vec3d * char *ship_subsys_get_name(ship_subsys *ss) { - if(strlen(ss->sub_name) > 0) { + if(strlen(ss->sub_name) > 0) return ss->sub_name; - } else { + else return ss->system_info->name; - } } bool ship_subsys_has_instance_name(ship_subsys *ss) @@ -14975,13 +14903,13 @@ float ship_quadrant_shield_strength(object *hit_objp, vec3d *hitpos) // convert hitpos to position in model coordinates vm_vec_sub(&tmpv1, hitpos, &hit_objp->pos); vm_vec_rotate(&tmpv2, &tmpv1, &hit_objp->orient); - quadrant_num = get_quadrant(&tmpv2, hit_objp); + quadrant_num = get_quadrant(&tmpv2); //nprintf(("Alan","Quadrant hit: %d\n", quadrant_num)); if ( quadrant_num < 0 ) quadrant_num = 0; - max_quadrant = get_max_shield_quad(hit_objp, quadrant_num); + max_quadrant = get_max_shield_quad(hit_objp); if ( max_quadrant <= 0 ) { return 0.0f; } @@ -15539,7 +15467,54 @@ void ship_maybe_praise_player(ship *deader_sp) Player->praise_delay_timestamp = timestamp_rand(1000, 2000); } -// player has just killed a ship, maybe offer send a 'good job' message +void ship_maybe_praise_self(ship *deader_sp, ship *killer_sp) +{ + int j; + bool wingman = false; + + if ( myrand()&10 ) { + return; + } + + if (Game_mode & GM_MULTIPLAYER) { + return; + } + + // only praise if killing an enemy so check they both attack each other! + if (!((iff_x_attacks_y(deader_sp->team, killer_sp->team)) && (iff_x_attacks_y(killer_sp->team, deader_sp->team ))) ) { + return; + } + + + // only send messages from the player's wingmen + if (killer_sp->wingnum == -1) { + return; + } + for ( j = 0; j < MAX_STARTING_WINGS; j++ ) { + if ( Starting_wings[j] == killer_sp->wingnum) { + wingman = true; + break; + } + } + + if (!wingman) { + return; + } + + // don't praise the destruction of navbuoys, cargo or other non-flyable ship types + if ( (Ship_info[deader_sp->ship_info_index].class_type > 0) && !(Ship_types[Ship_info[deader_sp->ship_info_index].class_type].message_bools & STI_MSG_PRAISE_DESTRUCTION) ) { + return; + } + + // ensure the ship isn't silenced + if ( killer_sp->flags2 & SF2_NO_BUILTIN_MESSAGES ) { + return; + } + + message_send_builtin_to_player(MESSAGE_PRAISE_SELF, killer_sp, MESSAGE_PRIORITY_HIGH, MESSAGE_TIME_SOON, 0, 0, -1, -1); + +} + #define PLAYER_ASK_HELP_INTERVAL 60000 // minimum time between praises #define PLAYER_MAX_ASK_HELP 10 // max number of warnings player can receive in a mission #define ASK_HELP_SHIELD_PERCENT 0.1 // percent shields at which ship will ask for help @@ -15811,7 +15786,7 @@ void ship_maybe_tell_about_rearm(ship *sp) { if (swp->primary_bank_ammo[i] / swp->primary_bank_start_ammo[i] < 0.3f) { - message_type = MESSAGE_REARM_REQUEST; + message_type = MESSAGE_PRIMARIES_LOW; break; } } @@ -16175,6 +16150,9 @@ void ship_page_in() ship_init_afterburners( &Ships[i] ); } + //WMC - Since this is already in-mission, ignore the warpin effect. + Ships[i].warpout_effect->pageIn(); + // don't need this one anymore, it's already been accounted for // num_subsystems_needed += Ship_info[Ships[i].ship_info_index].n_subsystems; } @@ -17000,7 +16978,12 @@ float ship_get_warpout_speed(object *objp) Assert(objp->type == OBJ_SHIP); ship_info *sip = &Ship_info[Ships[objp->instance].ship_info_index]; - if(sip->warpout_type == WT_SWEEPER) + //WMC - Any speed is good for in place anims (aka BSG FTL effect) + if(sip->warpout_type == WT_IN_PLACE_ANIM && sip->warpout_speed <= 0.0f) + { + return objp->phys_info.speed; + } + else if(sip->warpout_type == WT_SWEEPER || sip->warpout_type == WT_IN_PLACE_ANIM) { return sip->warpout_speed; } diff --git a/code/ship/ship.h b/code/ship/ship.h index 60fce895ac..66064e81a0 100644 --- a/code/ship/ship.h +++ b/code/ship/ship.h @@ -786,7 +786,7 @@ * * 66 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 65 8/02/99 10:39p Dave * Added colored shields. OoOoOoooOoo @@ -1137,7 +1137,7 @@ extern char *Turret_target_order_names[NUM_TURRET_ORDER_TYPES]; //aiturret.cpp // Goober5000 #define SSF_CARGO_REVEALED (1 << 0) #define SSF_UNTARGETABLE (1 << 1) -#define SSF_NO_SS_TARGETING (1 << 2) +#define SSF_NO_SS_TARGETING (1 << 2) // Wanderer #define SSSF_ALIVE (1 << 0) // subsystem has active alive sound @@ -1303,6 +1303,8 @@ typedef struct ship_subsys_info { #define SF2_NAVPOINT_NEEDSLINK (1<<14) // Kazan - This ship requires "linking" for autopilot (when player ship gets within specified distance SF2_NAVPOINT_NEEDSLINK is replaced by SF2_NAVPOINT_CARRY) #define SF2_HIDE_SHIP_NAME (1<<15) // Karajorma - Hides the ships name (like the -wcsaga command line used to but for any selected ship) #define SF2_AFTERBURNER_LOCKED (1<<16) // KeldorKatarn - This ship can't use its afterburners +#define SF2_SET_CLASS_DYNAMICALLY (1<<18) // Karajorma - This ship should have its class assigned rather than simply read from the mission file +#define SF2_LOCK_ALL_TURRETS_INITIALLY (1<<19) // Karajorma - Lock all turrets on this ship at mission start or on arrival // If any of these bits in the ship->flags are set, ignore this ship when targetting @@ -1313,7 +1315,7 @@ extern int TARGET_SHIP_IGNORE_FLAGS; #define NUM_SUB_EXPL_HANDLES 2 // How many different big ship sub explosion sounds can be played. #define MAX_SHIP_CONTRAILS 12 -#define MAX_MAN_THRUSTERS 32 +#define MAX_MAN_THRUSTERS 64 typedef struct ship_spark { vec3d pos; // position of spark in the submodel's RF @@ -1392,9 +1394,6 @@ typedef struct ship { float ship_max_shield_strength; float ship_max_hull_strength; - float max_shield_recharge_pct; - float ship_max_shield_segment[MAX_SHIELD_SECTIONS]; // defines the per segment maximum shield strengths - int ship_guardian_threshold; // Goober5000 - now also determines whether ship is guardian'd @@ -1595,16 +1594,16 @@ typedef struct ship { int thrusters_start[MAX_MAN_THRUSTERS]; //Timestamp of when thrusters started int thrusters_sounds[MAX_MAN_THRUSTERS]; //Sound index for thrusters - - /* +/* flash_ball *debris_flare; int n_debris_flare; float flare_life; int flare_bm; */ - int ship_iff_color[MAX_IFFS][MAX_IFFS]; + std::vector s_alt_classes; + int ship_iff_color[MAX_IFFS][MAX_IFFS]; } ship; struct ai_target_priority { @@ -1627,7 +1626,6 @@ extern std::vector Ai_tp_list; void parse_ai_target_priorities(); ai_target_priority init_ai_target_priorities(); - // structure and array def for ships that have exited the game. Keeps track of certain useful // information. #define SEF_DESTROYED (1<<0) @@ -1637,8 +1635,6 @@ ai_target_priority init_ai_target_priorities(); #define SEF_BEEN_TAGGED (1<<4) #define SEF_RED_ALERT_CARRY (1<<5) -#define MAX_EXITED_SHIPS (2*MAX_SHIPS) //DTP changed for MAX_SHIPS sake. double of max_ships. - typedef struct exited_ship { char ship_name[NAME_LENGTH]; int obj_signature; @@ -1649,11 +1645,13 @@ typedef struct exited_ship { int hull_strength; fix time_cargo_revealed; char cargo1; + float damage_ship[MAX_DAMAGE_SLOTS]; // A copy of the arrays from the ship so that we can figure out what damaged it + int damage_ship_id[MAX_DAMAGE_SLOTS]; exited_ship() { memset(this, 0, sizeof(exited_ship)); obj_signature = ship_class = -1; } } exited_ship; -extern exited_ship Ships_exited[MAX_EXITED_SHIPS]; +extern std::vector Ships_exited; // a couple of functions to get at the data extern void ship_add_exited_ship( ship *shipp, int reason ); @@ -1711,7 +1709,8 @@ extern int ship_find_exited_ship_by_signature( int signature); #define SIF2_GENERATE_HUD_ICON (1 << 5) // Enable generation of a HUD shield icon #define SIF2_DISABLE_WEAPON_DAMAGE_SCALING (1 << 6) // WMC - Disable weapon scaling based on flags #define SIF2_GUN_CONVERGENCE (1 << 7) // WMC - Gun convergence based on model weapon norms. -#define SIF2_INTRINSIC_NO_SHIELDS (1 << 8) // Chief - disables shields for this ship even without No Shields in mission. +#define SIF2_NO_THRUSTER_GEO_NOISE (1 << 8) // Echelon9 - No thruster geometry noise. +#define SIF2_INTRINSIC_NO_SHIELDS (1 << 9) // Chief - disables shields for this ship even without No Shields in mission. #define MAX_SHIP_FLAGS 8 // Number of distinct flags for flags field in ship_info struct #define SIF_DEFAULT_VALUE 0 @@ -1973,9 +1972,6 @@ typedef struct ship_info { float max_hull_strength; // Max hull strength of this class of ship. float max_shield_strength; - float max_shield_recharge; - float max_shield_segment_strength[MAX_SHIELD_SECTIONS]; - float hull_repair_rate; //How much of the hull is repaired every second float subsys_repair_rate; //How fast @@ -2054,19 +2050,17 @@ typedef struct ship_info { int num_maneuvering; man_thruster maneuvering[MAX_MAN_THRUSTERS]; - int ship_iff_info[MAX_IFFS][MAX_IFFS]; - int radar_image_2d_idx; int radar_image_size; float radar_projection_size_mult; + int ship_iff_info[MAX_IFFS][MAX_IFFS]; + int aiming_flags; float minimum_convergence_distance; float convergence_distance; vec3d convergence_offset; - int num_shield_segments; - float emp_resistance_mod; } ship_info; @@ -2363,7 +2357,7 @@ extern int ship_query_general_type(int ship); extern int ship_class_query_general_type(int ship_class); extern int ship_query_general_type(ship *shipp); extern int ship_docking_valid(int docker, int dockee); -extern int get_quadrant(vec3d *hit_pnt, object *objp); // Return quadrant num of last hit ponit. +extern int get_quadrant(vec3d *hit_pnt); // Return quadrant num of last hit ponit. extern void ship_obj_list_rebuild(); // only called by save/restore code extern int ship_query_state(char *name); @@ -2416,6 +2410,7 @@ void ship_check_cargo_all(); // called from game_simulation_frame void ship_maybe_warn_player(ship *enemy_sp, float dist); void ship_maybe_praise_player(ship *deader_sp); +void ship_maybe_praise_self(ship *deader_sp, ship *killer_sp); void ship_maybe_ask_for_help(ship *sp); void ship_scream(ship *sp); void ship_maybe_scream(ship *sp); @@ -2467,7 +2462,6 @@ int object_in_turret_fov(object *objp, ship_subsys *ss, vec3d *tvec, vec3d *tpos bool turret_std_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod = 0); bool turret_adv_fov_test(ship_subsys *ss, vec3d *gvec, vec3d *v2e, float size_mod = 0); - // forcible jettison cargo from a ship void object_jettison_cargo(object *objp, object *cargo_objp); diff --git a/code/ship/shipfx.cpp b/code/ship/shipfx.cpp index f795166e4e..a25c8b45bc 100644 --- a/code/ship/shipfx.cpp +++ b/code/ship/shipfx.cpp @@ -373,7 +373,7 @@ * larger fireballs * * 47 9/05/99 11:10a Andsager - * Fix up which split ship get debris pieces. Dont render debris pieces + * Fix up which split ship get debris pieces. Don't render debris pieces * for split ships until they are near clip plane. * * 46 9/02/99 12:55a Mikek @@ -405,7 +405,7 @@ * * 37 8/13/99 10:49a Andsager * Knossos and HUGE ship warp out. HUGE ship warp in. Stealth search - * modes dont collide big ships. + * modes don't collide big ships. * * 36 8/05/99 2:06a Dave * Whee. @@ -1080,7 +1080,6 @@ void shipfx_warpin_start( object *objp ) { //float effect_time, effect_radius; ship *shipp = &Ships[objp->instance]; - ship_info *sip = &Ship_info[shipp->ship_info_index]; if (shipp->flags & SF_ARRIVING) { @@ -1251,7 +1250,6 @@ void shipfx_warpin_frame( object *objp, float frametime ) ship *shipp; shipp = &Ships[objp->instance]; - ship_info *sip = &Ship_info[shipp->ship_info_index]; if ( shipp->flags & SF_DYING ) return; @@ -1439,7 +1437,9 @@ int compute_special_warpout_stuff(object *objp, float *speed, float *warp_time, *warp_time = shipfx_calculate_warp_time(objp, WD_WARP_OUT); // Calculate speed to fly through - *speed = shipfx_calculate_warp_dist(objp) / *warp_time; + //*speed = shipfx_calculate_warp_dist(objp) / *warp_time; + //WMC - use the function + *speed = ship_get_warpout_speed(objp); // increase time, because we have extra distance to cover *warp_time += dist_to_plane / *speed; @@ -1471,7 +1471,9 @@ void compute_warpout_stuff(object *objp, float *speed, float *warp_time, vec3d * *warp_time = shipfx_calculate_warp_time(objp, WD_WARP_OUT); // Pick some speed at which we want to go through the warp effect. - *speed = shipfx_calculate_warp_dist(objp) / *warp_time; + //*speed = shipfx_calculate_warp_dist(objp) / *warp_time; + //WMC - Use the function + *speed = ship_get_warpout_speed(objp); if ( objp == Player_obj ) { // Goober5000 - cap at 65 @@ -1484,7 +1486,8 @@ void compute_warpout_stuff(object *objp, float *speed, float *warp_time, vec3d * else { polymodel *pm = model_get(sip->model_num); - vm_vec_add(¢er_pos,&objp->pos,&pm->autocenter); + vm_vec_unrotate(¢er_pos, &pm->autocenter, &objp->orient); + vm_vec_add2(¢er_pos,&objp->pos); } @@ -1537,7 +1540,6 @@ void shipfx_warpout_start( object *objp ) //float warp_time; ship *shipp; shipp = &Ships[objp->instance]; - ship_info *sip = &Ship_info[shipp->ship_info_index]; if ( shipp->flags & SF_DEPART_WARP ) { mprintf(( "Ship is already departing!\n" )); @@ -1718,7 +1720,6 @@ void shipfx_warpout_frame( object *objp, float frametime ) { ship *shipp; shipp = &Ships[objp->instance]; - ship_info *sip = &Ship_info[shipp->ship_info_index]; if ( shipp->flags & SF_DYING ) return; @@ -2323,19 +2324,13 @@ void shipfx_emit_spark( int n, int sn ) // // phreak: Mantis 1676 - Re-enable warpout clipping. - if ( ((shipp->flags & SF_ARRIVING) && (shipp->warpin_effect != NULL)) - || ((shipp->flags & SF_DEPART_WARP) && (shipp->warpout_effect != NULL)) ) + if ((shipp->flags & (SF_ARRIVING|SF_DEPART_WARP)) && (shipp->warpout_effect)) { vec3d warp_pnt, tmp; matrix warp_orient; - if (shipp->flags & SF_ARRIVING) { - shipp->warpin_effect->getWarpPosition(&warp_pnt); - shipp->warpin_effect->getWarpOrientation(&warp_orient); - } else { - shipp->warpout_effect->getWarpPosition(&warp_pnt); - shipp->warpout_effect->getWarpOrientation(&warp_orient); - } + shipp->warpout_effect->getWarpPosition(&warp_pnt); + shipp->warpout_effect->getWarpOrientation(&warp_orient); vm_vec_sub( &tmp, &outpnt, &warp_pnt ); @@ -3904,7 +3899,7 @@ void shipfx_cloak_frame(ship *shipp, float frametime) if (get_hull_pct(obj) < .2f) { shipfx_stop_cloak(shipp,25000); - break; //dont need to calc alpha + break; //don't need to calc alpha } shipp->cloak_alpha = fl2i(shipfx_calc_visibility(obj, &Eye_position) * 255.0f); @@ -4278,9 +4273,19 @@ bool WarpEffect::isValid() return true; } +void WarpEffect::pageIn() +{ +} +void WarpEffect::pageOut() +{ +} + int WarpEffect::warpStart() { - return 0; + if(!this->isValid()) + return 0; + + return 1; } int WarpEffect::warpFrame(float frametime) @@ -4630,7 +4635,7 @@ int WE_Default::getWarpOrientation(matrix* output) return 0; } - vm_vector_2_matrix(output, &fvec, NULL, NULL); + vm_vector_2_matrix(output, &objp->orient.vec.fvec, NULL, NULL); return 1; } @@ -4638,53 +4643,188 @@ int WE_Default::getWarpOrientation(matrix* output) WE_BTRL::WE_BTRL(object *n_objp, int n_direction) :WarpEffect(n_objp, n_direction) { - //Set radius - anim = bm_load_either(sip->warpin_anim, &anim_nframes, &anim_fps, 1); + //Zero animation and such + anim = shockwave = -1; + anim_fps = shockwave_fps = 0; + anim_nframes = shockwave_nframes = 0; + anim_total_time = shockwave_total_time = 0; - int total_time = fl2i(((float)anim_nframes / (float)anim_fps) * 1000.0f); - stage = 0; - stage_duration[0] = 0; - stage_duration[1] = sip->warpin_time; - stage_duration[2] = total_time - sip->warpin_time; - - batcher.allocate(1); - radius_full = 0.0f; + //Setup anim name + char tmp_name[MAX_FILENAME_LEN]; + memset(tmp_name, 0, MAX_FILENAME_LEN); if(direction == WD_WARP_IN) - radius_full = sip->warpin_radius; + strncpy(tmp_name, sip->warpin_anim, MAX_FILENAME_LEN-1); else if(direction == WD_WARP_OUT) - radius_full = sip->warpout_radius; - if(radius_full <= 0.0f) - radius_full = objp->radius; + strncpy(tmp_name, sip->warpout_anim, MAX_FILENAME_LEN-1); + strlwr(tmp_name); + if(strlen(tmp_name)) + { + //Load anim + anim = bm_load_either(tmp_name, &anim_nframes, &anim_fps, 1); + if(anim > -1) + { + anim_total_time = fl2i(((float)anim_nframes / (float)anim_fps) * 1000.0f); + } + + //Setup shockwave name + strncat(tmp_name, "-shockwave", MAX_FILENAME_LEN-1); + + //Load shockwave + shockwave = bm_load_either(tmp_name, &shockwave_nframes, &shockwave_fps, 1); + if(shockwave > -1) + { + shockwave_total_time = fl2i(((float)shockwave_nframes / (float)shockwave_fps) * 1000.0f); + } + } + //Set radius + tube_radius = 0.0f; + if(direction == WD_WARP_IN) + tube_radius = sip->warpin_radius; + else + tube_radius = sip->warpout_radius; + + polymodel *pm = model_get(sip->model_num); + if(pm == NULL) + { + autocenter = vmd_zero_vector; + z_offset_max = objp->radius; + z_offset_min = -objp->radius; + + if(tube_radius <= 0.0f) + tube_radius = objp->radius; + } + else + { + //Autogenerate everything from ship dimensions + if(tube_radius <= 0.0f) + tube_radius = MAX((pm->maxs.xyz.y - pm->mins.xyz.y), (pm->maxs.xyz.x - pm->mins.xyz.x))/2.0f; + autocenter = pm->autocenter; + z_offset_max = pm->maxs.xyz.z - pm->autocenter.xyz.z; + z_offset_min = pm->mins.xyz.z - pm->autocenter.xyz.z; + } + + //*****Timing + stage = -1; + if(direction == WD_WARP_IN) + { + stage_duration[0] = sip->warpin_time; + stage_duration[1] = MAX(anim_total_time - sip->warpin_time, shockwave_total_time); + } + else + { + stage_duration[0] = sip->warpout_time; + stage_duration[1] = MAX(anim_total_time - sip->warpout_time, shockwave_total_time); + } stage_time_start = stage_time_end = total_time_start = total_time_end = timestamp(); + + //*****Graphics + batcher.allocate(1); + + //*****Sound + snd_range_factor = 1.0f; + snd_start = snd_end = -1; + snd_start_gs = snd_end_gs = NULL; + + //*****Instance + pos = vmd_zero_vector; } WE_BTRL::~WE_BTRL() { if(anim > -1) bm_unload(anim); + if(shockwave > -1) + bm_unload(shockwave); +} + +void WE_BTRL::pageIn() +{ + if(anim > -1) + bm_page_in_texture(anim); + if(shockwave > -1) + bm_page_in_texture(shockwave); } int WE_BTRL::warpStart() { - if(!this->isValid()) + if(!WarpEffect::warpStart()) return 0; //WMC - bail - if (anim < 0) + if (anim < 0 && shockwave < 0) { this->warpEnd(); return 0; } - stage = 1; - total_time_start = timestamp(); - int total_duration = fl2i(((float)anim_nframes / (float)anim_fps) * 1000.0f); - total_time_end = timestamp(total_duration); - stage_time_start = total_time_start; - stage_time_end = timestamp(stage_duration[1]); + //WMC - If object is docked now, update data: + if(object_is_docked(objp)) + { + z_offset_max = dock_calc_max_semilatus_rectum_parallel_to_axis(objp, Z_AXIS); + z_offset_min = -z_offset_max; + if(tube_radius <= 0.0f) + { + float x_radius = dock_calc_max_semilatus_rectum_parallel_to_axis(objp, X_AXIS); + float y_radius = dock_calc_max_semilatus_rectum_parallel_to_axis(objp, Y_AXIS); + tube_radius = MAX(x_radius, y_radius); + } - shipp->flags |= SF_ARRIVING_STAGE_1; + vec3d dock_center; + dock_calc_docked_center(&dock_center, objp); + vm_vec_sub(&autocenter, &dock_center, &objp->pos); + } + + if(direction == WD_WARP_IN) + shipp->flags |= SF_ARRIVING_STAGE_1; + else + shipp->flags |= SF_DEPART_WARP; + + //*****Sound + int gs_start_index = -1; + int gs_end_index = -1; + if(direction == WD_WARP_IN) + { + shipp->flags |= SF_ARRIVING_STAGE_1; + gs_start_index = sip->warpin_snd_start; + gs_end_index = sip->warpin_snd_end; + } + else if(direction == WD_WARP_OUT) + { + shipp->flags |= SF_DEPART_WARP; + gs_start_index = sip->warpout_snd_start; + gs_end_index = sip->warpout_snd_end; + } + else + { + this->warpEnd(); + return 0; + } + + //Base is 100m long/diameter ship + //WMC - Leave this as 1.0f + //snd_range_factor = objp->radius / 50.0f; + if(gs_start_index > -1) + { + snd_start_gs = &Snds[gs_start_index]; + snd_start = snd_play_3d(snd_start_gs, &objp->pos, &View_position, 0.0f, NULL, 0, 1, SND_PRIORITY_SINGLE_INSTANCE, NULL, snd_range_factor); + } + if(gs_end_index > -1) + { + snd_end_gs = &Snds[gs_end_index]; + snd_end = -1; + } + + stage = 0; + int total_duration = 0; + for(int i = 0; i < WE_BTRL_NUM_STAGES; i++) + total_duration += stage_duration[i]; + + total_time_start = timestamp(); + total_time_end = timestamp(total_duration); + + stage_time_start = total_time_start; + stage_time_end = timestamp(stage_duration[stage]); return 1; } @@ -4694,27 +4834,60 @@ int WE_BTRL::warpFrame(float frametime) if(!this->isValid()) return 0; - if (stage == 1 && timestamp_elapsed(stage_time_end )) + while( timestamp_elapsed(stage_time_end )) { - objp->phys_info.flags |= PF_WARP_IN; - shipp->flags &= (~SF_ARRIVING_STAGE_1); - shipp->flags |= SF_ARRIVING_STAGE_2; + stage++; + if(stage < WE_BTRL_NUM_STAGES) + { + stage_time_start = timestamp(); + stage_time_end = timestamp(stage_duration[stage]); + } + switch(stage) + { + case 1: + if(direction == WD_WARP_IN) + { + //objp->phys_info.flags |= PF_WARP_IN; + shipp->flags &= (~SF_ARRIVING_STAGE_1); + shipp->flags |= SF_ARRIVING_STAGE_2; + } + break; + default: + this->warpEnd(); + return 0; + } + } - stage = 2; - stage_time_start = timestamp(); - stage_time_end = timestamp(stage_duration[2]); - } - if(stage == 2 && timestamp_elapsed(stage_time_end)) + switch(stage) { - this->warpEnd(); + case 0: + case 1: + vm_vec_unrotate(&pos, &autocenter, &objp->orient); + vm_vec_add2(&pos, &objp->pos); + break; + default: + this->warpEnd(); + return 0; } + if(snd_start > -1) + snd_update_3d_pos(snd_start, snd_start_gs, &objp->pos, 0.0f, snd_range_factor); + return 1; } int WE_BTRL::warpShipClip() { - return 0; + if(!this->isValid()) + return 0; + + if(direction == WD_WARP_OUT && stage > 0) + { + vec3d pos; + vm_vec_scale_add(&pos, &objp->pos, &objp->orient.vec.fvec, objp->radius); + g3_start_user_clip_plane( &pos, &objp->orient.vec.fvec ); + } + return 1; } int WE_BTRL::warpShipRender() @@ -4722,38 +4895,106 @@ int WE_BTRL::warpShipRender() if(!this->isValid()) return 0; - if(anim < 0) + if(anim < 0 && shockwave < 0) return 0; - //Figure out which frame we're on - int frame = fl2i((float)((float)(timestamp() - (float)total_time_start) / (float)(total_time_end - (float)total_time_start)) * (float)(anim_nframes-1) + 0.5); - - if ( frame > (anim_nframes-1) ) { - //frame = (anim_nframes-1); - return 1; - } - - //Set the correct frame - gr_set_bitmap(anim + frame, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f); - - //Do warpout geometry - vec3d start, end; - vm_vec_scale_add(&start, &objp->pos, &objp->orient.vec.fvec, radius_full); - vm_vec_scale_add(&end, &objp->pos, &objp->orient.vec.fvec, -radius_full); - batcher.draw_beam(&start, &end, radius_full*2.0f, 1.0f); - // turn off zbuffering int saved_zbuffer_mode = gr_zbuffer_get(); - gr_zbuffer_set(GR_ZBUFF_NONE); + gr_zbuffer_set(GR_ZBUFF_NONE); - //Render the warpout effect - batcher.render(TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT | TMAP_HTL_3D_UNLIT); + if(anim > -1) + { + //Figure out which frame we're on + //int anim_frame = fl2i( (((float)timestamp() - (float)total_time_start) / ((float) anim_total_time)) * (float)(anim_nframes-1) + 0.5f); + int anim_frame = fl2i( ((float)(timestamp() - total_time_start)/1000.0f) * (float)anim_fps); + + if ( anim_frame < anim_nframes ) + { + //Set the correct frame + gr_set_bitmap(anim + anim_frame, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f); + + //Do warpout geometry + vec3d start, end; + vm_vec_scale_add(&start, &pos, &objp->orient.vec.fvec, z_offset_min); + vm_vec_scale_add(&end, &pos, &objp->orient.vec.fvec, z_offset_max); + + //vm_vec_scale_add(&start, &objp->pos, &objp->orient.vec.fvec, z_offset_min); + //vm_vec_scale_add(&end, &objp->pos, &objp->orient.vec.fvec, z_offset_max); + + batcher.draw_beam(&start, &end, tube_radius*2.0f, 1.0f); + + //Render the warpout effect + batcher.render(TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TEXTURED | TMAP_FLAG_CORRECT | TMAP_HTL_3D_UNLIT); + } + } + + if(stage == 1 && shockwave > -1) + { + //int shockwave_frame = fl2i( (((float)timestamp() - (float)stage_time_start) / ((float) shockwave_total_time)) * (float)(shockwave_nframes-1) + 0.5f); + int shockwave_frame = fl2i( ((float)(timestamp() - stage_time_start)/1000.0f) * (float)shockwave_fps); + + if(shockwave_frame < shockwave_nframes) + { + vertex p; + //vm_vec_scale_add(&pos, &objp->pos, &objp->orient.vec.fvec, (z_offset_max - z_offset_min)/2.0f); + extern int Cmdline_nohtl; + if(Cmdline_nohtl) { + g3_rotate_vertex(&p, &pos ); + }else{ + g3_transfer_vertex(&p, &pos); + } + gr_set_bitmap(shockwave + shockwave_frame, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f ); + g3_draw_bitmap(&p, 0, objp->radius, TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT ); + } + } // restore zbuffer mode gr_zbuffer_set(saved_zbuffer_mode); return 1; } +int WE_BTRL::warpEnd() +{ + if(snd_start > -1) + snd_stop(snd_start); + if(snd_end_gs != NULL) + snd_end = snd_play_3d(snd_end_gs, &objp->pos, &View_position, 0.0f, NULL, 0, 1.0f, SND_PRIORITY_SINGLE_INSTANCE, NULL, snd_range_factor); + + return WarpEffect::warpEnd(); +} + +//WMC - These two functions are used to fool collision detection code +//And do player warpout +int WE_BTRL::getWarpPosition(vec3d *output) +{ + if(!this->isValid()) + return 0; + + vec3d pos; + if(direction == WD_WARP_OUT && stage > 0) + { + vm_vec_scale_add(&pos, &objp->pos, &objp->orient.vec.fvec, objp->radius); + } + else + { + vm_vec_scale_add(&pos, &objp->pos, &objp->orient.vec.fvec, objp->radius); + } + + *output = pos; + return 1; +} + +int WE_BTRL::getWarpOrientation(matrix* output) +{ + if (!this->isValid()) + { + return 0; + } + + vm_vector_2_matrix(output, &objp->orient.vec.fvec, NULL, NULL); + return 1; +} + //********************-----CLASS: WE_Homeworld-----********************// WE_Homeworld::WE_Homeworld(object *n_objp, int n_direction) :WarpEffect(n_objp, n_direction) @@ -5026,7 +5267,7 @@ WE_Hyperspace::WE_Hyperspace(object *n_objp, int n_direction) total_time_start = total_time_end = timestamp(); pos_final = vmd_zero_vector; - scale_factor = 50.0f * objp->radius; + scale_factor = 750.0f * objp->radius; } int WE_Hyperspace::warpStart() diff --git a/code/ship/shipfx.h b/code/ship/shipfx.h index 24c1c0df84..44d11fa612 100644 --- a/code/ship/shipfx.h +++ b/code/ship/shipfx.h @@ -325,6 +325,9 @@ public: void clear(); bool isValid(); + virtual void pageIn(); + virtual void pageOut(); + virtual int warpStart(); virtual int warpFrame(float frametime); virtual int warpShipClip(); @@ -388,23 +391,47 @@ private: int stage_time_end; // pops when ship is completely warped out or warped in. Used for both warp in and out. //Data "storage" - int stage_duration[WE_BTRL_NUM_STAGES+1]; + int stage_duration[WE_BTRL_NUM_STAGES]; //anim int anim; int anim_nframes; int anim_fps; + int anim_total_time; + int shockwave; + int shockwave_nframes; + int shockwave_fps; + int shockwave_total_time; geometry_batcher batcher; - float radius_full; + vec3d autocenter; + float z_offset_max; + float z_offset_min; + float tube_radius; + + //*****Per-instance + vec3d pos; + //Sound + float snd_range_factor; + int snd_start; + struct game_snd *snd_start_gs; + int snd_end; + struct game_snd *snd_end_gs; + public: WE_BTRL(object *n_objp, int n_direction); ~WE_BTRL(); - int warpStart(); - int warpFrame(float frametime); - int warpShipClip(); - int warpShipRender(); + virtual void pageIn(); + + virtual int warpStart(); + virtual int warpFrame(float frametime); + virtual int warpShipClip(); + virtual int warpShipRender(); + virtual int warpEnd(); + + virtual int getWarpPosition(vec3d *output); + virtual int getWarpOrientation(matrix *output); }; //********************-----CLASS: WE_Homeworld-----********************// diff --git a/code/ship/shiphit.cpp b/code/ship/shiphit.cpp index 54c3c4791c..a05ddc0a59 100644 --- a/code/ship/shiphit.cpp +++ b/code/ship/shiphit.cpp @@ -827,7 +827,7 @@ void do_subobj_destroyed_stuff( ship *ship_p, ship_subsys *subsys, vec3d* hitpos vec3d temp_vec, center_to_subsys, rand_vec; vm_vec_sub(¢er_to_subsys, &g_subobj_pos, &objp->pos); - for (int i=0; iinstance]; @@ -2187,18 +2188,18 @@ void ship_hit_kill(object *ship_obj, object *other_obj, float percent_killed, in // single player and multiplayer masters evaluate the scoring and kill stuff if ( !MULTIPLAYER_CLIENT && !(Game_mode & GM_DEMO_PLAYBACK)) { - scoring_eval_kill( ship_obj ); + killer_index = scoring_eval_kill( ship_obj ); // ship is destroyed -- send this event to the mission log stuff to record this event. Try to find who // killed this ship. scoring_eval_kill above should leave the obj signature of the ship who killed // this guy (or a -1 if no one got the kill). killer_ship_name = NULL; killer_damage_percent = -1; - if ( sp->damage_ship_id[0] != -1 ) { + if ( killer_index >= 0 ) { object *objp; int sig; - sig = sp->damage_ship_id[0]; + sig = sp->damage_ship_id[killer_index]; for ( objp = GET_FIRST(&obj_used_list); objp != END_OF_LIST(&obj_used_list); objp = GET_NEXT(objp) ) { if ( objp->signature == sig ){ break; @@ -2218,7 +2219,7 @@ void ship_hit_kill(object *ship_obj, object *other_obj, float percent_killed, in killer_ship_name = Ships_exited[ei].ship_name; } } - killer_damage_percent = (int)(sp->damage_ship[0] * 100.0f); + killer_damage_percent = (int)(sp->damage_ship[killer_index]/sp->total_damage_received * 100.0f); } if(!self_destruct){ @@ -2262,8 +2263,13 @@ void ship_hit_kill(object *ship_obj, object *other_obj, float percent_killed, in } // maybe praise the player for this kill - if ( (killer_damage_percent > 10) && (other_obj != NULL) && (other_obj->parent_sig == Player_obj->signature) ) { - ship_maybe_praise_player(sp); + if ( (killer_damage_percent > 10) && (other_obj != NULL) ) { + if (other_obj->parent_sig == Player_obj->signature) { + ship_maybe_praise_player(sp); + } + else if ((other_obj->parent_type == OBJ_SHIP) || (other_obj->parent_type == OBJ_START)) { + ship_maybe_praise_self(sp, &Ships[Objects[other_obj->parent].instance]); + } } } @@ -2776,7 +2782,8 @@ static void ship_do_damage(object *ship_obj, object *other_obj, vec3d *hitpos, f if (bobjn >= 0) { if ( !(The_mission.ai_profile->flags & AIPF_INCLUDE_BEAMS_IN_STAT_CALCS) && - !(Ship_info[Ships[Objects[bobjn].instance].ship_info_index].flags & (SIF_FIGHTER | SIF_BOMBER)) ) { + !(Ship_info[Ships[Objects[bobjn].instance].ship_info_index].flags & (SIF_FIGHTER | SIF_BOMBER)) && + !(Objects[bobjn].flags & OF_PLAYER_SHIP) ) { bobjn = -1; } } @@ -3032,7 +3039,7 @@ void ship_apply_global_damage(object *ship_obj, object *other_obj, vec3d *force_ vm_vec_rotate( &local_hitpos, &tmp, &ship_obj->orient ); // shield_quad = quadrant facing the force_center - shield_quad = get_quadrant(&local_hitpos, ship_obj); + shield_quad = get_quadrant(&local_hitpos); // world_hitpos use force_center for shockwave // Goober5000 check for NULL @@ -3049,20 +3056,8 @@ void ship_apply_global_damage(object *ship_obj, object *other_obj, vec3d *force_ // radius of the object. vm_vec_scale_add( &world_hitpos, &ship_obj->pos, &ship_obj->orient.vec.fvec, ship_obj->radius ); - int n_shd_sections; - switch (ship_obj->n_shield_segments) { - case 1: - n_shd_sections = 1; - break; - case 2: - n_shd_sections = 2; - break; - default: - n_shd_sections = MAX_SHIELD_SECTIONS; - break; - } - for (int i=0; ipProperties->vValue.ulVal; int shipNum = pElements->pProperties->pNextSibling->vValue.ulVal; - // Cant issue commands to yourself - if(wingType == 0 && shipNum == 1) - { - break; - } - - char shipName[20]; + char shipName[NAME_LENGTH]; sprintf(shipName,"%s %d", wing_names[wingType], shipNum); Msg_instance = ship_name_lookup(shipName); - if (Msg_instance < 0) + + // Can't issue commands to yourself or to nobody + if(Msg_instance < 0 || Msg_instance == Player_obj->instance) + { break; + } if(!(Player->flags & PLAYER_FLAGS_MSG_MODE)) { @@ -297,12 +295,12 @@ void VOICEREC_execute_command(ISpPhrase *pPhrase, HWND hWnd) else if(Squad_msg_mode == SM_MODE_SHIP_COMMAND) { // nprintf(("warning", "VOICER msg ship %d\n", Msg_instance)); - hud_squadmsg_send_ship_command( Msg_instance, Msg_shortcut_command, true, 1 ); + hud_squadmsg_send_ship_command( Msg_instance, Msg_shortcut_command, 1 ); } else if(Squad_msg_mode == SM_MODE_WING_COMMAND) { // nprintf(("warning", "VOICER msg wing %d\n", Msg_instance)); - hud_squadmsg_send_wing_command( Msg_instance, Msg_shortcut_command, true 1 ); + hud_squadmsg_send_wing_command( Msg_instance, Msg_shortcut_command, 1 ); } else if(Squad_msg_mode == SM_MODE_REINFORCEMENTS ) { diff --git a/code/species_defs/species_defs.cpp b/code/species_defs/species_defs.cpp index d1e15bf59e..2efee5006c 100644 --- a/code/species_defs/species_defs.cpp +++ b/code/species_defs/species_defs.cpp @@ -362,11 +362,11 @@ void parse_species_tbl(char *filename) stuff_string(temp_name, F_NAME, NAME_LENGTH); // search for it in iffs - for (int i = 0; i < Num_iffs; i++) + for (int iLoop = 0; iLoop < Num_iffs; iLoop++) { - if (!stricmp(Iff_info[i].iff_name, temp_name)) + if (!stricmp(Iff_info[iLoop].iff_name, temp_name)) { - species->default_iff = i; + species->default_iff = iLoop; iff_found = true; } } diff --git a/code/starfield/starfield.cpp b/code/starfield/starfield.cpp index 97f2d26b97..96ed85ac5c 100644 --- a/code/starfield/starfield.cpp +++ b/code/starfield/starfield.cpp @@ -738,6 +738,7 @@ int stars_debris_loaded = 0; // 0 = not loaded, 1 = normal vclips, 2 = nebula vc // background data int Stars_background_inited = 0; // if we're inited int Nmodel_num = -1; // model num +int Nmodel_flags = DEFAULT_NMODEL_FLAGS; // model flags int Nmodel_bitmap = -1; // model texture int Num_debris_normal = 0; @@ -1463,7 +1464,7 @@ void stars_post_level_init() ubyte red,green,blue,alpha; - stars_set_background_model(The_mission.skybox_model, NULL); + stars_set_background_model(The_mission.skybox_model, NULL, The_mission.skybox_flags); stars_load_debris( ((The_mission.flags & MISSION_FLAG_FULLNEB) || Nebula_sexp_used) ); @@ -2906,27 +2907,27 @@ void stars_page_in() // background nebula models and planets void stars_draw_background() { - int flags = MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT | MR_NO_LIGHTING; - if (Nmodel_num < 0) return; if (Nmodel_bitmap >= 0) { model_set_forced_texture(Nmodel_bitmap); - flags |= MR_FORCE_TEXTURE; + Nmodel_flags |= MR_FORCE_TEXTURE; } // draw the model at the player's eye with no z-buffering model_set_alpha(1.0f); - model_render(Nmodel_num, &vmd_identity_matrix, &Eye_position, flags); + model_render(Nmodel_num, &vmd_identity_matrix, &Eye_position, Nmodel_flags); - if (Nmodel_bitmap >= 0) + if (Nmodel_bitmap >= 0) { model_set_forced_texture(-1); + Nmodel_flags &= !MR_FORCE_TEXTURE; + } } // call this to set a specific model as the background model -void stars_set_background_model(char *model_name, char *texture_name) +void stars_set_background_model(char *model_name, char *texture_name, int flags) { if (Nmodel_bitmap >= 0) { bm_unload(Nmodel_bitmap); @@ -2938,6 +2939,8 @@ void stars_set_background_model(char *model_name, char *texture_name) Nmodel_num = -1; } + Nmodel_flags = flags; + if ( (model_name == NULL) || (*model_name == '\0') ) return; diff --git a/code/starfield/starfield.h b/code/starfield/starfield.h index 4c18f3a60c..1f0157d883 100644 --- a/code/starfield/starfield.h +++ b/code/starfield/starfield.h @@ -204,9 +204,12 @@ #include "globalincs/globals.h" #include "globalincs/pstypes.h" #include "graphics/2d.h" +#include "model/model.h" #include +#define DEFAULT_NMODEL_FLAGS (MR_NO_ZBUFFER | MR_NO_CULL | MR_ALL_XPARENT | MR_NO_LIGHTING) + #define MAX_STARFIELD_BITMAP_LISTS 1 #define MAX_ASTEROID_FIELDS 4 @@ -233,6 +236,7 @@ typedef struct background_t { extern int Num_backgrounds; extern int Cur_background; extern background_t Backgrounds[MAX_BACKGROUNDS]; +extern int Nmodel_flags; extern bool Dynamic_environment; @@ -297,7 +301,7 @@ void stars_draw_sun_glow(int sun_n); void stars_camera_cut(); // call this to set a specific model as the background model -void stars_set_background_model(char *model_name, char *texture_name); +void stars_set_background_model(char *model_name, char *texture_name, int flags = DEFAULT_NMODEL_FLAGS); // lookup a starfield bitmap, return index or -1 on fail int stars_find_bitmap(char *name); diff --git a/code/stats/medals.cpp b/code/stats/medals.cpp index 1f96016dda..88391c43ff 100644 --- a/code/stats/medals.cpp +++ b/code/stats/medals.cpp @@ -728,7 +728,7 @@ void blit_label(char *label, int *coords, int num) gr_set_color_fast(&Color_bright); // translate medal names before displaying - // cant translate in table cuz the names are used in comparisons + // can't translate in table cuz the names are used in comparisons if (Lcl_gr) { char translated_label[256]; strncpy(translated_label, label, 256); @@ -954,7 +954,7 @@ void blit_medals() } } - // now blit rank, since that "medal" doesnt get loaded (or drawn) the normal way + // now blit rank, since that "medal" doesn't get loaded (or drawn) the normal way gr_set_bitmap(Rank_bm); gr_bitmap(Medal_coords[gr_screen.res][RANK_MEDAL_REGION][0], Medal_coords[gr_screen.res][RANK_MEDAL_REGION][1]); } diff --git a/code/stats/scoring.cpp b/code/stats/scoring.cpp index 0ad2c20764..76e0160194 100644 --- a/code/stats/scoring.cpp +++ b/code/stats/scoring.cpp @@ -75,7 +75,7 @@ * and posably fixed Turnsky's shinemap bug * * Revision 2.2 2003/01/27 01:12:15 DTP - * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. + * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still can't join. narrowing it down. * * Revision 2.1 2002/08/01 01:41:10 penguin * The big include file move @@ -802,7 +802,7 @@ void scoring_add_damage(object *ship_obj,object *other_obj,float damage) char Scoring_debug_text[4096]; // evaluate a kill on a ship -void scoring_eval_kill(object *ship_obj) +int scoring_eval_kill(object *ship_obj) { float max_damage_pct; // the pct% of total damage the max damage object did int max_damage_index; // the index into the dying ship's damage_ship[] array corresponding the greatest amount of damage @@ -819,15 +819,15 @@ void scoring_eval_kill(object *ship_obj) // multiplayer clients bail here if(MULTIPLAYER_CLIENT){ - return; + return -1; } // we don't evaluate kills on anything except ships if(ship_obj->type != OBJ_SHIP){ - return; + return -1; } if((ship_obj->instance < 0) || (ship_obj->instance >= MAX_SHIPS)){ - return; + return -1; } // assign the dead ship @@ -850,10 +850,7 @@ void scoring_eval_kill(object *ship_obj) // if this ship doesn't show up on player sensors, then don't eval a kill if ( dead_ship->flags & SF_HIDDEN_FROM_SENSORS ){ - // make sure to set invalid killer id numbers - dead_ship->damage_ship_id[0] = -1; - dead_ship->damage_ship[0] = -1.0f; - return; + return -1; } #ifndef NDEBUG @@ -886,7 +883,7 @@ void scoring_eval_kill(object *ship_obj) // doh if((max_damage_index < 0) || (max_damage_index >= MAX_DAMAGE_SLOTS)){ - return; + return -1; } // the pct of total damage applied to this ship @@ -933,7 +930,7 @@ void scoring_eval_kill(object *ship_obj) // bogus if((plr->objnum < 0) || (plr->objnum >= MAX_OBJECTS)){ - return; + return -1; } // get the ship info index of the ship type of this kill. we need to take ship @@ -1002,7 +999,7 @@ void scoring_eval_kill(object *ship_obj) if (!(Netgame.type_flags & NG_TYPE_DOGFIGHT) && (Ship_info[dead_ship->ship_info_index].flags & (SIF_BIG_SHIP | SIF_HUGE_SHIP))) { for (idx=0; idxp_info.team) && (&Net_players[idx] != net_plr)) { - assist_score = (int)(dead_ship->score * scoring_get_scale_factor() * The_mission.ai_profile->assist_award_percentage_scale[Game_skill_level]); + assist_score = (int)(dead_ship->score * The_mission.ai_profile->assist_award_percentage_scale[Game_skill_level]); Net_players[idx].m_player->stats.m_score += assist_score; #ifdef SCORING_DEBUG @@ -1056,10 +1053,6 @@ void scoring_eval_kill(object *ship_obj) // get credit for an assist scoring_eval_assists(dead_ship,killer_sig, is_enemy_player); - // bash damage_ship_id[0] with the signature of the guy who is getting credit for the kill - dead_ship->damage_ship_id[0] = killer_sig; - dead_ship->damage_ship[0] = max_damage_pct; - #ifdef SCORING_DEBUG if (Game_mode & GM_MULTIPLAYER) { @@ -1086,6 +1079,7 @@ void scoring_eval_kill(object *ship_obj) } #endif + return max_damage_index; } // kill_id is the object signature of the guy who got the credit for the kill (may be -1, if no one got it) diff --git a/code/stats/scoring.h b/code/stats/scoring.h index eff227a854..7ea4c272bd 100644 --- a/code/stats/scoring.h +++ b/code/stats/scoring.h @@ -37,7 +37,7 @@ * --Goober5000 * * Revision 2.2 2003/01/27 00:51:08 DTP - * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still cant join. narrowing it down. + * Part of bumping MAX_SHIPS to 250 max_ship_types. Server now no more Crashes on kill, when max_shiptypes is above 200. Note Client still can't join. narrowing it down. * * Revision 2.1 2002/08/01 01:41:10 penguin * The big include file move @@ -327,7 +327,7 @@ void scoring_do_accept( scoring_struct *score ); void scoring_check_medal(scoring_struct *sc); void scoring_add_damage(object *ship_obj,object *other_obj,float damage); -void scoring_eval_kill(object *ship_obj); +int scoring_eval_kill(object *ship_obj); void scoring_eval_assists(ship *sp,int killer_sig, bool enemy_player = false); // bash the passed player to the specified rank diff --git a/code/weapon/beam.cpp b/code/weapon/beam.cpp index d9fbb351ed..59791e2910 100644 --- a/code/weapon/beam.cpp +++ b/code/weapon/beam.cpp @@ -2759,7 +2759,8 @@ void beam_aim(beam *b) default: Int3(); - } + } + b->subsys->turret_next_fire_pos = temp_int; // recalculate object pairs @@ -2949,9 +2950,9 @@ int beam_collide_ship(obj_pair *pair) { // pick out the shield quadrant if (shield_collision) - quadrant_num = get_quadrant(&mc_shield.hit_point, ship_objp); + quadrant_num = get_quadrant(&mc_shield.hit_point); else if (hull_enter_collision && (sip->flags2 & SIF2_SURFACE_SHIELDS)) - quadrant_num = get_quadrant(&mc_hull_enter.hit_point, ship_objp); + quadrant_num = get_quadrant(&mc_hull_enter.hit_point); // make sure that the shield is active in that quadrant if ((quadrant_num >= 0) && ((shipp->flags & SF_DYING) || !ship_is_shield_up(ship_objp, quadrant_num))) @@ -3627,18 +3628,16 @@ int beam_ok_to_fire(beam *b) // if the beam will be firing out of its FOV, power it down vec3d aim_dir, temp; vec3d turret_dir, turret_pos; - //bool in_fov; vm_vec_sub(&aim_dir, &b->last_shot, &b->last_start); vm_vec_normalize(&aim_dir); beam_get_global_turret_gun_info(b->objp, b->subsys, &turret_pos, &turret_dir, 1, &temp, b->fighter_beam); - // nope... this section has nothing to do with turret normals... + // NEEDS TO - PROBABLY - BE CHANGED INTO USING STD/ADV FOV TESTS /* - if (b->subsys->system_info->flags & MSS_FLAG_TURRET_ALT_MATH) - in_fov = turret_adv_fov_test(b->subsys, &turret_dir, &aim_dir); - else - in_fov = turret_std_fov_test(b->subsys, &turret_dir, &aim_dir); + if (b->subsys->system_info->flags & MSS_FLAG_TURRET_ALT_MATH) + in_fov = turret_adv_fov_test(b->subsys, &turret_dir, &aim_dir); + else + in_fov = turret_std_fov_test(b->subsys, &turret_dir, &aim_dir); */ - if(vm_vec_dotprod(&aim_dir, &turret_dir) < b->subsys->system_info->turret_fov){ nprintf(("BEAM", "BEAM : powering beam down because of FOV condition!\n")); return 0; diff --git a/code/weapon/emp.cpp b/code/weapon/emp.cpp index f9210d935f..f3d305816b 100644 --- a/code/weapon/emp.cpp +++ b/code/weapon/emp.cpp @@ -304,7 +304,7 @@ void emp_apply(vec3d *pos, float inner_radius, float outer_radius, float emp_int scale_factor = 1.0f; if(dist_mag >= inner_radius){ scale_factor = 1.0f - (dist_mag / outer_radius); - } + } scale_factor -= Ship_info[Ships[target->instance].ship_info_index].emp_resistance_mod; diff --git a/code/weapon/swarm.cpp b/code/weapon/swarm.cpp index 39fce6abc5..db33a42800 100644 --- a/code/weapon/swarm.cpp +++ b/code/weapon/swarm.cpp @@ -640,7 +640,6 @@ void turret_swarm_set_up_info(int parent_objnum, ship_subsys *turret, weapon_inf tsi->target_subsys = turret->targeted_subsys; tsi->time_to_fire = 1; // first missile next frame tsi->weapon_num = weapon_num; - mprintf(("weapon_num: %i\n", weapon_num)); } void turret_swarm_fire_from_turret(turret_swarm_info *tsi); @@ -666,7 +665,7 @@ void turret_swarm_maybe_fire_missile(int shipnum) // search ship subsystems for turrets with valid turret_swarm_info_index for (subsys = GET_FIRST(&shipp->subsys_list); subsys != END_OF_LIST(&shipp->subsys_list); subsys = GET_NEXT(subsys)) { - if (subsys->turret_swarm_num > 0) { + if (subsys->turret_swarm_num > 0) { int swarms_per_turret = subsys->turret_swarm_num; diff --git a/code/weapon/trails.cpp b/code/weapon/trails.cpp index 155ecacc9a..1321935e23 100644 --- a/code/weapon/trails.cpp +++ b/code/weapon/trails.cpp @@ -78,7 +78,7 @@ * and posably fixed Turnsky's shinemap bug * * Revision 2.14 2004/02/16 11:47:34 randomtiger - * Removed a lot of files that we dont need anymore. + * Removed a lot of files that we don't need anymore. * Changed htl to be on by default, command now -nohtl * Changed D3D to use a 2D vertex for 2D operations which should cut down on redundant data having to go though the system. * Added small change to all -start_mission flag to take you to any mission by filename, very useful for testing. diff --git a/code/weapon/weapon.h b/code/weapon/weapon.h index 56765bd80d..28c7194468 100644 --- a/code/weapon/weapon.h +++ b/code/weapon/weapon.h @@ -659,12 +659,13 @@ extern int Num_weapon_subtypes; #define WF_LOCKED_WHEN_FIRED (1<<5) // fired with a lock #define WF_DESTROYED_BY_WEAPON (1<<6) // destroyed by damage from other weapon #define WF_SPAWNED (1<<7) //Spawned from a spawning type weapon +#define WF_HOMING_UPDATE_NEEDED (1<<8) // this is a newly spawned homing weapon which needs to update client machines typedef struct weapon { int weapon_info_index; // index into weapon_info array int objnum; // object number for this weapon int team; // The team of the ship that fired this - int species; // The species of the ship that fired this + int species; // The species of the ship that fired thisz float lifeleft; // life left on this weapon vec3d start_pos; @@ -971,8 +972,6 @@ typedef struct weapon_info { script_hook sc_collide_ship; script_hook sc_collide_weapon; - bool swarm_burst; - int weapon_hitpoints; } weapon_info; diff --git a/code/weapon/weapons.cpp b/code/weapon/weapons.cpp index df6a49e4b5..947e3a9579 100644 --- a/code/weapon/weapons.cpp +++ b/code/weapon/weapons.cpp @@ -1716,7 +1716,6 @@ void parse_wi_flags(weapon_info *weaponp) { Warning(LOCATION,"Weapon %s has the \"inherit parent target\" flag, but not the \"child\" flag. No changes in behavior will occur.", weaponp->name); } - } void parse_shockwave_info(shockwave_create_info *sci, char *pre_char) @@ -1867,7 +1866,6 @@ void init_weapon_entry(int weap_info_index) wip->swarm_count = -1; // *Default is 150 -Et1 wip->SwarmWait = SWARM_MISSILE_DELAY; - wip->swarm_burst = false; wip->launch_snd = -1; wip->impact_snd = -1; @@ -2515,9 +2513,6 @@ int parse_weapon(int subtype, bool replace) } } - if((wip->wi_flags & WIF_SWARM) && optional_string( "+No Swarming Movement:" )) - stuff_boolean(&wip->swarm_burst); - if(optional_string("$Free Flight Time:")) { stuff_float(&(wip->free_flight_time)); } else if(first_time && is_homing) { @@ -2679,7 +2674,6 @@ int parse_weapon(int subtype, bool replace) if ( optional_string("+Faded Out Sections:") ) { stuff_int(&ti->n_fade_out_sections); } - // wip->delta_time = fl2i(1000.0f*wip->max_life)/(NUM_TRAIL_SECTIONS+1); // time between sections. max_life / num_sections basically. } @@ -4023,7 +4017,7 @@ void weapon_close() } if (Spawn_names != NULL) { - for (int i=0; iflags & OF_PROTECTED) && (wp->weapon_flags & WF_SPAWNED)) continue; + // Spawned weapons should never home in on their parent - even in multiplayer dogfights where they would pass the iff test below + if ((wp->weapon_flags & WF_SPAWNED) && (objp == &Objects[weapon_objp->parent])) + continue; + homing_object_team = obj_team(objp); if (iff_x_attacks_y(wp->team, homing_object_team)) { @@ -4678,13 +4676,16 @@ void weapon_home(object *obj, int num, float frame_time) // If not 1/2 second gone by, don't home yet. if ((hobjp == &obj_used_list) || ( f2fl(Missiontime - wp->creation_time) < wip->free_flight_time )) { - // If this is a heat seeking homing missile and 1/2 second has elapsed since firing - // and we don't have a target (else we wouldn't be inside the IF), find a new target. + // If this is a heat seeking homing missile and 1/2 second has elapsed since firing, find a new target. if ((wip->wi_flags & WIF_HOMING_HEAT) && (f2fl(Missiontime - wp->creation_time) > wip->free_flight_time)) { find_homing_object(obj, num); } + else if (MULTIPLAYER_MASTER && (wip->wi_flags & WIF_LOCKED_HOMING) && (wp->weapon_flags & WF_HOMING_UPDATE_NEEDED)) { + wp->weapon_flags &= ~WF_HOMING_UPDATE_NEEDED; + send_homing_weapon_info(num); + } if (obj->phys_info.speed > max_speed) { obj->phys_info.speed -= frame_time * 4; @@ -5287,7 +5288,7 @@ void weapon_process_post(object * obj, float frame_time) */ // If this is a swarm type missile, // if ( wip->wi_flags & WIF_SWARM ) - if (( wp->swarm_index >= 0 ) && (wip->swarm_burst == false)) { + if ( wp->swarm_index >= 0 ) { swarm_update_direction(obj, frame_time); } @@ -5481,6 +5482,9 @@ void weapon_set_tracking_info(int weapon_objnum, int parent_objnum, int target_o if (target_is_locked && (wp->target_num != -1) && (wip->wi_flags & WIF_LOCKED_HOMING) ) { wp->lifeleft *= 1.2f; + if (MULTIPLAYER_MASTER) { + wp->weapon_flags |= WF_HOMING_UPDATE_NEEDED; + } } ai_update_danger_weapon(target_objnum, weapon_objnum); @@ -6539,7 +6543,10 @@ void weapons_page_in() // for weapons in weaponry pool for (i = 0; i < Num_teams; i++) { for (j = 0; j < Num_weapon_types; j++) { - used_weapons[j] += Team_data[i].weaponry_pool[j]; + used_weapons[j] = 0; + } + for (j = 0; j < Team_data[i].num_weapon_choices; j++) { + used_weapons[Team_data[i].weaponry_pool[j]] += Team_data[i].weaponry_count[j]; } } @@ -6875,11 +6882,7 @@ void weapon_maybe_spew_particle(object *obj) vm_vec_scale(&vel, wip->particle_spew_vel); // emit the particle - if ( (wip->wi_flags & WIF_CORKSCREW) ) { - vm_vec_add(&particle_pos, &obj->last_pos, &direct); - } else { - vm_vec_add(&particle_pos, &obj->pos, &direct); - } + vm_vec_add(&particle_pos, &obj->pos, &direct); if (wip->particle_spew_anim.first_frame < 0) particle_create(&particle_pos, &vel, wip->particle_spew_lifetime, wip->particle_spew_radius, PARTICLE_SMOKE); diff --git a/code/windows_stub/stubs.cpp b/code/windows_stub/stubs.cpp index 5122f223d6..2cf517479f 100644 --- a/code/windows_stub/stubs.cpp +++ b/code/windows_stub/stubs.cpp @@ -154,6 +154,9 @@ bool env_enabled = false; bool cell_enabled = false; +int Global_warning_count = 0; +int Global_error_count = 0; + #define MAX_BUF_SIZE 1024 static char buffer[MAX_BUF_SIZE], buffer_tmp[MAX_BUF_SIZE]; @@ -219,9 +222,62 @@ void WinAssert(char * text, char *filename, int line) abort(); } +// fatal assertion error +void WinAssert(char * text, char *filename, int line, const char * format, ... ) +{ + // Karajorma - Nicked the code from the Warning function below + va_list args; + int i; + int slen = 0; + + memset( buffer, 0, sizeof(buffer) ); + memset( buffer_tmp, 0, sizeof(buffer_tmp) ); + + va_start(args, format); + vsnprintf(buffer_tmp, sizeof(buffer_tmp) - 1, format, args); + va_end(args); + + slen = strlen(buffer_tmp); + + // strip out the newline char so the output looks better + for (i = 0; i < slen; i++){ + if (buffer_tmp[i] == (char)0x0a) { + buffer[i] = ' '; + } else { + buffer[i] = buffer_tmp[i]; + } + } + + // kill off extra white space at end + if (buffer[slen-1] == (char)0x20) { + buffer[slen-1] = '\0'; + } else { + // just being careful + buffer[slen] = '\0'; + } + + fprintf(stderr, "ASSERTION FAILED: \"%s\" at %s:%d %s\n", text, filename, line, buffer); + + // this stuff migt be really useful for solving bug reports and user errors. We should output it! + mprintf(("ASSERTION: \"%s\" at %s:%d %s\n", text, strrchr(filename, '/')+1, line, buffer )); + + if (Cmdline_nowarn) { + return; + } + + // we have to call os_deinit() before abort() so we make sure that SDL gets + // closed out and we don't lose video/input control + os_deinit(); + + abort(); +} + + // standard warning message void Warning( char * filename, int line, const char * format, ... ) { + Global_warning_count++; + #ifndef NDEBUG va_list args; int i; @@ -263,6 +319,8 @@ void Warning( char * filename, int line, const char * format, ... ) // fatal error message void Error( char * filename, int line, const char * format, ... ) { + Global_error_count++; + va_list args; int i; int slen = 0; diff --git a/configure.ac b/configure.ac index 3735052141..b66a31cd81 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl configure.ac for fs2_open dnl dnl $Id: configure.ac,v 1.31.2.4 2007-05-28 19:36:12 taylor Exp $ -AC_INIT(fs2_open, 3.6.10) +AC_INIT(fs2_open, 3.6.11) AC_CONFIG_SRCDIR(code/freespace2/freespace.cpp) dnl we need at least version 2.54 of autoconf diff --git a/dx8sdk/include/d3d8caps.h b/dx8sdk/include/d3d8caps.h index 6af8e6c434..78cd9906ec 100644 --- a/dx8sdk/include/d3d8caps.h +++ b/dx8sdk/include/d3d8caps.h @@ -182,7 +182,7 @@ typedef struct _D3DCAPS8 #define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */ #define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */ #define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */ -#define D3DPMISCCAPS_NULLREFERENCE 0x00001000L /* Reference Device that doesnt render */ +#define D3DPMISCCAPS_NULLREFERENCE 0x00001000L /* Reference Device that doesn't render */ // // LineCaps diff --git a/lua/lapi.c b/lua/lapi.c index d7e8931e45..5d5145d2eb 100644 --- a/lua/lapi.c +++ b/lua/lapi.c @@ -1,5 +1,5 @@ /* -** $Id: lapi.c,v 2.55.1.3 2008/01/03 15:20:39 roberto Exp $ +** $Id: lapi.c,v 2.55.1.5 2008/07/04 18:41:18 roberto Exp $ ** Lua API ** See Copyright Notice in lua.h */ @@ -93,15 +93,14 @@ void luaA_pushobject (lua_State *L, const TValue *o) { LUA_API int lua_checkstack (lua_State *L, int size) { - int res; + int res = 1; lua_lock(L); - if ((L->top - L->base + size) > LUAI_MAXCSTACK) + if (size > LUAI_MAXCSTACK || (L->top - L->base + size) > LUAI_MAXCSTACK) res = 0; /* stack overflow */ - else { + else if (size > 0) { luaD_checkstack(L, size); if (L->ci->top < L->top + size) L->ci->top = L->top + size; - res = 1; } lua_unlock(L); return res; @@ -930,10 +929,13 @@ LUA_API int lua_gc (lua_State *L, int what, int data) { g->GCthreshold = g->totalbytes - a; else g->GCthreshold = 0; - while (g->GCthreshold <= g->totalbytes) + while (g->GCthreshold <= g->totalbytes) { luaC_step(L); - if (g->gcstate == GCSpause) /* end of cycle? */ - res = 1; /* signal it */ + if (g->gcstate == GCSpause) { /* end of cycle? */ + res = 1; /* signal it */ + break; + } + } break; } case LUA_GCSETPAUSE: { diff --git a/lua/lbaselib.c b/lua/lbaselib.c index eb06bcef86..2a4c079d3b 100644 --- a/lua/lbaselib.c +++ b/lua/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.191.1.4 2008/01/20 13:53:22 roberto Exp $ +** $Id: lbaselib.c,v 1.191.1.6 2008/02/14 16:46:22 roberto Exp $ ** Basic library ** See Copyright Notice in lua.h */ @@ -344,10 +344,12 @@ static int luaB_unpack (lua_State *L) { luaL_checktype(L, 1, LUA_TTABLE); i = luaL_optint(L, 2, 1); e = luaL_opt(L, luaL_checkint, 3, luaL_getn(L, 1)); + if (i > e) return 0; /* empty range */ n = e - i + 1; /* number of elements */ - if (n <= 0) return 0; /* empty range */ - luaL_checkstack(L, n, "table too big to unpack"); - for (; i<=e; i++) /* push arg[i...e] */ + if (n <= 0 || !lua_checkstack(L, n)) /* n <= 0 means arith. overflow */ + return luaL_error(L, "too many results to unpack"); + lua_rawgeti(L, 1, i); /* push arg[i] (avoiding overflow problems) */ + while (i++ < e) /* push arg[i + 1...e] */ lua_rawgeti(L, 1, i); return n; } @@ -526,7 +528,7 @@ static int auxresume (lua_State *L, lua_State *co, int narg) { status = lua_resume(co, narg); if (status == 0 || status == LUA_YIELD) { int nres = lua_gettop(co); - if (!lua_checkstack(L, nres)) + if (!lua_checkstack(L, nres + 1)) luaL_error(L, "too many results to resume"); lua_xmove(co, L, nres); /* move yielded values */ return nres; diff --git a/lua/ldebug.c b/lua/ldebug.c index 9eac4a9b41..50ad3d3803 100644 --- a/lua/ldebug.c +++ b/lua/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.29.1.3 2007/12/28 15:32:23 roberto Exp $ +** $Id: ldebug.c,v 2.29.1.6 2008/05/08 16:56:26 roberto Exp $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -275,12 +275,12 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) { static int precheck (const Proto *pt) { check(pt->maxstacksize <= MAXSTACK); - lua_assert(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); - lua_assert(!(pt->is_vararg & VARARG_NEEDSARG) || + check(pt->numparams+(pt->is_vararg & VARARG_HASARG) <= pt->maxstacksize); + check(!(pt->is_vararg & VARARG_NEEDSARG) || (pt->is_vararg & VARARG_HASARG)); check(pt->sizeupvalues <= pt->nups); check(pt->sizelineinfo == pt->sizecode || pt->sizelineinfo == 0); - check(GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); + check(pt->sizecode > 0 && GET_OPCODE(pt->code[pt->sizecode-1]) == OP_RETURN); return 1; } @@ -346,9 +346,18 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) { int dest = pc+1+b; check(0 <= dest && dest < pt->sizecode); if (dest > 0) { - /* cannot jump to a setlist count */ - Instruction d = pt->code[dest-1]; - check(!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)); + int j; + /* check that it does not jump to a setlist count; this + is tricky, because the count from a previous setlist may + have the same value of an invalid setlist; so, we must + go all the way back to the first of them (if any) */ + for (j = 0; j < dest; j++) { + Instruction d = pt->code[dest-1-j]; + if (!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)) break; + } + /* if 'j' is even, previous value is not a setlist (even if + it looks like one) */ + check((j&1) == 0); } } break; @@ -363,7 +372,11 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) { } switch (op) { case OP_LOADBOOL: { - check(c == 0 || pc+2 < pt->sizecode); /* check its jump */ + if (c == 1) { /* does it jump? */ + check(pc+2 < pt->sizecode); /* check its jump */ + check(GET_OPCODE(pt->code[pc+1]) != OP_SETLIST || + GETARG_C(pt->code[pc+1]) != 0); + } break; } case OP_LOADNIL: { @@ -428,7 +441,10 @@ static Instruction symbexec (const Proto *pt, int lastpc, int reg) { } case OP_SETLIST: { if (b > 0) checkreg(pt, a + b); - if (c == 0) pc++; + if (c == 0) { + pc++; + check(pc < pt->sizecode - 1); + } break; } case OP_CLOSURE: { diff --git a/lua/loadlib.c b/lua/loadlib.c index d955f3ef41..0d401eba1c 100644 --- a/lua/loadlib.c +++ b/lua/loadlib.c @@ -1,5 +1,5 @@ /* -** $Id: loadlib.c,v 1.52.1.2 2007/12/28 14:58:43 roberto Exp $ +** $Id: loadlib.c,v 1.52.1.3 2008/08/06 13:29:28 roberto Exp $ ** Dynamic library loader for Lua ** See Copyright Notice in lua.h ** @@ -506,8 +506,10 @@ static int ll_require (lua_State *L) { static void setfenv (lua_State *L) { lua_Debug ar; - lua_getstack(L, 1, &ar); - lua_getinfo(L, "f", &ar); + if (lua_getstack(L, 1, &ar) == 0 || + lua_getinfo(L, "f", &ar) == 0 || /* get calling function */ + lua_iscfunction(L, -1)) + luaL_error(L, LUA_QL("module") " not called from a Lua function"); lua_pushvalue(L, -2); lua_setfenv(L, -2); lua_pop(L, 1); diff --git a/lua/lobject.h b/lua/lobject.h index e7199dfc68..f1e447ef3b 100644 --- a/lua/lobject.h +++ b/lua/lobject.h @@ -1,5 +1,5 @@ /* -** $Id: lobject.h,v 2.20.1.1 2007/12/27 13:02:25 roberto Exp $ +** $Id: lobject.h,v 2.20.1.2 2008/08/06 13:29:48 roberto Exp $ ** Type definitions for Lua objects ** See Copyright Notice in lua.h */ @@ -208,7 +208,7 @@ typedef union TString { #define getstr(ts) cast(const char *, (ts) + 1) -#define svalue(o) getstr(tsvalue(o)) +#define svalue(o) getstr(rawtsvalue(o)) diff --git a/lua/lstrlib.c b/lua/lstrlib.c index ca333ba168..1b4763d4ee 100644 --- a/lua/lstrlib.c +++ b/lua/lstrlib.c @@ -1,5 +1,5 @@ /* -** $Id: lstrlib.c,v 1.132.1.3 2007/12/28 15:32:23 roberto Exp $ +** $Id: lstrlib.c,v 1.132.1.4 2008/07/11 17:27:21 roberto Exp $ ** Standard library for string operations and pattern-matching ** See Copyright Notice in lua.h */ @@ -35,7 +35,8 @@ static int str_len (lua_State *L) { static ptrdiff_t posrelat (ptrdiff_t pos, size_t len) { /* relative string position: negative means back from end */ - return (pos>=0) ? pos : (ptrdiff_t)len+pos+1; + if (pos < 0) pos += (ptrdiff_t)len + 1; + return (pos >= 0) ? pos : 0; } diff --git a/lua/ltablib.c b/lua/ltablib.c index 06f1c37be1..b6d9cb4ac7 100644 --- a/lua/ltablib.c +++ b/lua/ltablib.c @@ -1,5 +1,5 @@ /* -** $Id: ltablib.c,v 1.38.1.2 2007/12/28 15:32:23 roberto Exp $ +** $Id: ltablib.c,v 1.38.1.3 2008/02/14 16:46:58 roberto Exp $ ** Library for Table Manipulation ** See Copyright Notice in lua.h */ @@ -132,6 +132,15 @@ static int tremove (lua_State *L) { } +static void addfield (lua_State *L, luaL_Buffer *b, int i) { + lua_rawgeti(L, 1, i); + if (!lua_isstring(L, -1)) + luaL_error(L, "invalid value (%s) at index %d in table for " + LUA_QL("concat"), luaL_typename(L, -1), i); + luaL_addvalue(b); +} + + static int tconcat (lua_State *L) { luaL_Buffer b; size_t lsep; @@ -141,13 +150,12 @@ static int tconcat (lua_State *L) { i = luaL_optint(L, 3, 1); last = luaL_opt(L, luaL_checkint, 4, luaL_getn(L, 1)); luaL_buffinit(L, &b); - for (; i <= last; i++) { - lua_rawgeti(L, 1, i); - luaL_argcheck(L, lua_isstring(L, -1), 1, "table contains non-strings"); - luaL_addvalue(&b); - if (i != last) - luaL_addlstring(&b, sep, lsep); + for (; i < last; i++) { + addfield(L, &b, i); + luaL_addlstring(&b, sep, lsep); } + if (i == last) /* add last value (if interval was not empty) */ + addfield(L, &b, i); luaL_pushresult(&b); return 1; } diff --git a/lua/lua.h b/lua/lua.h index 5bc97b746f..e4bdfd3b94 100644 --- a/lua/lua.h +++ b/lua/lua.h @@ -1,5 +1,5 @@ /* -** $Id: lua.h,v 1.218.1.4 2008/01/03 15:41:15 roberto Exp $ +** $Id: lua.h,v 1.218.1.5 2008/08/06 13:30:12 roberto Exp $ ** Lua - An Extensible Extension Language ** Lua.org, PUC-Rio, Brazil (http://www.lua.org) ** See Copyright Notice at the end of this file @@ -17,7 +17,7 @@ #define LUA_VERSION "Lua 5.1" -#define LUA_RELEASE "Lua 5.1.3" +#define LUA_RELEASE "Lua 5.1.4" #define LUA_VERSION_NUM 501 #define LUA_COPYRIGHT "Copyright (C) 1994-2008 Lua.org, PUC-Rio" #define LUA_AUTHORS "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" diff --git a/lua/luaconf.h b/lua/luaconf.h index ae16d62335..e2cb26163a 100644 --- a/lua/luaconf.h +++ b/lua/luaconf.h @@ -1,5 +1,5 @@ /* -** $Id: luaconf.h,v 1.82.1.6 2008/01/18 17:07:48 roberto Exp $ +** $Id: luaconf.h,v 1.82.1.7 2008/02/11 16:25:08 roberto Exp $ ** Configuration file for Lua ** See Copyright Notice in lua.h */ @@ -36,6 +36,7 @@ #if defined(LUA_USE_LINUX) #define LUA_USE_POSIX #define LUA_USE_DLOPEN /* needs an extra library: -ldl */ +#define LUA_USE_READLINE /* needs some extra libraries */ #endif #if defined(LUA_USE_MACOSX) @@ -439,10 +440,10 @@ @* can use. ** CHANGE it if you need lots of (Lua) stack space for your C ** functions. This limit is arbitrary; its only purpose is to stop C -** functions to consume unlimited stack space. +** functions to consume unlimited stack space. (must be smaller than +** -LUA_REGISTRYINDEX) */ -#define LUAI_MCS_AUX ((int)(INT_MAX / (4*sizeof(LUA_NUMBER)))) -#define LUAI_MAXCSTACK (LUAI_MCS_AUX > SHRT_MAX ? SHRT_MAX : LUAI_MCS_AUX) +#define LUAI_MAXCSTACK 8000 diff --git a/lua/lundump.c b/lua/lundump.c index 731c064553..8010a45795 100644 --- a/lua/lundump.c +++ b/lua/lundump.c @@ -1,5 +1,5 @@ /* -** $Id: lundump.c,v 2.7.1.2 2008/01/18 16:39:11 roberto Exp $ +** $Id: lundump.c,v 2.7.1.4 2008/04/04 19:51:41 roberto Exp $ ** load precompiled Lua chunks ** See Copyright Notice in lua.h */ @@ -48,7 +48,6 @@ static void error(LoadState* S, const char* why) static void LoadBlock(LoadState* S, void* b, size_t size) { size_t r=luaZ_read(S->Z,b,size); - UNUSED(r); IF (r!=0, "unexpected end"); } @@ -115,7 +114,7 @@ static void LoadConstants(LoadState* S, Proto* f) setnilvalue(o); break; case LUA_TBOOLEAN: - setbvalue(o,LoadChar(S)); + setbvalue(o,LoadChar(S)!=0); break; case LUA_TNUMBER: setnvalue(o,LoadNumber(S)); @@ -161,7 +160,9 @@ static void LoadDebug(LoadState* S, Proto* f) static Proto* LoadFunction(LoadState* S, TString* p) { - Proto* f=luaF_newproto(S->L); + Proto* f; + if (++S->L->nCcalls > LUAI_MAXCCALLS) error(S,"code too deep"); + f=luaF_newproto(S->L); setptvalue2s(S->L,S->L->top,f); incr_top(S->L); f->source=LoadString(S); if (f->source==NULL) f->source=p; f->linedefined=LoadInt(S); @@ -175,6 +176,7 @@ static Proto* LoadFunction(LoadState* S, TString* p) LoadDebug(S,f); IF (!luaG_checkcode(f), "bad code"); S->L->top--; + S->L->nCcalls--; return f; } diff --git a/projects/MSVC_2008/Fred2.vcproj b/projects/MSVC_2008/Fred2.vcproj index 7cd573fd36..d203f9e4a4 100644 --- a/projects/MSVC_2008/Fred2.vcproj +++ b/projects/MSVC_2008/Fred2.vcproj @@ -65,7 +65,7 @@ ProgramDataBaseFileName="$(IntDir)\" BrowseInformation="1" BrowseInformationFile="$(IntDir)\" - WarningLevel="3" + WarningLevel="4" SuppressStartupBanner="true" DebugInformationFormat="4" /> @@ -83,7 +83,7 @@ + + @@ -728,6 +732,10 @@ RelativePath="..\..\code\fred2\adjustgriddlg.h" > + + diff --git a/projects/MSVC_2008/Freespace2.sln b/projects/MSVC_2008/Freespace2.sln index 7be06610c6..f4b634f084 100644 --- a/projects/MSVC_2008/Freespace2.sln +++ b/projects/MSVC_2008/Freespace2.sln @@ -66,6 +66,7 @@ Global {332C7037-05BE-4202-93AC-182F1A2DF2AC}.Release|Win32.ActiveCfg = Release|Win32 {332C7037-05BE-4202-93AC-182F1A2DF2AC}.Release|Win32.Build.0 = Release|Win32 {92C8C611-75AA-4BD7-9B73-584822AAAEB5}.Debug|Win32.ActiveCfg = Debug|Win32 + {92C8C611-75AA-4BD7-9B73-584822AAAEB5}.Debug|Win32.Build.0 = Debug|Win32 {92C8C611-75AA-4BD7-9B73-584822AAAEB5}.Release SSE|Win32.ActiveCfg = Release SSE|Win32 {92C8C611-75AA-4BD7-9B73-584822AAAEB5}.Release SSE|Win32.Build.0 = Release SSE|Win32 {92C8C611-75AA-4BD7-9B73-584822AAAEB5}.Release SSE2|Win32.ActiveCfg = Release SSE2|Win32 diff --git a/projects/MSVC_2008/Freespace2.vcproj b/projects/MSVC_2008/Freespace2.vcproj index b964d6a04d..e23689ad0c 100644 --- a/projects/MSVC_2008/Freespace2.vcproj +++ b/projects/MSVC_2008/Freespace2.vcproj @@ -86,7 +86,7 @@ UseLibraryDependencyInputs="false" AdditionalDependencies="code.lib liblua_d.lib libjpeg_d.lib d3d8.lib d3dx8.lib DxErr8.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib ole32.lib advapi32.lib gdi32.lib user32.lib trackir.lib" ShowProgress="0" - OutputFile="$(OutDir)\fs2_open_3_6_10d.exe" + OutputFile="$(OutDir)\fs2_open_3_6_11d.exe" LinkIncremental="2" SuppressStartupBanner="true" AdditionalLibraryDirectories="$(ConfigurationName),../../oggvorbis/lib,../../dx8sdk/lib,../../openal/libs/win32,../../openal/libs/win64,../../trackir/lib" @@ -200,7 +200,7 @@ + + + + diff --git a/projects/MSVC_6/Fred2.dsp b/projects/MSVC_6/Fred2.dsp index 7e1c8767c5..1d26d7f0e9 100644 --- a/projects/MSVC_6/Fred2.dsp +++ b/projects/MSVC_6/Fred2.dsp @@ -118,6 +118,10 @@ SOURCE=..\..\code\fred2\AdjustGridDlg.cpp # End Source File # Begin Source File +SOURCE=..\..\code\fred2\AltShipClassDlg.cpp +# End Source File +# Begin Source File + SOURCE=..\..\code\fred2\AsteroidEditorDlg.cpp # End Source File # Begin Source File @@ -366,6 +370,10 @@ SOURCE=..\..\code\fred2\AdjustGridDlg.h # End Source File # Begin Source File +SOURCE=..\..\code\fred2\AltShipClassDlg.h +# End Source File +# Begin Source File + SOURCE=..\..\code\fred2\AsteroidEditorDlg.h # End Source File # Begin Source File diff --git a/projects/MSVC_6/Freespace2.dsp b/projects/MSVC_6/Freespace2.dsp index 7948d3ef5d..db209e9aad 100644 --- a/projects/MSVC_6/Freespace2.dsp +++ b/projects/MSVC_6/Freespace2.dsp @@ -43,7 +43,7 @@ RSC=rc.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /O2 /Oy /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /D "_MBCS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_OPENAL" /D "NO_DIRECT3D" /U "_DEBUG" /FR /YX /FD /c +# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /O2 /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /D "_MBCS" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "USE_OPENAL" /D "NO_DIRECT3D" /U "_DEBUG" /FR /YX /FD /c # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 # ADD BASE RSC /l 0x409 /d "NDEBUG" @@ -94,7 +94,7 @@ LINK32=link.exe InputPath=.\Debug\fs2_open_trunk_d.exe SOURCE="$(InputPath)" -"$(FS2PATH)/fs2_open_trunk_d.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" +"$(FS2PATH)/fs2_open_trunk_r.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" copy /y $(InputPath) "$(FS2PATH)/fs2_open_trunk_d.exe" # End Custom Build diff --git a/projects/MSVC_6/code.dsp b/projects/MSVC_6/code.dsp index 178b295cea..261b5bbdf4 100644 --- a/projects/MSVC_6/code.dsp +++ b/projects/MSVC_6/code.dsp @@ -2673,6 +2673,14 @@ SOURCE=..\..\code\Network\multi_respawn.h # End Source File # Begin Source File +SOURCE=..\..\code\network\multi_sexp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\multi_sexp.h +# End Source File +# Begin Source File + SOURCE=..\..\code\Network\multi_team.cpp # End Source File # Begin Source File diff --git a/projects/MSVC_6/wxFRED2.dsp b/projects/MSVC_6/wxFRED2.dsp index 7025d46ae0..db701aa712 100644 --- a/projects/MSVC_6/wxFRED2.dsp +++ b/projects/MSVC_6/wxFRED2.dsp @@ -337,7 +337,7 @@ SOURCE=..\..\code\wxfred2\wxfred.xrc !IF "$(CFG)" == "wxFRED2 - Win32 Release" # Begin Custom Build - Compiling XRC resources... -InputDir=\projects\fs2_open\code\wxfred2 +InputDir=..\..\code\wxfred2 InputPath=..\..\code\wxfred2\wxfred.xrc InputName=wxfred @@ -349,7 +349,7 @@ InputName=wxfred !ELSEIF "$(CFG)" == "wxFRED2 - Win32 Debug" # Begin Custom Build - Compiling XRC resources... -InputDir=\projects\fs2_open\code\wxfred2 +InputDir=..\..\code\wxfred2 InputPath=..\..\code\wxfred2\wxfred.xrc InputName=wxfred diff --git a/projects/MSVC_6_Release/Fred2.dsp b/projects/MSVC_6_Release/Fred2.dsp new file mode 100644 index 0000000000..b89469699a --- /dev/null +++ b/projects/MSVC_6_Release/Fred2.dsp @@ -0,0 +1,755 @@ +# Microsoft Developer Studio Project File - Name="Fred2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Fred2 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Fred2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Fred2.mak" CFG="Fred2 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Fred2 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Fred2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Fred2 - Win32 Debug Inferno" (based on "Win32 (x86) Application") +!MESSAGE "Fred2 - Win32 Release Inferno" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Fred2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\fred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Z7 /O2 /I "../../code" /I "../../openal/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /Fr /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 DxErr8.lib d3d8.lib d3dx8.lib wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fred2_open_trunk_r.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Copying build... +InputPath=.\Release\fred2_open_trunk_r.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fred2_open_trunk_r.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fred2_open_trunk_r.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Fred2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\fred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /I "../../code" /I "../../openal/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 Quartz.lib DxErr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug/fred2_open_trunk_d.exe" /pdbtype:sept /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Copying build... +InputPath=.\Debug\fred2_open_trunk_d.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fred2_open_trunk_d.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fred2_open_trunk_d.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Fred2 - Win32 Debug Inferno" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Fred2___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "Fred2___Win32_Debug_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno\Profile\fred2" +# PROP Intermediate_Dir "Debug_Inferno\Profile\fred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /I "../../code" /I "../../openal/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /FR /YX /FD /GZ /c +# ADD CPP /nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /I "../../code" /I "../../openal/include" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "INF_BUILD" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug_Inferno/Fred2.bsc" +LINK32=link.exe +# ADD BASE LINK32 Quartz.lib DxErr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug/fred2_open_trunk_d.exe" /pdbtype:sept /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 Quartz.lib DxErr8.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /pdb:"Debug_Inferno/fred2_open_trunk_d_INF.pdb" /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug_Inferno/fred2_open_trunk_d_INF.exe" /pdbtype:sept /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Copying build... +InputPath=.\Debug_Inferno\fred2_open_trunk_d_INF.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fred2_open_trunk_d_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fred2_open_trunk_d_INF.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Fred2 - Win32 Release Inferno" + +# PROP BASE Use_MFC 1 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Fred2___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "Fred2___Win32_Release_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 1 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno\Profile\fred2" +# PROP Intermediate_Dir "Release_Inferno\Profile\fred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MT /W3 /GX /Z7 /O2 /I "../../code" /I "../../openal/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /Fr /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Z7 /O2 /I "../../code" /I "../../openal/include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "FRED" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "INF_BUILD" /Fr /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release_Inferno/Fred2.bsc" +LINK32=link.exe +# ADD BASE LINK32 DxErr8.lib d3d8.lib d3dx8.lib wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fred2_open_trunk_r.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT BASE LINK32 /pdb:none +# ADD LINK32 DxErr8.lib d3d8.lib d3dx8.lib wsock32.lib winmm.lib msacm32.lib vfw32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /pdb:"Release_Inferno/fred2_open_trunk_r_INF.pdb" /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release_Inferno/fred2_open_trunk_r_INF.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none +# Begin Custom Build - Copying build... +InputPath=.\Release_Inferno\fred2_open_trunk_r_INF.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fred2_open_trunk_r_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fred2_open_trunk_r_INF.exe" + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "Fred2 - Win32 Release" +# Name "Fred2 - Win32 Debug" +# Name "Fred2 - Win32 Debug Inferno" +# Name "Fred2 - Win32 Release Inferno" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\code\fred2\AddVariableDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AdjustGridDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AltShipClassDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AsteroidEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BackgroundChooser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BgBitmapDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BriefingEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignFilelistBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignTreeView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignTreeWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CmdBrief.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CreateWingDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CustomWingNames.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\DebriefingEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\dialog1.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\DumpStats.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\EventEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\folderdlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FRED.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FRED.rc +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FREDDoc.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FredRender.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FredStubs.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FREDView.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Grid.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\IgnoreOrdersDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\InitialShips.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\InitialStatus.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MainFrm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Management.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MessageEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionGoalsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionNotesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionSave.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ModifyVariableDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\OperatorArgTypeSelect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\OrientEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\PlayerStartEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\PrefsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ReinforcementEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\restrictpaths.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\SetGlobalShipFlags.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Sexp_tree.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShieldSysDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ship_select.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipCheckListBox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipClassEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipFlagsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipGoalsDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipSpecialDamage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipSpecialHitpoints.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipTexturesDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\StarfieldEditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\StdAfx.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\TextViewDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\VoiceActingManager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\WaypointPathDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\WeaponEditorDlg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\wing.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\wing_editor.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\code\fred2\AddVariableDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AdjustGridDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AltShipClassDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\AsteroidEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BackgroundChooser.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BgBitmapDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\BriefingEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignFilelistBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignTreeView.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CampaignTreeWnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CmdBrief.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CreateWingDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\CustomWingNames.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\DebriefingEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\dialog1.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\DumpStats.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\editor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\EventEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\folderdlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FRED.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FREDDoc.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FredRender.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\FREDView.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Grid.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\IgnoreOrdersDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\InitialShips.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\InitialStatus.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MainFrm.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Management.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MessageEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionGoalsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionNotesDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\MissionSave.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ModifyVariableDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\OperatorArgTypeSelect.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\OrientEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\PlayerStartEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\PrefsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ReinforcementEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\resource.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\restrictpaths.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\SetGlobalShipFlags.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\Sexp_tree.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShieldSysDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ship_select.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipCheckListBox.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipClassEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipFlagsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipGoalsDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipSpecialDamage.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipSpecialHitpoints.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\ShipTexturesDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\StarfieldEditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\stdafx.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\TextViewDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\VoiceActingManager.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\WaypointPathDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\WeaponEditorDlg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\wing.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\wing_editor.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\code\fred2\res\bitmap1.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\black_do.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\bmp00001.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\chained.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\chained_directive.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\cursor1.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\cursor2.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\data.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\FRED.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\FREDDoc.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\green_do.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\root.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\root_directive.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\Toolbar.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fred2\res\variable.bmp +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/MSVC_6_Release/Freespace2.dsp b/projects/MSVC_6_Release/Freespace2.dsp new file mode 100644 index 0000000000..ee686527f6 --- /dev/null +++ b/projects/MSVC_6_Release/Freespace2.dsp @@ -0,0 +1,247 @@ +# Microsoft Developer Studio Project File - Name="Freespace2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=Freespace2 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "Freespace2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "Freespace2.mak" CFG="Freespace2 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "Freespace2 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "Freespace2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "Freespace2 - Win32 Debug Inferno" (based on "Win32 (x86) Application") +!MESSAGE "Freespace2 - Win32 Release Inferno" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName ""$/Freespace2", RHWBAAAA" +# PROP Scc_LocalPath "." +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "Freespace2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\freespace2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /O2 /Oy /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_MBCS" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "_DEBUG" /FR /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" /d "FS2_SPEECH" /d "FS2_VOICER" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release\Profile\Freespace2.bsc" "Release\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 Dxerr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fs2_open_trunk_r.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none /debug +# Begin Custom Build - Copying build... +InputPath=.\Release\fs2_open_trunk_r.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fs2_open_trunk_r.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fs2_open_trunk_r.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Freespace2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\freespace2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" /d "FS2_SPEECH" /d "FS2_VOICER" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug\Profile\Freespace2.bsc" "Debug\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 DxErr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug\fs2_open_trunk_d.exe" /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none /incremental:no +# Begin Custom Build - Copying build... +InputPath=.\Debug\fs2_open_trunk_d.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fs2_open_trunk_d.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fs2_open_trunk_d.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Freespace2 - Win32 Debug Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Freespace2___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "Freespace2___Win32_Debug_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno" +# PROP Intermediate_Dir "Debug_Inferno\Profile\freespace2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICEREC" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD CPP /nologo /G5 /MTd /W4 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "INF_BUILD" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" /d "FS2_SPEECH" /d "FS2_VOICER" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Debug\Profile\Freespace2.bsc" "Debug\Profile\*.sbr" +# ADD BSC32 /nologo /o"Debug_Inferno\Profile\Freespace2.bsc" "Debug\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 DxErr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug\fs2_open_trunk_d.exe" /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT BASE LINK32 /pdb:none /incremental:no +# ADD LINK32 DxErr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /debug /debugtype:both /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /nodefaultlib:"libcmt.lib" /out:"Debug_Inferno\fs2_open_trunk_d_INF.exe" /libpath:"Debug" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none /incremental:no +# Begin Custom Build - Copying build... +InputPath=.\Debug_Inferno\fs2_open_trunk_d_INF.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fs2_open_trunk_d_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fs2_open_trunk_d_INF.exe" + +# End Custom Build + +!ELSEIF "$(CFG)" == "Freespace2 - Win32 Release Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Freespace2___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "Freespace2___Win32_Release_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno" +# PROP Intermediate_Dir "Release_Inferno\Profile\freespace2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MT /W2 /GX /Zi /O2 /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_MBCS" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICEREC" /U "_DEBUG" /FR /YX /FD /c +# ADD CPP /nologo /G5 /MT /W2 /GX /Zi /O2 /Oy /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_MBCS" /D "NDEBUG" /D "INF_BUILD" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "_DEBUG" /FR /YX /FD /c +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" /d "FS2_SPEECH" /d "FS2_VOICER" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Release\Profile\Freespace2.bsc" "Release\Profile\*.sbr" +# ADD BSC32 /nologo /o"Release_Inferno\Profile\Freespace2.bsc" "Release\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 Dxerr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release/fs2_open_trunk_r.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT BASE LINK32 /pdb:none /debug +# ADD LINK32 Dxerr8.lib Quartz.lib d3d8.lib d3dx8.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib openal32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib theora_static.lib trackir.lib /nologo /subsystem:windows /map /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libcd.lib" /out:"Release_Inferno/fs2_open_trunk_r_INF.exe" /libpath:"Release" /libpath:"../../oggvorbis/lib" /libpath:"../../dx8sdk/lib" /libpath:"../../openal/libs/win32" /libpath:"../../openal/libs/win64" /libpath:"../../trackir/lib" /libpath:"../../speech/lib/i386" /MAPINFO:EXPORTS /MAPINFO:LINES +# SUBTRACT LINK32 /pdb:none /debug +# Begin Custom Build - Copying build... +InputPath=.\Release_Inferno\fs2_open_trunk_r_INF.exe +SOURCE="$(InputPath)" + +"$(FS2PATH)/fs2_open_trunk_r_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + copy /y $(InputPath) "$(FS2PATH)/fs2_open_trunk_r_INF.exe" + +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "Freespace2 - Win32 Release" +# Name "Freespace2 - Win32 Debug" +# Name "Freespace2 - Win32 Debug Inferno" +# Name "Freespace2 - Win32 Release Inferno" +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\app_icon.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\FreeSpace.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\FreeSpace.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\FreeSpace.rc +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\FreespaceResource.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\goal_com.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\goal_fail.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\goal_inc.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\goal_none.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\goal_ord.bmp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grstub.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\LevelPaging.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\FREESPACE2\LevelPaging.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\freespace2\phrases.cfg +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\phrases.cfg +# End Source File +# End Target +# End Project diff --git a/projects/MSVC_6_Release/Freespace2.dsw b/projects/MSVC_6_Release/Freespace2.dsw new file mode 100644 index 0000000000..9dfdbef936 --- /dev/null +++ b/projects/MSVC_6_Release/Freespace2.dsw @@ -0,0 +1,116 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "Freespace2"=.\Freespace2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name code + End Project Dependency + Begin Project Dependency + Project_Dep_Name libjpeg + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblua + End Project Dependency +}}} + +############################################################################### + +Project: "Fred2"=.\Fred2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name code + End Project Dependency + Begin Project Dependency + Project_Dep_Name libjpeg + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblua + End Project Dependency +}}} + +############################################################################### + +Project: "wxFRED2"=.\wxFRED2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name code + End Project Dependency + Begin Project Dependency + Project_Dep_Name libjpeg + End Project Dependency + Begin Project Dependency + Project_Dep_Name liblua + End Project Dependency +}}} + +############################################################################### + +Project: "code"=.\code.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "libjpeg"=.\libjpeg.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "liblua"=.\liblua.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/projects/MSVC_6_Release/code.dsp b/projects/MSVC_6_Release/code.dsp new file mode 100644 index 0000000000..b038252ec2 --- /dev/null +++ b/projects/MSVC_6_Release/code.dsp @@ -0,0 +1,3145 @@ +# Microsoft Developer Studio Project File - Name="code" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=code - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "code.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "code.mak" CFG="code - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "code - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "code - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "code - Win32 Debug Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE "code - Win32 Release Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName ""$/Freespace2/code", UCACAAAA" +# PROP Scc_LocalPath "." +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "code - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\code" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /Ob2 /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "_DEBUG" /FR /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release\Profile\code.bsc" "Release\Profile\*.sbr" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\code" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug\Profile\code.bsc" "Debug\Profile\*.sbr" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "code___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "code___Win32_Debug_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno" +# PROP Intermediate_Dir "Debug_Inferno" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICEREC" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD CPP /nologo /G5 /MTd /W3 /Gm /Gi /GX /ZI /Od /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "_DEBUG" /D "INF_BUILD" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "NDEBUG" /FR /YX /FD /GZ /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Debug\Profile\code.bsc" "Debug\Profile\*.sbr" +# ADD BSC32 /nologo /o"Debug_Inferno\Profile\code.bsc" "Debug\Profile\*.sbr" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "code___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "code___Win32_Release_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno" +# PROP Intermediate_Dir "Release_Inferno" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /Ob2 /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "NDEBUG" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICEREC" /U "_DEBUG" /FR /YX /FD /c +# ADD CPP /nologo /G5 /MT /W3 /GX /Zi /O2 /Ob2 /I "../../code" /I "../../oggvorbis/include" /I "../../dx8sdk/include" /I "../../lua" /I "../../openal/include" /I "../../speech/include" /D "NDEBUG" /D "INF_BUILD" /D "_WINDOWS" /D "WIN32" /D "USE_OPENAL" /D "NO_DIRECT3D" /D "FS2_SPEECH" /D "FS2_VOICER" /U "_DEBUG" /FR /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Release\Profile\code.bsc" "Release\Profile\*.sbr" +# ADD BSC32 /nologo /o"Release_Inferno\Profile\code.bsc" "Release\Profile\*.sbr" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "code - Win32 Release" +# Name "code - Win32 Debug" +# Name "code - Win32 Debug Inferno" +# Name "code - Win32 Release Inferno" +# Begin Group "AI" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\ai\ai.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\ai.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\ai_profiles.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\ai_profiles.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiBig.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiBig.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiCode.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiGoals.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiGoals.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiInternal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiLocal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ai\AiTurret.cpp +# End Source File +# End Group +# Begin Group "Anim" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Anim\AnimPlay.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Anim\AnimPlay.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Anim\PackUnpack.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Anim\PackUnpack.h +# End Source File +# End Group +# Begin Group "Asteroid" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Asteroid\Asteroid.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Asteroid\Asteroid.h +# End Source File +# End Group +# Begin Group "Bmpman" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\bmpman\bm_internal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Bmpman\BmpMan.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Bmpman\BmpMan.h +# End Source File +# End Group +# Begin Group "Camera" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\camera\camera.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\camera\camera.h +# End Source File +# End Group +# Begin Group "CFile" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\CFile\cfile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\cfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\CfileArchive.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\CfileArchive.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\CfileList.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\CfileSystem.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\CFile\CfileSystem.h +# End Source File +# End Group +# Begin Group "CMeasure" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\CMeasure\CMeasure.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\CMeasure\CMeasure.h +# End Source File +# End Group +# Begin Group "ControlConfig" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\ControlConfig\ControlsConfig.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\ControlConfig\ControlsConfig.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ControlConfig\ControlsConfigCommon.cpp +# End Source File +# End Group +# Begin Group "Cutscene" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Cutscene\Cutscenes.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Cutscene\Cutscenes.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\decoder16.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\decoder8.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\movie.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\movie.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\mve_audio.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\mvelib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\mvelib.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\mveplayer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\oggplayer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\cutscene\oggplayer.h +# End Source File +# End Group +# Begin Group "Debris" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Debris\Debris.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Debris\Debris.h +# End Source File +# End Group +# Begin Group "DebugConsole" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\DebugConsole\Console.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\debugconsole\dbugfile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\debugconsole\dbugfile.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\debugconsole\timerbar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\debugconsole\timerbar.h +# End Source File +# End Group +# Begin Group "DirectX" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\directx\dx8show.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\directx\dx8show.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vasync.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vD3dcaps.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vd3drmdef.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vd3drmobj.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vd3drmwin.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vd3dvec.inl +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vDinput.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vdplay.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vdplobby.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vdsetup.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vDsound.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vdvp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vDinput.lib +# End Source File +# Begin Source File + +SOURCE=..\..\code\DirectX\vDsound.lib +# End Source File +# Begin Source File + +SOURCE=..\..\code\directx\strmiids.lib +# End Source File +# Begin Source File + +SOURCE=..\..\code\directx\dxguid.lib +# End Source File +# End Group +# Begin Group "Fireball" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Fireball\FireBalls.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Fireball\FireBalls.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Fireball\WarpInEffect.cpp +# End Source File +# End Group +# Begin Group "GameHelp" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\GameHelp\ContextHelp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GameHelp\ContextHelp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GameHelp\GameplayHelp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GameHelp\GameplayHelp.h +# End Source File +# End Group +# Begin Group "GameSequence" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\GameSequence\GameSequence.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GameSequence\GameSequence.h +# End Source File +# End Group +# Begin Group "GameSnd" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Gamesnd\EventMusic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Gamesnd\EventMusic.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Gamesnd\GameSnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Gamesnd\GameSnd.h +# End Source File +# End Group +# Begin Group "GlobalIncs" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\AlphaColors.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\AlphaColors.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\crypt.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\crypt.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\globalincs\def_files.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\globalincs\def_files.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\globalincs\globals.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\LinkList.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\PsTypes.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\SystemVars.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\SystemVars.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\version.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\version.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\GlobalIncs\WinDebug.cpp +# End Source File +# End Group +# Begin Group "Graphics" + +# PROP Default_Filter "" +# Begin Group "SoftwareGr" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Graphics\Font.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\Font.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\generic.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\generic.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grstub.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grstub.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\Line.h +# End Source File +# End Group +# Begin Group "D3D8Gr" + +# PROP Default_Filter "" +# Begin Group "Headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Graphics\GrD3D.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3DBmpman.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\GrD3DInternal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grd3dlight.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grd3dsetup.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3DStateBlock.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\code\Graphics\GrD3D.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3DBmpman.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3DCalls.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grd3dlight.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\GrD3DRender.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3Dsetup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\GrD3DStateBlock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\GrD3DTexture.cpp +# End Source File +# End Group +# Begin Group "OpenGLGr" + +# PROP Default_Filter "" +# Begin Group "OpenGL Headers" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\graphics\gropengl.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglbmpman.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengldraw.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglextension.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengllight.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglshader.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglstate.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengltexture.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengltnl.h +# End Source File +# End Group +# Begin Group "OpenGL CPPs" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\graphics\gropengl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglbmpman.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengldraw.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglextension.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengllight.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglshader.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropenglstate.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengltexture.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\gropengltnl.cpp +# End Source File +# End Group +# End Group +# Begin Source File + +SOURCE=..\..\code\Graphics\2d.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\2d.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grbatch.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\graphics\grbatch.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\GrInternal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Graphics\TMAPPER.H +# End Source File +# End Group +# Begin Group "Hud" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Hud\HUD.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUD.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HudArtillery.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HudArtillery.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDbrackets.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDbrackets.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDconfig.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDconfig.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDescort.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDescort.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDets.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDets.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDgauges.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDlock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDlock.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDmessage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDmessage.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\hud\HUDNavigation.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\hud\HUDNavigation.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDObserver.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDObserver.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\hud\hudparse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\hud\hudparse.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDreticle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDreticle.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDshield.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDshield.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDsquadmsg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDsquadmsg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDtarget.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDtarget.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDtargetbox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDtargetbox.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDWingmanStatus.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Hud\HUDWingmanStatus.h +# End Source File +# End Group +# Begin Group "Io" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Io\Joy.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Joy.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Joy_ff.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Joy_ff.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Key.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Key.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\KeyControl.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\KeyControl.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Mouse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Mouse.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\sw_error.hpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\sw_force.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\sw_guid.hpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\swff_lib.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Timer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Io\Timer.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\io\trackir.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\io\trackir.h +# End Source File +# End Group +# Begin Group "JumpNode" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\JumpNode\JumpNode.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\JumpNode\JumpNode.h +# End Source File +# End Group +# Begin Group "Lab" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\lab\lab.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\lab\lab.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\lab\wmcgui.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\lab\wmcgui.h +# End Source File +# End Group +# Begin Group "Lighting" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Lighting\Lighting.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Lighting\Lighting.h +# End Source File +# End Group +# Begin Group "Math" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\math\bitarray.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\Fix.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\fix.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\Floating.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\Floating.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\Fvi.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\Fvi.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\spline.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\spline.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\StaticRand.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\StaticRand.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\VecMat.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Math\VecMat.h +# End Source File +# End Group +# Begin Group "MenuUI" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\MenuUI\Barracks.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\Barracks.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\Credits.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\Credits.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\fishtank.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\fishtank.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\MainHallMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\MainHallMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\MainHallTemp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\MainHallTemp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\OptionsMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\OptionsMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\OptionsMenuMulti.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\OptionsMenuMulti.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\PlayerMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\PlayerMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\ReadyRoom.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\ReadyRoom.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\SnazzyUI.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\SnazzyUI.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\TechMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\TechMenu.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\TrainingMenu.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MenuUI\TrainingMenu.h +# End Source File +# End Group +# Begin Group "Mission" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Mission\MissionBriefCommon.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionBriefCommon.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionCampaign.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionCampaign.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionGoals.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionGoals.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionGrid.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionGrid.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionHotKey.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionHotKey.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionLoad.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionLoad.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionLog.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionLog.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionMessage.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionMessage.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionParse.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionParse.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionTraining.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Mission\MissionTraining.h +# End Source File +# End Group +# Begin Group "MissionUI" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\MissionUI\Chatbox.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\Chatbox.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\missionui\fictionviewer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\missionui\fictionviewer.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionBrief.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionBrief.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionCmdBrief.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionCmdBrief.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionDebrief.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionDebrief.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionLoopBrief.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionLoopBrief.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionPause.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionPause.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionRecommend.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionRecommend.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionScreenCommon.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionScreenCommon.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionShipChoice.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionShipChoice.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionStats.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionStats.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionWeaponChoice.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\MissionWeaponChoice.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\RedAlert.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\MissionUI\RedAlert.h +# End Source File +# End Group +# Begin Group "Model" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Model\MODEL.H +# End Source File +# Begin Source File + +SOURCE=..\..\code\model\ModelAnim.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\model\modelanim.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Model\ModelCollide.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Model\ModelInterp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Model\ModelOctant.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Model\ModelRead.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Model\ModelsInc.h +# End Source File +# End Group +# Begin Group "Object" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Object\CollideDebrisShip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\CollideDebrisWeapon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\CollideShipShip.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\CollideShipWeapon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\CollideWeaponWeapon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\deadobjectdock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\deadobjectdock.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\ObjCollide.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\ObjCollide.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\Object.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\Object.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\objectdock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\objectdock.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\objectshield.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\objectshield.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\ObjectSnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\ObjectSnd.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Object\ObjectSort.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\parseobjectdock.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\parseobjectdock.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\waypoint.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\object\waypoint.h +# End Source File +# End Group +# Begin Group "Observer" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Observer\Observer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Observer\Observer.h +# End Source File +# End Group +# Begin Group "OsApi" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\OsApi\MONOPUB.H +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OsApi.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OsApi.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OsRegistry.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OsRegistry.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OutWnd.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\OsApi\OutWnd.h +# End Source File +# End Group +# Begin Group "Palman" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Palman\PalMan.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Palman\PalMan.h +# End Source File +# End Group +# Begin Group "Parse" + +# PROP Default_Filter "" +# Begin Group "Scripting" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\parse\lua.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\parse\lua.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\parse\python.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\parse\python.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\parse\scripting.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\parse\scripting.h +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\code\Parse\Encrypt.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Parse\Encrypt.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Parse\PARSELO.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\code\Parse\parselo.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Parse\SEXP.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\code\Parse\SEXP.H +# End Source File +# End Group +# Begin Group "Particle" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Particle\Particle.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Particle\Particle.h +# End Source File +# End Group +# Begin Group "PcxUtils" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\PcxUtils\pcxutils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\PcxUtils\pcxutils.h +# End Source File +# End Group +# Begin Group "Physics" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Physics\Physics.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Physics\Physics.h +# End Source File +# End Group +# Begin Group "Playerman" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Playerman\ManagePilot.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Playerman\ManagePilot.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Playerman\Player.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Playerman\PlayerControl.cpp +# End Source File +# End Group +# Begin Group "Popup" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Popup\Popup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Popup\Popup.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Popup\PopupDead.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Popup\PopupDead.h +# End Source File +# End Group +# Begin Group "Radar" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Radar\Radar.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Radar\Radar.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\radar\radarorb.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\radar\radarorb.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\radar\radarsetup.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\radar\radarsetup.h +# End Source File +# End Group +# Begin Group "Render" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Render\3D.H +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3dClipper.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3ddraw.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3dInternal.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3dLaser.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3dMath.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Render\3dSetup.cpp +# End Source File +# End Group +# Begin Group "Ship" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\ship\Afterburner.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\Afterburner.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\AWACS.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\AWACS.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\Shield.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\Ship.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\Ship.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipContrails.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipContrails.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipFX.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipFX.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipHit.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\ShipHit.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\ship\SubsysDamage.h +# End Source File +# End Group +# Begin Group "Sound" + +# PROP Default_Filter "" +# Begin Group "ogg" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\sound\ogg\ogg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\ogg\ogg.h +# End Source File +# End Group +# Begin Source File + +SOURCE="..\..\code\sound\acm-openal.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\acm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\acm.h +# End Source File +# Begin Source File + +SOURCE="..\..\code\sound\audiostr-openal.cpp" +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\AudioStr.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\AudioStr.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\channel.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\ds.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\ds.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\ds3d.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\ds3d.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\dscap.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\dscap.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\fsspeech.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\fsspeech.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\midifile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\midifile.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\midiseq.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\phrases.xml + +!IF "$(CFG)" == "code - Win32 Release" + +# Begin Custom Build +InputDir=..\..\code\sound +InputPath=..\..\code\sound\phrases.xml +InputName=phrases + +BuildCmds= \ + "$(InputDir)\gc" "$(InputDir)\$(InputName)" \ + "$(InputDir)\gc" /h "$(InputDir)\grammar.h" "$(InputDir)\$(InputName)" \ + + +"$(InputDir)\phrases.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\grammar.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +# Begin Custom Build +InputDir=..\..\code\sound +InputPath=..\..\code\sound\phrases.xml +InputName=phrases + +BuildCmds= \ + "$(InputDir)\gc" "$(InputDir)\$(InputName)" \ + "$(InputDir)\gc" /h "$(InputDir)\grammar.h" "$(InputDir)\$(InputName)" \ + + +"$(InputDir)\phrases.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\grammar.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +# Begin Custom Build +InputDir=..\..\code\sound +InputPath=..\..\code\sound\phrases.xml +InputName=phrases + +BuildCmds= \ + "$(InputDir)\gc" "$(InputDir)\$(InputName)" \ + "$(InputDir)\gc" /h "$(InputDir)\grammar.h" "$(InputDir)\$(InputName)" \ + + +"$(InputDir)\phrases.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\grammar.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# Begin Custom Build +InputDir=..\..\code\sound +InputPath=..\..\code\sound\phrases.xml +InputName=phrases + +BuildCmds= \ + "$(InputDir)\gc" "$(InputDir)\$(InputName)" \ + "$(InputDir)\gc" /h "$(InputDir)\grammar.h" "$(InputDir)\$(InputName)" \ + + +"$(InputDir)\phrases.cfg" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(InputDir)\grammar.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\RBAudio.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\RBAudio.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\rtvoice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\rtvoice.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\Sound.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\Sound.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\speech.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\speech.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\voicerec.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\sound\voicerec.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\WinMIDI.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\WinMIDI.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Sound\winmidi_base.cpp +# End Source File +# End Group +# Begin Group "Starfield" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Starfield\Nebula.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Starfield\Nebula.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Starfield\StarField.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Starfield\StarField.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Starfield\Supernova.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Starfield\Supernova.h +# End Source File +# End Group +# Begin Group "Stats" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Stats\Medals.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Stats\Medals.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Stats\Scoring.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Stats\Scoring.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Stats\Stats.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Stats\Stats.h +# End Source File +# End Group +# Begin Group "Ui" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\UI\BUTTON.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\CHECKBOX.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\GADGET.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\icon.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\INPUTBOX.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\KEYTRAP.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\LISTBOX.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\RADIO.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\SCROLL.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\slider.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Ui\SLIDER2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\UI.H +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\UiDefs.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\UIDRAW.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\UIMOUSE.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\UI\WINDOW.cpp +# End Source File +# End Group +# Begin Group "VCodec" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\VCodec\CODEC1.CPP +# End Source File +# Begin Source File + +SOURCE=..\..\code\VCodec\CODEC1.H +# End Source File +# End Group +# Begin Group "Weapon" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Weapon\Beam.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Beam.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Corkscrew.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Corkscrew.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Emp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Emp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Flak.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Flak.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\MuzzleFlash.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\MuzzleFlash.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Shockwave.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Shockwave.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Swarm.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Swarm.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Trails.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Trails.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Weapon.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Weapon\Weapons.cpp +# End Source File +# End Group +# Begin Group "Nebula" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Nebula\Neb.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Nebula\Neb.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Nebula\NebLightning.cpp + +!IF "$(CFG)" == "code - Win32 Release" + +# ADD CPP /Od + +!ELSEIF "$(CFG)" == "code - Win32 Debug" + +!ELSEIF "$(CFG)" == "code - Win32 Debug Inferno" + +!ELSEIF "$(CFG)" == "code - Win32 Release Inferno" + +# ADD BASE CPP /Od +# ADD CPP /Od + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=..\..\code\Nebula\NebLightning.h +# End Source File +# End Group +# Begin Group "Localization" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Localization\fhash.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Localization\fhash.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Localization\localize.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Localization\localize.h +# End Source File +# End Group +# Begin Group "TgaUtils" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\TgaUtils\TgaUtils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\TgaUtils\TgaUtils.h +# End Source File +# End Group +# Begin Group "Demo" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Demo\Demo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Demo\Demo.h +# End Source File +# End Group +# Begin Group "InetFile" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Inetfile\CFtp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Inetfile\CFtp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Inetfile\Chttpget.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Inetfile\Chttpget.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Inetfile\inetgetfile.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Inetfile\inetgetfile.h +# End Source File +# End Group +# Begin Group "ExceptionHandler" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\ExceptionHandler\ExceptionHandler.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\ExceptionHandler\ExceptionHandler.h +# End Source File +# End Group +# Begin Group "Network" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\network\chat_api.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\chat_api.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\Multi.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\Multi.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_campaign.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_campaign.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_data.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_data.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_dogfight.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_dogfight.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_endgame.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_endgame.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_ingame.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_ingame.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_kick.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_kick.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_log.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_log.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_obj.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_obj.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_observer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_observer.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_oo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_oo.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_options.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_options.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pause.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pause.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pinfo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pinfo.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_ping.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_ping.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pmsg.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_pmsg.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\multi_pxo.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\multi_pxo.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_rate.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_rate.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_respawn.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_respawn.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\multi_sexp.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\network\multi_sexp.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_team.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_team.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_update.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_update.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_voice.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_voice.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_xfer.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multi_xfer.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multilag.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multilag.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiMsgs.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\multimsgs.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiTeamSelect.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiTeamSelect.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiUI.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiUI.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiUtil.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\MultiUtil.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\PsNet.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\PsNet.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\Psnet2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\Psnet2.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\stand_gui.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Network\stand_gui.h +# End Source File +# End Group +# Begin Group "Decals" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\decals\decals.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\decals\decals.h +# End Source File +# End Group +# Begin Group "ddsutils" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\ddsutils\ddsutils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\ddsutils\ddsutils.h +# End Source File +# End Group +# Begin Group "Cmdline" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Cmdline\cmdline.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Cmdline\cmdline.h +# End Source File +# End Group +# Begin Group "Species_Defs" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\species_defs\species_defs.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\species_defs\species_defs.h +# End Source File +# End Group +# Begin Group "jpgutils" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\jpgutils\jpgutils.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\jpgutils\jpgutils.h +# End Source File +# End Group +# Begin Group "Autopilot" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\Autopilot\Autopilot.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\Autopilot\Autopilot.h +# End Source File +# End Group +# Begin Group "iff_defs" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\iff_defs\iff_defs.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\iff_defs\iff_defs.h +# End Source File +# End Group +# Begin Group "fs2netd" + +# PROP Default_Filter "" +# Begin Source File + +SOURCE=..\..\code\fs2netd\fs2netd_client.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\fs2netd_client.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\protocol.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\tcp_client.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\tcp_client.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\tcp_socket.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\fs2netd\tcp_socket.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/MSVC_6_Release/libjpeg.dsp b/projects/MSVC_6_Release/libjpeg.dsp new file mode 100644 index 0000000000..594bb7b8bf --- /dev/null +++ b/projects/MSVC_6_Release/libjpeg.dsp @@ -0,0 +1,382 @@ +# Microsoft Developer Studio Project File - Name="libjpeg" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libjpeg - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libjpeg.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libjpeg.mak" CFG="libjpeg - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libjpeg - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libjpeg - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "libjpeg - Win32 Debug Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE "libjpeg - Win32 Release Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libjpeg - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\libjpeg" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release\Profile\libjpeg.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\libjpeg" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_MBCS" /D "_LIB" /D "WIN32" /D "_DEBUG" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug/libjpeg_d.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\libjpeg_d.lib" + +!ELSEIF "$(CFG)" == "libjpeg - Win32 Debug Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "libjpeg___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "libjpeg___Win32_Debug_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno" +# PROP Intermediate_Dir "Debug_Inferno\Profile\libjpeg" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "_MBCS" /D "_LIB" /D "WIN32" /D "_DEBUG" /FR /YX /FD /GZ /c +# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /D "_MBCS" /D "_LIB" /D "WIN32" /D "_DEBUG" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Debug/libjpeg_d.bsc" +# ADD BSC32 /nologo /o"Debug_Inferno/libjpeg_d.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"Debug\libjpeg_d.lib" +# ADD LIB32 /nologo /out:"Debug_Inferno\libjpeg_d.lib" + +!ELSEIF "$(CFG)" == "libjpeg - Win32 Release Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "libjpeg___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "libjpeg___Win32_Release_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno" +# PROP Intermediate_Dir "Release_Inferno\Profile\libjpeg" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Release\Profile\libjpeg.bsc" +# ADD BSC32 /nologo /o"Release_Inferno\Profile\libjpeg.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "libjpeg - Win32 Release" +# Name "libjpeg - Win32 Debug" +# Name "libjpeg - Win32 Debug Inferno" +# Name "libjpeg - Win32 Release Inferno" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\libjpeg\jcapimin.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcapistd.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jccoefct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jccolor.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcdctmgr.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jchuff.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcinit.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcmainct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcmarker.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcmaster.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcomapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcparam.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcphuff.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcprepct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jcsample.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jctrans.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdapimin.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdapistd.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdatadst.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdatasrc.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdcoefct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdcolor.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jddctmgr.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdhuff.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdinput.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdmainct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdmarker.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdmaster.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdmerge.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdphuff.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdpostct.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdsample.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdtrans.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jerror.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jfdctflt.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jfdctfst.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jfdctint.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jidctflt.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jidctfst.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jidctint.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jidctred.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jmemansi.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jmemmgr.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jquant1.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jquant2.c +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jutils.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\libjpeg\cderror.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\cdjpeg.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jchuff.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jconfig_vc.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdct.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jdhuff.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jerror.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jinclude.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jmemsys.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jmorecfg.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jpegint.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jpeglib.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\jversion.h +# End Source File +# Begin Source File + +SOURCE=..\..\libjpeg\transupp.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/MSVC_6_Release/liblua.dsp b/projects/MSVC_6_Release/liblua.dsp new file mode 100644 index 0000000000..2e7987d8f3 --- /dev/null +++ b/projects/MSVC_6_Release/liblua.dsp @@ -0,0 +1,362 @@ +# Microsoft Developer Studio Project File - Name="liblua" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=liblua - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "liblua.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "liblua.mak" CFG="liblua - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "liblua - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "liblua - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE "liblua - Win32 Debug Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE "liblua - Win32 Release Inferno" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "liblua - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\liblua" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release\Profile\liblua.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "liblua - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "liblua___Win32_Debug" +# PROP BASE Intermediate_Dir "liblua___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\liblua" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug/liblua_d.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo /out:"Debug\liblua_d.lib" + +!ELSEIF "$(CFG)" == "liblua - Win32 Debug Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "liblua___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "liblua___Win32_Debug_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno" +# PROP Intermediate_Dir "Debug_Inferno\Profile\liblua" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /FR /YX /FD /GZ /c +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Debug/liblua_d.bsc" +# ADD BSC32 /nologo /o"Debug_Inferno/liblua_d.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo /out:"Debug\liblua_d.lib" +# ADD LIB32 /nologo /out:"Debug_Inferno\liblua_d.lib" + +!ELSEIF "$(CFG)" == "liblua - Win32 Release Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "liblua___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "liblua___Win32_Release_Inferno" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno" +# PROP Intermediate_Dir "Release_Inferno\Profile\liblua" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Release\Profile\liblua.bsc" +# ADD BSC32 /nologo /o"Release_Inferno\Profile\liblua.bsc" +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "liblua - Win32 Release" +# Name "liblua - Win32 Debug" +# Name "liblua - Win32 Debug Inferno" +# Name "liblua - Win32 Release Inferno" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\lua\lapi.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lauxlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lbaselib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lcode.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldblib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldebug.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldo.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldump.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lfunc.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lgc.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\linit.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\liolib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\llex.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lmathlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lmem.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\loadlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lobject.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lopcodes.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\loslib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lparser.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lstate.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lstring.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lstrlib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltable.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltablib.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltests.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltm.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lua.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lundump.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lvm.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lzio.c +# End Source File +# Begin Source File + +SOURCE=..\..\lua\print.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\lua\lapi.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lauxlib.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lcode.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldebug.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ldo.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lfunc.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lgc.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\llex.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\llimits.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lmem.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lobject.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lopcodes.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lparser.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lstate.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lstring.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltable.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\ltm.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lua.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\luaconf.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lualib.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lundump.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lvm.h +# End Source File +# Begin Source File + +SOURCE=..\..\lua\lzio.h +# End Source File +# End Group +# End Target +# End Project diff --git a/projects/MSVC_6_Release/wxFRED2.dsp b/projects/MSVC_6_Release/wxFRED2.dsp new file mode 100644 index 0000000000..846c18b66d --- /dev/null +++ b/projects/MSVC_6_Release/wxFRED2.dsp @@ -0,0 +1,485 @@ +# Microsoft Developer Studio Project File - Name="wxFRED2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Application" 0x0101 + +CFG=wxFRED2 - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "wxFRED2.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "wxFRED2.mak" CFG="wxFRED2 - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "wxFRED2 - Win32 Release" (based on "Win32 (x86) Application") +!MESSAGE "wxFRED2 - Win32 Debug" (based on "Win32 (x86) Application") +!MESSAGE "wxFRED2 - Win32 Debug Inferno" (based on "Win32 (x86) Application") +!MESSAGE "wxFRED2 - Win32 Release Inferno" (based on "Win32 (x86) Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +MTL=midl.exe +RSC=rc.exe + +!IF "$(CFG)" == "wxFRED2 - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "wxFRED2___Win32_Release" +# PROP BASE Intermediate_Dir "wxFRED2___Win32_Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release\Profile\wxfred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/msw" /I "$(WXWIN)/lib/vc_lib/msw" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /U "_DEBUG" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Release/Profile/wxFRED2.bsc" "Release\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"Release/wxfred2_open_trunk_r.exe" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT LINK32 /nodefaultlib +# Begin Custom Build - Copying build... +ProjDir=. +InputPath=.\Release\wxfred2_open_trunk_r.exe +SOURCE="$(InputPath)" + +BuildCmds= \ + copy $(InputPath) "$(FS2PATH)\wxfred2_open_trunk_r.exe" \ + copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \ + + +"$(FS2PATH)\wxfred2_open_trunk_r.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "wxFRED2___Win32_Debug" +# PROP BASE Intermediate_Dir "wxFRED2___Win32_Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug\Profile\wxfred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/mswd" /I "$(WXWIN)/lib/vc_lib/mswd" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /U "NDEBUG" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo /o"Debug/Profile/wxFRED2.bsc" "Debug\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"Debug/wxfred2_open_trunk_d.exe" /pdbtype:sept /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT LINK32 /nodefaultlib +# Begin Custom Build - Copying build... +ProjDir=. +InputPath=.\Debug\wxfred2_open_trunk_d.exe +SOURCE="$(InputPath)" + +BuildCmds= \ + copy $(InputPath) "$(FS2PATH)/wxfred2_open_trunk_d.exe" \ + copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \ + + +"$(FS2PATH)/wxfred2_open_trunk_d.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Debug Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "wxFRED2___Win32_Debug_Inferno" +# PROP BASE Intermediate_Dir "wxFRED2___Win32_Debug_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug_Inferno" +# PROP Intermediate_Dir "Debug_Inferno\Profile\wxfred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/mswd" /I "$(WXWIN)/lib/vc_lib/mswd" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /U "NDEBUG" /FR /YX /FD /GZ /c +# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/mswd" /I "$(WXWIN)/lib/vc_lib/mswd" /D "_WINDOWS" /D "WIN32" /D "_DEBUG" /D "INF_BUILD" /U "NDEBUG" /FR /YX /FD /GZ /c +# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "_DEBUG" +# ADD RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Debug/Profile/wxFRED2.bsc" "Debug\Profile\*.sbr" +# ADD BSC32 /nologo /o"Debug_Inferno/Profile/wxFRED2.bsc" "Debug\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"Debug/wxfred2_open_trunk_d.exe" /pdbtype:sept /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT BASE LINK32 /nodefaultlib +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28d_xrc.lib wxmsw28d_html.lib wxmsw28d_adv.lib wxmsw28d_core.lib wxbase28d_xml.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libcd.lib" /nodefaultlib:"libcid.lib" /out:"Debug_Inferno/wxfred2_open_trunk_d_INF.exe" /pdbtype:sept /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT LINK32 /nodefaultlib +# Begin Custom Build - Copying build... +ProjDir=. +InputPath=.\Debug_Inferno\wxfred2_open_trunk_d_INF.exe +SOURCE="$(InputPath)" + +BuildCmds= \ + copy $(InputPath) "$(FS2PATH)/wxfred2_open_trunk_d_INF.exe" \ + copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \ + + +"$(FS2PATH)/wxfred2_open_trunk_d_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Release Inferno" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "wxFRED2___Win32_Release_Inferno" +# PROP BASE Intermediate_Dir "wxFRED2___Win32_Release_Inferno" +# PROP BASE Ignore_Export_Lib 0 +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release_Inferno" +# PROP Intermediate_Dir "Release_Inferno\Profile\wxfred2" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /MD /W3 /GX /Zi /O2 /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/msw" /I "$(WXWIN)/lib/vc_lib/msw" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /U "_DEBUG" /YX /FD /c +# SUBTRACT BASE CPP /Fr +# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "$(WXWIN)/include" /I "$(WXWIN)/contrib/include" /I "$(WXWIN)/lib/msw" /I "$(WXWIN)/lib/vc_lib/msw" /D "WIN32" /D "_WINDOWS" /D "NDEBUG" /D "INF_BUILD" /U "_DEBUG" /YX /FD /c +# SUBTRACT CPP /Fr +# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 +# ADD BASE RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "NDEBUG" +# ADD RSC /l 0x409 /i "../../code/wxfred2/res" /i "$(WXWIN)/include" /i "$(WXWIN)/contrib/include" /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo /o"Release/Profile/wxFRED2.bsc" "Release\Profile\*.sbr" +# ADD BSC32 /nologo /o"Release_Inferno/Profile/wxFRED2.bsc" "Release\Profile\*.sbr" +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"Release/wxfred2_open_trunk_r.exe" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT BASE LINK32 /nodefaultlib +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib comctl32.lib rpcrt4.lib wsock32.lib winmm.lib wxmsw28_xrc.lib wxmsw28_html.lib wxmsw28_adv.lib wxmsw28_core.lib wxbase28_xml.lib wxbase28.lib wxtiff.lib wxjpeg.lib wxpng.lib wxzlib.lib wxregex.lib wxexpat.lib /nologo /subsystem:windows /map /debug /machine:I386 /nodefaultlib:"libc.lib" /nodefaultlib:"libci.lib" /out:"Release_Inferno/wxfred2_open_trunk_r_INF.exe" /libpath:"$(WXWIN)/lib" /libpath:"$(WXWIN)/lib/vc_lib" +# SUBTRACT LINK32 /nodefaultlib +# Begin Custom Build - Copying build... +ProjDir=. +InputPath=.\Release_Inferno\wxfred2_open_trunk_r_INF.exe +SOURCE="$(InputPath)" + +BuildCmds= \ + copy $(InputPath) "$(FS2PATH)\wxfred2_open_trunk_r_INF.exe" \ + copy "$(ProjDir)\..\..\code\wxfred2\wxfred.xrc" "$(FS2PATH)\wxfred.xrc" \ + + +"$(FS2PATH)\wxfred2_open_trunk_r_INF.exe" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) + +"$(FS2PATH)\wxfred.xrc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + $(BuildCmds) +# End Custom Build + +!ENDIF + +# Begin Target + +# Name "wxFRED2 - Win32 Release" +# Name "wxFRED2 - Win32 Debug" +# Name "wxFRED2 - Win32 Debug Inferno" +# Name "wxFRED2 - Win32 Release Inferno" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\code\wxfred2\aboutbox.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\asteroidfieldeditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\campaigneditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\commandbriefingeditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\debriefingeditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\fredframe.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\missionspecseditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\setglobalshipflagseditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\shieldsystemeditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\voiceactingmanagereditor.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\voicefilemanager.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wxfred2.cpp +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wxfred_xrc.cpp +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\code\wxfred2\aboutbox.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\asteroidfieldeditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\campaigneditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\commandbriefingeditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\debriefingeditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\fredframe.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\missionspecseditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\setglobalshipflagseditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\shieldsystemeditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\voiceactingmanagereditor.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\voicefilemanager.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wxfred2.h +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wxfred_xrc.h +# End Source File +# End Group +# Begin Group "Resource Files" + +# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\blank.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\bullseye.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\cdrom.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\computer.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\drive.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\file1.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\floppy.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\folder1.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\folder2.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\FRED.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\hand.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\magnif1.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\noentry.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\pbrush.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\pencil.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\pntleft.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\pntright.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\query.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\removble.ico +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\rightarr.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\roller.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\size.cur +# End Source File +# Begin Source File + +SOURCE=..\..\code\wxfred2\wx\msw\watch1.cur +# End Source File +# End Group +# Begin Source File + +SOURCE=..\..\code\wxfred2\wxfred.xrc + +!IF "$(CFG)" == "wxFRED2 - Win32 Release" + +# Begin Custom Build - Compiling XRC resources... +InputDir=..\..\code\wxfred2 +InputPath=..\..\code\wxfred2\wxfred.xrc +InputName=wxfred + +"$(InputDir)/$(InputName)_xrc.inl" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(WXRC)\wxrc.exe" /c /o"$(InputDir)/$(InputName)_xrc.inl" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Debug" + +# Begin Custom Build - Compiling XRC resources... +InputDir=..\..\code\wxfred2 +InputPath=..\..\code\wxfred2\wxfred.xrc +InputName=wxfred + +"$(InputDir)/$(InputName)_xrc.inl" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(WXRC)\wxrc.exe" /c /o"$(InputDir)/$(InputName)_xrc.inl" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Debug Inferno" + +# Begin Custom Build - Compiling XRC resources... +InputDir=..\..\code\wxfred2 +InputPath=..\..\code\wxfred2\wxfred.xrc +InputName=wxfred + +"$(InputDir)/$(InputName)_xrc.inl" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(WXRC)\wxrc.exe" /c /o"$(InputDir)/$(InputName)_xrc.inl" "$(InputPath)" + +# End Custom Build + +!ELSEIF "$(CFG)" == "wxFRED2 - Win32 Release Inferno" + +# Begin Custom Build - Compiling XRC resources... +InputDir=..\..\code\wxfred2 +InputPath=..\..\code\wxfred2\wxfred.xrc +InputName=wxfred + +"$(InputDir)/$(InputName)_xrc.inl" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + "$(WXRC)\wxrc.exe" /c /o"$(InputDir)/$(InputName)_xrc.inl" "$(InputPath)" + +# End Custom Build + +!ENDIF + +# End Source File +# End Target +# End Project diff --git a/projects/Xcode/FS2_Open.xcodeproj/project.pbxproj b/projects/Xcode/FS2_Open.xcodeproj/project.pbxproj index 87d968797e..6c868d9590 100755 --- a/projects/Xcode/FS2_Open.xcodeproj/project.pbxproj +++ b/projects/Xcode/FS2_Open.xcodeproj/project.pbxproj @@ -677,6 +677,8 @@ 34DCF87008CFB15700A528A0 /* cryptstring.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34DCF86F08CFB15700A528A0 /* cryptstring.cpp */; }; 34DCF88208CFB29E00A528A0 /* encrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 345954B208C3D6A0003B1351 /* encrypt.cpp */; }; 34DCF88608CFB2B500A528A0 /* scramble.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 34DCF88408CFB2B500A528A0 /* scramble.cpp */; }; + 914580490FD036ED00788595 /* multi_sexp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 914580470FD036ED00788595 /* multi_sexp.cpp */; }; + 9145804A0FD036ED00788595 /* multi_sexp.h in Headers */ = {isa = PBXBuildFile; fileRef = 914580480FD036ED00788595 /* multi_sexp.h */; }; /* End PBXBuildFile section */ /* Begin PBXBuildRule section */ @@ -1551,6 +1553,8 @@ 34DCF87A08CFB21600A528A0 /* scramble */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = scramble; sourceTree = BUILT_PRODUCTS_DIR; }; 34DCF88408CFB2B500A528A0 /* scramble.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = scramble.cpp; sourceTree = ""; }; 34DCF88508CFB2B500A528A0 /* scramble.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = scramble.h; sourceTree = ""; }; + 914580470FD036ED00788595 /* multi_sexp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = multi_sexp.cpp; sourceTree = ""; }; + 914580480FD036ED00788595 /* multi_sexp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = multi_sexp.h; sourceTree = ""; }; B2F67ED704C74A3F00A80002 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = /System/Library/Frameworks/OpenGL.framework; sourceTree = ""; }; B2F67F1E04C773E400A80002 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = /System/Library/Frameworks/GLUT.framework; sourceTree = ""; }; F5A47A9D01A0482F01D3D55B /* SDLMain.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SDLMain.h; sourceTree = SOURCE_ROOT; }; @@ -2480,6 +2484,8 @@ 3459545108C3D6A0003B1351 /* network */ = { isa = PBXGroup; children = ( + 914580470FD036ED00788595 /* multi_sexp.cpp */, + 914580480FD036ED00788595 /* multi_sexp.h */, 3488082D0DA05488001CAB39 /* chat_api.cpp */, 3488082E0DA05488001CAB39 /* chat_api.h */, 3459545408C3D6A0003B1351 /* multi.cpp */, @@ -3152,6 +3158,7 @@ 25FB46190E2E537F0089DF93 /* gropenglshader.h in Headers */, 25FB461E0E2E55370089DF93 /* gropenglstate.h in Headers */, 25FB46230E2E55500089DF93 /* gropengldraw.h in Headers */, + 9145804A0FD036ED00788595 /* multi_sexp.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3663,6 +3670,7 @@ 25FB461D0E2E55370089DF93 /* gropenglstate.cpp in Sources */, 25FB461F0E2E55370089DF93 /* gropenglshader.cpp in Sources */, 25FB46220E2E55500089DF93 /* gropengldraw.cpp in Sources */, + 914580490FD036ED00788595 /* multi_sexp.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -4616,6 +4624,559 @@ }; name = Release; }; + 915F25D00F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = "3.6.10-trunk"; + DEAD_CODE_STRIPPING = NO; + DEPLOYMENT_POSTPROCESSING = YES; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + _DEBUG, + SCP_UNIX, + NO_DIRECT3D, + USE_OPENAL, + APPLE_APP, + INF_BUILD, + ); + GENERATE_PROFILING_CODE = NO; + INFOPLIST_FILE = "Info-debug.plist"; + MACOSX_DEPLOYMENT_TARGET = 10.4; + PRODUCT_NAME = "FS2_Open (debug)"; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + STRIP_INSTALLED_PRODUCT = NO; + UNSTRIPPED_PRODUCT = YES; + WARNING_CFLAGS = "-Wno-char-subscripts"; + }; + name = Debug_Inferno; + }; + 915F25D10F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + FRAMEWORK_SEARCH_PATHS = ./Frameworks; + HEADER_SEARCH_PATHS = ( + ../../code, + ../../libjpeg, + ../../lua, + ./Frameworks/SDL.framework/Headers, + ); + LIBRARY_SEARCH_PATHS = ( + "$(LIBRARY_SEARCH_PATHS)", + "$(SRCROOT)/build/Debug", + ); + OTHER_LDFLAGS = ( + "-framework", + SDL, + "-lSystemStubs", + ); + PREBINDING = NO; + }; + name = Debug_Inferno; + }; + 915F25D20F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/Frameworks\""; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + _DEBUG, + SCP_UNIX, + USE_OPENAL, + NO_DIRECT3D, + APPLE_APP, + ); + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/Ogg.framework/Headers, + ./Frameworks/Vorbis.framework/Headers, + ./Frameworks/Theora.framework/Headers, + ./Frameworks/SDL.framework/Headers, + /System/Library/Frameworks/OpenAL.framework/Headers, + /System/Library/Frameworks/OpenGL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/lib"; + LIBRARY_STYLE = STATIC; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = NO; + PRODUCT_NAME = code; + SECTORDER_FLAGS = ""; + SEPARATE_STRIP = NO; + SKIP_INSTALL = YES; + WARNING_CFLAGS = "-Wno-char-subscripts"; + ZERO_LINK = NO; + }; + name = Debug_Inferno; + }; + 915F25D30F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + GCC_PREPROCESSOR_DEFINITIONS = ( + _DEBUG, + SCP_UNIX, + USE_OPENAL, + NO_DIRECT3D, + APPLE_APP, + ); + HEADER_SEARCH_PATHS = ../../libjpeg; + LIBRARY_STYLE = STATIC; + PREBINDING = NO; + PRODUCT_NAME = jpeg; + SEPARATE_STRIP = NO; + WARNING_CFLAGS = ( + "-Wno-char-subscripts", + "-Wno-main", + ); + }; + name = Debug_Inferno; + }; + 915F25D40F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + LIBRARY_SEARCH_PATHS = ( + "$(LIBRARY_SEARCH_PATHS)", + "$(SRCROOT)/../../lua", + ); + PREBINDING = NO; + PRODUCT_NAME = lua; + SEPARATE_STRIP = NO; + UNSTRIPPED_PRODUCT = "$(UNSTRIPPED_PRODUCT)"; + }; + name = Debug_Inferno; + }; + 915F25D50F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = YES; + PRODUCT_NAME = cfilearchiver; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug_Inferno; + }; + 915F25D60F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = YES; + PRODUCT_NAME = cfileextractor; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug_Inferno; + }; + 915F25D70F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = YES; + PRODUCT_NAME = cryptstring; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug_Inferno; + }; + 915F25D80F8AA7CE00521775 /* Debug_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = YES; + PRODUCT_NAME = scramble; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Debug_Inferno; + }; + 915F25D90F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = ( + ppc, + i386, + ); + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = "3.6.10-trunk"; + DEAD_CODE_STRIPPING = YES; + DEPLOYMENT_POSTPROCESSING = YES; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 3; + GCC_PREPROCESSOR_DEFINITIONS = ( + INF_BUILD, + NDEBUG, + SCP_UNIX, + NO_DIRECT3D, + USE_OPENAL, + APPLE_APP, + ); + GCC_STRICT_ALIASING = YES; + GCC_UNROLL_LOOPS = YES; + INFOPLIST_FILE = Info.plist; + MACOSX_DEPLOYMENT_TARGET = 10.4; + SDKROOT = /Developer/SDKs/MacOSX10.4u.sdk; + SEPARATE_STRIP = YES; + WARNING_CFLAGS = "-Wno-char-subscripts"; + }; + name = Release_Inferno; + }; + 915F25DA0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ./Frameworks; + HEADER_SEARCH_PATHS = ( + ../../code, + ../../libjpeg, + ../../lua, + ./Frameworks/SDL.framework/Headers, + ); + LIBRARY_SEARCH_PATHS = ( + "$(LIBRARY_SEARCH_PATHS)", + "$(SRCROOT)/build/Debug", + ); + OTHER_LDFLAGS = ( + "-framework", + SDL, + "-lSystemStubs", + ); + PREBINDING = NO; + PRODUCT_NAME = FS2_Open; + SEPARATE_STRIP = YES; + STRIP_INSTALLED_PRODUCT = YES; + }; + name = Release_Inferno; + }; + 915F25DB0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)", + ); + FRAMEWORK_SEARCH_PATHS_QUOTED_1 = "\"$(SRCROOT)/Frameworks\""; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/Ogg.framework/Headers, + ./Frameworks/Vorbis.framework/Headers, + ./Frameworks/Theora.framework/Headers, + ./Frameworks/SDL.framework/Headers, + /System/Library/Frameworks/OpenAL.framework/Headers, + /System/Library/Frameworks/OpenGL.framework/Headers, + ); + LIBRARY_STYLE = STATIC; + PREBINDING = NO; + PRODUCT_NAME = code; + SEPARATE_STRIP = NO; + STRIP_INSTALLED_PRODUCT = NO; + STRIP_STYLE = all; + }; + name = Release_Inferno; + }; + 915F25DC0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + HEADER_SEARCH_PATHS = ../../libjpeg; + LIBRARY_STYLE = STATIC; + PREBINDING = NO; + PRODUCT_NAME = jpeg; + SEPARATE_STRIP = NO; + STRIP_INSTALLED_PRODUCT = NO; + STRIP_STYLE = all; + }; + name = Release_Inferno; + }; + 915F25DD0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEAD_CODE_STRIPPING = NO; + LIBRARY_SEARCH_PATHS = ( + "$(LIBRARY_SEARCH_PATHS)", + "$(SRCROOT)/../../lua", + ); + PREBINDING = NO; + PRODUCT_NAME = lua; + SEPARATE_STRIP = NO; + STRIP_INSTALLED_PRODUCT = NO; + STRIP_STYLE = all; + }; + name = Release_Inferno; + }; + 915F25DE0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = NO; + PRODUCT_NAME = cfilearchiver; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release_Inferno; + }; + 915F25DF0F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = YES; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = NO; + PRODUCT_NAME = cfileextractor; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release_Inferno; + }; + 915F25E00F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = NO; + PRODUCT_NAME = cryptstring; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release_Inferno; + }; + 915F25E10F8AA7D700521775 /* Release_Inferno */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = YES; + DEAD_CODE_STRIPPING = NO; + GCC_DEBUGGING_SYMBOLS = default; + GCC_GENERATE_DEBUGGING_SYMBOLS = NO; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCP_UNIX, + NDEBUG, + NO_DIRECT3D, + ); + GCC_USE_GCC3_PFE_SUPPORT = YES; + HEADER_SEARCH_PATHS = ( + ../../code, + ./Frameworks/SDL.framework/Headers, + ); + INSTALL_PATH = "$(HOME)/bin"; + MACOSX_DEPLOYMENT_TARGET = ""; + OTHER_CFLAGS = ""; + OTHER_LDFLAGS = ""; + OTHER_REZFLAGS = ""; + PREBINDING = NO; + PRODUCT_NAME = scramble; + SECTORDER_FLAGS = ""; + WARNING_CFLAGS = ( + "-Wmost", + "-Wno-four-char-constants", + "-Wno-unknown-pragmas", + ); + }; + name = Release_Inferno; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ @@ -4623,7 +5184,9 @@ isa = XCConfigurationList; buildConfigurations = ( 344BA94E095A5A2000B9D97D /* Debug */, + 915F25D40F8AA7CE00521775 /* Debug_Inferno */, 344BA94F095A5A2000B9D97D /* Release */, + 915F25DD0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4632,7 +5195,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34BE722D08C940D200673B45 /* Debug */, + 915F25D30F8AA7CE00521775 /* Debug_Inferno */, 34BE722E08C940D200673B45 /* Release */, + 915F25DC0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4641,7 +5206,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34BE723108C940D200673B45 /* Debug */, + 915F25D20F8AA7CE00521775 /* Debug_Inferno */, 34BE723208C940D200673B45 /* Release */, + 915F25DB0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4650,7 +5217,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34BE723508C940D200673B45 /* Debug */, + 915F25D10F8AA7CE00521775 /* Debug_Inferno */, 34BE723608C940D200673B45 /* Release */, + 915F25DA0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4659,7 +5228,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34BE723908C940D200673B45 /* Debug */, + 915F25D00F8AA7CE00521775 /* Debug_Inferno */, 34BE723A08C940D200673B45 /* Release */, + 915F25D90F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4668,7 +5239,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34DCF83808CFA6F000A528A0 /* Debug */, + 915F25D50F8AA7CE00521775 /* Debug_Inferno */, 34DCF83908CFA6F000A528A0 /* Release */, + 915F25DE0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4677,7 +5250,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34DCF85F08CFAF0500A528A0 /* Debug */, + 915F25D60F8AA7CE00521775 /* Debug_Inferno */, 34DCF86008CFAF0500A528A0 /* Release */, + 915F25DF0F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4686,7 +5261,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34DCF86C08CFB13E00A528A0 /* Debug */, + 915F25D70F8AA7CE00521775 /* Debug_Inferno */, 34DCF86D08CFB13E00A528A0 /* Release */, + 915F25E00F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; @@ -4695,7 +5272,9 @@ isa = XCConfigurationList; buildConfigurations = ( 34DCF87D08CFB23400A528A0 /* Debug */, + 915F25D80F8AA7CE00521775 /* Debug_Inferno */, 34DCF87E08CFB23400A528A0 /* Release */, + 915F25E10F8AA7D700521775 /* Release_Inferno */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; diff --git a/projects/Xcode/Info.plist b/projects/Xcode/Info.plist index 908c1e8a30..7b05a4e387 100644 --- a/projects/Xcode/Info.plist +++ b/projects/Xcode/Info.plist @@ -15,7 +15,7 @@ CFBundleSignature ???? CFBundleVersion - 3.6.10-trunk + 3.6.11-trunk NSMainNibFile MainMenu NSPrincipalClass diff --git a/speech/include/Spddkhlp.h b/speech/include/Spddkhlp.h new file mode 100644 index 0000000000..9e0aa32d08 --- /dev/null +++ b/speech/include/Spddkhlp.h @@ -0,0 +1,854 @@ +/******************************************************************************* +* SPDDKHLP.h * +*------------* +* Description: +* This is the header file for core helper functions implementation. +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*******************************************************************************/ +#ifndef SPDDKHLP_h +#define SPDDKHLP_h + +#ifndef SPHelper_h +#include +#endif + +#include + +#ifndef SPError_h +#include +#endif + +#ifndef SPDebug_h +#include +#endif + +#ifndef _INC_LIMITS +#include +#endif + +#ifndef _INC_CRTDBG +#include +#endif + +#ifndef _INC_MALLOC +#include +#endif + +#ifndef _INC_MMSYSTEM +#include +#endif + +#ifndef __comcat_h__ +#include +#endif + +//=== Constants ============================================================== +#define sp_countof(x) ((sizeof(x) / sizeof(*(x)))) + +#define SP_IS_BAD_WRITE_PTR(p) ( SPIsBadWritePtr( p, sizeof(*(p)) )) +#define SP_IS_BAD_READ_PTR(p) ( SPIsBadReadPtr( p, sizeof(*(p)) )) +#define SP_IS_BAD_CODE_PTR(p) ( ::IsBadCodePtr((FARPROC)(p) ) +#define SP_IS_BAD_INTERFACE_PTR(p) ( SPIsBadInterfacePtr( (p) ) ) +#define SP_IS_BAD_VARIANT_PTR(p) ( SPIsBadVARIANTPtr( (p) ) ) +#define SP_IS_BAD_STRING_PTR(p) ( SPIsBadStringPtr( (p) ) ) + +#define SP_IS_BAD_OPTIONAL_WRITE_PTR(p) ((p) && SPIsBadWritePtr( p, sizeof(*(p)) )) +#define SP_IS_BAD_OPTIONAL_READ_PTR(p) ((p) && SPIsBadReadPtr( p, sizeof(*(p)) )) +#define SP_IS_BAD_OPTIONAL_INTERFACE_PTR(p) ((p) && SPIsBadInterfacePtr(p)) +#define SP_IS_BAD_OPTIONAL_STRING_PTR(p) ((p) && SPIsBadStringPtr(p)) + +//=== Class, Enum, Struct, Template, and Union Declarations ================== + +//=== Inlines ================================================================ + +/*** Pointer validation functions +*/ + +// TODO: Add decent debug output for bad parameters + +inline BOOL SPIsBadStringPtr( const WCHAR * psz, ULONG cMaxChars = 0xFFFF ) +{ + BOOL IsBad = false; + __try + { + do + { + if( *psz++ == 0 ) return IsBad; + } + while( --cMaxChars ); + } + __except( GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ) + { + IsBad = true; + } + + return IsBad; +} + +inline BOOL SPIsBadReadPtr( const void* pMem, UINT Size ) +{ +#ifdef _DEBUG + BOOL bIsBad = ::IsBadReadPtr( pMem, Size ); + SPDBG_ASSERT(!bIsBad); + return bIsBad; +#else + return ::IsBadReadPtr( pMem, Size ); +#endif +} + +inline BOOL SPIsBadWritePtr( void* pMem, UINT Size ) +{ +#ifdef _DEBUG + BOOL bIsBad = ::IsBadWritePtr( pMem, Size ); + SPDBG_ASSERT(!bIsBad); + return bIsBad; +#else + return ::IsBadWritePtr( pMem, Size ); +#endif +} + +inline BOOL SPIsBadInterfacePtr( const IUnknown* pUnknown ) +{ +#ifdef _DEBUG + BOOL bIsBad = ( ::IsBadReadPtr( pUnknown, sizeof( *pUnknown ) ) || + ::IsBadCodePtr( (FARPROC)((void**)pUnknown)[0] ))? + (true):(false); + SPDBG_ASSERT(!bIsBad); + return bIsBad; +#else + return ( ::IsBadReadPtr( pUnknown, sizeof( *pUnknown ) ) || + ::IsBadCodePtr( (FARPROC)((void**)pUnknown)[0] ))? + (true):(false); +#endif +} + +inline BOOL SPIsBadVARIANTPtr( const VARIANT* pVar ) +{ +#ifdef _DEBUG + BOOL bIsBad = ::IsBadReadPtr( pVar, sizeof( *pVar ) ); + SPDBG_ASSERT(!bIsBad); + return bIsBad; +#else + return ::IsBadReadPtr( pVar, sizeof( *pVar ) ); +#endif +} + +#ifdef __ATLCOM_H__ //--- Only enable these if ATL is being used + +// +// Helper functions can be used to implement GetObjectToken/SetObjectToken for objects that +// support ISpObjectWithToken +// +inline HRESULT SpGenericSetObjectToken(ISpObjectToken * pCallersToken, CComPtr & cpObjToken) +{ + HRESULT hr = S_OK; + if (SP_IS_BAD_INTERFACE_PTR(pCallersToken)) + { + hr = E_INVALIDARG; + } + else + { + if (cpObjToken) + { + hr = SPERR_ALREADY_INITIALIZED; + } + else + { + cpObjToken = pCallersToken; + } + } + return hr; +} + + +inline HRESULT SpGenericGetObjectToken(ISpObjectToken ** ppCallersToken, CComPtr & cpObjToken) +{ + HRESULT hr = S_OK; + if (SP_IS_BAD_WRITE_PTR(ppCallersToken)) + { + hr = E_POINTER; + } + else + { + *ppCallersToken = cpObjToken; + if (*ppCallersToken) + { + (*ppCallersToken)->AddRef(); + } + else + { + hr = S_FALSE; + } + } + return hr; +} + +#endif // __ATLCOM_H__ + + +// +// Helper class for SPSTATEINFO sturcture automatically initializes and cleans up +// the structure + provides a few helper functions. +// +class CSpStateInfo : public SPSTATEINFO +{ +public: + CSpStateInfo() + { + cAllocatedEntries = NULL; + pTransitions = NULL; + } + ~CSpStateInfo() + { + ::CoTaskMemFree(pTransitions); + } + SPTRANSITIONENTRY * FirstEpsilon() + { + return pTransitions; + } + SPTRANSITIONENTRY * FirstRule() + { + return pTransitions + cEpsilons; + } + SPTRANSITIONENTRY * FirstWord() + { + return pTransitions + cEpsilons + cRules; + } + SPTRANSITIONENTRY * FirstSpecialTransition() + { + return pTransitions + cEpsilons + cRules + cWords; + } +}; + + +// +// This basic queue implementation can be used to maintin linked lists of classes. The class T +// must contain the member m_pNext which is used by this template to point to the next element. +// If the bPurgeWhenDeleted is TRUE then all of the elements in the queue will be deleted +// when the queue is deleted, otherwise they will not. +// If bMaintainCount is TRUE then a running count will be maintained, and GetCount() will be +// efficent. If it is FALSE then a running count will not be maintained, and GetCount() will +// be an order N operation. If you do not require a count, then +// + +template class CSpBasicList; + +template +class CSpBasicQueue +{ +public: + T * m_pHead; + T * m_pTail; + ULONG m_cElements; // Warning! Use GetCount() -- Not maintained if bMaintainCount is FALSE. + + CSpBasicQueue() + { + m_pHead = NULL; + if (bMaintainCount) + { + m_cElements = 0; + } + } + + ~CSpBasicQueue() + { + if (bPurgeWhenDeleted) + { + Purge(); + } + } + + HRESULT CreateNode(T ** ppNode) + { + *ppNode = new T; + if (*ppNode) + { + return S_OK; + } + else + { + return E_OUTOFMEMORY; + } + } + + T * GetNext(const T * pNode) + { + return pNode->m_pNext; + } + + + T * Item(ULONG i) + { + T * pNode = m_pHead; + while (pNode && i) + { + i--; + pNode = pNode->m_pNext; + } + return pNode; + } + + void InsertAfter(T * pPrev, T * pNewNode) + { + if (pPrev) + { + pNewNode->m_pNext = pPrev->m_pNext; + pPrev->m_pNext = pNewNode; + if (pNewNode->m_pNext == NULL) + { + m_pTail = pNewNode; + } + if (bMaintainCount) ++m_cElements; + } + else + { + InsertHead(pNewNode); + } + } + + void InsertTail(T * pNode) + { + pNode->m_pNext = NULL; + if (m_pHead) + { + m_pTail->m_pNext = pNode; + } + else + { + m_pHead = pNode; + } + m_pTail = pNode; + if (bMaintainCount) ++m_cElements; + } + + void InsertHead(T * pNode) + { + pNode->m_pNext = m_pHead; + if (m_pHead == NULL) + { + m_pTail = pNode; + } + m_pHead = pNode; + if (bMaintainCount) ++m_cElements; + } + + T * RemoveHead() + { + T * pNode = m_pHead; + if (pNode) + { + m_pHead = pNode->m_pNext; + if (bMaintainCount) --m_cElements; + } + return pNode; + } + + T * RemoveTail() + { + T * pNode = m_pHead; + if (pNode) + { + if (pNode == m_pTail) + { + m_pHead = NULL; + } + else + { + T * pPrev; + do + { + pPrev = pNode; + pNode = pNode->m_pNext; + } while ( pNode != m_pTail ); + pPrev->m_pNext = NULL; + m_pTail = pPrev; + } + if (bMaintainCount) --m_cElements; + } + return pNode; + } + + void Purge() + { + while (m_pHead) + { + T * pDie = m_pHead; + m_pHead = pDie->m_pNext; + delete pDie; + } + if (bMaintainCount) m_cElements = 0; + } + + void ExplicitPurge() + { + T * pDie; + BYTE * pb; + + while (m_pHead) + { + pDie = m_pHead; + m_pHead = pDie->m_pNext; + + pDie->~T(); + + pb = reinterpret_cast(pDie); + delete [] pb; + } + if (bMaintainCount) m_cElements = 0; + } + + + T * GetTail() const + { + if (m_pHead) + { + return m_pTail; + } + return NULL; + } + + T * GetHead() const + { + return m_pHead; + } + + BOOL IsEmpty() const + { + return m_pHead == NULL; + } + + BOOL Remove(T * pNode) + { + if (m_pHead == pNode) + { + m_pHead = pNode->m_pNext; + if (bMaintainCount) --m_cElements; + return TRUE; + } + else + { + T * pCur = m_pHead; + while (pCur) + { + T * pNext = pCur->m_pNext; + if (pNext == pNode) + { + if ((pCur->m_pNext = pNode->m_pNext) == NULL) + { + m_pTail = pCur; + } + if (bMaintainCount) --m_cElements; + return TRUE; + } + pCur = pNext; + } + } + return FALSE; + } + + void MoveAllToHeadOf(CSpBasicQueue & DestQueue) + { + if (m_pHead) + { + m_pTail->m_pNext = DestQueue.m_pHead; + if (DestQueue.m_pHead == NULL) + { + DestQueue.m_pTail = m_pTail; + } + DestQueue.m_pHead = m_pHead; + m_pHead = NULL; + if (bMaintainCount) + { + DestQueue.m_cElements += m_cElements; + m_cElements = 0; + } + } + } + + void MoveAllToList(CSpBasicList & List) + { + if (m_pHead) + { + m_pTail->m_pNext = List.m_pFirst; + List.m_pFirst = m_pHead; + m_pHead = NULL; + } + if (bMaintainCount) + { + m_cElements = 0; + } + } + + BOOL MoveToList(T * pNode, CSpBasicList & List) + { + BOOL bFound = Remove(pNode); + if (bFound) + { + List.AddNode(pNode); + } + return bFound; + } + + ULONG GetCount() const + { + if (bMaintainCount) + { + return m_cElements; + } + else + { + ULONG c = 0; + for (T * pNode = m_pHead; + pNode; + pNode = pNode->m_pNext, c++) {} + return c; + } + } + + // + // The following functions require the class T to implement a static function: + // + // LONG Compare(const T * pElem1, const T * pElem2) + // + // which returns < 0 if pElem1 is less than pElem2, 0 if they are equal, and > 0 if + // pElem1 is greater than pElem2. + // + void InsertSorted(T * pNode) + { + if (m_pHead) + { + if (T::Compare(pNode, m_pTail) >= 0) + { + pNode->m_pNext = NULL; + m_pTail->m_pNext = pNode; + m_pTail = pNode; + } + else + { + // + // We don't have to worry about walking off of the end of the list here since + // we have already checked the tail. + // + T ** ppNext = &m_pHead; + while (T::Compare(pNode, *ppNext) >= 0) + { + ppNext = &((*ppNext)->m_pNext); + } + pNode->m_pNext = *ppNext; + *ppNext = pNode; + } + } + else + { + pNode->m_pNext = NULL; + m_pHead = m_pTail = pNode; + } + if (bMaintainCount) ++m_cElements; + } + + HRESULT InsertSortedUnique(T * pNode) + { + HRESULT hr = S_OK; + if (m_pHead) + { + if (T::Compare(pNode, m_pTail) > 0) + { + pNode->m_pNext = NULL; + m_pTail->m_pNext = pNode; + m_pTail = pNode; + } + else + { + // + // We don't have to worry about walking off of the end of the list here since + // we have already checked the tail. + // + T ** ppNext = &m_pHead; + while (T::Compare(pNode, *ppNext) > 0) + { + ppNext = &((*ppNext)->m_pNext); + } + if (T::Compare(pNode, *ppNext) != 0) + { + pNode->m_pNext = *ppNext; + *ppNext = pNode; + } + else + { + delete pNode; + hr = S_FALSE; + } + } + } + else + { + pNode->m_pNext = NULL; + m_pHead = m_pTail = pNode; + } + if (bMaintainCount) ++m_cElements; + return hr; + } + + // + // These functions must support the "==" operator for the TFIND type. + // + template + T * Find(TFIND & FindVal) const + { + for (T * pNode = m_pHead; pNode && (!(*pNode == FindVal)); pNode = pNode->m_pNext) + {} + return pNode; + } + + template + T * FindNext(const T * pCurNode, TFIND & FindVal) const + { + for (T * pNode = pCurNode->m_pNext; pNode && (!(*pNode == FindVal)); pNode = pNode->m_pNext) + {} + return pNode; + } + + // + // Searches for and removes a single list element + // + template + T * FindAndRemove(TFIND & FindVal) + { + T * pNode = m_pHead; + if (pNode) + { + if (*pNode == FindVal) + { + m_pHead = pNode->m_pNext; + if (bMaintainCount) --m_cElements; + } + else + { + T * pPrev = pNode; + for (pNode = pNode->m_pNext; + pNode; + pPrev = pNode, pNode = pNode->m_pNext) + { + if (*pNode == FindVal) + { + pPrev->m_pNext = pNode->m_pNext; + if (pNode->m_pNext == NULL) + { + m_pTail = pPrev; + } + if (bMaintainCount) --m_cElements; + break; + } + } + } + } + return pNode; + } + + // + // Searches for and deletes all list elements that match + // + template + void FindAndDeleteAll(TFIND & FindVal) + { + T * pNode = m_pHead; + while (pNode && *pNode == FindVal) + { + m_pHead = pNode->m_pNext; + delete pNode; + if (bMaintainCount) --m_cElements; + pNode = m_pHead; + } + T * pPrev = pNode; + while (pNode) + { + T * pNext = pNode->m_pNext; + if (*pNode == FindVal) + { + pPrev->m_pNext = pNext; + delete pNode; + if (bMaintainCount) --m_cElements; + } + else + { + pPrev = pNode; + } + pNode = pNext; + } + m_pTail = pPrev; // Just always set it in case we removed the tail. + } + + +}; + +template +class CSpBasicList +{ +public: + T * m_pFirst; + CSpBasicList() : m_pFirst(NULL) {} + ~CSpBasicList() + { + if (bPurgeWhenDeleted) + { + Purge(); + } + } + + void Purge() + { + while (m_pFirst) + { + T * pNext = m_pFirst->m_pNext; + delete m_pFirst; + m_pFirst = pNext; + } + } + + void ExplicitPurge() + { + T * pDie; + BYTE * pb; + + while (m_pFirst) + { + pDie = m_pFirst; + m_pFirst = pDie->m_pNext; + + pDie->~T(); + + pb = reinterpret_cast(pDie); + delete [] pb; + } + } + + HRESULT RemoveFirstOrAllocateNew(T ** ppNode) + { + if (m_pFirst) + { + *ppNode = m_pFirst; + m_pFirst = m_pFirst->m_pNext; + } + else + { + *ppNode = new T; + if (*ppNode == NULL) + { + return E_OUTOFMEMORY; + } + } + return S_OK; + } + + void AddNode(T * pNode) + { + pNode->m_pNext = m_pFirst; + m_pFirst = pNode; + } + T * GetFirst() + { + return m_pFirst; + } + T * RemoveFirst() + { + T * pNode = m_pFirst; + if (pNode) + { + m_pFirst = pNode->m_pNext; + } + return pNode; + } +}; + +#define STACK_ALLOC(TYPE, COUNT) (TYPE *)_alloca(sizeof(TYPE) * (COUNT)) +#define STACK_ALLOC_AND_ZERO(TYPE, COUNT) (TYPE *)memset(_alloca(sizeof(TYPE) * (COUNT)), 0, (sizeof(TYPE) * (COUNT))) +#define STACK_ALLOC_AND_COPY(TYPE, COUNT, SOURCE) (TYPE *)memcpy(_alloca(sizeof(TYPE) * (COUNT)), (SOURCE), (sizeof(TYPE) * (COUNT))) + +inline HRESULT SpGetSubTokenFromToken( + ISpObjectToken * pToken, + const WCHAR * pszSubKeyName, + ISpObjectToken ** ppToken, + BOOL fCreateIfNotExist = FALSE) +{ + SPDBG_FUNC("SpGetTokenFromDataKey"); + HRESULT hr = S_OK; + + if (SP_IS_BAD_INTERFACE_PTR(pToken) || + SP_IS_BAD_STRING_PTR(pszSubKeyName) || + SP_IS_BAD_WRITE_PTR(ppToken)) + { + hr = E_POINTER; + } + + // First, either create or open the datakey for the new token + CComPtr cpDataKeyForNewToken; + if (SUCCEEDED(hr)) + { + if (fCreateIfNotExist) + { + hr = pToken->CreateKey(pszSubKeyName, &cpDataKeyForNewToken); + } + else + { + hr = pToken->OpenKey(pszSubKeyName, &cpDataKeyForNewToken); + } + } + + // The sub token's category will be the token id of it's parent token + CSpDynamicString dstrCategoryId; + if (SUCCEEDED(hr)) + { + hr = pToken->GetId(&dstrCategoryId); + } + + // The sub token's token id will be it's category id + "\\" the key name + CSpDynamicString dstrTokenId; + if (SUCCEEDED(hr)) + { + dstrTokenId = dstrCategoryId; + dstrTokenId.Append2(L"\\", pszSubKeyName); + } + + // Now create the token and initalize it + CComPtr cpTokenInit; + if (SUCCEEDED(hr)) + { + hr = cpTokenInit.CoCreateInstance(CLSID_SpObjectToken); + } + + if (SUCCEEDED(hr)) + { + hr = cpTokenInit->InitFromDataKey(dstrCategoryId, dstrTokenId, cpDataKeyForNewToken); + } + + if (SUCCEEDED(hr)) + { + *ppToken = cpTokenInit.Detach(); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +template +HRESULT SpCreateObjectFromSubToken(ISpObjectToken * pToken, const WCHAR * pszSubKeyName, T ** ppObject, + IUnknown * pUnkOuter = NULL, DWORD dwClsCtxt = CLSCTX_ALL) +{ + SPDBG_FUNC("SpCreateObjectFromSubToken"); + HRESULT hr; + + CComPtr cpSubToken; + hr = SpGetSubTokenFromToken(pToken, pszSubKeyName, &cpSubToken); + + if (SUCCEEDED(hr)) + { + hr = SpCreateObjectFromToken(cpSubToken, ppObject, pUnkOuter, dwClsCtxt); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +#endif /* This must be the last line in the file */ diff --git a/speech/include/sapi.h b/speech/include/sapi.h new file mode 100644 index 0000000000..cec350ba24 --- /dev/null +++ b/speech/include/sapi.h @@ -0,0 +1,25599 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0347 */ +/* Compiler settings for sapi.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __sapi_h__ +#define __sapi_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ISpNotifySource_FWD_DEFINED__ +#define __ISpNotifySource_FWD_DEFINED__ +typedef interface ISpNotifySource ISpNotifySource; +#endif /* __ISpNotifySource_FWD_DEFINED__ */ + + +#ifndef __ISpNotifySink_FWD_DEFINED__ +#define __ISpNotifySink_FWD_DEFINED__ +typedef interface ISpNotifySink ISpNotifySink; +#endif /* __ISpNotifySink_FWD_DEFINED__ */ + + +#ifndef __ISpNotifyTranslator_FWD_DEFINED__ +#define __ISpNotifyTranslator_FWD_DEFINED__ +typedef interface ISpNotifyTranslator ISpNotifyTranslator; +#endif /* __ISpNotifyTranslator_FWD_DEFINED__ */ + + +#ifndef __ISpDataKey_FWD_DEFINED__ +#define __ISpDataKey_FWD_DEFINED__ +typedef interface ISpDataKey ISpDataKey; +#endif /* __ISpDataKey_FWD_DEFINED__ */ + + +#ifndef __ISpRegDataKey_FWD_DEFINED__ +#define __ISpRegDataKey_FWD_DEFINED__ +typedef interface ISpRegDataKey ISpRegDataKey; +#endif /* __ISpRegDataKey_FWD_DEFINED__ */ + + +#ifndef __ISpObjectTokenCategory_FWD_DEFINED__ +#define __ISpObjectTokenCategory_FWD_DEFINED__ +typedef interface ISpObjectTokenCategory ISpObjectTokenCategory; +#endif /* __ISpObjectTokenCategory_FWD_DEFINED__ */ + + +#ifndef __ISpObjectToken_FWD_DEFINED__ +#define __ISpObjectToken_FWD_DEFINED__ +typedef interface ISpObjectToken ISpObjectToken; +#endif /* __ISpObjectToken_FWD_DEFINED__ */ + + +#ifndef __ISpObjectTokenInit_FWD_DEFINED__ +#define __ISpObjectTokenInit_FWD_DEFINED__ +typedef interface ISpObjectTokenInit ISpObjectTokenInit; +#endif /* __ISpObjectTokenInit_FWD_DEFINED__ */ + + +#ifndef __IEnumSpObjectTokens_FWD_DEFINED__ +#define __IEnumSpObjectTokens_FWD_DEFINED__ +typedef interface IEnumSpObjectTokens IEnumSpObjectTokens; +#endif /* __IEnumSpObjectTokens_FWD_DEFINED__ */ + + +#ifndef __ISpObjectWithToken_FWD_DEFINED__ +#define __ISpObjectWithToken_FWD_DEFINED__ +typedef interface ISpObjectWithToken ISpObjectWithToken; +#endif /* __ISpObjectWithToken_FWD_DEFINED__ */ + + +#ifndef __ISpResourceManager_FWD_DEFINED__ +#define __ISpResourceManager_FWD_DEFINED__ +typedef interface ISpResourceManager ISpResourceManager; +#endif /* __ISpResourceManager_FWD_DEFINED__ */ + + +#ifndef __ISpEventSource_FWD_DEFINED__ +#define __ISpEventSource_FWD_DEFINED__ +typedef interface ISpEventSource ISpEventSource; +#endif /* __ISpEventSource_FWD_DEFINED__ */ + + +#ifndef __ISpEventSink_FWD_DEFINED__ +#define __ISpEventSink_FWD_DEFINED__ +typedef interface ISpEventSink ISpEventSink; +#endif /* __ISpEventSink_FWD_DEFINED__ */ + + +#ifndef __ISpStreamFormat_FWD_DEFINED__ +#define __ISpStreamFormat_FWD_DEFINED__ +typedef interface ISpStreamFormat ISpStreamFormat; +#endif /* __ISpStreamFormat_FWD_DEFINED__ */ + + +#ifndef __ISpStream_FWD_DEFINED__ +#define __ISpStream_FWD_DEFINED__ +typedef interface ISpStream ISpStream; +#endif /* __ISpStream_FWD_DEFINED__ */ + + +#ifndef __ISpStreamFormatConverter_FWD_DEFINED__ +#define __ISpStreamFormatConverter_FWD_DEFINED__ +typedef interface ISpStreamFormatConverter ISpStreamFormatConverter; +#endif /* __ISpStreamFormatConverter_FWD_DEFINED__ */ + + +#ifndef __ISpAudio_FWD_DEFINED__ +#define __ISpAudio_FWD_DEFINED__ +typedef interface ISpAudio ISpAudio; +#endif /* __ISpAudio_FWD_DEFINED__ */ + + +#ifndef __ISpMMSysAudio_FWD_DEFINED__ +#define __ISpMMSysAudio_FWD_DEFINED__ +typedef interface ISpMMSysAudio ISpMMSysAudio; +#endif /* __ISpMMSysAudio_FWD_DEFINED__ */ + + +#ifndef __ISpTranscript_FWD_DEFINED__ +#define __ISpTranscript_FWD_DEFINED__ +typedef interface ISpTranscript ISpTranscript; +#endif /* __ISpTranscript_FWD_DEFINED__ */ + + +#ifndef __ISpLexicon_FWD_DEFINED__ +#define __ISpLexicon_FWD_DEFINED__ +typedef interface ISpLexicon ISpLexicon; +#endif /* __ISpLexicon_FWD_DEFINED__ */ + + +#ifndef __ISpContainerLexicon_FWD_DEFINED__ +#define __ISpContainerLexicon_FWD_DEFINED__ +typedef interface ISpContainerLexicon ISpContainerLexicon; +#endif /* __ISpContainerLexicon_FWD_DEFINED__ */ + + +#ifndef __ISpPhoneConverter_FWD_DEFINED__ +#define __ISpPhoneConverter_FWD_DEFINED__ +typedef interface ISpPhoneConverter ISpPhoneConverter; +#endif /* __ISpPhoneConverter_FWD_DEFINED__ */ + + +#ifndef __ISpVoice_FWD_DEFINED__ +#define __ISpVoice_FWD_DEFINED__ +typedef interface ISpVoice ISpVoice; +#endif /* __ISpVoice_FWD_DEFINED__ */ + + +#ifndef __ISpPhrase_FWD_DEFINED__ +#define __ISpPhrase_FWD_DEFINED__ +typedef interface ISpPhrase ISpPhrase; +#endif /* __ISpPhrase_FWD_DEFINED__ */ + + +#ifndef __ISpPhraseAlt_FWD_DEFINED__ +#define __ISpPhraseAlt_FWD_DEFINED__ +typedef interface ISpPhraseAlt ISpPhraseAlt; +#endif /* __ISpPhraseAlt_FWD_DEFINED__ */ + + +#ifndef __ISpRecoResult_FWD_DEFINED__ +#define __ISpRecoResult_FWD_DEFINED__ +typedef interface ISpRecoResult ISpRecoResult; +#endif /* __ISpRecoResult_FWD_DEFINED__ */ + + +#ifndef __ISpGrammarBuilder_FWD_DEFINED__ +#define __ISpGrammarBuilder_FWD_DEFINED__ +typedef interface ISpGrammarBuilder ISpGrammarBuilder; +#endif /* __ISpGrammarBuilder_FWD_DEFINED__ */ + + +#ifndef __ISpRecoGrammar_FWD_DEFINED__ +#define __ISpRecoGrammar_FWD_DEFINED__ +typedef interface ISpRecoGrammar ISpRecoGrammar; +#endif /* __ISpRecoGrammar_FWD_DEFINED__ */ + + +#ifndef __ISpRecoContext_FWD_DEFINED__ +#define __ISpRecoContext_FWD_DEFINED__ +typedef interface ISpRecoContext ISpRecoContext; +#endif /* __ISpRecoContext_FWD_DEFINED__ */ + + +#ifndef __ISpProperties_FWD_DEFINED__ +#define __ISpProperties_FWD_DEFINED__ +typedef interface ISpProperties ISpProperties; +#endif /* __ISpProperties_FWD_DEFINED__ */ + + +#ifndef __ISpRecognizer_FWD_DEFINED__ +#define __ISpRecognizer_FWD_DEFINED__ +typedef interface ISpRecognizer ISpRecognizer; +#endif /* __ISpRecognizer_FWD_DEFINED__ */ + + +#ifndef __ISpeechDataKey_FWD_DEFINED__ +#define __ISpeechDataKey_FWD_DEFINED__ +typedef interface ISpeechDataKey ISpeechDataKey; +#endif /* __ISpeechDataKey_FWD_DEFINED__ */ + + +#ifndef __ISpeechObjectToken_FWD_DEFINED__ +#define __ISpeechObjectToken_FWD_DEFINED__ +typedef interface ISpeechObjectToken ISpeechObjectToken; +#endif /* __ISpeechObjectToken_FWD_DEFINED__ */ + + +#ifndef __ISpeechObjectTokens_FWD_DEFINED__ +#define __ISpeechObjectTokens_FWD_DEFINED__ +typedef interface ISpeechObjectTokens ISpeechObjectTokens; +#endif /* __ISpeechObjectTokens_FWD_DEFINED__ */ + + +#ifndef __ISpeechObjectTokenCategory_FWD_DEFINED__ +#define __ISpeechObjectTokenCategory_FWD_DEFINED__ +typedef interface ISpeechObjectTokenCategory ISpeechObjectTokenCategory; +#endif /* __ISpeechObjectTokenCategory_FWD_DEFINED__ */ + + +#ifndef __ISpeechAudioBufferInfo_FWD_DEFINED__ +#define __ISpeechAudioBufferInfo_FWD_DEFINED__ +typedef interface ISpeechAudioBufferInfo ISpeechAudioBufferInfo; +#endif /* __ISpeechAudioBufferInfo_FWD_DEFINED__ */ + + +#ifndef __ISpeechAudioStatus_FWD_DEFINED__ +#define __ISpeechAudioStatus_FWD_DEFINED__ +typedef interface ISpeechAudioStatus ISpeechAudioStatus; +#endif /* __ISpeechAudioStatus_FWD_DEFINED__ */ + + +#ifndef __ISpeechAudioFormat_FWD_DEFINED__ +#define __ISpeechAudioFormat_FWD_DEFINED__ +typedef interface ISpeechAudioFormat ISpeechAudioFormat; +#endif /* __ISpeechAudioFormat_FWD_DEFINED__ */ + + +#ifndef __ISpeechWaveFormatEx_FWD_DEFINED__ +#define __ISpeechWaveFormatEx_FWD_DEFINED__ +typedef interface ISpeechWaveFormatEx ISpeechWaveFormatEx; +#endif /* __ISpeechWaveFormatEx_FWD_DEFINED__ */ + + +#ifndef __ISpeechBaseStream_FWD_DEFINED__ +#define __ISpeechBaseStream_FWD_DEFINED__ +typedef interface ISpeechBaseStream ISpeechBaseStream; +#endif /* __ISpeechBaseStream_FWD_DEFINED__ */ + + +#ifndef __ISpeechFileStream_FWD_DEFINED__ +#define __ISpeechFileStream_FWD_DEFINED__ +typedef interface ISpeechFileStream ISpeechFileStream; +#endif /* __ISpeechFileStream_FWD_DEFINED__ */ + + +#ifndef __ISpeechMemoryStream_FWD_DEFINED__ +#define __ISpeechMemoryStream_FWD_DEFINED__ +typedef interface ISpeechMemoryStream ISpeechMemoryStream; +#endif /* __ISpeechMemoryStream_FWD_DEFINED__ */ + + +#ifndef __ISpeechCustomStream_FWD_DEFINED__ +#define __ISpeechCustomStream_FWD_DEFINED__ +typedef interface ISpeechCustomStream ISpeechCustomStream; +#endif /* __ISpeechCustomStream_FWD_DEFINED__ */ + + +#ifndef __ISpeechAudio_FWD_DEFINED__ +#define __ISpeechAudio_FWD_DEFINED__ +typedef interface ISpeechAudio ISpeechAudio; +#endif /* __ISpeechAudio_FWD_DEFINED__ */ + + +#ifndef __ISpeechMMSysAudio_FWD_DEFINED__ +#define __ISpeechMMSysAudio_FWD_DEFINED__ +typedef interface ISpeechMMSysAudio ISpeechMMSysAudio; +#endif /* __ISpeechMMSysAudio_FWD_DEFINED__ */ + + +#ifndef __ISpeechVoice_FWD_DEFINED__ +#define __ISpeechVoice_FWD_DEFINED__ +typedef interface ISpeechVoice ISpeechVoice; +#endif /* __ISpeechVoice_FWD_DEFINED__ */ + + +#ifndef __ISpeechVoiceStatus_FWD_DEFINED__ +#define __ISpeechVoiceStatus_FWD_DEFINED__ +typedef interface ISpeechVoiceStatus ISpeechVoiceStatus; +#endif /* __ISpeechVoiceStatus_FWD_DEFINED__ */ + + +#ifndef ___ISpeechVoiceEvents_FWD_DEFINED__ +#define ___ISpeechVoiceEvents_FWD_DEFINED__ +typedef interface _ISpeechVoiceEvents _ISpeechVoiceEvents; +#endif /* ___ISpeechVoiceEvents_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecognizer_FWD_DEFINED__ +#define __ISpeechRecognizer_FWD_DEFINED__ +typedef interface ISpeechRecognizer ISpeechRecognizer; +#endif /* __ISpeechRecognizer_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecognizerStatus_FWD_DEFINED__ +#define __ISpeechRecognizerStatus_FWD_DEFINED__ +typedef interface ISpeechRecognizerStatus ISpeechRecognizerStatus; +#endif /* __ISpeechRecognizerStatus_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecoContext_FWD_DEFINED__ +#define __ISpeechRecoContext_FWD_DEFINED__ +typedef interface ISpeechRecoContext ISpeechRecoContext; +#endif /* __ISpeechRecoContext_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecoGrammar_FWD_DEFINED__ +#define __ISpeechRecoGrammar_FWD_DEFINED__ +typedef interface ISpeechRecoGrammar ISpeechRecoGrammar; +#endif /* __ISpeechRecoGrammar_FWD_DEFINED__ */ + + +#ifndef ___ISpeechRecoContextEvents_FWD_DEFINED__ +#define ___ISpeechRecoContextEvents_FWD_DEFINED__ +typedef interface _ISpeechRecoContextEvents _ISpeechRecoContextEvents; +#endif /* ___ISpeechRecoContextEvents_FWD_DEFINED__ */ + + +#ifndef __ISpeechGrammarRule_FWD_DEFINED__ +#define __ISpeechGrammarRule_FWD_DEFINED__ +typedef interface ISpeechGrammarRule ISpeechGrammarRule; +#endif /* __ISpeechGrammarRule_FWD_DEFINED__ */ + + +#ifndef __ISpeechGrammarRules_FWD_DEFINED__ +#define __ISpeechGrammarRules_FWD_DEFINED__ +typedef interface ISpeechGrammarRules ISpeechGrammarRules; +#endif /* __ISpeechGrammarRules_FWD_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleState_FWD_DEFINED__ +#define __ISpeechGrammarRuleState_FWD_DEFINED__ +typedef interface ISpeechGrammarRuleState ISpeechGrammarRuleState; +#endif /* __ISpeechGrammarRuleState_FWD_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleStateTransition_FWD_DEFINED__ +#define __ISpeechGrammarRuleStateTransition_FWD_DEFINED__ +typedef interface ISpeechGrammarRuleStateTransition ISpeechGrammarRuleStateTransition; +#endif /* __ISpeechGrammarRuleStateTransition_FWD_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleStateTransitions_FWD_DEFINED__ +#define __ISpeechGrammarRuleStateTransitions_FWD_DEFINED__ +typedef interface ISpeechGrammarRuleStateTransitions ISpeechGrammarRuleStateTransitions; +#endif /* __ISpeechGrammarRuleStateTransitions_FWD_DEFINED__ */ + + +#ifndef __ISpeechTextSelectionInformation_FWD_DEFINED__ +#define __ISpeechTextSelectionInformation_FWD_DEFINED__ +typedef interface ISpeechTextSelectionInformation ISpeechTextSelectionInformation; +#endif /* __ISpeechTextSelectionInformation_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecoResult_FWD_DEFINED__ +#define __ISpeechRecoResult_FWD_DEFINED__ +typedef interface ISpeechRecoResult ISpeechRecoResult; +#endif /* __ISpeechRecoResult_FWD_DEFINED__ */ + + +#ifndef __ISpeechRecoResultTimes_FWD_DEFINED__ +#define __ISpeechRecoResultTimes_FWD_DEFINED__ +typedef interface ISpeechRecoResultTimes ISpeechRecoResultTimes; +#endif /* __ISpeechRecoResultTimes_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseAlternate_FWD_DEFINED__ +#define __ISpeechPhraseAlternate_FWD_DEFINED__ +typedef interface ISpeechPhraseAlternate ISpeechPhraseAlternate; +#endif /* __ISpeechPhraseAlternate_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseAlternates_FWD_DEFINED__ +#define __ISpeechPhraseAlternates_FWD_DEFINED__ +typedef interface ISpeechPhraseAlternates ISpeechPhraseAlternates; +#endif /* __ISpeechPhraseAlternates_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseInfo_FWD_DEFINED__ +#define __ISpeechPhraseInfo_FWD_DEFINED__ +typedef interface ISpeechPhraseInfo ISpeechPhraseInfo; +#endif /* __ISpeechPhraseInfo_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseElement_FWD_DEFINED__ +#define __ISpeechPhraseElement_FWD_DEFINED__ +typedef interface ISpeechPhraseElement ISpeechPhraseElement; +#endif /* __ISpeechPhraseElement_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseElements_FWD_DEFINED__ +#define __ISpeechPhraseElements_FWD_DEFINED__ +typedef interface ISpeechPhraseElements ISpeechPhraseElements; +#endif /* __ISpeechPhraseElements_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseReplacement_FWD_DEFINED__ +#define __ISpeechPhraseReplacement_FWD_DEFINED__ +typedef interface ISpeechPhraseReplacement ISpeechPhraseReplacement; +#endif /* __ISpeechPhraseReplacement_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseReplacements_FWD_DEFINED__ +#define __ISpeechPhraseReplacements_FWD_DEFINED__ +typedef interface ISpeechPhraseReplacements ISpeechPhraseReplacements; +#endif /* __ISpeechPhraseReplacements_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseProperty_FWD_DEFINED__ +#define __ISpeechPhraseProperty_FWD_DEFINED__ +typedef interface ISpeechPhraseProperty ISpeechPhraseProperty; +#endif /* __ISpeechPhraseProperty_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseProperties_FWD_DEFINED__ +#define __ISpeechPhraseProperties_FWD_DEFINED__ +typedef interface ISpeechPhraseProperties ISpeechPhraseProperties; +#endif /* __ISpeechPhraseProperties_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseRule_FWD_DEFINED__ +#define __ISpeechPhraseRule_FWD_DEFINED__ +typedef interface ISpeechPhraseRule ISpeechPhraseRule; +#endif /* __ISpeechPhraseRule_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseRules_FWD_DEFINED__ +#define __ISpeechPhraseRules_FWD_DEFINED__ +typedef interface ISpeechPhraseRules ISpeechPhraseRules; +#endif /* __ISpeechPhraseRules_FWD_DEFINED__ */ + + +#ifndef __ISpeechLexicon_FWD_DEFINED__ +#define __ISpeechLexicon_FWD_DEFINED__ +typedef interface ISpeechLexicon ISpeechLexicon; +#endif /* __ISpeechLexicon_FWD_DEFINED__ */ + + +#ifndef __ISpeechLexiconWords_FWD_DEFINED__ +#define __ISpeechLexiconWords_FWD_DEFINED__ +typedef interface ISpeechLexiconWords ISpeechLexiconWords; +#endif /* __ISpeechLexiconWords_FWD_DEFINED__ */ + + +#ifndef __ISpeechLexiconWord_FWD_DEFINED__ +#define __ISpeechLexiconWord_FWD_DEFINED__ +typedef interface ISpeechLexiconWord ISpeechLexiconWord; +#endif /* __ISpeechLexiconWord_FWD_DEFINED__ */ + + +#ifndef __ISpeechLexiconPronunciations_FWD_DEFINED__ +#define __ISpeechLexiconPronunciations_FWD_DEFINED__ +typedef interface ISpeechLexiconPronunciations ISpeechLexiconPronunciations; +#endif /* __ISpeechLexiconPronunciations_FWD_DEFINED__ */ + + +#ifndef __ISpeechLexiconPronunciation_FWD_DEFINED__ +#define __ISpeechLexiconPronunciation_FWD_DEFINED__ +typedef interface ISpeechLexiconPronunciation ISpeechLexiconPronunciation; +#endif /* __ISpeechLexiconPronunciation_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhraseInfoBuilder_FWD_DEFINED__ +#define __ISpeechPhraseInfoBuilder_FWD_DEFINED__ +typedef interface ISpeechPhraseInfoBuilder ISpeechPhraseInfoBuilder; +#endif /* __ISpeechPhraseInfoBuilder_FWD_DEFINED__ */ + + +#ifndef __ISpeechPhoneConverter_FWD_DEFINED__ +#define __ISpeechPhoneConverter_FWD_DEFINED__ +typedef interface ISpeechPhoneConverter ISpeechPhoneConverter; +#endif /* __ISpeechPhoneConverter_FWD_DEFINED__ */ + + +#ifndef __SpNotifyTranslator_FWD_DEFINED__ +#define __SpNotifyTranslator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpNotifyTranslator SpNotifyTranslator; +#else +typedef struct SpNotifyTranslator SpNotifyTranslator; +#endif /* __cplusplus */ + +#endif /* __SpNotifyTranslator_FWD_DEFINED__ */ + + +#ifndef __SpObjectTokenCategory_FWD_DEFINED__ +#define __SpObjectTokenCategory_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpObjectTokenCategory SpObjectTokenCategory; +#else +typedef struct SpObjectTokenCategory SpObjectTokenCategory; +#endif /* __cplusplus */ + +#endif /* __SpObjectTokenCategory_FWD_DEFINED__ */ + + +#ifndef __SpObjectToken_FWD_DEFINED__ +#define __SpObjectToken_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpObjectToken SpObjectToken; +#else +typedef struct SpObjectToken SpObjectToken; +#endif /* __cplusplus */ + +#endif /* __SpObjectToken_FWD_DEFINED__ */ + + +#ifndef __SpResourceManager_FWD_DEFINED__ +#define __SpResourceManager_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpResourceManager SpResourceManager; +#else +typedef struct SpResourceManager SpResourceManager; +#endif /* __cplusplus */ + +#endif /* __SpResourceManager_FWD_DEFINED__ */ + + +#ifndef __SpStreamFormatConverter_FWD_DEFINED__ +#define __SpStreamFormatConverter_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpStreamFormatConverter SpStreamFormatConverter; +#else +typedef struct SpStreamFormatConverter SpStreamFormatConverter; +#endif /* __cplusplus */ + +#endif /* __SpStreamFormatConverter_FWD_DEFINED__ */ + + +#ifndef __SpMMAudioEnum_FWD_DEFINED__ +#define __SpMMAudioEnum_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpMMAudioEnum SpMMAudioEnum; +#else +typedef struct SpMMAudioEnum SpMMAudioEnum; +#endif /* __cplusplus */ + +#endif /* __SpMMAudioEnum_FWD_DEFINED__ */ + + +#ifndef __SpMMAudioIn_FWD_DEFINED__ +#define __SpMMAudioIn_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpMMAudioIn SpMMAudioIn; +#else +typedef struct SpMMAudioIn SpMMAudioIn; +#endif /* __cplusplus */ + +#endif /* __SpMMAudioIn_FWD_DEFINED__ */ + + +#ifndef __SpMMAudioOut_FWD_DEFINED__ +#define __SpMMAudioOut_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpMMAudioOut SpMMAudioOut; +#else +typedef struct SpMMAudioOut SpMMAudioOut; +#endif /* __cplusplus */ + +#endif /* __SpMMAudioOut_FWD_DEFINED__ */ + + +#ifndef __SpRecPlayAudio_FWD_DEFINED__ +#define __SpRecPlayAudio_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpRecPlayAudio SpRecPlayAudio; +#else +typedef struct SpRecPlayAudio SpRecPlayAudio; +#endif /* __cplusplus */ + +#endif /* __SpRecPlayAudio_FWD_DEFINED__ */ + + +#ifndef __SpStream_FWD_DEFINED__ +#define __SpStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpStream SpStream; +#else +typedef struct SpStream SpStream; +#endif /* __cplusplus */ + +#endif /* __SpStream_FWD_DEFINED__ */ + + +#ifndef __SpVoice_FWD_DEFINED__ +#define __SpVoice_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpVoice SpVoice; +#else +typedef struct SpVoice SpVoice; +#endif /* __cplusplus */ + +#endif /* __SpVoice_FWD_DEFINED__ */ + + +#ifndef __SpSharedRecoContext_FWD_DEFINED__ +#define __SpSharedRecoContext_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpSharedRecoContext SpSharedRecoContext; +#else +typedef struct SpSharedRecoContext SpSharedRecoContext; +#endif /* __cplusplus */ + +#endif /* __SpSharedRecoContext_FWD_DEFINED__ */ + + +#ifndef __SpInprocRecognizer_FWD_DEFINED__ +#define __SpInprocRecognizer_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpInprocRecognizer SpInprocRecognizer; +#else +typedef struct SpInprocRecognizer SpInprocRecognizer; +#endif /* __cplusplus */ + +#endif /* __SpInprocRecognizer_FWD_DEFINED__ */ + + +#ifndef __SpSharedRecognizer_FWD_DEFINED__ +#define __SpSharedRecognizer_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpSharedRecognizer SpSharedRecognizer; +#else +typedef struct SpSharedRecognizer SpSharedRecognizer; +#endif /* __cplusplus */ + +#endif /* __SpSharedRecognizer_FWD_DEFINED__ */ + + +#ifndef __SpLexicon_FWD_DEFINED__ +#define __SpLexicon_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpLexicon SpLexicon; +#else +typedef struct SpLexicon SpLexicon; +#endif /* __cplusplus */ + +#endif /* __SpLexicon_FWD_DEFINED__ */ + + +#ifndef __SpUnCompressedLexicon_FWD_DEFINED__ +#define __SpUnCompressedLexicon_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpUnCompressedLexicon SpUnCompressedLexicon; +#else +typedef struct SpUnCompressedLexicon SpUnCompressedLexicon; +#endif /* __cplusplus */ + +#endif /* __SpUnCompressedLexicon_FWD_DEFINED__ */ + + +#ifndef __SpCompressedLexicon_FWD_DEFINED__ +#define __SpCompressedLexicon_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpCompressedLexicon SpCompressedLexicon; +#else +typedef struct SpCompressedLexicon SpCompressedLexicon; +#endif /* __cplusplus */ + +#endif /* __SpCompressedLexicon_FWD_DEFINED__ */ + + +#ifndef __SpPhoneConverter_FWD_DEFINED__ +#define __SpPhoneConverter_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpPhoneConverter SpPhoneConverter; +#else +typedef struct SpPhoneConverter SpPhoneConverter; +#endif /* __cplusplus */ + +#endif /* __SpPhoneConverter_FWD_DEFINED__ */ + + +#ifndef __SpNullPhoneConverter_FWD_DEFINED__ +#define __SpNullPhoneConverter_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpNullPhoneConverter SpNullPhoneConverter; +#else +typedef struct SpNullPhoneConverter SpNullPhoneConverter; +#endif /* __cplusplus */ + +#endif /* __SpNullPhoneConverter_FWD_DEFINED__ */ + + +#ifndef __SpTextSelectionInformation_FWD_DEFINED__ +#define __SpTextSelectionInformation_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpTextSelectionInformation SpTextSelectionInformation; +#else +typedef struct SpTextSelectionInformation SpTextSelectionInformation; +#endif /* __cplusplus */ + +#endif /* __SpTextSelectionInformation_FWD_DEFINED__ */ + + +#ifndef __SpPhraseInfoBuilder_FWD_DEFINED__ +#define __SpPhraseInfoBuilder_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpPhraseInfoBuilder SpPhraseInfoBuilder; +#else +typedef struct SpPhraseInfoBuilder SpPhraseInfoBuilder; +#endif /* __cplusplus */ + +#endif /* __SpPhraseInfoBuilder_FWD_DEFINED__ */ + + +#ifndef __SpAudioFormat_FWD_DEFINED__ +#define __SpAudioFormat_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpAudioFormat SpAudioFormat; +#else +typedef struct SpAudioFormat SpAudioFormat; +#endif /* __cplusplus */ + +#endif /* __SpAudioFormat_FWD_DEFINED__ */ + + +#ifndef __SpWaveFormatEx_FWD_DEFINED__ +#define __SpWaveFormatEx_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpWaveFormatEx SpWaveFormatEx; +#else +typedef struct SpWaveFormatEx SpWaveFormatEx; +#endif /* __cplusplus */ + +#endif /* __SpWaveFormatEx_FWD_DEFINED__ */ + + +#ifndef __SpInProcRecoContext_FWD_DEFINED__ +#define __SpInProcRecoContext_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpInProcRecoContext SpInProcRecoContext; +#else +typedef struct SpInProcRecoContext SpInProcRecoContext; +#endif /* __cplusplus */ + +#endif /* __SpInProcRecoContext_FWD_DEFINED__ */ + + +#ifndef __SpCustomStream_FWD_DEFINED__ +#define __SpCustomStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpCustomStream SpCustomStream; +#else +typedef struct SpCustomStream SpCustomStream; +#endif /* __cplusplus */ + +#endif /* __SpCustomStream_FWD_DEFINED__ */ + + +#ifndef __SpFileStream_FWD_DEFINED__ +#define __SpFileStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpFileStream SpFileStream; +#else +typedef struct SpFileStream SpFileStream; +#endif /* __cplusplus */ + +#endif /* __SpFileStream_FWD_DEFINED__ */ + + +#ifndef __SpMemoryStream_FWD_DEFINED__ +#define __SpMemoryStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpMemoryStream SpMemoryStream; +#else +typedef struct SpMemoryStream SpMemoryStream; +#endif /* __cplusplus */ + +#endif /* __SpMemoryStream_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_sapi_0000 */ +/* [local] */ + +#pragma warning(disable:4201) // Allow nameless structs/unions +#pragma comment(lib, "sapi.lib") +#if 0 +typedef /* [hidden][restricted] */ struct WAVEFORMATEX + { + WORD wFormatTag; + WORD nChannels; + DWORD nSamplesPerSec; + DWORD nAvgBytesPerSec; + WORD nBlockAlign; + WORD wBitsPerSample; + WORD cbSize; + } WAVEFORMATEX; + +#else +#include +#endif + + + + + + + + + + + + + + + + + + + + + + + + + +typedef /* [hidden] */ +enum SPDATAKEYLOCATION + { SPDKL_DefaultLocation = 0, + SPDKL_CurrentUser = 1, + SPDKL_LocalMachine = 2, + SPDKL_CurrentConfig = 5 + } SPDATAKEYLOCATION; + +#define SPDUI_EngineProperties L"EngineProperties" +#define SPDUI_AddRemoveWord L"AddRemoveWord" +#define SPDUI_UserTraining L"UserTraining" +#define SPDUI_MicTraining L"MicTraining" +#define SPDUI_RecoProfileProperties L"RecoProfileProperties" +#define SPDUI_AudioProperties L"AudioProperties" +#define SPDUI_AudioVolume L"AudioVolume" +typedef /* [hidden] */ +enum SPSTREAMFORMAT + { SPSF_Default = -1, + SPSF_NoAssignedFormat = 0, + SPSF_Text = SPSF_NoAssignedFormat + 1, + SPSF_NonStandardFormat = SPSF_Text + 1, + SPSF_ExtendedAudioFormat = SPSF_NonStandardFormat + 1, + SPSF_8kHz8BitMono = SPSF_ExtendedAudioFormat + 1, + SPSF_8kHz8BitStereo = SPSF_8kHz8BitMono + 1, + SPSF_8kHz16BitMono = SPSF_8kHz8BitStereo + 1, + SPSF_8kHz16BitStereo = SPSF_8kHz16BitMono + 1, + SPSF_11kHz8BitMono = SPSF_8kHz16BitStereo + 1, + SPSF_11kHz8BitStereo = SPSF_11kHz8BitMono + 1, + SPSF_11kHz16BitMono = SPSF_11kHz8BitStereo + 1, + SPSF_11kHz16BitStereo = SPSF_11kHz16BitMono + 1, + SPSF_12kHz8BitMono = SPSF_11kHz16BitStereo + 1, + SPSF_12kHz8BitStereo = SPSF_12kHz8BitMono + 1, + SPSF_12kHz16BitMono = SPSF_12kHz8BitStereo + 1, + SPSF_12kHz16BitStereo = SPSF_12kHz16BitMono + 1, + SPSF_16kHz8BitMono = SPSF_12kHz16BitStereo + 1, + SPSF_16kHz8BitStereo = SPSF_16kHz8BitMono + 1, + SPSF_16kHz16BitMono = SPSF_16kHz8BitStereo + 1, + SPSF_16kHz16BitStereo = SPSF_16kHz16BitMono + 1, + SPSF_22kHz8BitMono = SPSF_16kHz16BitStereo + 1, + SPSF_22kHz8BitStereo = SPSF_22kHz8BitMono + 1, + SPSF_22kHz16BitMono = SPSF_22kHz8BitStereo + 1, + SPSF_22kHz16BitStereo = SPSF_22kHz16BitMono + 1, + SPSF_24kHz8BitMono = SPSF_22kHz16BitStereo + 1, + SPSF_24kHz8BitStereo = SPSF_24kHz8BitMono + 1, + SPSF_24kHz16BitMono = SPSF_24kHz8BitStereo + 1, + SPSF_24kHz16BitStereo = SPSF_24kHz16BitMono + 1, + SPSF_32kHz8BitMono = SPSF_24kHz16BitStereo + 1, + SPSF_32kHz8BitStereo = SPSF_32kHz8BitMono + 1, + SPSF_32kHz16BitMono = SPSF_32kHz8BitStereo + 1, + SPSF_32kHz16BitStereo = SPSF_32kHz16BitMono + 1, + SPSF_44kHz8BitMono = SPSF_32kHz16BitStereo + 1, + SPSF_44kHz8BitStereo = SPSF_44kHz8BitMono + 1, + SPSF_44kHz16BitMono = SPSF_44kHz8BitStereo + 1, + SPSF_44kHz16BitStereo = SPSF_44kHz16BitMono + 1, + SPSF_48kHz8BitMono = SPSF_44kHz16BitStereo + 1, + SPSF_48kHz8BitStereo = SPSF_48kHz8BitMono + 1, + SPSF_48kHz16BitMono = SPSF_48kHz8BitStereo + 1, + SPSF_48kHz16BitStereo = SPSF_48kHz16BitMono + 1, + SPSF_TrueSpeech_8kHz1BitMono = SPSF_48kHz16BitStereo + 1, + SPSF_CCITT_ALaw_8kHzMono = SPSF_TrueSpeech_8kHz1BitMono + 1, + SPSF_CCITT_ALaw_8kHzStereo = SPSF_CCITT_ALaw_8kHzMono + 1, + SPSF_CCITT_ALaw_11kHzMono = SPSF_CCITT_ALaw_8kHzStereo + 1, + SPSF_CCITT_ALaw_11kHzStereo = SPSF_CCITT_ALaw_11kHzMono + 1, + SPSF_CCITT_ALaw_22kHzMono = SPSF_CCITT_ALaw_11kHzStereo + 1, + SPSF_CCITT_ALaw_22kHzStereo = SPSF_CCITT_ALaw_22kHzMono + 1, + SPSF_CCITT_ALaw_44kHzMono = SPSF_CCITT_ALaw_22kHzStereo + 1, + SPSF_CCITT_ALaw_44kHzStereo = SPSF_CCITT_ALaw_44kHzMono + 1, + SPSF_CCITT_uLaw_8kHzMono = SPSF_CCITT_ALaw_44kHzStereo + 1, + SPSF_CCITT_uLaw_8kHzStereo = SPSF_CCITT_uLaw_8kHzMono + 1, + SPSF_CCITT_uLaw_11kHzMono = SPSF_CCITT_uLaw_8kHzStereo + 1, + SPSF_CCITT_uLaw_11kHzStereo = SPSF_CCITT_uLaw_11kHzMono + 1, + SPSF_CCITT_uLaw_22kHzMono = SPSF_CCITT_uLaw_11kHzStereo + 1, + SPSF_CCITT_uLaw_22kHzStereo = SPSF_CCITT_uLaw_22kHzMono + 1, + SPSF_CCITT_uLaw_44kHzMono = SPSF_CCITT_uLaw_22kHzStereo + 1, + SPSF_CCITT_uLaw_44kHzStereo = SPSF_CCITT_uLaw_44kHzMono + 1, + SPSF_ADPCM_8kHzMono = SPSF_CCITT_uLaw_44kHzStereo + 1, + SPSF_ADPCM_8kHzStereo = SPSF_ADPCM_8kHzMono + 1, + SPSF_ADPCM_11kHzMono = SPSF_ADPCM_8kHzStereo + 1, + SPSF_ADPCM_11kHzStereo = SPSF_ADPCM_11kHzMono + 1, + SPSF_ADPCM_22kHzMono = SPSF_ADPCM_11kHzStereo + 1, + SPSF_ADPCM_22kHzStereo = SPSF_ADPCM_22kHzMono + 1, + SPSF_ADPCM_44kHzMono = SPSF_ADPCM_22kHzStereo + 1, + SPSF_ADPCM_44kHzStereo = SPSF_ADPCM_44kHzMono + 1, + SPSF_GSM610_8kHzMono = SPSF_ADPCM_44kHzStereo + 1, + SPSF_GSM610_11kHzMono = SPSF_GSM610_8kHzMono + 1, + SPSF_GSM610_22kHzMono = SPSF_GSM610_11kHzMono + 1, + SPSF_GSM610_44kHzMono = SPSF_GSM610_22kHzMono + 1, + SPSF_NUM_FORMATS = SPSF_GSM610_44kHzMono + 1 + } SPSTREAMFORMAT; + +EXTERN_C const GUID SPDFID_Text; +EXTERN_C const GUID SPDFID_WaveFormatEx; +#define SPREG_USER_ROOT L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech" +#define SPREG_LOCAL_MACHINE_ROOT L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech" +#define SPCAT_AUDIOOUT L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput" +#define SPCAT_AUDIOIN L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput" +#define SPCAT_VOICES L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Voices" +#define SPCAT_RECOGNIZERS L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\Recognizers" +#define SPCAT_APPLEXICONS L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AppLexicons" +#define SPCAT_PHONECONVERTERS L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\PhoneConverters" +#define SPCAT_RECOPROFILES L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\RecoProfiles" +#define SPMMSYS_AUDIO_IN_TOKEN_ID L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioInput\\TokenEnums\\MMAudioIn\\" +#define SPMMSYS_AUDIO_OUT_TOKEN_ID L"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Speech\\AudioOutput\\TokenEnums\\MMAudioOut\\" +#define SPCURRENT_USER_LEXICON_TOKEN_ID L"HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Speech\\CurrentUserLexicon" +#define SPTOKENVALUE_CLSID L"CLSID" +#define SPTOKENKEY_FILES L"Files" +#define SPTOKENKEY_UI L"UI" +#define SPTOKENKEY_ATTRIBUTES L"Attributes" +#define SPVOICECATEGORY_TTSRATE L"DefaultTTSRate" +#define SPPROP_RESOURCE_USAGE L"ResourceUsage" +#define SPPROP_HIGH_CONFIDENCE_THRESHOLD L"HighConfidenceThreshold" +#define SPPROP_NORMAL_CONFIDENCE_THRESHOLD L"NormalConfidenceThreshold" +#define SPPROP_LOW_CONFIDENCE_THRESHOLD L"LowConfidenceThreshold" +#define SPPROP_RESPONSE_SPEED L"ResponseSpeed" +#define SPPROP_COMPLEX_RESPONSE_SPEED L"ComplexResponseSpeed" +#define SPPROP_ADAPTATION_ON L"AdaptationOn" +#define SPTOPIC_SPELLING L"Spelling" +#define SPWILDCARD L"..." +#define SPDICTATION L"*" +#define SPINFDICTATION L"*+" +#define SP_LOW_CONFIDENCE ( -1 ) + +#define SP_NORMAL_CONFIDENCE ( 0 ) + +#define SP_HIGH_CONFIDENCE ( +1 ) + +#define DEFAULT_WEIGHT ( 1 ) + +#define SP_MAX_WORD_LENGTH ( 128 ) + +#define SP_MAX_PRON_LENGTH ( 384 ) + +#if defined(__cplusplus) +interface ISpNotifyCallback +{ +virtual HRESULT STDMETHODCALLTYPE NotifyCallback( + WPARAM wParam, + LPARAM lParam) = 0; +}; +#else +typedef void *ISpNotifyCallback; + +#endif +#if 0 +typedef void *SPNOTIFYCALLBACK; + +#else +typedef void __stdcall SPNOTIFYCALLBACK(WPARAM wParam, LPARAM lParam); +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0000_v0_0_s_ifspec; + +#ifndef __ISpNotifySource_INTERFACE_DEFINED__ +#define __ISpNotifySource_INTERFACE_DEFINED__ + +/* interface ISpNotifySource */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpNotifySource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5EFF4AEF-8487-11D2-961C-00C04F8EE628") + ISpNotifySource : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetNotifySink( + /* [in] */ ISpNotifySink *pNotifySink) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetNotifyWindowMessage( + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetNotifyCallbackFunction( + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetNotifyCallbackInterface( + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetNotifyWin32Event( void) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE WaitForNotifyEvent( + /* [in] */ DWORD dwMilliseconds) = 0; + + virtual /* [local] */ HANDLE STDMETHODCALLTYPE GetNotifyEventHandle( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpNotifySourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpNotifySource * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpNotifySource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpNotifySource * This); + + HRESULT ( STDMETHODCALLTYPE *SetNotifySink )( + ISpNotifySource * This, + /* [in] */ ISpNotifySink *pNotifySink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWindowMessage )( + ISpNotifySource * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackFunction )( + ISpNotifySource * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackInterface )( + ISpNotifySource * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWin32Event )( + ISpNotifySource * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *WaitForNotifyEvent )( + ISpNotifySource * This, + /* [in] */ DWORD dwMilliseconds); + + /* [local] */ HANDLE ( STDMETHODCALLTYPE *GetNotifyEventHandle )( + ISpNotifySource * This); + + END_INTERFACE + } ISpNotifySourceVtbl; + + interface ISpNotifySource + { + CONST_VTBL struct ISpNotifySourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpNotifySource_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpNotifySource_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpNotifySource_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpNotifySource_SetNotifySink(This,pNotifySink) \ + (This)->lpVtbl -> SetNotifySink(This,pNotifySink) + +#define ISpNotifySource_SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) + +#define ISpNotifySource_SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) + +#define ISpNotifySource_SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) + +#define ISpNotifySource_SetNotifyWin32Event(This) \ + (This)->lpVtbl -> SetNotifyWin32Event(This) + +#define ISpNotifySource_WaitForNotifyEvent(This,dwMilliseconds) \ + (This)->lpVtbl -> WaitForNotifyEvent(This,dwMilliseconds) + +#define ISpNotifySource_GetNotifyEventHandle(This) \ + (This)->lpVtbl -> GetNotifyEventHandle(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpNotifySource_SetNotifySink_Proxy( + ISpNotifySource * This, + /* [in] */ ISpNotifySink *pNotifySink); + + +void __RPC_STUB ISpNotifySource_SetNotifySink_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpNotifySource_SetNotifyWindowMessage_Proxy( + ISpNotifySource * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifySource_SetNotifyWindowMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpNotifySource_SetNotifyCallbackFunction_Proxy( + ISpNotifySource * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifySource_SetNotifyCallbackFunction_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpNotifySource_SetNotifyCallbackInterface_Proxy( + ISpNotifySource * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifySource_SetNotifyCallbackInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpNotifySource_SetNotifyWin32Event_Proxy( + ISpNotifySource * This); + + +void __RPC_STUB ISpNotifySource_SetNotifyWin32Event_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpNotifySource_WaitForNotifyEvent_Proxy( + ISpNotifySource * This, + /* [in] */ DWORD dwMilliseconds); + + +void __RPC_STUB ISpNotifySource_WaitForNotifyEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HANDLE STDMETHODCALLTYPE ISpNotifySource_GetNotifyEventHandle_Proxy( + ISpNotifySource * This); + + +void __RPC_STUB ISpNotifySource_GetNotifyEventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpNotifySource_INTERFACE_DEFINED__ */ + + +#ifndef __ISpNotifySink_INTERFACE_DEFINED__ +#define __ISpNotifySink_INTERFACE_DEFINED__ + +/* interface ISpNotifySink */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpNotifySink; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("259684DC-37C3-11D2-9603-00C04F8EE628") + ISpNotifySink : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Notify( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpNotifySinkVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpNotifySink * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpNotifySink * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpNotifySink * This); + + HRESULT ( STDMETHODCALLTYPE *Notify )( + ISpNotifySink * This); + + END_INTERFACE + } ISpNotifySinkVtbl; + + interface ISpNotifySink + { + CONST_VTBL struct ISpNotifySinkVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpNotifySink_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpNotifySink_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpNotifySink_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpNotifySink_Notify(This) \ + (This)->lpVtbl -> Notify(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpNotifySink_Notify_Proxy( + ISpNotifySink * This); + + +void __RPC_STUB ISpNotifySink_Notify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpNotifySink_INTERFACE_DEFINED__ */ + + +#ifndef __ISpNotifyTranslator_INTERFACE_DEFINED__ +#define __ISpNotifyTranslator_INTERFACE_DEFINED__ + +/* interface ISpNotifyTranslator */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpNotifyTranslator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ACA16614-5D3D-11D2-960E-00C04F8EE628") + ISpNotifyTranslator : public ISpNotifySink + { + public: + virtual HRESULT STDMETHODCALLTYPE InitWindowMessage( + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitCallback( + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitSpNotifyCallback( + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitWin32Event( + HANDLE hEvent, + BOOL fCloseHandleOnRelease) = 0; + + virtual HRESULT STDMETHODCALLTYPE Wait( + /* [in] */ DWORD dwMilliseconds) = 0; + + virtual HANDLE STDMETHODCALLTYPE GetEventHandle( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpNotifyTranslatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpNotifyTranslator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpNotifyTranslator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpNotifyTranslator * This); + + HRESULT ( STDMETHODCALLTYPE *Notify )( + ISpNotifyTranslator * This); + + HRESULT ( STDMETHODCALLTYPE *InitWindowMessage )( + ISpNotifyTranslator * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + HRESULT ( STDMETHODCALLTYPE *InitCallback )( + ISpNotifyTranslator * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + HRESULT ( STDMETHODCALLTYPE *InitSpNotifyCallback )( + ISpNotifyTranslator * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + HRESULT ( STDMETHODCALLTYPE *InitWin32Event )( + ISpNotifyTranslator * This, + HANDLE hEvent, + BOOL fCloseHandleOnRelease); + + HRESULT ( STDMETHODCALLTYPE *Wait )( + ISpNotifyTranslator * This, + /* [in] */ DWORD dwMilliseconds); + + HANDLE ( STDMETHODCALLTYPE *GetEventHandle )( + ISpNotifyTranslator * This); + + END_INTERFACE + } ISpNotifyTranslatorVtbl; + + interface ISpNotifyTranslator + { + CONST_VTBL struct ISpNotifyTranslatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpNotifyTranslator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpNotifyTranslator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpNotifyTranslator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpNotifyTranslator_Notify(This) \ + (This)->lpVtbl -> Notify(This) + + +#define ISpNotifyTranslator_InitWindowMessage(This,hWnd,Msg,wParam,lParam) \ + (This)->lpVtbl -> InitWindowMessage(This,hWnd,Msg,wParam,lParam) + +#define ISpNotifyTranslator_InitCallback(This,pfnCallback,wParam,lParam) \ + (This)->lpVtbl -> InitCallback(This,pfnCallback,wParam,lParam) + +#define ISpNotifyTranslator_InitSpNotifyCallback(This,pSpCallback,wParam,lParam) \ + (This)->lpVtbl -> InitSpNotifyCallback(This,pSpCallback,wParam,lParam) + +#define ISpNotifyTranslator_InitWin32Event(This,hEvent,fCloseHandleOnRelease) \ + (This)->lpVtbl -> InitWin32Event(This,hEvent,fCloseHandleOnRelease) + +#define ISpNotifyTranslator_Wait(This,dwMilliseconds) \ + (This)->lpVtbl -> Wait(This,dwMilliseconds) + +#define ISpNotifyTranslator_GetEventHandle(This) \ + (This)->lpVtbl -> GetEventHandle(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpNotifyTranslator_InitWindowMessage_Proxy( + ISpNotifyTranslator * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifyTranslator_InitWindowMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpNotifyTranslator_InitCallback_Proxy( + ISpNotifyTranslator * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifyTranslator_InitCallback_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpNotifyTranslator_InitSpNotifyCallback_Proxy( + ISpNotifyTranslator * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + +void __RPC_STUB ISpNotifyTranslator_InitSpNotifyCallback_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpNotifyTranslator_InitWin32Event_Proxy( + ISpNotifyTranslator * This, + HANDLE hEvent, + BOOL fCloseHandleOnRelease); + + +void __RPC_STUB ISpNotifyTranslator_InitWin32Event_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpNotifyTranslator_Wait_Proxy( + ISpNotifyTranslator * This, + /* [in] */ DWORD dwMilliseconds); + + +void __RPC_STUB ISpNotifyTranslator_Wait_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpNotifyTranslator_GetEventHandle_Proxy( + ISpNotifyTranslator * This); + + +void __RPC_STUB ISpNotifyTranslator_GetEventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpNotifyTranslator_INTERFACE_DEFINED__ */ + + +#ifndef __ISpDataKey_INTERFACE_DEFINED__ +#define __ISpDataKey_INTERFACE_DEFINED__ + +/* interface ISpDataKey */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpDataKey; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("14056581-E16C-11D2-BB90-00C04F8EE6C0") + ISpDataKey : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetData( + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetData( + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStringValue( + const WCHAR *pszValueName, + const WCHAR *pszValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStringValue( + const WCHAR *pszValueName, + WCHAR **ppszValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDWORD( + const WCHAR *pszValueName, + DWORD dwValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDWORD( + const WCHAR *pszValueName, + DWORD *pdwValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenKey( + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateKey( + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteKey( + const WCHAR *pszSubKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteValue( + const WCHAR *pszValueName) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumKeys( + ULONG Index, + WCHAR **ppszSubKeyName) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumValues( + ULONG Index, + WCHAR **ppszValueName) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpDataKeyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpDataKey * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpDataKey * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpDataKey * This); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpDataKey * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpDataKey * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpDataKey * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpDataKey * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + HRESULT ( STDMETHODCALLTYPE *SetDWORD )( + ISpDataKey * This, + const WCHAR *pszValueName, + DWORD dwValue); + + HRESULT ( STDMETHODCALLTYPE *GetDWORD )( + ISpDataKey * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpDataKey * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpDataKey * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpDataKey * This, + const WCHAR *pszSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpDataKey * This, + const WCHAR *pszValueName); + + HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpDataKey * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpDataKey * This, + ULONG Index, + WCHAR **ppszValueName); + + END_INTERFACE + } ISpDataKeyVtbl; + + interface ISpDataKey + { + CONST_VTBL struct ISpDataKeyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpDataKey_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpDataKey_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpDataKey_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpDataKey_SetData(This,pszValueName,cbData,pData) \ + (This)->lpVtbl -> SetData(This,pszValueName,cbData,pData) + +#define ISpDataKey_GetData(This,pszValueName,pcbData,pData) \ + (This)->lpVtbl -> GetData(This,pszValueName,pcbData,pData) + +#define ISpDataKey_SetStringValue(This,pszValueName,pszValue) \ + (This)->lpVtbl -> SetStringValue(This,pszValueName,pszValue) + +#define ISpDataKey_GetStringValue(This,pszValueName,ppszValue) \ + (This)->lpVtbl -> GetStringValue(This,pszValueName,ppszValue) + +#define ISpDataKey_SetDWORD(This,pszValueName,dwValue) \ + (This)->lpVtbl -> SetDWORD(This,pszValueName,dwValue) + +#define ISpDataKey_GetDWORD(This,pszValueName,pdwValue) \ + (This)->lpVtbl -> GetDWORD(This,pszValueName,pdwValue) + +#define ISpDataKey_OpenKey(This,pszSubKeyName,ppSubKey) \ + (This)->lpVtbl -> OpenKey(This,pszSubKeyName,ppSubKey) + +#define ISpDataKey_CreateKey(This,pszSubKey,ppSubKey) \ + (This)->lpVtbl -> CreateKey(This,pszSubKey,ppSubKey) + +#define ISpDataKey_DeleteKey(This,pszSubKey) \ + (This)->lpVtbl -> DeleteKey(This,pszSubKey) + +#define ISpDataKey_DeleteValue(This,pszValueName) \ + (This)->lpVtbl -> DeleteValue(This,pszValueName) + +#define ISpDataKey_EnumKeys(This,Index,ppszSubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,ppszSubKeyName) + +#define ISpDataKey_EnumValues(This,Index,ppszValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ppszValueName) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpDataKey_SetData_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + +void __RPC_STUB ISpDataKey_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_GetData_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + +void __RPC_STUB ISpDataKey_GetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_SetStringValue_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + +void __RPC_STUB ISpDataKey_SetStringValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_GetStringValue_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + +void __RPC_STUB ISpDataKey_GetStringValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_SetDWORD_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + DWORD dwValue); + + +void __RPC_STUB ISpDataKey_SetDWORD_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_GetDWORD_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + +void __RPC_STUB ISpDataKey_GetDWORD_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_OpenKey_Proxy( + ISpDataKey * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + +void __RPC_STUB ISpDataKey_OpenKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_CreateKey_Proxy( + ISpDataKey * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + +void __RPC_STUB ISpDataKey_CreateKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_DeleteKey_Proxy( + ISpDataKey * This, + const WCHAR *pszSubKey); + + +void __RPC_STUB ISpDataKey_DeleteKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_DeleteValue_Proxy( + ISpDataKey * This, + const WCHAR *pszValueName); + + +void __RPC_STUB ISpDataKey_DeleteValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_EnumKeys_Proxy( + ISpDataKey * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + +void __RPC_STUB ISpDataKey_EnumKeys_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpDataKey_EnumValues_Proxy( + ISpDataKey * This, + ULONG Index, + WCHAR **ppszValueName); + + +void __RPC_STUB ISpDataKey_EnumValues_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpDataKey_INTERFACE_DEFINED__ */ + + +#ifndef __ISpRegDataKey_INTERFACE_DEFINED__ +#define __ISpRegDataKey_INTERFACE_DEFINED__ + +/* interface ISpRegDataKey */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpRegDataKey; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("92A66E2B-C830-4149-83DF-6FC2BA1E7A5B") + ISpRegDataKey : public ISpDataKey + { + public: + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetKey( + /* [in] */ HKEY hkey, + /* [in] */ BOOL fReadOnly) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpRegDataKeyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpRegDataKey * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpRegDataKey * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpRegDataKey * This); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + HRESULT ( STDMETHODCALLTYPE *SetDWORD )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + DWORD dwValue); + + HRESULT ( STDMETHODCALLTYPE *GetDWORD )( + ISpRegDataKey * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpRegDataKey * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpRegDataKey * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpRegDataKey * This, + const WCHAR *pszSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpRegDataKey * This, + const WCHAR *pszValueName); + + HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpRegDataKey * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpRegDataKey * This, + ULONG Index, + WCHAR **ppszValueName); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetKey )( + ISpRegDataKey * This, + /* [in] */ HKEY hkey, + /* [in] */ BOOL fReadOnly); + + END_INTERFACE + } ISpRegDataKeyVtbl; + + interface ISpRegDataKey + { + CONST_VTBL struct ISpRegDataKeyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpRegDataKey_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpRegDataKey_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpRegDataKey_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpRegDataKey_SetData(This,pszValueName,cbData,pData) \ + (This)->lpVtbl -> SetData(This,pszValueName,cbData,pData) + +#define ISpRegDataKey_GetData(This,pszValueName,pcbData,pData) \ + (This)->lpVtbl -> GetData(This,pszValueName,pcbData,pData) + +#define ISpRegDataKey_SetStringValue(This,pszValueName,pszValue) \ + (This)->lpVtbl -> SetStringValue(This,pszValueName,pszValue) + +#define ISpRegDataKey_GetStringValue(This,pszValueName,ppszValue) \ + (This)->lpVtbl -> GetStringValue(This,pszValueName,ppszValue) + +#define ISpRegDataKey_SetDWORD(This,pszValueName,dwValue) \ + (This)->lpVtbl -> SetDWORD(This,pszValueName,dwValue) + +#define ISpRegDataKey_GetDWORD(This,pszValueName,pdwValue) \ + (This)->lpVtbl -> GetDWORD(This,pszValueName,pdwValue) + +#define ISpRegDataKey_OpenKey(This,pszSubKeyName,ppSubKey) \ + (This)->lpVtbl -> OpenKey(This,pszSubKeyName,ppSubKey) + +#define ISpRegDataKey_CreateKey(This,pszSubKey,ppSubKey) \ + (This)->lpVtbl -> CreateKey(This,pszSubKey,ppSubKey) + +#define ISpRegDataKey_DeleteKey(This,pszSubKey) \ + (This)->lpVtbl -> DeleteKey(This,pszSubKey) + +#define ISpRegDataKey_DeleteValue(This,pszValueName) \ + (This)->lpVtbl -> DeleteValue(This,pszValueName) + +#define ISpRegDataKey_EnumKeys(This,Index,ppszSubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,ppszSubKeyName) + +#define ISpRegDataKey_EnumValues(This,Index,ppszValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ppszValueName) + + +#define ISpRegDataKey_SetKey(This,hkey,fReadOnly) \ + (This)->lpVtbl -> SetKey(This,hkey,fReadOnly) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpRegDataKey_SetKey_Proxy( + ISpRegDataKey * This, + /* [in] */ HKEY hkey, + /* [in] */ BOOL fReadOnly); + + +void __RPC_STUB ISpRegDataKey_SetKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpRegDataKey_INTERFACE_DEFINED__ */ + + +#ifndef __ISpObjectTokenCategory_INTERFACE_DEFINED__ +#define __ISpObjectTokenCategory_INTERFACE_DEFINED__ + +/* interface ISpObjectTokenCategory */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpObjectTokenCategory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2D3D3845-39AF-4850-BBF9-40B49780011D") + ISpObjectTokenCategory : public ISpDataKey + { + public: + virtual HRESULT STDMETHODCALLTYPE SetId( + /* [in] */ const WCHAR *pszCategoryId, + BOOL fCreateIfNotExist) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetId( + /* [out] */ WCHAR **ppszCoMemCategoryId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDataKey( + SPDATAKEYLOCATION spdkl, + ISpDataKey **ppDataKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumTokens( + /* [string][in] */ const WCHAR *pzsReqAttribs, + /* [string][in] */ const WCHAR *pszOptAttribs, + /* [out] */ IEnumSpObjectTokens **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultTokenId( + /* [in] */ const WCHAR *pszTokenId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultTokenId( + /* [out] */ WCHAR **ppszCoMemTokenId) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpObjectTokenCategoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpObjectTokenCategory * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpObjectTokenCategory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpObjectTokenCategory * This); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + HRESULT ( STDMETHODCALLTYPE *SetDWORD )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + DWORD dwValue); + + HRESULT ( STDMETHODCALLTYPE *GetDWORD )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpObjectTokenCategory * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpObjectTokenCategory * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpObjectTokenCategory * This, + const WCHAR *pszSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpObjectTokenCategory * This, + const WCHAR *pszValueName); + + HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpObjectTokenCategory * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpObjectTokenCategory * This, + ULONG Index, + WCHAR **ppszValueName); + + HRESULT ( STDMETHODCALLTYPE *SetId )( + ISpObjectTokenCategory * This, + /* [in] */ const WCHAR *pszCategoryId, + BOOL fCreateIfNotExist); + + HRESULT ( STDMETHODCALLTYPE *GetId )( + ISpObjectTokenCategory * This, + /* [out] */ WCHAR **ppszCoMemCategoryId); + + HRESULT ( STDMETHODCALLTYPE *GetDataKey )( + ISpObjectTokenCategory * This, + SPDATAKEYLOCATION spdkl, + ISpDataKey **ppDataKey); + + HRESULT ( STDMETHODCALLTYPE *EnumTokens )( + ISpObjectTokenCategory * This, + /* [string][in] */ const WCHAR *pzsReqAttribs, + /* [string][in] */ const WCHAR *pszOptAttribs, + /* [out] */ IEnumSpObjectTokens **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultTokenId )( + ISpObjectTokenCategory * This, + /* [in] */ const WCHAR *pszTokenId); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultTokenId )( + ISpObjectTokenCategory * This, + /* [out] */ WCHAR **ppszCoMemTokenId); + + END_INTERFACE + } ISpObjectTokenCategoryVtbl; + + interface ISpObjectTokenCategory + { + CONST_VTBL struct ISpObjectTokenCategoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpObjectTokenCategory_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpObjectTokenCategory_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpObjectTokenCategory_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpObjectTokenCategory_SetData(This,pszValueName,cbData,pData) \ + (This)->lpVtbl -> SetData(This,pszValueName,cbData,pData) + +#define ISpObjectTokenCategory_GetData(This,pszValueName,pcbData,pData) \ + (This)->lpVtbl -> GetData(This,pszValueName,pcbData,pData) + +#define ISpObjectTokenCategory_SetStringValue(This,pszValueName,pszValue) \ + (This)->lpVtbl -> SetStringValue(This,pszValueName,pszValue) + +#define ISpObjectTokenCategory_GetStringValue(This,pszValueName,ppszValue) \ + (This)->lpVtbl -> GetStringValue(This,pszValueName,ppszValue) + +#define ISpObjectTokenCategory_SetDWORD(This,pszValueName,dwValue) \ + (This)->lpVtbl -> SetDWORD(This,pszValueName,dwValue) + +#define ISpObjectTokenCategory_GetDWORD(This,pszValueName,pdwValue) \ + (This)->lpVtbl -> GetDWORD(This,pszValueName,pdwValue) + +#define ISpObjectTokenCategory_OpenKey(This,pszSubKeyName,ppSubKey) \ + (This)->lpVtbl -> OpenKey(This,pszSubKeyName,ppSubKey) + +#define ISpObjectTokenCategory_CreateKey(This,pszSubKey,ppSubKey) \ + (This)->lpVtbl -> CreateKey(This,pszSubKey,ppSubKey) + +#define ISpObjectTokenCategory_DeleteKey(This,pszSubKey) \ + (This)->lpVtbl -> DeleteKey(This,pszSubKey) + +#define ISpObjectTokenCategory_DeleteValue(This,pszValueName) \ + (This)->lpVtbl -> DeleteValue(This,pszValueName) + +#define ISpObjectTokenCategory_EnumKeys(This,Index,ppszSubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,ppszSubKeyName) + +#define ISpObjectTokenCategory_EnumValues(This,Index,ppszValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ppszValueName) + + +#define ISpObjectTokenCategory_SetId(This,pszCategoryId,fCreateIfNotExist) \ + (This)->lpVtbl -> SetId(This,pszCategoryId,fCreateIfNotExist) + +#define ISpObjectTokenCategory_GetId(This,ppszCoMemCategoryId) \ + (This)->lpVtbl -> GetId(This,ppszCoMemCategoryId) + +#define ISpObjectTokenCategory_GetDataKey(This,spdkl,ppDataKey) \ + (This)->lpVtbl -> GetDataKey(This,spdkl,ppDataKey) + +#define ISpObjectTokenCategory_EnumTokens(This,pzsReqAttribs,pszOptAttribs,ppEnum) \ + (This)->lpVtbl -> EnumTokens(This,pzsReqAttribs,pszOptAttribs,ppEnum) + +#define ISpObjectTokenCategory_SetDefaultTokenId(This,pszTokenId) \ + (This)->lpVtbl -> SetDefaultTokenId(This,pszTokenId) + +#define ISpObjectTokenCategory_GetDefaultTokenId(This,ppszCoMemTokenId) \ + (This)->lpVtbl -> GetDefaultTokenId(This,ppszCoMemTokenId) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_SetId_Proxy( + ISpObjectTokenCategory * This, + /* [in] */ const WCHAR *pszCategoryId, + BOOL fCreateIfNotExist); + + +void __RPC_STUB ISpObjectTokenCategory_SetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_GetId_Proxy( + ISpObjectTokenCategory * This, + /* [out] */ WCHAR **ppszCoMemCategoryId); + + +void __RPC_STUB ISpObjectTokenCategory_GetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_GetDataKey_Proxy( + ISpObjectTokenCategory * This, + SPDATAKEYLOCATION spdkl, + ISpDataKey **ppDataKey); + + +void __RPC_STUB ISpObjectTokenCategory_GetDataKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_EnumTokens_Proxy( + ISpObjectTokenCategory * This, + /* [string][in] */ const WCHAR *pzsReqAttribs, + /* [string][in] */ const WCHAR *pszOptAttribs, + /* [out] */ IEnumSpObjectTokens **ppEnum); + + +void __RPC_STUB ISpObjectTokenCategory_EnumTokens_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_SetDefaultTokenId_Proxy( + ISpObjectTokenCategory * This, + /* [in] */ const WCHAR *pszTokenId); + + +void __RPC_STUB ISpObjectTokenCategory_SetDefaultTokenId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenCategory_GetDefaultTokenId_Proxy( + ISpObjectTokenCategory * This, + /* [out] */ WCHAR **ppszCoMemTokenId); + + +void __RPC_STUB ISpObjectTokenCategory_GetDefaultTokenId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpObjectTokenCategory_INTERFACE_DEFINED__ */ + + +#ifndef __ISpObjectToken_INTERFACE_DEFINED__ +#define __ISpObjectToken_INTERFACE_DEFINED__ + +/* interface ISpObjectToken */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpObjectToken; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("14056589-E16C-11D2-BB90-00C04F8EE6C0") + ISpObjectToken : public ISpDataKey + { + public: + virtual HRESULT STDMETHODCALLTYPE SetId( + const WCHAR *pszCategoryId, + const WCHAR *pszTokenId, + BOOL fCreateIfNotExist) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetId( + WCHAR **ppszCoMemTokenId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCategory( + ISpObjectTokenCategory **ppTokenCategory) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateInstance( + /* [in] */ IUnknown *pUnkOuter, + /* [in] */ DWORD dwClsContext, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStorageFileName( + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszValueName, + /* [in] */ const WCHAR *pszFileNameSpecifier, + /* [in] */ ULONG nFolder, + /* [out] */ WCHAR **ppszFilePath) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveStorageFileName( + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszKeyName, + /* [in] */ BOOL fDeleteFile) = 0; + + virtual HRESULT STDMETHODCALLTYPE Remove( + const CLSID *pclsidCaller) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE MatchesAttributes( + /* [in] */ const WCHAR *pszAttributes, + /* [out] */ BOOL *pfMatches) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpObjectTokenVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpObjectToken * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpObjectToken * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpObjectToken * This); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpObjectToken * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpObjectToken * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpObjectToken * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpObjectToken * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + HRESULT ( STDMETHODCALLTYPE *SetDWORD )( + ISpObjectToken * This, + const WCHAR *pszValueName, + DWORD dwValue); + + HRESULT ( STDMETHODCALLTYPE *GetDWORD )( + ISpObjectToken * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpObjectToken * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpObjectToken * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpObjectToken * This, + const WCHAR *pszSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpObjectToken * This, + const WCHAR *pszValueName); + + HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpObjectToken * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpObjectToken * This, + ULONG Index, + WCHAR **ppszValueName); + + HRESULT ( STDMETHODCALLTYPE *SetId )( + ISpObjectToken * This, + const WCHAR *pszCategoryId, + const WCHAR *pszTokenId, + BOOL fCreateIfNotExist); + + HRESULT ( STDMETHODCALLTYPE *GetId )( + ISpObjectToken * This, + WCHAR **ppszCoMemTokenId); + + HRESULT ( STDMETHODCALLTYPE *GetCategory )( + ISpObjectToken * This, + ISpObjectTokenCategory **ppTokenCategory); + + HRESULT ( STDMETHODCALLTYPE *CreateInstance )( + ISpObjectToken * This, + /* [in] */ IUnknown *pUnkOuter, + /* [in] */ DWORD dwClsContext, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFileName )( + ISpObjectToken * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszValueName, + /* [in] */ const WCHAR *pszFileNameSpecifier, + /* [in] */ ULONG nFolder, + /* [out] */ WCHAR **ppszFilePath); + + HRESULT ( STDMETHODCALLTYPE *RemoveStorageFileName )( + ISpObjectToken * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszKeyName, + /* [in] */ BOOL fDeleteFile); + + HRESULT ( STDMETHODCALLTYPE *Remove )( + ISpObjectToken * This, + const CLSID *pclsidCaller); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpObjectToken * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpObjectToken * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject); + + HRESULT ( STDMETHODCALLTYPE *MatchesAttributes )( + ISpObjectToken * This, + /* [in] */ const WCHAR *pszAttributes, + /* [out] */ BOOL *pfMatches); + + END_INTERFACE + } ISpObjectTokenVtbl; + + interface ISpObjectToken + { + CONST_VTBL struct ISpObjectTokenVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpObjectToken_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpObjectToken_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpObjectToken_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpObjectToken_SetData(This,pszValueName,cbData,pData) \ + (This)->lpVtbl -> SetData(This,pszValueName,cbData,pData) + +#define ISpObjectToken_GetData(This,pszValueName,pcbData,pData) \ + (This)->lpVtbl -> GetData(This,pszValueName,pcbData,pData) + +#define ISpObjectToken_SetStringValue(This,pszValueName,pszValue) \ + (This)->lpVtbl -> SetStringValue(This,pszValueName,pszValue) + +#define ISpObjectToken_GetStringValue(This,pszValueName,ppszValue) \ + (This)->lpVtbl -> GetStringValue(This,pszValueName,ppszValue) + +#define ISpObjectToken_SetDWORD(This,pszValueName,dwValue) \ + (This)->lpVtbl -> SetDWORD(This,pszValueName,dwValue) + +#define ISpObjectToken_GetDWORD(This,pszValueName,pdwValue) \ + (This)->lpVtbl -> GetDWORD(This,pszValueName,pdwValue) + +#define ISpObjectToken_OpenKey(This,pszSubKeyName,ppSubKey) \ + (This)->lpVtbl -> OpenKey(This,pszSubKeyName,ppSubKey) + +#define ISpObjectToken_CreateKey(This,pszSubKey,ppSubKey) \ + (This)->lpVtbl -> CreateKey(This,pszSubKey,ppSubKey) + +#define ISpObjectToken_DeleteKey(This,pszSubKey) \ + (This)->lpVtbl -> DeleteKey(This,pszSubKey) + +#define ISpObjectToken_DeleteValue(This,pszValueName) \ + (This)->lpVtbl -> DeleteValue(This,pszValueName) + +#define ISpObjectToken_EnumKeys(This,Index,ppszSubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,ppszSubKeyName) + +#define ISpObjectToken_EnumValues(This,Index,ppszValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ppszValueName) + + +#define ISpObjectToken_SetId(This,pszCategoryId,pszTokenId,fCreateIfNotExist) \ + (This)->lpVtbl -> SetId(This,pszCategoryId,pszTokenId,fCreateIfNotExist) + +#define ISpObjectToken_GetId(This,ppszCoMemTokenId) \ + (This)->lpVtbl -> GetId(This,ppszCoMemTokenId) + +#define ISpObjectToken_GetCategory(This,ppTokenCategory) \ + (This)->lpVtbl -> GetCategory(This,ppTokenCategory) + +#define ISpObjectToken_CreateInstance(This,pUnkOuter,dwClsContext,riid,ppvObject) \ + (This)->lpVtbl -> CreateInstance(This,pUnkOuter,dwClsContext,riid,ppvObject) + +#define ISpObjectToken_GetStorageFileName(This,clsidCaller,pszValueName,pszFileNameSpecifier,nFolder,ppszFilePath) \ + (This)->lpVtbl -> GetStorageFileName(This,clsidCaller,pszValueName,pszFileNameSpecifier,nFolder,ppszFilePath) + +#define ISpObjectToken_RemoveStorageFileName(This,clsidCaller,pszKeyName,fDeleteFile) \ + (This)->lpVtbl -> RemoveStorageFileName(This,clsidCaller,pszKeyName,fDeleteFile) + +#define ISpObjectToken_Remove(This,pclsidCaller) \ + (This)->lpVtbl -> Remove(This,pclsidCaller) + +#define ISpObjectToken_IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) \ + (This)->lpVtbl -> IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) + +#define ISpObjectToken_DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,punkObject) \ + (This)->lpVtbl -> DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,punkObject) + +#define ISpObjectToken_MatchesAttributes(This,pszAttributes,pfMatches) \ + (This)->lpVtbl -> MatchesAttributes(This,pszAttributes,pfMatches) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_SetId_Proxy( + ISpObjectToken * This, + const WCHAR *pszCategoryId, + const WCHAR *pszTokenId, + BOOL fCreateIfNotExist); + + +void __RPC_STUB ISpObjectToken_SetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_GetId_Proxy( + ISpObjectToken * This, + WCHAR **ppszCoMemTokenId); + + +void __RPC_STUB ISpObjectToken_GetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_GetCategory_Proxy( + ISpObjectToken * This, + ISpObjectTokenCategory **ppTokenCategory); + + +void __RPC_STUB ISpObjectToken_GetCategory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_CreateInstance_Proxy( + ISpObjectToken * This, + /* [in] */ IUnknown *pUnkOuter, + /* [in] */ DWORD dwClsContext, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + +void __RPC_STUB ISpObjectToken_CreateInstance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_GetStorageFileName_Proxy( + ISpObjectToken * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszValueName, + /* [in] */ const WCHAR *pszFileNameSpecifier, + /* [in] */ ULONG nFolder, + /* [out] */ WCHAR **ppszFilePath); + + +void __RPC_STUB ISpObjectToken_GetStorageFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_RemoveStorageFileName_Proxy( + ISpObjectToken * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszKeyName, + /* [in] */ BOOL fDeleteFile); + + +void __RPC_STUB ISpObjectToken_RemoveStorageFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_Remove_Proxy( + ISpObjectToken * This, + const CLSID *pclsidCaller); + + +void __RPC_STUB ISpObjectToken_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpObjectToken_IsUISupported_Proxy( + ISpObjectToken * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported); + + +void __RPC_STUB ISpObjectToken_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpObjectToken_DisplayUI_Proxy( + ISpObjectToken * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject); + + +void __RPC_STUB ISpObjectToken_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectToken_MatchesAttributes_Proxy( + ISpObjectToken * This, + /* [in] */ const WCHAR *pszAttributes, + /* [out] */ BOOL *pfMatches); + + +void __RPC_STUB ISpObjectToken_MatchesAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpObjectToken_INTERFACE_DEFINED__ */ + + +#ifndef __ISpObjectTokenInit_INTERFACE_DEFINED__ +#define __ISpObjectTokenInit_INTERFACE_DEFINED__ + +/* interface ISpObjectTokenInit */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpObjectTokenInit; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B8AAB0CF-346F-49D8-9499-C8B03F161D51") + ISpObjectTokenInit : public ISpObjectToken + { + public: + virtual HRESULT STDMETHODCALLTYPE InitFromDataKey( + /* [in] */ const WCHAR *pszCategoryId, + /* [in] */ const WCHAR *pszTokenId, + /* [in] */ ISpDataKey *pDataKey) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpObjectTokenInitVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpObjectTokenInit * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpObjectTokenInit * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpObjectTokenInit * This); + + HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + ULONG cbData, + const BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + ULONG *pcbData, + BYTE *pData); + + HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + const WCHAR *pszValue); + + HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + WCHAR **ppszValue); + + HRESULT ( STDMETHODCALLTYPE *SetDWORD )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + DWORD dwValue); + + HRESULT ( STDMETHODCALLTYPE *GetDWORD )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName, + DWORD *pdwValue); + + HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpObjectTokenInit * This, + const WCHAR *pszSubKeyName, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpObjectTokenInit * This, + const WCHAR *pszSubKey, + ISpDataKey **ppSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpObjectTokenInit * This, + const WCHAR *pszSubKey); + + HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpObjectTokenInit * This, + const WCHAR *pszValueName); + + HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpObjectTokenInit * This, + ULONG Index, + WCHAR **ppszSubKeyName); + + HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpObjectTokenInit * This, + ULONG Index, + WCHAR **ppszValueName); + + HRESULT ( STDMETHODCALLTYPE *SetId )( + ISpObjectTokenInit * This, + const WCHAR *pszCategoryId, + const WCHAR *pszTokenId, + BOOL fCreateIfNotExist); + + HRESULT ( STDMETHODCALLTYPE *GetId )( + ISpObjectTokenInit * This, + WCHAR **ppszCoMemTokenId); + + HRESULT ( STDMETHODCALLTYPE *GetCategory )( + ISpObjectTokenInit * This, + ISpObjectTokenCategory **ppTokenCategory); + + HRESULT ( STDMETHODCALLTYPE *CreateInstance )( + ISpObjectTokenInit * This, + /* [in] */ IUnknown *pUnkOuter, + /* [in] */ DWORD dwClsContext, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *GetStorageFileName )( + ISpObjectTokenInit * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszValueName, + /* [in] */ const WCHAR *pszFileNameSpecifier, + /* [in] */ ULONG nFolder, + /* [out] */ WCHAR **ppszFilePath); + + HRESULT ( STDMETHODCALLTYPE *RemoveStorageFileName )( + ISpObjectTokenInit * This, + /* [in] */ REFCLSID clsidCaller, + /* [in] */ const WCHAR *pszKeyName, + /* [in] */ BOOL fDeleteFile); + + HRESULT ( STDMETHODCALLTYPE *Remove )( + ISpObjectTokenInit * This, + const CLSID *pclsidCaller); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpObjectTokenInit * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpObjectTokenInit * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject); + + HRESULT ( STDMETHODCALLTYPE *MatchesAttributes )( + ISpObjectTokenInit * This, + /* [in] */ const WCHAR *pszAttributes, + /* [out] */ BOOL *pfMatches); + + HRESULT ( STDMETHODCALLTYPE *InitFromDataKey )( + ISpObjectTokenInit * This, + /* [in] */ const WCHAR *pszCategoryId, + /* [in] */ const WCHAR *pszTokenId, + /* [in] */ ISpDataKey *pDataKey); + + END_INTERFACE + } ISpObjectTokenInitVtbl; + + interface ISpObjectTokenInit + { + CONST_VTBL struct ISpObjectTokenInitVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpObjectTokenInit_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpObjectTokenInit_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpObjectTokenInit_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpObjectTokenInit_SetData(This,pszValueName,cbData,pData) \ + (This)->lpVtbl -> SetData(This,pszValueName,cbData,pData) + +#define ISpObjectTokenInit_GetData(This,pszValueName,pcbData,pData) \ + (This)->lpVtbl -> GetData(This,pszValueName,pcbData,pData) + +#define ISpObjectTokenInit_SetStringValue(This,pszValueName,pszValue) \ + (This)->lpVtbl -> SetStringValue(This,pszValueName,pszValue) + +#define ISpObjectTokenInit_GetStringValue(This,pszValueName,ppszValue) \ + (This)->lpVtbl -> GetStringValue(This,pszValueName,ppszValue) + +#define ISpObjectTokenInit_SetDWORD(This,pszValueName,dwValue) \ + (This)->lpVtbl -> SetDWORD(This,pszValueName,dwValue) + +#define ISpObjectTokenInit_GetDWORD(This,pszValueName,pdwValue) \ + (This)->lpVtbl -> GetDWORD(This,pszValueName,pdwValue) + +#define ISpObjectTokenInit_OpenKey(This,pszSubKeyName,ppSubKey) \ + (This)->lpVtbl -> OpenKey(This,pszSubKeyName,ppSubKey) + +#define ISpObjectTokenInit_CreateKey(This,pszSubKey,ppSubKey) \ + (This)->lpVtbl -> CreateKey(This,pszSubKey,ppSubKey) + +#define ISpObjectTokenInit_DeleteKey(This,pszSubKey) \ + (This)->lpVtbl -> DeleteKey(This,pszSubKey) + +#define ISpObjectTokenInit_DeleteValue(This,pszValueName) \ + (This)->lpVtbl -> DeleteValue(This,pszValueName) + +#define ISpObjectTokenInit_EnumKeys(This,Index,ppszSubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,ppszSubKeyName) + +#define ISpObjectTokenInit_EnumValues(This,Index,ppszValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ppszValueName) + + +#define ISpObjectTokenInit_SetId(This,pszCategoryId,pszTokenId,fCreateIfNotExist) \ + (This)->lpVtbl -> SetId(This,pszCategoryId,pszTokenId,fCreateIfNotExist) + +#define ISpObjectTokenInit_GetId(This,ppszCoMemTokenId) \ + (This)->lpVtbl -> GetId(This,ppszCoMemTokenId) + +#define ISpObjectTokenInit_GetCategory(This,ppTokenCategory) \ + (This)->lpVtbl -> GetCategory(This,ppTokenCategory) + +#define ISpObjectTokenInit_CreateInstance(This,pUnkOuter,dwClsContext,riid,ppvObject) \ + (This)->lpVtbl -> CreateInstance(This,pUnkOuter,dwClsContext,riid,ppvObject) + +#define ISpObjectTokenInit_GetStorageFileName(This,clsidCaller,pszValueName,pszFileNameSpecifier,nFolder,ppszFilePath) \ + (This)->lpVtbl -> GetStorageFileName(This,clsidCaller,pszValueName,pszFileNameSpecifier,nFolder,ppszFilePath) + +#define ISpObjectTokenInit_RemoveStorageFileName(This,clsidCaller,pszKeyName,fDeleteFile) \ + (This)->lpVtbl -> RemoveStorageFileName(This,clsidCaller,pszKeyName,fDeleteFile) + +#define ISpObjectTokenInit_Remove(This,pclsidCaller) \ + (This)->lpVtbl -> Remove(This,pclsidCaller) + +#define ISpObjectTokenInit_IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) \ + (This)->lpVtbl -> IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) + +#define ISpObjectTokenInit_DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,punkObject) \ + (This)->lpVtbl -> DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,punkObject) + +#define ISpObjectTokenInit_MatchesAttributes(This,pszAttributes,pfMatches) \ + (This)->lpVtbl -> MatchesAttributes(This,pszAttributes,pfMatches) + + +#define ISpObjectTokenInit_InitFromDataKey(This,pszCategoryId,pszTokenId,pDataKey) \ + (This)->lpVtbl -> InitFromDataKey(This,pszCategoryId,pszTokenId,pDataKey) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenInit_InitFromDataKey_Proxy( + ISpObjectTokenInit * This, + /* [in] */ const WCHAR *pszCategoryId, + /* [in] */ const WCHAR *pszTokenId, + /* [in] */ ISpDataKey *pDataKey); + + +void __RPC_STUB ISpObjectTokenInit_InitFromDataKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpObjectTokenInit_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumSpObjectTokens_INTERFACE_DEFINED__ +#define __IEnumSpObjectTokens_INTERFACE_DEFINED__ + +/* interface IEnumSpObjectTokens */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IEnumSpObjectTokens; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("06B64F9E-7FDA-11D2-B4F2-00C04F797396") + IEnumSpObjectTokens : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ISpObjectToken **pelt, + /* [out] */ ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumSpObjectTokens **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Item( + /* [in] */ ULONG Index, + /* [out] */ ISpObjectToken **ppToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCount( + /* [out] */ ULONG *pCount) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumSpObjectTokensVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumSpObjectTokens * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumSpObjectTokens * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumSpObjectTokens * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumSpObjectTokens * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ISpObjectToken **pelt, + /* [out] */ ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumSpObjectTokens * This, + /* [in] */ ULONG celt); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumSpObjectTokens * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumSpObjectTokens * This, + /* [out] */ IEnumSpObjectTokens **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Item )( + IEnumSpObjectTokens * This, + /* [in] */ ULONG Index, + /* [out] */ ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *GetCount )( + IEnumSpObjectTokens * This, + /* [out] */ ULONG *pCount); + + END_INTERFACE + } IEnumSpObjectTokensVtbl; + + interface IEnumSpObjectTokens + { + CONST_VTBL struct IEnumSpObjectTokensVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumSpObjectTokens_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumSpObjectTokens_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumSpObjectTokens_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumSpObjectTokens_Next(This,celt,pelt,pceltFetched) \ + (This)->lpVtbl -> Next(This,celt,pelt,pceltFetched) + +#define IEnumSpObjectTokens_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + +#define IEnumSpObjectTokens_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumSpObjectTokens_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define IEnumSpObjectTokens_Item(This,Index,ppToken) \ + (This)->lpVtbl -> Item(This,Index,ppToken) + +#define IEnumSpObjectTokens_GetCount(This,pCount) \ + (This)->lpVtbl -> GetCount(This,pCount) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_Next_Proxy( + IEnumSpObjectTokens * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ISpObjectToken **pelt, + /* [out] */ ULONG *pceltFetched); + + +void __RPC_STUB IEnumSpObjectTokens_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_Skip_Proxy( + IEnumSpObjectTokens * This, + /* [in] */ ULONG celt); + + +void __RPC_STUB IEnumSpObjectTokens_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_Reset_Proxy( + IEnumSpObjectTokens * This); + + +void __RPC_STUB IEnumSpObjectTokens_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_Clone_Proxy( + IEnumSpObjectTokens * This, + /* [out] */ IEnumSpObjectTokens **ppEnum); + + +void __RPC_STUB IEnumSpObjectTokens_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_Item_Proxy( + IEnumSpObjectTokens * This, + /* [in] */ ULONG Index, + /* [out] */ ISpObjectToken **ppToken); + + +void __RPC_STUB IEnumSpObjectTokens_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumSpObjectTokens_GetCount_Proxy( + IEnumSpObjectTokens * This, + /* [out] */ ULONG *pCount); + + +void __RPC_STUB IEnumSpObjectTokens_GetCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumSpObjectTokens_INTERFACE_DEFINED__ */ + + +#ifndef __ISpObjectWithToken_INTERFACE_DEFINED__ +#define __ISpObjectWithToken_INTERFACE_DEFINED__ + +/* interface ISpObjectWithToken */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpObjectWithToken; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5B559F40-E952-11D2-BB91-00C04F8EE6C0") + ISpObjectWithToken : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetObjectToken( + ISpObjectToken *pToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectToken( + ISpObjectToken **ppToken) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpObjectWithTokenVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpObjectWithToken * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpObjectWithToken * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpObjectWithToken * This); + + HRESULT ( STDMETHODCALLTYPE *SetObjectToken )( + ISpObjectWithToken * This, + ISpObjectToken *pToken); + + HRESULT ( STDMETHODCALLTYPE *GetObjectToken )( + ISpObjectWithToken * This, + ISpObjectToken **ppToken); + + END_INTERFACE + } ISpObjectWithTokenVtbl; + + interface ISpObjectWithToken + { + CONST_VTBL struct ISpObjectWithTokenVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpObjectWithToken_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpObjectWithToken_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpObjectWithToken_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpObjectWithToken_SetObjectToken(This,pToken) \ + (This)->lpVtbl -> SetObjectToken(This,pToken) + +#define ISpObjectWithToken_GetObjectToken(This,ppToken) \ + (This)->lpVtbl -> GetObjectToken(This,ppToken) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpObjectWithToken_SetObjectToken_Proxy( + ISpObjectWithToken * This, + ISpObjectToken *pToken); + + +void __RPC_STUB ISpObjectWithToken_SetObjectToken_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectWithToken_GetObjectToken_Proxy( + ISpObjectWithToken * This, + ISpObjectToken **ppToken); + + +void __RPC_STUB ISpObjectWithToken_GetObjectToken_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpObjectWithToken_INTERFACE_DEFINED__ */ + + +#ifndef __ISpResourceManager_INTERFACE_DEFINED__ +#define __ISpResourceManager_INTERFACE_DEFINED__ + +/* interface ISpResourceManager */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpResourceManager; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("93384E18-5014-43D5-ADBB-A78E055926BD") + ISpResourceManager : public IServiceProvider + { + public: + virtual HRESULT STDMETHODCALLTYPE SetObject( + /* [in] */ REFGUID guidServiceId, + /* [in] */ IUnknown *pUnkObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObject( + /* [in] */ REFGUID guidServiceId, + /* [in] */ REFCLSID ObjectCLSID, + /* [in] */ REFIID ObjectIID, + /* [in] */ BOOL fReleaseWhenLastExternalRefReleased, + /* [iid_is][out] */ void **ppObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpResourceManagerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpResourceManager * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpResourceManager * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpResourceManager * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryService )( + ISpResourceManager * This, + /* [in] */ REFGUID guidService, + /* [in] */ REFIID riid, + /* [out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *SetObject )( + ISpResourceManager * This, + /* [in] */ REFGUID guidServiceId, + /* [in] */ IUnknown *pUnkObject); + + HRESULT ( STDMETHODCALLTYPE *GetObject )( + ISpResourceManager * This, + /* [in] */ REFGUID guidServiceId, + /* [in] */ REFCLSID ObjectCLSID, + /* [in] */ REFIID ObjectIID, + /* [in] */ BOOL fReleaseWhenLastExternalRefReleased, + /* [iid_is][out] */ void **ppObject); + + END_INTERFACE + } ISpResourceManagerVtbl; + + interface ISpResourceManager + { + CONST_VTBL struct ISpResourceManagerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpResourceManager_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpResourceManager_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpResourceManager_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpResourceManager_QueryService(This,guidService,riid,ppvObject) \ + (This)->lpVtbl -> QueryService(This,guidService,riid,ppvObject) + + +#define ISpResourceManager_SetObject(This,guidServiceId,pUnkObject) \ + (This)->lpVtbl -> SetObject(This,guidServiceId,pUnkObject) + +#define ISpResourceManager_GetObject(This,guidServiceId,ObjectCLSID,ObjectIID,fReleaseWhenLastExternalRefReleased,ppObject) \ + (This)->lpVtbl -> GetObject(This,guidServiceId,ObjectCLSID,ObjectIID,fReleaseWhenLastExternalRefReleased,ppObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpResourceManager_SetObject_Proxy( + ISpResourceManager * This, + /* [in] */ REFGUID guidServiceId, + /* [in] */ IUnknown *pUnkObject); + + +void __RPC_STUB ISpResourceManager_SetObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpResourceManager_GetObject_Proxy( + ISpResourceManager * This, + /* [in] */ REFGUID guidServiceId, + /* [in] */ REFCLSID ObjectCLSID, + /* [in] */ REFIID ObjectIID, + /* [in] */ BOOL fReleaseWhenLastExternalRefReleased, + /* [iid_is][out] */ void **ppObject); + + +void __RPC_STUB ISpResourceManager_GetObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpResourceManager_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0262 */ +/* [local] */ + +typedef /* [hidden] */ +enum SPEVENTLPARAMTYPE + { SPET_LPARAM_IS_UNDEFINED = 0, + SPET_LPARAM_IS_TOKEN = SPET_LPARAM_IS_UNDEFINED + 1, + SPET_LPARAM_IS_OBJECT = SPET_LPARAM_IS_TOKEN + 1, + SPET_LPARAM_IS_POINTER = SPET_LPARAM_IS_OBJECT + 1, + SPET_LPARAM_IS_STRING = SPET_LPARAM_IS_POINTER + 1 + } SPEVENTLPARAMTYPE; + +typedef /* [hidden] */ +enum SPEVENTENUM + { SPEI_UNDEFINED = 0, + SPEI_START_INPUT_STREAM = 1, + SPEI_END_INPUT_STREAM = 2, + SPEI_VOICE_CHANGE = 3, + SPEI_TTS_BOOKMARK = 4, + SPEI_WORD_BOUNDARY = 5, + SPEI_PHONEME = 6, + SPEI_SENTENCE_BOUNDARY = 7, + SPEI_VISEME = 8, + SPEI_TTS_AUDIO_LEVEL = 9, + SPEI_TTS_PRIVATE = 15, + SPEI_MIN_TTS = 1, + SPEI_MAX_TTS = 15, + SPEI_END_SR_STREAM = 34, + SPEI_SOUND_START = 35, + SPEI_SOUND_END = 36, + SPEI_PHRASE_START = 37, + SPEI_RECOGNITION = 38, + SPEI_HYPOTHESIS = 39, + SPEI_SR_BOOKMARK = 40, + SPEI_PROPERTY_NUM_CHANGE = 41, + SPEI_PROPERTY_STRING_CHANGE = 42, + SPEI_FALSE_RECOGNITION = 43, + SPEI_INTERFERENCE = 44, + SPEI_REQUEST_UI = 45, + SPEI_RECO_STATE_CHANGE = 46, + SPEI_ADAPTATION = 47, + SPEI_START_SR_STREAM = 48, + SPEI_RECO_OTHER_CONTEXT = 49, + SPEI_SR_AUDIO_LEVEL = 50, + SPEI_SR_PRIVATE = 52, + SPEI_MIN_SR = 34, + SPEI_MAX_SR = 52, + SPEI_RESERVED1 = 30, + SPEI_RESERVED2 = 33, + SPEI_RESERVED3 = 63 + } SPEVENTENUM; + +#define SPFEI_FLAGCHECK ( (1ui64 << SPEI_RESERVED1) | (1ui64 << SPEI_RESERVED2) ) +#define SPFEI_ALL_TTS_EVENTS (0x000000000000FFFEui64 | SPFEI_FLAGCHECK) +#define SPFEI_ALL_SR_EVENTS (0x001FFFFC00000000ui64 | SPFEI_FLAGCHECK) +#define SPFEI_ALL_EVENTS 0xEFFFFFFFFFFFFFFFui64 +#define SPFEI(SPEI_ord) ((1ui64 << SPEI_ord) | SPFEI_FLAGCHECK) +#if 0 +typedef /* [hidden][restricted] */ struct SPEVENT + { + WORD eEventId; + WORD elParamType; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + WPARAM wParam; + LPARAM lParam; + } SPEVENT; + +typedef /* [hidden][restricted] */ struct SPSERIALIZEDEVENT + { + WORD eEventId; + WORD elParamType; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + ULONG SerializedwParam; + LONG SerializedlParam; + } SPSERIALIZEDEVENT; + +typedef /* [hidden][restricted] */ struct SPSERIALIZEDEVENT64 + { + WORD eEventId; + WORD elParamType; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + ULONGLONG SerializedwParam; + LONGLONG SerializedlParam; + } SPSERIALIZEDEVENT64; + +#else +typedef struct SPEVENT +{ + SPEVENTENUM eEventId : 16; + SPEVENTLPARAMTYPE elParamType : 16; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + WPARAM wParam; + LPARAM lParam; +} SPEVENT; +typedef struct SPSERIALIZEDEVENT +{ + SPEVENTENUM eEventId : 16; + SPEVENTLPARAMTYPE elParamType : 16; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + ULONG SerializedwParam; + LONG SerializedlParam; +} SPSERIALIZEDEVENT; +typedef struct SPSERIALIZEDEVENT64 +{ + SPEVENTENUM eEventId : 16; + SPEVENTLPARAMTYPE elParamType : 16; + ULONG ulStreamNum; + ULONGLONG ullAudioStreamOffset; + ULONGLONG SerializedwParam; + LONGLONG SerializedlParam; +} SPSERIALIZEDEVENT64; +#endif +typedef /* [hidden] */ +enum SPINTERFERENCE + { SPINTERFERENCE_NONE = 0, + SPINTERFERENCE_NOISE = SPINTERFERENCE_NONE + 1, + SPINTERFERENCE_NOSIGNAL = SPINTERFERENCE_NOISE + 1, + SPINTERFERENCE_TOOLOUD = SPINTERFERENCE_NOSIGNAL + 1, + SPINTERFERENCE_TOOQUIET = SPINTERFERENCE_TOOLOUD + 1, + SPINTERFERENCE_TOOFAST = SPINTERFERENCE_TOOQUIET + 1, + SPINTERFERENCE_TOOSLOW = SPINTERFERENCE_TOOFAST + 1 + } SPINTERFERENCE; + +typedef /* [hidden] */ +enum SPENDSRSTREAMFLAGS + { SPESF_NONE = 0, + SPESF_STREAM_RELEASED = 1 << 0 + } SPENDSRSTREAMFLAGS; + +typedef /* [hidden] */ +enum SPVFEATURE + { SPVFEATURE_STRESSED = 1L << 0, + SPVFEATURE_EMPHASIS = 1L << 1 + } SPVFEATURE; + +typedef /* [hidden] */ +enum SPVISEMES + { SP_VISEME_0 = 0, + SP_VISEME_1 = SP_VISEME_0 + 1, + SP_VISEME_2 = SP_VISEME_1 + 1, + SP_VISEME_3 = SP_VISEME_2 + 1, + SP_VISEME_4 = SP_VISEME_3 + 1, + SP_VISEME_5 = SP_VISEME_4 + 1, + SP_VISEME_6 = SP_VISEME_5 + 1, + SP_VISEME_7 = SP_VISEME_6 + 1, + SP_VISEME_8 = SP_VISEME_7 + 1, + SP_VISEME_9 = SP_VISEME_8 + 1, + SP_VISEME_10 = SP_VISEME_9 + 1, + SP_VISEME_11 = SP_VISEME_10 + 1, + SP_VISEME_12 = SP_VISEME_11 + 1, + SP_VISEME_13 = SP_VISEME_12 + 1, + SP_VISEME_14 = SP_VISEME_13 + 1, + SP_VISEME_15 = SP_VISEME_14 + 1, + SP_VISEME_16 = SP_VISEME_15 + 1, + SP_VISEME_17 = SP_VISEME_16 + 1, + SP_VISEME_18 = SP_VISEME_17 + 1, + SP_VISEME_19 = SP_VISEME_18 + 1, + SP_VISEME_20 = SP_VISEME_19 + 1, + SP_VISEME_21 = SP_VISEME_20 + 1 + } SPVISEMES; + +typedef /* [hidden][restricted] */ struct SPEVENTSOURCEINFO + { + ULONGLONG ullEventInterest; + ULONGLONG ullQueuedInterest; + ULONG ulCount; + } SPEVENTSOURCEINFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0262_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0262_v0_0_s_ifspec; + +#ifndef __ISpEventSource_INTERFACE_DEFINED__ +#define __ISpEventSource_INTERFACE_DEFINED__ + +/* interface ISpEventSource */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpEventSource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BE7A9CCE-5F9E-11D2-960F-00C04F8EE628") + ISpEventSource : public ISpNotifySource + { + public: + virtual HRESULT STDMETHODCALLTYPE SetInterest( + /* [in] */ ULONGLONG ullEventInterest, + /* [in] */ ULONGLONG ullQueuedInterest) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEvents( + /* [in] */ ULONG ulCount, + /* [size_is][out] */ SPEVENT *pEventArray, + /* [out] */ ULONG *pulFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInfo( + /* [out] */ SPEVENTSOURCEINFO *pInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpEventSourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpEventSource * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpEventSource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpEventSource * This); + + HRESULT ( STDMETHODCALLTYPE *SetNotifySink )( + ISpEventSource * This, + /* [in] */ ISpNotifySink *pNotifySink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWindowMessage )( + ISpEventSource * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackFunction )( + ISpEventSource * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackInterface )( + ISpEventSource * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWin32Event )( + ISpEventSource * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *WaitForNotifyEvent )( + ISpEventSource * This, + /* [in] */ DWORD dwMilliseconds); + + /* [local] */ HANDLE ( STDMETHODCALLTYPE *GetNotifyEventHandle )( + ISpEventSource * This); + + HRESULT ( STDMETHODCALLTYPE *SetInterest )( + ISpEventSource * This, + /* [in] */ ULONGLONG ullEventInterest, + /* [in] */ ULONGLONG ullQueuedInterest); + + HRESULT ( STDMETHODCALLTYPE *GetEvents )( + ISpEventSource * This, + /* [in] */ ULONG ulCount, + /* [size_is][out] */ SPEVENT *pEventArray, + /* [out] */ ULONG *pulFetched); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + ISpEventSource * This, + /* [out] */ SPEVENTSOURCEINFO *pInfo); + + END_INTERFACE + } ISpEventSourceVtbl; + + interface ISpEventSource + { + CONST_VTBL struct ISpEventSourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpEventSource_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpEventSource_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpEventSource_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpEventSource_SetNotifySink(This,pNotifySink) \ + (This)->lpVtbl -> SetNotifySink(This,pNotifySink) + +#define ISpEventSource_SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) + +#define ISpEventSource_SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) + +#define ISpEventSource_SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) + +#define ISpEventSource_SetNotifyWin32Event(This) \ + (This)->lpVtbl -> SetNotifyWin32Event(This) + +#define ISpEventSource_WaitForNotifyEvent(This,dwMilliseconds) \ + (This)->lpVtbl -> WaitForNotifyEvent(This,dwMilliseconds) + +#define ISpEventSource_GetNotifyEventHandle(This) \ + (This)->lpVtbl -> GetNotifyEventHandle(This) + + +#define ISpEventSource_SetInterest(This,ullEventInterest,ullQueuedInterest) \ + (This)->lpVtbl -> SetInterest(This,ullEventInterest,ullQueuedInterest) + +#define ISpEventSource_GetEvents(This,ulCount,pEventArray,pulFetched) \ + (This)->lpVtbl -> GetEvents(This,ulCount,pEventArray,pulFetched) + +#define ISpEventSource_GetInfo(This,pInfo) \ + (This)->lpVtbl -> GetInfo(This,pInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpEventSource_SetInterest_Proxy( + ISpEventSource * This, + /* [in] */ ULONGLONG ullEventInterest, + /* [in] */ ULONGLONG ullQueuedInterest); + + +void __RPC_STUB ISpEventSource_SetInterest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpEventSource_GetEvents_Proxy( + ISpEventSource * This, + /* [in] */ ULONG ulCount, + /* [size_is][out] */ SPEVENT *pEventArray, + /* [out] */ ULONG *pulFetched); + + +void __RPC_STUB ISpEventSource_GetEvents_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpEventSource_GetInfo_Proxy( + ISpEventSource * This, + /* [out] */ SPEVENTSOURCEINFO *pInfo); + + +void __RPC_STUB ISpEventSource_GetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpEventSource_INTERFACE_DEFINED__ */ + + +#ifndef __ISpEventSink_INTERFACE_DEFINED__ +#define __ISpEventSink_INTERFACE_DEFINED__ + +/* interface ISpEventSink */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpEventSink; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BE7A9CC9-5F9E-11D2-960F-00C04F8EE628") + ISpEventSink : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AddEvents( + /* [in] */ const SPEVENT *pEventArray, + /* [in] */ ULONG ulCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEventInterest( + /* [out] */ ULONGLONG *pullEventInterest) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpEventSinkVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpEventSink * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpEventSink * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpEventSink * This); + + HRESULT ( STDMETHODCALLTYPE *AddEvents )( + ISpEventSink * This, + /* [in] */ const SPEVENT *pEventArray, + /* [in] */ ULONG ulCount); + + HRESULT ( STDMETHODCALLTYPE *GetEventInterest )( + ISpEventSink * This, + /* [out] */ ULONGLONG *pullEventInterest); + + END_INTERFACE + } ISpEventSinkVtbl; + + interface ISpEventSink + { + CONST_VTBL struct ISpEventSinkVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpEventSink_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpEventSink_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpEventSink_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpEventSink_AddEvents(This,pEventArray,ulCount) \ + (This)->lpVtbl -> AddEvents(This,pEventArray,ulCount) + +#define ISpEventSink_GetEventInterest(This,pullEventInterest) \ + (This)->lpVtbl -> GetEventInterest(This,pullEventInterest) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpEventSink_AddEvents_Proxy( + ISpEventSink * This, + /* [in] */ const SPEVENT *pEventArray, + /* [in] */ ULONG ulCount); + + +void __RPC_STUB ISpEventSink_AddEvents_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpEventSink_GetEventInterest_Proxy( + ISpEventSink * This, + /* [out] */ ULONGLONG *pullEventInterest); + + +void __RPC_STUB ISpEventSink_GetEventInterest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpEventSink_INTERFACE_DEFINED__ */ + + +#ifndef __ISpStreamFormat_INTERFACE_DEFINED__ +#define __ISpStreamFormat_INTERFACE_DEFINED__ + +/* interface ISpStreamFormat */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpStreamFormat; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BED530BE-2606-4F4D-A1C0-54C5CDA5566F") + ISpStreamFormat : public IStream + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpStreamFormatVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpStreamFormat * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpStreamFormat * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpStreamFormat * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpStreamFormat * This, + /* [length_is][size_is][out] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpStreamFormat * This, + /* [size_is][in] */ const void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpStreamFormat * This, + /* [in] */ LARGE_INTEGER dlibMove, + /* [in] */ DWORD dwOrigin, + /* [out] */ ULARGE_INTEGER *plibNewPosition); + + HRESULT ( STDMETHODCALLTYPE *SetSize )( + ISpStreamFormat * This, + /* [in] */ ULARGE_INTEGER libNewSize); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( + ISpStreamFormat * This, + /* [unique][in] */ IStream *pstm, + /* [in] */ ULARGE_INTEGER cb, + /* [out] */ ULARGE_INTEGER *pcbRead, + /* [out] */ ULARGE_INTEGER *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpStreamFormat * This, + /* [in] */ DWORD grfCommitFlags); + + HRESULT ( STDMETHODCALLTYPE *Revert )( + ISpStreamFormat * This); + + HRESULT ( STDMETHODCALLTYPE *LockRegion )( + ISpStreamFormat * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *UnlockRegion )( + ISpStreamFormat * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *Stat )( + ISpStreamFormat * This, + /* [out] */ STATSTG *pstatstg, + /* [in] */ DWORD grfStatFlag); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpStreamFormat * This, + /* [out] */ IStream **ppstm); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpStreamFormat * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + END_INTERFACE + } ISpStreamFormatVtbl; + + interface ISpStreamFormat + { + CONST_VTBL struct ISpStreamFormatVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpStreamFormat_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpStreamFormat_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpStreamFormat_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpStreamFormat_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpStreamFormat_Write(This,pv,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pv,cb,pcbWritten) + + +#define ISpStreamFormat_Seek(This,dlibMove,dwOrigin,plibNewPosition) \ + (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) + +#define ISpStreamFormat_SetSize(This,libNewSize) \ + (This)->lpVtbl -> SetSize(This,libNewSize) + +#define ISpStreamFormat_CopyTo(This,pstm,cb,pcbRead,pcbWritten) \ + (This)->lpVtbl -> CopyTo(This,pstm,cb,pcbRead,pcbWritten) + +#define ISpStreamFormat_Commit(This,grfCommitFlags) \ + (This)->lpVtbl -> Commit(This,grfCommitFlags) + +#define ISpStreamFormat_Revert(This) \ + (This)->lpVtbl -> Revert(This) + +#define ISpStreamFormat_LockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> LockRegion(This,libOffset,cb,dwLockType) + +#define ISpStreamFormat_UnlockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> UnlockRegion(This,libOffset,cb,dwLockType) + +#define ISpStreamFormat_Stat(This,pstatstg,grfStatFlag) \ + (This)->lpVtbl -> Stat(This,pstatstg,grfStatFlag) + +#define ISpStreamFormat_Clone(This,ppstm) \ + (This)->lpVtbl -> Clone(This,ppstm) + + +#define ISpStreamFormat_GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpStreamFormat_GetFormat_Proxy( + ISpStreamFormat * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + +void __RPC_STUB ISpStreamFormat_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpStreamFormat_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0265 */ +/* [local] */ + +typedef /* [hidden] */ +enum SPFILEMODE + { SPFM_OPEN_READONLY = 0, + SPFM_OPEN_READWRITE = SPFM_OPEN_READONLY + 1, + SPFM_CREATE = SPFM_OPEN_READWRITE + 1, + SPFM_CREATE_ALWAYS = SPFM_CREATE + 1, + SPFM_NUM_MODES = SPFM_CREATE_ALWAYS + 1 + } SPFILEMODE; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0265_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0265_v0_0_s_ifspec; + +#ifndef __ISpStream_INTERFACE_DEFINED__ +#define __ISpStream_INTERFACE_DEFINED__ + +/* interface ISpStream */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("12E3CCA9-7518-44C5-A5E7-BA5A79CB929E") + ISpStream : public ISpStreamFormat + { + public: + virtual HRESULT STDMETHODCALLTYPE SetBaseStream( + IStream *pStream, + REFGUID rguidFormat, + const WAVEFORMATEX *pWaveFormatEx) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBaseStream( + IStream **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE BindToFile( + const WCHAR *pszFileName, + SPFILEMODE eMode, + const GUID *pFormatId, + const WAVEFORMATEX *pWaveFormatEx, + ULONGLONG ullEventInterest) = 0; + + virtual HRESULT STDMETHODCALLTYPE Close( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpStream * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpStream * This, + /* [length_is][size_is][out] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpStream * This, + /* [size_is][in] */ const void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpStream * This, + /* [in] */ LARGE_INTEGER dlibMove, + /* [in] */ DWORD dwOrigin, + /* [out] */ ULARGE_INTEGER *plibNewPosition); + + HRESULT ( STDMETHODCALLTYPE *SetSize )( + ISpStream * This, + /* [in] */ ULARGE_INTEGER libNewSize); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( + ISpStream * This, + /* [unique][in] */ IStream *pstm, + /* [in] */ ULARGE_INTEGER cb, + /* [out] */ ULARGE_INTEGER *pcbRead, + /* [out] */ ULARGE_INTEGER *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpStream * This, + /* [in] */ DWORD grfCommitFlags); + + HRESULT ( STDMETHODCALLTYPE *Revert )( + ISpStream * This); + + HRESULT ( STDMETHODCALLTYPE *LockRegion )( + ISpStream * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *UnlockRegion )( + ISpStream * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *Stat )( + ISpStream * This, + /* [out] */ STATSTG *pstatstg, + /* [in] */ DWORD grfStatFlag); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpStream * This, + /* [out] */ IStream **ppstm); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpStream * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *SetBaseStream )( + ISpStream * This, + IStream *pStream, + REFGUID rguidFormat, + const WAVEFORMATEX *pWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *GetBaseStream )( + ISpStream * This, + IStream **ppStream); + + HRESULT ( STDMETHODCALLTYPE *BindToFile )( + ISpStream * This, + const WCHAR *pszFileName, + SPFILEMODE eMode, + const GUID *pFormatId, + const WAVEFORMATEX *pWaveFormatEx, + ULONGLONG ullEventInterest); + + HRESULT ( STDMETHODCALLTYPE *Close )( + ISpStream * This); + + END_INTERFACE + } ISpStreamVtbl; + + interface ISpStream + { + CONST_VTBL struct ISpStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpStream_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpStream_Write(This,pv,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pv,cb,pcbWritten) + + +#define ISpStream_Seek(This,dlibMove,dwOrigin,plibNewPosition) \ + (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) + +#define ISpStream_SetSize(This,libNewSize) \ + (This)->lpVtbl -> SetSize(This,libNewSize) + +#define ISpStream_CopyTo(This,pstm,cb,pcbRead,pcbWritten) \ + (This)->lpVtbl -> CopyTo(This,pstm,cb,pcbRead,pcbWritten) + +#define ISpStream_Commit(This,grfCommitFlags) \ + (This)->lpVtbl -> Commit(This,grfCommitFlags) + +#define ISpStream_Revert(This) \ + (This)->lpVtbl -> Revert(This) + +#define ISpStream_LockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> LockRegion(This,libOffset,cb,dwLockType) + +#define ISpStream_UnlockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> UnlockRegion(This,libOffset,cb,dwLockType) + +#define ISpStream_Stat(This,pstatstg,grfStatFlag) \ + (This)->lpVtbl -> Stat(This,pstatstg,grfStatFlag) + +#define ISpStream_Clone(This,ppstm) \ + (This)->lpVtbl -> Clone(This,ppstm) + + +#define ISpStream_GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) + + +#define ISpStream_SetBaseStream(This,pStream,rguidFormat,pWaveFormatEx) \ + (This)->lpVtbl -> SetBaseStream(This,pStream,rguidFormat,pWaveFormatEx) + +#define ISpStream_GetBaseStream(This,ppStream) \ + (This)->lpVtbl -> GetBaseStream(This,ppStream) + +#define ISpStream_BindToFile(This,pszFileName,eMode,pFormatId,pWaveFormatEx,ullEventInterest) \ + (This)->lpVtbl -> BindToFile(This,pszFileName,eMode,pFormatId,pWaveFormatEx,ullEventInterest) + +#define ISpStream_Close(This) \ + (This)->lpVtbl -> Close(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpStream_SetBaseStream_Proxy( + ISpStream * This, + IStream *pStream, + REFGUID rguidFormat, + const WAVEFORMATEX *pWaveFormatEx); + + +void __RPC_STUB ISpStream_SetBaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStream_GetBaseStream_Proxy( + ISpStream * This, + IStream **ppStream); + + +void __RPC_STUB ISpStream_GetBaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStream_BindToFile_Proxy( + ISpStream * This, + const WCHAR *pszFileName, + SPFILEMODE eMode, + const GUID *pFormatId, + const WAVEFORMATEX *pWaveFormatEx, + ULONGLONG ullEventInterest); + + +void __RPC_STUB ISpStream_BindToFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStream_Close_Proxy( + ISpStream * This); + + +void __RPC_STUB ISpStream_Close_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpStream_INTERFACE_DEFINED__ */ + + +#ifndef __ISpStreamFormatConverter_INTERFACE_DEFINED__ +#define __ISpStreamFormatConverter_INTERFACE_DEFINED__ + +/* interface ISpStreamFormatConverter */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpStreamFormatConverter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("678A932C-EA71-4446-9B41-78FDA6280A29") + ISpStreamFormatConverter : public ISpStreamFormat + { + public: + virtual HRESULT STDMETHODCALLTYPE SetBaseStream( + /* [in] */ ISpStreamFormat *pStream, + /* [in] */ BOOL fSetFormatToBaseStreamFormat, + /* [in] */ BOOL fWriteToBaseStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBaseStream( + /* [out] */ ISpStreamFormat **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ REFGUID rguidFormatIdOfConvertedStream, + /* [in] */ const WAVEFORMATEX *pWaveFormatExOfConvertedStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResetSeekPosition( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScaleConvertedToBaseOffset( + /* [in] */ ULONGLONG ullOffsetConvertedStream, + /* [out] */ ULONGLONG *pullOffsetBaseStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScaleBaseToConvertedOffset( + /* [in] */ ULONGLONG ullOffsetBaseStream, + /* [out] */ ULONGLONG *pullOffsetConvertedStream) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpStreamFormatConverterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpStreamFormatConverter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpStreamFormatConverter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpStreamFormatConverter * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpStreamFormatConverter * This, + /* [length_is][size_is][out] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpStreamFormatConverter * This, + /* [size_is][in] */ const void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpStreamFormatConverter * This, + /* [in] */ LARGE_INTEGER dlibMove, + /* [in] */ DWORD dwOrigin, + /* [out] */ ULARGE_INTEGER *plibNewPosition); + + HRESULT ( STDMETHODCALLTYPE *SetSize )( + ISpStreamFormatConverter * This, + /* [in] */ ULARGE_INTEGER libNewSize); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( + ISpStreamFormatConverter * This, + /* [unique][in] */ IStream *pstm, + /* [in] */ ULARGE_INTEGER cb, + /* [out] */ ULARGE_INTEGER *pcbRead, + /* [out] */ ULARGE_INTEGER *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpStreamFormatConverter * This, + /* [in] */ DWORD grfCommitFlags); + + HRESULT ( STDMETHODCALLTYPE *Revert )( + ISpStreamFormatConverter * This); + + HRESULT ( STDMETHODCALLTYPE *LockRegion )( + ISpStreamFormatConverter * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *UnlockRegion )( + ISpStreamFormatConverter * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *Stat )( + ISpStreamFormatConverter * This, + /* [out] */ STATSTG *pstatstg, + /* [in] */ DWORD grfStatFlag); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpStreamFormatConverter * This, + /* [out] */ IStream **ppstm); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpStreamFormatConverter * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *SetBaseStream )( + ISpStreamFormatConverter * This, + /* [in] */ ISpStreamFormat *pStream, + /* [in] */ BOOL fSetFormatToBaseStreamFormat, + /* [in] */ BOOL fWriteToBaseStream); + + HRESULT ( STDMETHODCALLTYPE *GetBaseStream )( + ISpStreamFormatConverter * This, + /* [out] */ ISpStreamFormat **ppStream); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + ISpStreamFormatConverter * This, + /* [in] */ REFGUID rguidFormatIdOfConvertedStream, + /* [in] */ const WAVEFORMATEX *pWaveFormatExOfConvertedStream); + + HRESULT ( STDMETHODCALLTYPE *ResetSeekPosition )( + ISpStreamFormatConverter * This); + + HRESULT ( STDMETHODCALLTYPE *ScaleConvertedToBaseOffset )( + ISpStreamFormatConverter * This, + /* [in] */ ULONGLONG ullOffsetConvertedStream, + /* [out] */ ULONGLONG *pullOffsetBaseStream); + + HRESULT ( STDMETHODCALLTYPE *ScaleBaseToConvertedOffset )( + ISpStreamFormatConverter * This, + /* [in] */ ULONGLONG ullOffsetBaseStream, + /* [out] */ ULONGLONG *pullOffsetConvertedStream); + + END_INTERFACE + } ISpStreamFormatConverterVtbl; + + interface ISpStreamFormatConverter + { + CONST_VTBL struct ISpStreamFormatConverterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpStreamFormatConverter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpStreamFormatConverter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpStreamFormatConverter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpStreamFormatConverter_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpStreamFormatConverter_Write(This,pv,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pv,cb,pcbWritten) + + +#define ISpStreamFormatConverter_Seek(This,dlibMove,dwOrigin,plibNewPosition) \ + (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) + +#define ISpStreamFormatConverter_SetSize(This,libNewSize) \ + (This)->lpVtbl -> SetSize(This,libNewSize) + +#define ISpStreamFormatConverter_CopyTo(This,pstm,cb,pcbRead,pcbWritten) \ + (This)->lpVtbl -> CopyTo(This,pstm,cb,pcbRead,pcbWritten) + +#define ISpStreamFormatConverter_Commit(This,grfCommitFlags) \ + (This)->lpVtbl -> Commit(This,grfCommitFlags) + +#define ISpStreamFormatConverter_Revert(This) \ + (This)->lpVtbl -> Revert(This) + +#define ISpStreamFormatConverter_LockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> LockRegion(This,libOffset,cb,dwLockType) + +#define ISpStreamFormatConverter_UnlockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> UnlockRegion(This,libOffset,cb,dwLockType) + +#define ISpStreamFormatConverter_Stat(This,pstatstg,grfStatFlag) \ + (This)->lpVtbl -> Stat(This,pstatstg,grfStatFlag) + +#define ISpStreamFormatConverter_Clone(This,ppstm) \ + (This)->lpVtbl -> Clone(This,ppstm) + + +#define ISpStreamFormatConverter_GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) + + +#define ISpStreamFormatConverter_SetBaseStream(This,pStream,fSetFormatToBaseStreamFormat,fWriteToBaseStream) \ + (This)->lpVtbl -> SetBaseStream(This,pStream,fSetFormatToBaseStreamFormat,fWriteToBaseStream) + +#define ISpStreamFormatConverter_GetBaseStream(This,ppStream) \ + (This)->lpVtbl -> GetBaseStream(This,ppStream) + +#define ISpStreamFormatConverter_SetFormat(This,rguidFormatIdOfConvertedStream,pWaveFormatExOfConvertedStream) \ + (This)->lpVtbl -> SetFormat(This,rguidFormatIdOfConvertedStream,pWaveFormatExOfConvertedStream) + +#define ISpStreamFormatConverter_ResetSeekPosition(This) \ + (This)->lpVtbl -> ResetSeekPosition(This) + +#define ISpStreamFormatConverter_ScaleConvertedToBaseOffset(This,ullOffsetConvertedStream,pullOffsetBaseStream) \ + (This)->lpVtbl -> ScaleConvertedToBaseOffset(This,ullOffsetConvertedStream,pullOffsetBaseStream) + +#define ISpStreamFormatConverter_ScaleBaseToConvertedOffset(This,ullOffsetBaseStream,pullOffsetConvertedStream) \ + (This)->lpVtbl -> ScaleBaseToConvertedOffset(This,ullOffsetBaseStream,pullOffsetConvertedStream) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_SetBaseStream_Proxy( + ISpStreamFormatConverter * This, + /* [in] */ ISpStreamFormat *pStream, + /* [in] */ BOOL fSetFormatToBaseStreamFormat, + /* [in] */ BOOL fWriteToBaseStream); + + +void __RPC_STUB ISpStreamFormatConverter_SetBaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_GetBaseStream_Proxy( + ISpStreamFormatConverter * This, + /* [out] */ ISpStreamFormat **ppStream); + + +void __RPC_STUB ISpStreamFormatConverter_GetBaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_SetFormat_Proxy( + ISpStreamFormatConverter * This, + /* [in] */ REFGUID rguidFormatIdOfConvertedStream, + /* [in] */ const WAVEFORMATEX *pWaveFormatExOfConvertedStream); + + +void __RPC_STUB ISpStreamFormatConverter_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_ResetSeekPosition_Proxy( + ISpStreamFormatConverter * This); + + +void __RPC_STUB ISpStreamFormatConverter_ResetSeekPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_ScaleConvertedToBaseOffset_Proxy( + ISpStreamFormatConverter * This, + /* [in] */ ULONGLONG ullOffsetConvertedStream, + /* [out] */ ULONGLONG *pullOffsetBaseStream); + + +void __RPC_STUB ISpStreamFormatConverter_ScaleConvertedToBaseOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpStreamFormatConverter_ScaleBaseToConvertedOffset_Proxy( + ISpStreamFormatConverter * This, + /* [in] */ ULONGLONG ullOffsetBaseStream, + /* [out] */ ULONGLONG *pullOffsetConvertedStream); + + +void __RPC_STUB ISpStreamFormatConverter_ScaleBaseToConvertedOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpStreamFormatConverter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0267 */ +/* [local] */ + +typedef /* [hidden] */ +enum _SPAUDIOSTATE + { SPAS_CLOSED = 0, + SPAS_STOP = SPAS_CLOSED + 1, + SPAS_PAUSE = SPAS_STOP + 1, + SPAS_RUN = SPAS_PAUSE + 1 + } SPAUDIOSTATE; + +typedef /* [hidden][restricted] */ struct SPAUDIOSTATUS + { + long cbFreeBuffSpace; + ULONG cbNonBlockingIO; + SPAUDIOSTATE State; + ULONGLONG CurSeekPos; + ULONGLONG CurDevicePos; + DWORD dwReserved1; + DWORD dwReserved2; + } SPAUDIOSTATUS; + +typedef /* [hidden][restricted] */ struct SPAUDIOBUFFERINFO + { + ULONG ulMsMinNotification; + ULONG ulMsBufferSize; + ULONG ulMsEventBias; + } SPAUDIOBUFFERINFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0267_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0267_v0_0_s_ifspec; + +#ifndef __ISpAudio_INTERFACE_DEFINED__ +#define __ISpAudio_INTERFACE_DEFINED__ + +/* interface ISpAudio */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpAudio; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C05C768F-FAE8-4EC2-8E07-338321C12452") + ISpAudio : public ISpStreamFormat + { + public: + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ SPAUDIOSTATE NewState, + /* [in] */ ULONGLONG ullReserved) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ SPAUDIOSTATUS *pStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBufferInfo( + /* [in] */ const SPAUDIOBUFFERINFO *pBuffInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBufferInfo( + /* [out] */ SPAUDIOBUFFERINFO *pBuffInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultFormat( + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWaveFormatEx) = 0; + + virtual HANDLE STDMETHODCALLTYPE EventHandle( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVolumeLevel( + /* [out] */ ULONG *pLevel) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVolumeLevel( + /* [in] */ ULONG Level) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBufferNotifySize( + /* [out] */ ULONG *pcbSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBufferNotifySize( + /* [in] */ ULONG cbSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpAudio * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpAudio * This, + /* [length_is][size_is][out] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpAudio * This, + /* [size_is][in] */ const void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpAudio * This, + /* [in] */ LARGE_INTEGER dlibMove, + /* [in] */ DWORD dwOrigin, + /* [out] */ ULARGE_INTEGER *plibNewPosition); + + HRESULT ( STDMETHODCALLTYPE *SetSize )( + ISpAudio * This, + /* [in] */ ULARGE_INTEGER libNewSize); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( + ISpAudio * This, + /* [unique][in] */ IStream *pstm, + /* [in] */ ULARGE_INTEGER cb, + /* [out] */ ULARGE_INTEGER *pcbRead, + /* [out] */ ULARGE_INTEGER *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpAudio * This, + /* [in] */ DWORD grfCommitFlags); + + HRESULT ( STDMETHODCALLTYPE *Revert )( + ISpAudio * This); + + HRESULT ( STDMETHODCALLTYPE *LockRegion )( + ISpAudio * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *UnlockRegion )( + ISpAudio * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *Stat )( + ISpAudio * This, + /* [out] */ STATSTG *pstatstg, + /* [in] */ DWORD grfStatFlag); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpAudio * This, + /* [out] */ IStream **ppstm); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpAudio * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + ISpAudio * This, + /* [in] */ SPAUDIOSTATE NewState, + /* [in] */ ULONGLONG ullReserved); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + ISpAudio * This, + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + ISpAudio * This, + /* [out] */ SPAUDIOSTATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *SetBufferInfo )( + ISpAudio * This, + /* [in] */ const SPAUDIOBUFFERINFO *pBuffInfo); + + HRESULT ( STDMETHODCALLTYPE *GetBufferInfo )( + ISpAudio * This, + /* [out] */ SPAUDIOBUFFERINFO *pBuffInfo); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultFormat )( + ISpAudio * This, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWaveFormatEx); + + HANDLE ( STDMETHODCALLTYPE *EventHandle )( + ISpAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetVolumeLevel )( + ISpAudio * This, + /* [out] */ ULONG *pLevel); + + HRESULT ( STDMETHODCALLTYPE *SetVolumeLevel )( + ISpAudio * This, + /* [in] */ ULONG Level); + + HRESULT ( STDMETHODCALLTYPE *GetBufferNotifySize )( + ISpAudio * This, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *SetBufferNotifySize )( + ISpAudio * This, + /* [in] */ ULONG cbSize); + + END_INTERFACE + } ISpAudioVtbl; + + interface ISpAudio + { + CONST_VTBL struct ISpAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpAudio_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpAudio_Write(This,pv,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pv,cb,pcbWritten) + + +#define ISpAudio_Seek(This,dlibMove,dwOrigin,plibNewPosition) \ + (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) + +#define ISpAudio_SetSize(This,libNewSize) \ + (This)->lpVtbl -> SetSize(This,libNewSize) + +#define ISpAudio_CopyTo(This,pstm,cb,pcbRead,pcbWritten) \ + (This)->lpVtbl -> CopyTo(This,pstm,cb,pcbRead,pcbWritten) + +#define ISpAudio_Commit(This,grfCommitFlags) \ + (This)->lpVtbl -> Commit(This,grfCommitFlags) + +#define ISpAudio_Revert(This) \ + (This)->lpVtbl -> Revert(This) + +#define ISpAudio_LockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> LockRegion(This,libOffset,cb,dwLockType) + +#define ISpAudio_UnlockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> UnlockRegion(This,libOffset,cb,dwLockType) + +#define ISpAudio_Stat(This,pstatstg,grfStatFlag) \ + (This)->lpVtbl -> Stat(This,pstatstg,grfStatFlag) + +#define ISpAudio_Clone(This,ppstm) \ + (This)->lpVtbl -> Clone(This,ppstm) + + +#define ISpAudio_GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) + + +#define ISpAudio_SetState(This,NewState,ullReserved) \ + (This)->lpVtbl -> SetState(This,NewState,ullReserved) + +#define ISpAudio_SetFormat(This,rguidFmtId,pWaveFormatEx) \ + (This)->lpVtbl -> SetFormat(This,rguidFmtId,pWaveFormatEx) + +#define ISpAudio_GetStatus(This,pStatus) \ + (This)->lpVtbl -> GetStatus(This,pStatus) + +#define ISpAudio_SetBufferInfo(This,pBuffInfo) \ + (This)->lpVtbl -> SetBufferInfo(This,pBuffInfo) + +#define ISpAudio_GetBufferInfo(This,pBuffInfo) \ + (This)->lpVtbl -> GetBufferInfo(This,pBuffInfo) + +#define ISpAudio_GetDefaultFormat(This,pFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetDefaultFormat(This,pFormatId,ppCoMemWaveFormatEx) + +#define ISpAudio_EventHandle(This) \ + (This)->lpVtbl -> EventHandle(This) + +#define ISpAudio_GetVolumeLevel(This,pLevel) \ + (This)->lpVtbl -> GetVolumeLevel(This,pLevel) + +#define ISpAudio_SetVolumeLevel(This,Level) \ + (This)->lpVtbl -> SetVolumeLevel(This,Level) + +#define ISpAudio_GetBufferNotifySize(This,pcbSize) \ + (This)->lpVtbl -> GetBufferNotifySize(This,pcbSize) + +#define ISpAudio_SetBufferNotifySize(This,cbSize) \ + (This)->lpVtbl -> SetBufferNotifySize(This,cbSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpAudio_SetState_Proxy( + ISpAudio * This, + /* [in] */ SPAUDIOSTATE NewState, + /* [in] */ ULONGLONG ullReserved); + + +void __RPC_STUB ISpAudio_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_SetFormat_Proxy( + ISpAudio * This, + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + +void __RPC_STUB ISpAudio_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_GetStatus_Proxy( + ISpAudio * This, + /* [out] */ SPAUDIOSTATUS *pStatus); + + +void __RPC_STUB ISpAudio_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_SetBufferInfo_Proxy( + ISpAudio * This, + /* [in] */ const SPAUDIOBUFFERINFO *pBuffInfo); + + +void __RPC_STUB ISpAudio_SetBufferInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_GetBufferInfo_Proxy( + ISpAudio * This, + /* [out] */ SPAUDIOBUFFERINFO *pBuffInfo); + + +void __RPC_STUB ISpAudio_GetBufferInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_GetDefaultFormat_Proxy( + ISpAudio * This, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWaveFormatEx); + + +void __RPC_STUB ISpAudio_GetDefaultFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpAudio_EventHandle_Proxy( + ISpAudio * This); + + +void __RPC_STUB ISpAudio_EventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_GetVolumeLevel_Proxy( + ISpAudio * This, + /* [out] */ ULONG *pLevel); + + +void __RPC_STUB ISpAudio_GetVolumeLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_SetVolumeLevel_Proxy( + ISpAudio * This, + /* [in] */ ULONG Level); + + +void __RPC_STUB ISpAudio_SetVolumeLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_GetBufferNotifySize_Proxy( + ISpAudio * This, + /* [out] */ ULONG *pcbSize); + + +void __RPC_STUB ISpAudio_GetBufferNotifySize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpAudio_SetBufferNotifySize_Proxy( + ISpAudio * This, + /* [in] */ ULONG cbSize); + + +void __RPC_STUB ISpAudio_SetBufferNotifySize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpAudio_INTERFACE_DEFINED__ */ + + +#ifndef __ISpMMSysAudio_INTERFACE_DEFINED__ +#define __ISpMMSysAudio_INTERFACE_DEFINED__ + +/* interface ISpMMSysAudio */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpMMSysAudio; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("15806F6E-1D70-4B48-98E6-3B1A007509AB") + ISpMMSysAudio : public ISpAudio + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDeviceId( + /* [out] */ UINT *puDeviceId) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDeviceId( + /* [in] */ UINT uDeviceId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMMHandle( + void **pHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLineId( + /* [out] */ UINT *puLineId) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetLineId( + /* [in] */ UINT uLineId) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpMMSysAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpMMSysAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpMMSysAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpMMSysAudio * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpMMSysAudio * This, + /* [length_is][size_is][out] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpMMSysAudio * This, + /* [size_is][in] */ const void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpMMSysAudio * This, + /* [in] */ LARGE_INTEGER dlibMove, + /* [in] */ DWORD dwOrigin, + /* [out] */ ULARGE_INTEGER *plibNewPosition); + + HRESULT ( STDMETHODCALLTYPE *SetSize )( + ISpMMSysAudio * This, + /* [in] */ ULARGE_INTEGER libNewSize); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopyTo )( + ISpMMSysAudio * This, + /* [unique][in] */ IStream *pstm, + /* [in] */ ULARGE_INTEGER cb, + /* [out] */ ULARGE_INTEGER *pcbRead, + /* [out] */ ULARGE_INTEGER *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpMMSysAudio * This, + /* [in] */ DWORD grfCommitFlags); + + HRESULT ( STDMETHODCALLTYPE *Revert )( + ISpMMSysAudio * This); + + HRESULT ( STDMETHODCALLTYPE *LockRegion )( + ISpMMSysAudio * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *UnlockRegion )( + ISpMMSysAudio * This, + /* [in] */ ULARGE_INTEGER libOffset, + /* [in] */ ULARGE_INTEGER cb, + /* [in] */ DWORD dwLockType); + + HRESULT ( STDMETHODCALLTYPE *Stat )( + ISpMMSysAudio * This, + /* [out] */ STATSTG *pstatstg, + /* [in] */ DWORD grfStatFlag); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpMMSysAudio * This, + /* [out] */ IStream **ppstm); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpMMSysAudio * This, + GUID *pguidFormatId, + WAVEFORMATEX **ppCoMemWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + ISpMMSysAudio * This, + /* [in] */ SPAUDIOSTATE NewState, + /* [in] */ ULONGLONG ullReserved); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + ISpMMSysAudio * This, + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + ISpMMSysAudio * This, + /* [out] */ SPAUDIOSTATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *SetBufferInfo )( + ISpMMSysAudio * This, + /* [in] */ const SPAUDIOBUFFERINFO *pBuffInfo); + + HRESULT ( STDMETHODCALLTYPE *GetBufferInfo )( + ISpMMSysAudio * This, + /* [out] */ SPAUDIOBUFFERINFO *pBuffInfo); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultFormat )( + ISpMMSysAudio * This, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWaveFormatEx); + + HANDLE ( STDMETHODCALLTYPE *EventHandle )( + ISpMMSysAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetVolumeLevel )( + ISpMMSysAudio * This, + /* [out] */ ULONG *pLevel); + + HRESULT ( STDMETHODCALLTYPE *SetVolumeLevel )( + ISpMMSysAudio * This, + /* [in] */ ULONG Level); + + HRESULT ( STDMETHODCALLTYPE *GetBufferNotifySize )( + ISpMMSysAudio * This, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *SetBufferNotifySize )( + ISpMMSysAudio * This, + /* [in] */ ULONG cbSize); + + HRESULT ( STDMETHODCALLTYPE *GetDeviceId )( + ISpMMSysAudio * This, + /* [out] */ UINT *puDeviceId); + + HRESULT ( STDMETHODCALLTYPE *SetDeviceId )( + ISpMMSysAudio * This, + /* [in] */ UINT uDeviceId); + + HRESULT ( STDMETHODCALLTYPE *GetMMHandle )( + ISpMMSysAudio * This, + void **pHandle); + + HRESULT ( STDMETHODCALLTYPE *GetLineId )( + ISpMMSysAudio * This, + /* [out] */ UINT *puLineId); + + HRESULT ( STDMETHODCALLTYPE *SetLineId )( + ISpMMSysAudio * This, + /* [in] */ UINT uLineId); + + END_INTERFACE + } ISpMMSysAudioVtbl; + + interface ISpMMSysAudio + { + CONST_VTBL struct ISpMMSysAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpMMSysAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpMMSysAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpMMSysAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpMMSysAudio_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpMMSysAudio_Write(This,pv,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pv,cb,pcbWritten) + + +#define ISpMMSysAudio_Seek(This,dlibMove,dwOrigin,plibNewPosition) \ + (This)->lpVtbl -> Seek(This,dlibMove,dwOrigin,plibNewPosition) + +#define ISpMMSysAudio_SetSize(This,libNewSize) \ + (This)->lpVtbl -> SetSize(This,libNewSize) + +#define ISpMMSysAudio_CopyTo(This,pstm,cb,pcbRead,pcbWritten) \ + (This)->lpVtbl -> CopyTo(This,pstm,cb,pcbRead,pcbWritten) + +#define ISpMMSysAudio_Commit(This,grfCommitFlags) \ + (This)->lpVtbl -> Commit(This,grfCommitFlags) + +#define ISpMMSysAudio_Revert(This) \ + (This)->lpVtbl -> Revert(This) + +#define ISpMMSysAudio_LockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> LockRegion(This,libOffset,cb,dwLockType) + +#define ISpMMSysAudio_UnlockRegion(This,libOffset,cb,dwLockType) \ + (This)->lpVtbl -> UnlockRegion(This,libOffset,cb,dwLockType) + +#define ISpMMSysAudio_Stat(This,pstatstg,grfStatFlag) \ + (This)->lpVtbl -> Stat(This,pstatstg,grfStatFlag) + +#define ISpMMSysAudio_Clone(This,ppstm) \ + (This)->lpVtbl -> Clone(This,ppstm) + + +#define ISpMMSysAudio_GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetFormat(This,pguidFormatId,ppCoMemWaveFormatEx) + + +#define ISpMMSysAudio_SetState(This,NewState,ullReserved) \ + (This)->lpVtbl -> SetState(This,NewState,ullReserved) + +#define ISpMMSysAudio_SetFormat(This,rguidFmtId,pWaveFormatEx) \ + (This)->lpVtbl -> SetFormat(This,rguidFmtId,pWaveFormatEx) + +#define ISpMMSysAudio_GetStatus(This,pStatus) \ + (This)->lpVtbl -> GetStatus(This,pStatus) + +#define ISpMMSysAudio_SetBufferInfo(This,pBuffInfo) \ + (This)->lpVtbl -> SetBufferInfo(This,pBuffInfo) + +#define ISpMMSysAudio_GetBufferInfo(This,pBuffInfo) \ + (This)->lpVtbl -> GetBufferInfo(This,pBuffInfo) + +#define ISpMMSysAudio_GetDefaultFormat(This,pFormatId,ppCoMemWaveFormatEx) \ + (This)->lpVtbl -> GetDefaultFormat(This,pFormatId,ppCoMemWaveFormatEx) + +#define ISpMMSysAudio_EventHandle(This) \ + (This)->lpVtbl -> EventHandle(This) + +#define ISpMMSysAudio_GetVolumeLevel(This,pLevel) \ + (This)->lpVtbl -> GetVolumeLevel(This,pLevel) + +#define ISpMMSysAudio_SetVolumeLevel(This,Level) \ + (This)->lpVtbl -> SetVolumeLevel(This,Level) + +#define ISpMMSysAudio_GetBufferNotifySize(This,pcbSize) \ + (This)->lpVtbl -> GetBufferNotifySize(This,pcbSize) + +#define ISpMMSysAudio_SetBufferNotifySize(This,cbSize) \ + (This)->lpVtbl -> SetBufferNotifySize(This,cbSize) + + +#define ISpMMSysAudio_GetDeviceId(This,puDeviceId) \ + (This)->lpVtbl -> GetDeviceId(This,puDeviceId) + +#define ISpMMSysAudio_SetDeviceId(This,uDeviceId) \ + (This)->lpVtbl -> SetDeviceId(This,uDeviceId) + +#define ISpMMSysAudio_GetMMHandle(This,pHandle) \ + (This)->lpVtbl -> GetMMHandle(This,pHandle) + +#define ISpMMSysAudio_GetLineId(This,puLineId) \ + (This)->lpVtbl -> GetLineId(This,puLineId) + +#define ISpMMSysAudio_SetLineId(This,uLineId) \ + (This)->lpVtbl -> SetLineId(This,uLineId) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpMMSysAudio_GetDeviceId_Proxy( + ISpMMSysAudio * This, + /* [out] */ UINT *puDeviceId); + + +void __RPC_STUB ISpMMSysAudio_GetDeviceId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpMMSysAudio_SetDeviceId_Proxy( + ISpMMSysAudio * This, + /* [in] */ UINT uDeviceId); + + +void __RPC_STUB ISpMMSysAudio_SetDeviceId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpMMSysAudio_GetMMHandle_Proxy( + ISpMMSysAudio * This, + void **pHandle); + + +void __RPC_STUB ISpMMSysAudio_GetMMHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpMMSysAudio_GetLineId_Proxy( + ISpMMSysAudio * This, + /* [out] */ UINT *puLineId); + + +void __RPC_STUB ISpMMSysAudio_GetLineId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpMMSysAudio_SetLineId_Proxy( + ISpMMSysAudio * This, + /* [in] */ UINT uLineId); + + +void __RPC_STUB ISpMMSysAudio_SetLineId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpMMSysAudio_INTERFACE_DEFINED__ */ + + +#ifndef __ISpTranscript_INTERFACE_DEFINED__ +#define __ISpTranscript_INTERFACE_DEFINED__ + +/* interface ISpTranscript */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpTranscript; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("10F63BCE-201A-11D3-AC70-00C04F8EE6C0") + ISpTranscript : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTranscript( + /* [string][out] */ WCHAR **ppszTranscript) = 0; + + virtual HRESULT STDMETHODCALLTYPE AppendTranscript( + /* [string][in] */ const WCHAR *pszTranscript) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpTranscriptVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpTranscript * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpTranscript * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpTranscript * This); + + HRESULT ( STDMETHODCALLTYPE *GetTranscript )( + ISpTranscript * This, + /* [string][out] */ WCHAR **ppszTranscript); + + HRESULT ( STDMETHODCALLTYPE *AppendTranscript )( + ISpTranscript * This, + /* [string][in] */ const WCHAR *pszTranscript); + + END_INTERFACE + } ISpTranscriptVtbl; + + interface ISpTranscript + { + CONST_VTBL struct ISpTranscriptVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpTranscript_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpTranscript_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpTranscript_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpTranscript_GetTranscript(This,ppszTranscript) \ + (This)->lpVtbl -> GetTranscript(This,ppszTranscript) + +#define ISpTranscript_AppendTranscript(This,pszTranscript) \ + (This)->lpVtbl -> AppendTranscript(This,pszTranscript) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpTranscript_GetTranscript_Proxy( + ISpTranscript * This, + /* [string][out] */ WCHAR **ppszTranscript); + + +void __RPC_STUB ISpTranscript_GetTranscript_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTranscript_AppendTranscript_Proxy( + ISpTranscript * This, + /* [string][in] */ const WCHAR *pszTranscript); + + +void __RPC_STUB ISpTranscript_AppendTranscript_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpTranscript_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0270 */ +/* [local] */ + +typedef /* [hidden] */ +enum SPDISPLYATTRIBUTES + { SPAF_ONE_TRAILING_SPACE = 0x2, + SPAF_TWO_TRAILING_SPACES = 0x4, + SPAF_CONSUME_LEADING_SPACES = 0x8, + SPAF_ALL = 0xf + } SPDISPLAYATTRIBUTES; + +typedef unsigned short SPPHONEID; + +typedef /* [hidden][restricted] */ struct SPPHRASEELEMENT + { + ULONG ulAudioTimeOffset; + ULONG ulAudioSizeTime; + ULONG ulAudioStreamOffset; + ULONG ulAudioSizeBytes; + ULONG ulRetainedStreamOffset; + ULONG ulRetainedSizeBytes; + const WCHAR *pszDisplayText; + const WCHAR *pszLexicalForm; + const SPPHONEID *pszPronunciation; + BYTE bDisplayAttributes; + signed char RequiredConfidence; + signed char ActualConfidence; + BYTE Reserved; + float SREngineConfidence; + } SPPHRASEELEMENT; + +typedef /* [hidden][restricted] */ struct SPPHRASERULE SPPHRASERULE; + +/* [hidden] */ struct SPPHRASERULE + { + const WCHAR *pszName; + ULONG ulId; + ULONG ulFirstElement; + ULONG ulCountOfElements; + const SPPHRASERULE *pNextSibling; + const SPPHRASERULE *pFirstChild; + float SREngineConfidence; + signed char Confidence; + } ; +typedef /* [hidden][restricted] */ struct SPPHRASEPROPERTY SPPHRASEPROPERTY; + +/* [hidden] */ struct SPPHRASEPROPERTY + { + const WCHAR *pszName; + ULONG ulId; + const WCHAR *pszValue; + VARIANT vValue; + ULONG ulFirstElement; + ULONG ulCountOfElements; + const SPPHRASEPROPERTY *pNextSibling; + const SPPHRASEPROPERTY *pFirstChild; + float SREngineConfidence; + signed char Confidence; + } ; +typedef /* [hidden][restricted] */ struct SPPHRASEREPLACEMENT + { + BYTE bDisplayAttributes; + const WCHAR *pszReplacementText; + ULONG ulFirstElement; + ULONG ulCountOfElements; + } SPPHRASEREPLACEMENT; + +typedef /* [hidden][restricted] */ struct SPPHRASE + { + ULONG cbSize; + WORD LangID; + WORD wReserved; + ULONGLONG ullGrammarID; + ULONGLONG ftStartTime; + ULONGLONG ullAudioStreamPosition; + ULONG ulAudioSizeBytes; + ULONG ulRetainedSizeBytes; + ULONG ulAudioSizeTime; + SPPHRASERULE Rule; + const SPPHRASEPROPERTY *pProperties; + const SPPHRASEELEMENT *pElements; + ULONG cReplacements; + const SPPHRASEREPLACEMENT *pReplacements; + GUID SREngineID; + ULONG ulSREnginePrivateDataSize; + const BYTE *pSREnginePrivateData; + } SPPHRASE; + +typedef /* [hidden][restricted] */ struct SPSERIALIZEDPHRASE + { + ULONG ulSerializedSize; + } SPSERIALIZEDPHRASE; + +typedef /* [hidden] */ +enum SPVALUETYPE + { SPDF_PROPERTY = 0x1, + SPDF_REPLACEMENT = 0x2, + SPDF_RULE = 0x4, + SPDF_DISPLAYTEXT = 0x8, + SPDF_LEXICALFORM = 0x10, + SPDF_PRONUNCIATION = 0x20, + SPDF_AUDIO = 0x40, + SPDF_ALTERNATES = 0x80, + SPDF_ALL = 0xff + } SPVALUETYPE; + +typedef /* [hidden] */ struct SPBINARYGRAMMAR + { + ULONG ulTotalSerializedSize; + } SPBINARYGRAMMAR; + +typedef /* [hidden] */ +enum SPPHRASERNG + { SPPR_ALL_ELEMENTS = -1 + } SPPHRASERNG; + +#define SP_GETWHOLEPHRASE SPPR_ALL_ELEMENTS +#define SPRR_ALL_ELEMENTS SPPR_ALL_ELEMENTS +#if 0 +typedef void *SPSTATEHANDLE; + +#else +DECLARE_HANDLE(SPSTATEHANDLE); +#endif +typedef /* [hidden] */ +enum SPRECOEVENTFLAGS + { SPREF_AutoPause = 1 << 0, + SPREF_Emulated = 1 << 1 + } SPRECOEVENTFLAGS; + +typedef /* [hidden] */ +enum SPPARTOFSPEECH + { SPPS_NotOverriden = -1, + SPPS_Unknown = 0, + SPPS_Noun = 0x1000, + SPPS_Verb = 0x2000, + SPPS_Modifier = 0x3000, + SPPS_Function = 0x4000, + SPPS_Interjection = 0x5000 + } SPPARTOFSPEECH; + +typedef /* [hidden] */ +enum SPLEXICONTYPE + { eLEXTYPE_USER = 1L << 0, + eLEXTYPE_APP = 1L << 1, + eLEXTYPE_RESERVED1 = 1L << 2, + eLEXTYPE_RESERVED2 = 1L << 3, + eLEXTYPE_RESERVED3 = 1L << 4, + eLEXTYPE_RESERVED4 = 1L << 5, + eLEXTYPE_RESERVED5 = 1L << 6, + eLEXTYPE_RESERVED6 = 1L << 7, + eLEXTYPE_RESERVED7 = 1L << 8, + eLEXTYPE_RESERVED8 = 1L << 9, + eLEXTYPE_RESERVED9 = 1L << 10, + eLEXTYPE_RESERVED10 = 1L << 11, + eLEXTYPE_PRIVATE1 = 1L << 12, + eLEXTYPE_PRIVATE2 = 1L << 13, + eLEXTYPE_PRIVATE3 = 1L << 14, + eLEXTYPE_PRIVATE4 = 1L << 15, + eLEXTYPE_PRIVATE5 = 1L << 16, + eLEXTYPE_PRIVATE6 = 1L << 17, + eLEXTYPE_PRIVATE7 = 1L << 18, + eLEXTYPE_PRIVATE8 = 1L << 19, + eLEXTYPE_PRIVATE9 = 1L << 20, + eLEXTYPE_PRIVATE10 = 1L << 21, + eLEXTYPE_PRIVATE11 = 1L << 22, + eLEXTYPE_PRIVATE12 = 1L << 23, + eLEXTYPE_PRIVATE13 = 1L << 24, + eLEXTYPE_PRIVATE14 = 1L << 25, + eLEXTYPE_PRIVATE15 = 1L << 26, + eLEXTYPE_PRIVATE16 = 1L << 27, + eLEXTYPE_PRIVATE17 = 1L << 28, + eLEXTYPE_PRIVATE18 = 1L << 29, + eLEXTYPE_PRIVATE19 = 1L << 30, + eLEXTYPE_PRIVATE20 = 1L << 31 + } SPLEXICONTYPE; + +typedef /* [hidden] */ +enum SPWORDTYPE + { eWORDTYPE_ADDED = 1L << 0, + eWORDTYPE_DELETED = 1L << 1 + } SPWORDTYPE; + +typedef /* [hidden][restricted] */ struct SPWORDPRONUNCIATION + { + struct SPWORDPRONUNCIATION *pNextWordPronunciation; + SPLEXICONTYPE eLexiconType; + WORD LangID; + WORD wReserved; + SPPARTOFSPEECH ePartOfSpeech; + SPPHONEID szPronunciation[ 1 ]; + } SPWORDPRONUNCIATION; + +typedef /* [hidden][restricted] */ struct SPWORDPRONUNCIATIONLIST + { + ULONG ulSize; + BYTE *pvBuffer; + SPWORDPRONUNCIATION *pFirstWordPronunciation; + } SPWORDPRONUNCIATIONLIST; + +typedef /* [hidden][restricted] */ struct SPWORD + { + struct SPWORD *pNextWord; + WORD LangID; + WORD wReserved; + SPWORDTYPE eWordType; + WCHAR *pszWord; + SPWORDPRONUNCIATION *pFirstWordPronunciation; + } SPWORD; + +typedef /* [hidden][restricted] */ struct SPWORDLIST + { + ULONG ulSize; + BYTE *pvBuffer; + SPWORD *pFirstWord; + } SPWORDLIST; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0270_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0270_v0_0_s_ifspec; + +#ifndef __ISpLexicon_INTERFACE_DEFINED__ +#define __ISpLexicon_INTERFACE_DEFINED__ + +/* interface ISpLexicon */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpLexicon; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DA41A7C2-5383-4DB2-916B-6C1719E3DB58") + ISpLexicon : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPronunciations( + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ DWORD dwFlags, + /* [out][in] */ SPWORDPRONUNCIATIONLIST *pWordPronunciationList) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddPronunciation( + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemovePronunciation( + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGeneration( + DWORD *pdwGeneration) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGenerationChange( + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ SPWORDLIST *pWordList) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWords( + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ DWORD *pdwCookie, + /* [out][in] */ SPWORDLIST *pWordList) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpLexiconVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpLexicon * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpLexicon * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpLexicon * This); + + HRESULT ( STDMETHODCALLTYPE *GetPronunciations )( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ DWORD dwFlags, + /* [out][in] */ SPWORDPRONUNCIATIONLIST *pWordPronunciationList); + + HRESULT ( STDMETHODCALLTYPE *AddPronunciation )( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + HRESULT ( STDMETHODCALLTYPE *RemovePronunciation )( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + HRESULT ( STDMETHODCALLTYPE *GetGeneration )( + ISpLexicon * This, + DWORD *pdwGeneration); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationChange )( + ISpLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ SPWORDLIST *pWordList); + + HRESULT ( STDMETHODCALLTYPE *GetWords )( + ISpLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ DWORD *pdwCookie, + /* [out][in] */ SPWORDLIST *pWordList); + + END_INTERFACE + } ISpLexiconVtbl; + + interface ISpLexicon + { + CONST_VTBL struct ISpLexiconVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpLexicon_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpLexicon_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpLexicon_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpLexicon_GetPronunciations(This,pszWord,LangID,dwFlags,pWordPronunciationList) \ + (This)->lpVtbl -> GetPronunciations(This,pszWord,LangID,dwFlags,pWordPronunciationList) + +#define ISpLexicon_AddPronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) \ + (This)->lpVtbl -> AddPronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) + +#define ISpLexicon_RemovePronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) \ + (This)->lpVtbl -> RemovePronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) + +#define ISpLexicon_GetGeneration(This,pdwGeneration) \ + (This)->lpVtbl -> GetGeneration(This,pdwGeneration) + +#define ISpLexicon_GetGenerationChange(This,dwFlags,pdwGeneration,pWordList) \ + (This)->lpVtbl -> GetGenerationChange(This,dwFlags,pdwGeneration,pWordList) + +#define ISpLexicon_GetWords(This,dwFlags,pdwGeneration,pdwCookie,pWordList) \ + (This)->lpVtbl -> GetWords(This,dwFlags,pdwGeneration,pdwCookie,pWordList) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpLexicon_GetPronunciations_Proxy( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ DWORD dwFlags, + /* [out][in] */ SPWORDPRONUNCIATIONLIST *pWordPronunciationList); + + +void __RPC_STUB ISpLexicon_GetPronunciations_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpLexicon_AddPronunciation_Proxy( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + +void __RPC_STUB ISpLexicon_AddPronunciation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpLexicon_RemovePronunciation_Proxy( + ISpLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + +void __RPC_STUB ISpLexicon_RemovePronunciation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpLexicon_GetGeneration_Proxy( + ISpLexicon * This, + DWORD *pdwGeneration); + + +void __RPC_STUB ISpLexicon_GetGeneration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpLexicon_GetGenerationChange_Proxy( + ISpLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ SPWORDLIST *pWordList); + + +void __RPC_STUB ISpLexicon_GetGenerationChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpLexicon_GetWords_Proxy( + ISpLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ DWORD *pdwCookie, + /* [out][in] */ SPWORDLIST *pWordList); + + +void __RPC_STUB ISpLexicon_GetWords_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpLexicon_INTERFACE_DEFINED__ */ + + +#ifndef __ISpContainerLexicon_INTERFACE_DEFINED__ +#define __ISpContainerLexicon_INTERFACE_DEFINED__ + +/* interface ISpContainerLexicon */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpContainerLexicon; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8565572F-C094-41CC-B56E-10BD9C3FF044") + ISpContainerLexicon : public ISpLexicon + { + public: + virtual HRESULT STDMETHODCALLTYPE AddLexicon( + /* [in] */ ISpLexicon *pAddLexicon, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpContainerLexiconVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpContainerLexicon * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpContainerLexicon * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpContainerLexicon * This); + + HRESULT ( STDMETHODCALLTYPE *GetPronunciations )( + ISpContainerLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ DWORD dwFlags, + /* [out][in] */ SPWORDPRONUNCIATIONLIST *pWordPronunciationList); + + HRESULT ( STDMETHODCALLTYPE *AddPronunciation )( + ISpContainerLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + HRESULT ( STDMETHODCALLTYPE *RemovePronunciation )( + ISpContainerLexicon * This, + /* [in] */ const WCHAR *pszWord, + /* [in] */ WORD LangID, + /* [in] */ SPPARTOFSPEECH ePartOfSpeech, + /* [in] */ const SPPHONEID *pszPronunciation); + + HRESULT ( STDMETHODCALLTYPE *GetGeneration )( + ISpContainerLexicon * This, + DWORD *pdwGeneration); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationChange )( + ISpContainerLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ SPWORDLIST *pWordList); + + HRESULT ( STDMETHODCALLTYPE *GetWords )( + ISpContainerLexicon * This, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pdwGeneration, + /* [out][in] */ DWORD *pdwCookie, + /* [out][in] */ SPWORDLIST *pWordList); + + HRESULT ( STDMETHODCALLTYPE *AddLexicon )( + ISpContainerLexicon * This, + /* [in] */ ISpLexicon *pAddLexicon, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } ISpContainerLexiconVtbl; + + interface ISpContainerLexicon + { + CONST_VTBL struct ISpContainerLexiconVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpContainerLexicon_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpContainerLexicon_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpContainerLexicon_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpContainerLexicon_GetPronunciations(This,pszWord,LangID,dwFlags,pWordPronunciationList) \ + (This)->lpVtbl -> GetPronunciations(This,pszWord,LangID,dwFlags,pWordPronunciationList) + +#define ISpContainerLexicon_AddPronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) \ + (This)->lpVtbl -> AddPronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) + +#define ISpContainerLexicon_RemovePronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) \ + (This)->lpVtbl -> RemovePronunciation(This,pszWord,LangID,ePartOfSpeech,pszPronunciation) + +#define ISpContainerLexicon_GetGeneration(This,pdwGeneration) \ + (This)->lpVtbl -> GetGeneration(This,pdwGeneration) + +#define ISpContainerLexicon_GetGenerationChange(This,dwFlags,pdwGeneration,pWordList) \ + (This)->lpVtbl -> GetGenerationChange(This,dwFlags,pdwGeneration,pWordList) + +#define ISpContainerLexicon_GetWords(This,dwFlags,pdwGeneration,pdwCookie,pWordList) \ + (This)->lpVtbl -> GetWords(This,dwFlags,pdwGeneration,pdwCookie,pWordList) + + +#define ISpContainerLexicon_AddLexicon(This,pAddLexicon,dwFlags) \ + (This)->lpVtbl -> AddLexicon(This,pAddLexicon,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpContainerLexicon_AddLexicon_Proxy( + ISpContainerLexicon * This, + /* [in] */ ISpLexicon *pAddLexicon, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB ISpContainerLexicon_AddLexicon_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpContainerLexicon_INTERFACE_DEFINED__ */ + + +#ifndef __ISpPhoneConverter_INTERFACE_DEFINED__ +#define __ISpPhoneConverter_INTERFACE_DEFINED__ + +/* interface ISpPhoneConverter */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpPhoneConverter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8445C581-0CAC-4A38-ABFE-9B2CE2826455") + ISpPhoneConverter : public ISpObjectWithToken + { + public: + virtual HRESULT STDMETHODCALLTYPE PhoneToId( + /* [in] */ const WCHAR *pszPhone, + /* [out] */ SPPHONEID *pId) = 0; + + virtual HRESULT STDMETHODCALLTYPE IdToPhone( + /* [in] */ const SPPHONEID *pId, + /* [out] */ WCHAR *pszPhone) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpPhoneConverterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpPhoneConverter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpPhoneConverter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpPhoneConverter * This); + + HRESULT ( STDMETHODCALLTYPE *SetObjectToken )( + ISpPhoneConverter * This, + ISpObjectToken *pToken); + + HRESULT ( STDMETHODCALLTYPE *GetObjectToken )( + ISpPhoneConverter * This, + ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *PhoneToId )( + ISpPhoneConverter * This, + /* [in] */ const WCHAR *pszPhone, + /* [out] */ SPPHONEID *pId); + + HRESULT ( STDMETHODCALLTYPE *IdToPhone )( + ISpPhoneConverter * This, + /* [in] */ const SPPHONEID *pId, + /* [out] */ WCHAR *pszPhone); + + END_INTERFACE + } ISpPhoneConverterVtbl; + + interface ISpPhoneConverter + { + CONST_VTBL struct ISpPhoneConverterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpPhoneConverter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpPhoneConverter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpPhoneConverter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpPhoneConverter_SetObjectToken(This,pToken) \ + (This)->lpVtbl -> SetObjectToken(This,pToken) + +#define ISpPhoneConverter_GetObjectToken(This,ppToken) \ + (This)->lpVtbl -> GetObjectToken(This,ppToken) + + +#define ISpPhoneConverter_PhoneToId(This,pszPhone,pId) \ + (This)->lpVtbl -> PhoneToId(This,pszPhone,pId) + +#define ISpPhoneConverter_IdToPhone(This,pId,pszPhone) \ + (This)->lpVtbl -> IdToPhone(This,pId,pszPhone) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpPhoneConverter_PhoneToId_Proxy( + ISpPhoneConverter * This, + /* [in] */ const WCHAR *pszPhone, + /* [out] */ SPPHONEID *pId); + + +void __RPC_STUB ISpPhoneConverter_PhoneToId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhoneConverter_IdToPhone_Proxy( + ISpPhoneConverter * This, + /* [in] */ const SPPHONEID *pId, + /* [out] */ WCHAR *pszPhone); + + +void __RPC_STUB ISpPhoneConverter_IdToPhone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpPhoneConverter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0273 */ +/* [local] */ + +typedef /* [hidden][restricted] */ struct SPVPITCH + { + long MiddleAdj; + long RangeAdj; + } SPVPITCH; + +typedef /* [hidden] */ +enum SPVACTIONS + { SPVA_Speak = 0, + SPVA_Silence = SPVA_Speak + 1, + SPVA_Pronounce = SPVA_Silence + 1, + SPVA_Bookmark = SPVA_Pronounce + 1, + SPVA_SpellOut = SPVA_Bookmark + 1, + SPVA_Section = SPVA_SpellOut + 1, + SPVA_ParseUnknownTag = SPVA_Section + 1 + } SPVACTIONS; + +typedef /* [hidden][restricted] */ struct SPVCONTEXT + { + LPCWSTR pCategory; + LPCWSTR pBefore; + LPCWSTR pAfter; + } SPVCONTEXT; + +typedef /* [hidden][restricted] */ struct SPVSTATE + { + SPVACTIONS eAction; + WORD LangID; + WORD wReserved; + long EmphAdj; + long RateAdj; + ULONG Volume; + SPVPITCH PitchAdj; + ULONG SilenceMSecs; + SPPHONEID *pPhoneIds; + SPPARTOFSPEECH ePartOfSpeech; + SPVCONTEXT Context; + } SPVSTATE; + +typedef /* [hidden] */ +enum SPRUNSTATE + { SPRS_DONE = 1L << 0, + SPRS_IS_SPEAKING = 1L << 1 + } SPRUNSTATE; + +typedef /* [hidden] */ +enum SPVLIMITS + { SPMIN_VOLUME = 0, + SPMAX_VOLUME = 100, + SPMIN_RATE = -10, + SPMAX_RATE = 10 + } SPVLIMITS; + +typedef /* [hidden] */ +enum SPVPRIORITY + { SPVPRI_NORMAL = 0, + SPVPRI_ALERT = 1L << 0, + SPVPRI_OVER = 1L << 1 + } SPVPRIORITY; + +typedef /* [hidden][restricted] */ struct SPVOICESTATUS + { + ULONG ulCurrentStream; + ULONG ulLastStreamQueued; + HRESULT hrLastResult; + DWORD dwRunningState; + ULONG ulInputWordPos; + ULONG ulInputWordLen; + ULONG ulInputSentPos; + ULONG ulInputSentLen; + LONG lBookmarkId; + SPPHONEID PhonemeId; + SPVISEMES VisemeId; + DWORD dwReserved1; + DWORD dwReserved2; + } SPVOICESTATUS; + +typedef /* [hidden] */ +enum SPEAKFLAGS + { SPF_DEFAULT = 0, + SPF_ASYNC = 1L << 0, + SPF_PURGEBEFORESPEAK = 1L << 1, + SPF_IS_FILENAME = 1L << 2, + SPF_IS_XML = 1L << 3, + SPF_IS_NOT_XML = 1L << 4, + SPF_PERSIST_XML = 1L << 5, + SPF_NLP_SPEAK_PUNC = 1L << 6, + SPF_NLP_MASK = SPF_NLP_SPEAK_PUNC, + SPF_VOICE_MASK = SPF_ASYNC | SPF_PURGEBEFORESPEAK | SPF_IS_FILENAME | SPF_IS_XML | SPF_IS_NOT_XML | SPF_NLP_MASK | SPF_PERSIST_XML, + SPF_UNUSED_FLAGS = ~SPF_VOICE_MASK + } SPEAKFLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0273_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0273_v0_0_s_ifspec; + +#ifndef __ISpVoice_INTERFACE_DEFINED__ +#define __ISpVoice_INTERFACE_DEFINED__ + +/* interface ISpVoice */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpVoice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6C44DF74-72B9-4992-A1EC-EF996E0422D4") + ISpVoice : public ISpEventSource + { + public: + virtual HRESULT STDMETHODCALLTYPE SetOutput( + /* [in] */ IUnknown *pUnkOutput, + /* [in] */ BOOL fAllowFormatChanges) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputObjectToken( + /* [out] */ ISpObjectToken **ppObjectToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputStream( + /* [out] */ ISpStreamFormat **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVoice( + /* [in] */ ISpObjectToken *pToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVoice( + /* [out] */ ISpObjectToken **ppToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE Speak( + /* [string][in] */ const WCHAR *pwcs, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber) = 0; + + virtual HRESULT STDMETHODCALLTYPE SpeakStream( + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ SPVOICESTATUS *pStatus, + /* [string][out] */ WCHAR **ppszLastBookmark) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [string][in] */ WCHAR *pItemType, + /* [in] */ long lNumItems, + /* [out] */ ULONG *pulNumSkipped) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPriority( + /* [in] */ SPVPRIORITY ePriority) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPriority( + /* [out] */ SPVPRIORITY *pePriority) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAlertBoundary( + /* [in] */ SPEVENTENUM eBoundary) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAlertBoundary( + /* [out] */ SPEVENTENUM *peBoundary) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRate( + /* [in] */ long RateAdjust) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRate( + /* [out] */ long *pRateAdjust) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVolume( + /* [in] */ USHORT usVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVolume( + /* [out] */ USHORT *pusVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitUntilDone( + /* [in] */ ULONG msTimeout) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncSpeakTimeout( + /* [in] */ ULONG msTimeout) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSyncSpeakTimeout( + /* [out] */ ULONG *pmsTimeout) = 0; + + virtual /* [local] */ HANDLE STDMETHODCALLTYPE SpeakCompleteEvent( void) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpVoiceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpVoice * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpVoice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpVoice * This); + + HRESULT ( STDMETHODCALLTYPE *SetNotifySink )( + ISpVoice * This, + /* [in] */ ISpNotifySink *pNotifySink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWindowMessage )( + ISpVoice * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackFunction )( + ISpVoice * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackInterface )( + ISpVoice * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWin32Event )( + ISpVoice * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *WaitForNotifyEvent )( + ISpVoice * This, + /* [in] */ DWORD dwMilliseconds); + + /* [local] */ HANDLE ( STDMETHODCALLTYPE *GetNotifyEventHandle )( + ISpVoice * This); + + HRESULT ( STDMETHODCALLTYPE *SetInterest )( + ISpVoice * This, + /* [in] */ ULONGLONG ullEventInterest, + /* [in] */ ULONGLONG ullQueuedInterest); + + HRESULT ( STDMETHODCALLTYPE *GetEvents )( + ISpVoice * This, + /* [in] */ ULONG ulCount, + /* [size_is][out] */ SPEVENT *pEventArray, + /* [out] */ ULONG *pulFetched); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + ISpVoice * This, + /* [out] */ SPEVENTSOURCEINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetOutput )( + ISpVoice * This, + /* [in] */ IUnknown *pUnkOutput, + /* [in] */ BOOL fAllowFormatChanges); + + HRESULT ( STDMETHODCALLTYPE *GetOutputObjectToken )( + ISpVoice * This, + /* [out] */ ISpObjectToken **ppObjectToken); + + HRESULT ( STDMETHODCALLTYPE *GetOutputStream )( + ISpVoice * This, + /* [out] */ ISpStreamFormat **ppStream); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + ISpVoice * This); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + ISpVoice * This); + + HRESULT ( STDMETHODCALLTYPE *SetVoice )( + ISpVoice * This, + /* [in] */ ISpObjectToken *pToken); + + HRESULT ( STDMETHODCALLTYPE *GetVoice )( + ISpVoice * This, + /* [out] */ ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *Speak )( + ISpVoice * This, + /* [string][in] */ const WCHAR *pwcs, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + HRESULT ( STDMETHODCALLTYPE *SpeakStream )( + ISpVoice * This, + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + ISpVoice * This, + /* [out] */ SPVOICESTATUS *pStatus, + /* [string][out] */ WCHAR **ppszLastBookmark); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + ISpVoice * This, + /* [string][in] */ WCHAR *pItemType, + /* [in] */ long lNumItems, + /* [out] */ ULONG *pulNumSkipped); + + HRESULT ( STDMETHODCALLTYPE *SetPriority )( + ISpVoice * This, + /* [in] */ SPVPRIORITY ePriority); + + HRESULT ( STDMETHODCALLTYPE *GetPriority )( + ISpVoice * This, + /* [out] */ SPVPRIORITY *pePriority); + + HRESULT ( STDMETHODCALLTYPE *SetAlertBoundary )( + ISpVoice * This, + /* [in] */ SPEVENTENUM eBoundary); + + HRESULT ( STDMETHODCALLTYPE *GetAlertBoundary )( + ISpVoice * This, + /* [out] */ SPEVENTENUM *peBoundary); + + HRESULT ( STDMETHODCALLTYPE *SetRate )( + ISpVoice * This, + /* [in] */ long RateAdjust); + + HRESULT ( STDMETHODCALLTYPE *GetRate )( + ISpVoice * This, + /* [out] */ long *pRateAdjust); + + HRESULT ( STDMETHODCALLTYPE *SetVolume )( + ISpVoice * This, + /* [in] */ USHORT usVolume); + + HRESULT ( STDMETHODCALLTYPE *GetVolume )( + ISpVoice * This, + /* [out] */ USHORT *pusVolume); + + HRESULT ( STDMETHODCALLTYPE *WaitUntilDone )( + ISpVoice * This, + /* [in] */ ULONG msTimeout); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSpeakTimeout )( + ISpVoice * This, + /* [in] */ ULONG msTimeout); + + HRESULT ( STDMETHODCALLTYPE *GetSyncSpeakTimeout )( + ISpVoice * This, + /* [out] */ ULONG *pmsTimeout); + + /* [local] */ HANDLE ( STDMETHODCALLTYPE *SpeakCompleteEvent )( + ISpVoice * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpVoice * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpVoice * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData); + + END_INTERFACE + } ISpVoiceVtbl; + + interface ISpVoice + { + CONST_VTBL struct ISpVoiceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpVoice_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpVoice_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpVoice_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpVoice_SetNotifySink(This,pNotifySink) \ + (This)->lpVtbl -> SetNotifySink(This,pNotifySink) + +#define ISpVoice_SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) + +#define ISpVoice_SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) + +#define ISpVoice_SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) + +#define ISpVoice_SetNotifyWin32Event(This) \ + (This)->lpVtbl -> SetNotifyWin32Event(This) + +#define ISpVoice_WaitForNotifyEvent(This,dwMilliseconds) \ + (This)->lpVtbl -> WaitForNotifyEvent(This,dwMilliseconds) + +#define ISpVoice_GetNotifyEventHandle(This) \ + (This)->lpVtbl -> GetNotifyEventHandle(This) + + +#define ISpVoice_SetInterest(This,ullEventInterest,ullQueuedInterest) \ + (This)->lpVtbl -> SetInterest(This,ullEventInterest,ullQueuedInterest) + +#define ISpVoice_GetEvents(This,ulCount,pEventArray,pulFetched) \ + (This)->lpVtbl -> GetEvents(This,ulCount,pEventArray,pulFetched) + +#define ISpVoice_GetInfo(This,pInfo) \ + (This)->lpVtbl -> GetInfo(This,pInfo) + + +#define ISpVoice_SetOutput(This,pUnkOutput,fAllowFormatChanges) \ + (This)->lpVtbl -> SetOutput(This,pUnkOutput,fAllowFormatChanges) + +#define ISpVoice_GetOutputObjectToken(This,ppObjectToken) \ + (This)->lpVtbl -> GetOutputObjectToken(This,ppObjectToken) + +#define ISpVoice_GetOutputStream(This,ppStream) \ + (This)->lpVtbl -> GetOutputStream(This,ppStream) + +#define ISpVoice_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define ISpVoice_Resume(This) \ + (This)->lpVtbl -> Resume(This) + +#define ISpVoice_SetVoice(This,pToken) \ + (This)->lpVtbl -> SetVoice(This,pToken) + +#define ISpVoice_GetVoice(This,ppToken) \ + (This)->lpVtbl -> GetVoice(This,ppToken) + +#define ISpVoice_Speak(This,pwcs,dwFlags,pulStreamNumber) \ + (This)->lpVtbl -> Speak(This,pwcs,dwFlags,pulStreamNumber) + +#define ISpVoice_SpeakStream(This,pStream,dwFlags,pulStreamNumber) \ + (This)->lpVtbl -> SpeakStream(This,pStream,dwFlags,pulStreamNumber) + +#define ISpVoice_GetStatus(This,pStatus,ppszLastBookmark) \ + (This)->lpVtbl -> GetStatus(This,pStatus,ppszLastBookmark) + +#define ISpVoice_Skip(This,pItemType,lNumItems,pulNumSkipped) \ + (This)->lpVtbl -> Skip(This,pItemType,lNumItems,pulNumSkipped) + +#define ISpVoice_SetPriority(This,ePriority) \ + (This)->lpVtbl -> SetPriority(This,ePriority) + +#define ISpVoice_GetPriority(This,pePriority) \ + (This)->lpVtbl -> GetPriority(This,pePriority) + +#define ISpVoice_SetAlertBoundary(This,eBoundary) \ + (This)->lpVtbl -> SetAlertBoundary(This,eBoundary) + +#define ISpVoice_GetAlertBoundary(This,peBoundary) \ + (This)->lpVtbl -> GetAlertBoundary(This,peBoundary) + +#define ISpVoice_SetRate(This,RateAdjust) \ + (This)->lpVtbl -> SetRate(This,RateAdjust) + +#define ISpVoice_GetRate(This,pRateAdjust) \ + (This)->lpVtbl -> GetRate(This,pRateAdjust) + +#define ISpVoice_SetVolume(This,usVolume) \ + (This)->lpVtbl -> SetVolume(This,usVolume) + +#define ISpVoice_GetVolume(This,pusVolume) \ + (This)->lpVtbl -> GetVolume(This,pusVolume) + +#define ISpVoice_WaitUntilDone(This,msTimeout) \ + (This)->lpVtbl -> WaitUntilDone(This,msTimeout) + +#define ISpVoice_SetSyncSpeakTimeout(This,msTimeout) \ + (This)->lpVtbl -> SetSyncSpeakTimeout(This,msTimeout) + +#define ISpVoice_GetSyncSpeakTimeout(This,pmsTimeout) \ + (This)->lpVtbl -> GetSyncSpeakTimeout(This,pmsTimeout) + +#define ISpVoice_SpeakCompleteEvent(This) \ + (This)->lpVtbl -> SpeakCompleteEvent(This) + +#define ISpVoice_IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,pfSupported) \ + (This)->lpVtbl -> IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,pfSupported) + +#define ISpVoice_DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData) \ + (This)->lpVtbl -> DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetOutput_Proxy( + ISpVoice * This, + /* [in] */ IUnknown *pUnkOutput, + /* [in] */ BOOL fAllowFormatChanges); + + +void __RPC_STUB ISpVoice_SetOutput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetOutputObjectToken_Proxy( + ISpVoice * This, + /* [out] */ ISpObjectToken **ppObjectToken); + + +void __RPC_STUB ISpVoice_GetOutputObjectToken_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetOutputStream_Proxy( + ISpVoice * This, + /* [out] */ ISpStreamFormat **ppStream); + + +void __RPC_STUB ISpVoice_GetOutputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_Pause_Proxy( + ISpVoice * This); + + +void __RPC_STUB ISpVoice_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_Resume_Proxy( + ISpVoice * This); + + +void __RPC_STUB ISpVoice_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetVoice_Proxy( + ISpVoice * This, + /* [in] */ ISpObjectToken *pToken); + + +void __RPC_STUB ISpVoice_SetVoice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetVoice_Proxy( + ISpVoice * This, + /* [out] */ ISpObjectToken **ppToken); + + +void __RPC_STUB ISpVoice_GetVoice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_Speak_Proxy( + ISpVoice * This, + /* [string][in] */ const WCHAR *pwcs, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + +void __RPC_STUB ISpVoice_Speak_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SpeakStream_Proxy( + ISpVoice * This, + /* [in] */ IStream *pStream, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + +void __RPC_STUB ISpVoice_SpeakStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetStatus_Proxy( + ISpVoice * This, + /* [out] */ SPVOICESTATUS *pStatus, + /* [string][out] */ WCHAR **ppszLastBookmark); + + +void __RPC_STUB ISpVoice_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_Skip_Proxy( + ISpVoice * This, + /* [string][in] */ WCHAR *pItemType, + /* [in] */ long lNumItems, + /* [out] */ ULONG *pulNumSkipped); + + +void __RPC_STUB ISpVoice_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetPriority_Proxy( + ISpVoice * This, + /* [in] */ SPVPRIORITY ePriority); + + +void __RPC_STUB ISpVoice_SetPriority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetPriority_Proxy( + ISpVoice * This, + /* [out] */ SPVPRIORITY *pePriority); + + +void __RPC_STUB ISpVoice_GetPriority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetAlertBoundary_Proxy( + ISpVoice * This, + /* [in] */ SPEVENTENUM eBoundary); + + +void __RPC_STUB ISpVoice_SetAlertBoundary_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetAlertBoundary_Proxy( + ISpVoice * This, + /* [out] */ SPEVENTENUM *peBoundary); + + +void __RPC_STUB ISpVoice_GetAlertBoundary_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetRate_Proxy( + ISpVoice * This, + /* [in] */ long RateAdjust); + + +void __RPC_STUB ISpVoice_SetRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetRate_Proxy( + ISpVoice * This, + /* [out] */ long *pRateAdjust); + + +void __RPC_STUB ISpVoice_GetRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetVolume_Proxy( + ISpVoice * This, + /* [in] */ USHORT usVolume); + + +void __RPC_STUB ISpVoice_SetVolume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetVolume_Proxy( + ISpVoice * This, + /* [out] */ USHORT *pusVolume); + + +void __RPC_STUB ISpVoice_GetVolume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_WaitUntilDone_Proxy( + ISpVoice * This, + /* [in] */ ULONG msTimeout); + + +void __RPC_STUB ISpVoice_WaitUntilDone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_SetSyncSpeakTimeout_Proxy( + ISpVoice * This, + /* [in] */ ULONG msTimeout); + + +void __RPC_STUB ISpVoice_SetSyncSpeakTimeout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpVoice_GetSyncSpeakTimeout_Proxy( + ISpVoice * This, + /* [out] */ ULONG *pmsTimeout); + + +void __RPC_STUB ISpVoice_GetSyncSpeakTimeout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HANDLE STDMETHODCALLTYPE ISpVoice_SpeakCompleteEvent_Proxy( + ISpVoice * This); + + +void __RPC_STUB ISpVoice_SpeakCompleteEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpVoice_IsUISupported_Proxy( + ISpVoice * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported); + + +void __RPC_STUB ISpVoice_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpVoice_DisplayUI_Proxy( + ISpVoice * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData); + + +void __RPC_STUB ISpVoice_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpVoice_INTERFACE_DEFINED__ */ + + +#ifndef __ISpPhrase_INTERFACE_DEFINED__ +#define __ISpPhrase_INTERFACE_DEFINED__ + +/* interface ISpPhrase */ +/* [restricted][unique][helpstring][local][uuid][object] */ + + +EXTERN_C const IID IID_ISpPhrase; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1A5C0354-B621-4b5a-8791-D306ED379E53") + ISpPhrase : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPhrase( + /* [out] */ SPPHRASE **ppCoMemPhrase) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSerializedPhrase( + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetText( + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discard( + /* [in] */ DWORD dwValueTypes) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpPhraseVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpPhrase * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpPhrase * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpPhrase * This); + + HRESULT ( STDMETHODCALLTYPE *GetPhrase )( + ISpPhrase * This, + /* [out] */ SPPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetSerializedPhrase )( + ISpPhrase * This, + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetText )( + ISpPhrase * This, + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes); + + HRESULT ( STDMETHODCALLTYPE *Discard )( + ISpPhrase * This, + /* [in] */ DWORD dwValueTypes); + + END_INTERFACE + } ISpPhraseVtbl; + + interface ISpPhrase + { + CONST_VTBL struct ISpPhraseVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpPhrase_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpPhrase_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpPhrase_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpPhrase_GetPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetPhrase(This,ppCoMemPhrase) + +#define ISpPhrase_GetSerializedPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetSerializedPhrase(This,ppCoMemPhrase) + +#define ISpPhrase_GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) \ + (This)->lpVtbl -> GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) + +#define ISpPhrase_Discard(This,dwValueTypes) \ + (This)->lpVtbl -> Discard(This,dwValueTypes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpPhrase_GetPhrase_Proxy( + ISpPhrase * This, + /* [out] */ SPPHRASE **ppCoMemPhrase); + + +void __RPC_STUB ISpPhrase_GetPhrase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhrase_GetSerializedPhrase_Proxy( + ISpPhrase * This, + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase); + + +void __RPC_STUB ISpPhrase_GetSerializedPhrase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhrase_GetText_Proxy( + ISpPhrase * This, + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes); + + +void __RPC_STUB ISpPhrase_GetText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhrase_Discard_Proxy( + ISpPhrase * This, + /* [in] */ DWORD dwValueTypes); + + +void __RPC_STUB ISpPhrase_Discard_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpPhrase_INTERFACE_DEFINED__ */ + + +#ifndef __ISpPhraseAlt_INTERFACE_DEFINED__ +#define __ISpPhraseAlt_INTERFACE_DEFINED__ + +/* interface ISpPhraseAlt */ +/* [restricted][unique][helpstring][local][uuid][object] */ + + +EXTERN_C const IID IID_ISpPhraseAlt; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8FCEBC98-4E49-4067-9C6C-D86A0E092E3D") + ISpPhraseAlt : public ISpPhrase + { + public: + virtual HRESULT STDMETHODCALLTYPE GetAltInfo( + ISpPhrase **ppParent, + ULONG *pulStartElementInParent, + ULONG *pcElementsInParent, + ULONG *pcElementsInAlt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpPhraseAltVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpPhraseAlt * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpPhraseAlt * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpPhraseAlt * This); + + HRESULT ( STDMETHODCALLTYPE *GetPhrase )( + ISpPhraseAlt * This, + /* [out] */ SPPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetSerializedPhrase )( + ISpPhraseAlt * This, + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetText )( + ISpPhraseAlt * This, + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes); + + HRESULT ( STDMETHODCALLTYPE *Discard )( + ISpPhraseAlt * This, + /* [in] */ DWORD dwValueTypes); + + HRESULT ( STDMETHODCALLTYPE *GetAltInfo )( + ISpPhraseAlt * This, + ISpPhrase **ppParent, + ULONG *pulStartElementInParent, + ULONG *pcElementsInParent, + ULONG *pcElementsInAlt); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpPhraseAlt * This); + + END_INTERFACE + } ISpPhraseAltVtbl; + + interface ISpPhraseAlt + { + CONST_VTBL struct ISpPhraseAltVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpPhraseAlt_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpPhraseAlt_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpPhraseAlt_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpPhraseAlt_GetPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetPhrase(This,ppCoMemPhrase) + +#define ISpPhraseAlt_GetSerializedPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetSerializedPhrase(This,ppCoMemPhrase) + +#define ISpPhraseAlt_GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) \ + (This)->lpVtbl -> GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) + +#define ISpPhraseAlt_Discard(This,dwValueTypes) \ + (This)->lpVtbl -> Discard(This,dwValueTypes) + + +#define ISpPhraseAlt_GetAltInfo(This,ppParent,pulStartElementInParent,pcElementsInParent,pcElementsInAlt) \ + (This)->lpVtbl -> GetAltInfo(This,ppParent,pulStartElementInParent,pcElementsInParent,pcElementsInAlt) + +#define ISpPhraseAlt_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpPhraseAlt_GetAltInfo_Proxy( + ISpPhraseAlt * This, + ISpPhrase **ppParent, + ULONG *pulStartElementInParent, + ULONG *pcElementsInParent, + ULONG *pcElementsInAlt); + + +void __RPC_STUB ISpPhraseAlt_GetAltInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseAlt_Commit_Proxy( + ISpPhraseAlt * This); + + +void __RPC_STUB ISpPhraseAlt_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpPhraseAlt_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0276 */ +/* [local] */ + +typedef /* [hidden][restricted] */ struct SPRECORESULTTIMES + { + FILETIME ftStreamTime; + ULONGLONG ullLength; + DWORD dwTickCount; + ULONGLONG ullStart; + } SPRECORESULTTIMES; + +typedef /* [hidden] */ struct SPSERIALIZEDRESULT + { + ULONG ulSerializedSize; + } SPSERIALIZEDRESULT; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0276_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0276_v0_0_s_ifspec; + +#ifndef __ISpRecoResult_INTERFACE_DEFINED__ +#define __ISpRecoResult_INTERFACE_DEFINED__ + +/* interface ISpRecoResult */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpRecoResult; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("20B053BE-E235-43cd-9A2A-8D17A48B7842") + ISpRecoResult : public ISpPhrase + { + public: + virtual HRESULT STDMETHODCALLTYPE GetResultTimes( + /* [out] */ SPRECORESULTTIMES *pTimes) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAlternates( + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ ULONG ulRequestCount, + /* [out] */ ISpPhraseAlt **ppPhrases, + /* [out] */ ULONG *pcPhrasesReturned) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAudio( + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [out] */ ISpStreamFormat **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SpeakAudio( + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber) = 0; + + virtual HRESULT STDMETHODCALLTYPE Serialize( + /* [out] */ SPSERIALIZEDRESULT **ppCoMemSerializedResult) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScaleAudio( + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRecoContext( + /* [out] */ ISpRecoContext **ppRecoContext) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpRecoResultVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpRecoResult * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpRecoResult * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpRecoResult * This); + + HRESULT ( STDMETHODCALLTYPE *GetPhrase )( + ISpRecoResult * This, + /* [out] */ SPPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetSerializedPhrase )( + ISpRecoResult * This, + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetText )( + ISpRecoResult * This, + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes); + + HRESULT ( STDMETHODCALLTYPE *Discard )( + ISpRecoResult * This, + /* [in] */ DWORD dwValueTypes); + + HRESULT ( STDMETHODCALLTYPE *GetResultTimes )( + ISpRecoResult * This, + /* [out] */ SPRECORESULTTIMES *pTimes); + + HRESULT ( STDMETHODCALLTYPE *GetAlternates )( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ ULONG ulRequestCount, + /* [out] */ ISpPhraseAlt **ppPhrases, + /* [out] */ ULONG *pcPhrasesReturned); + + HRESULT ( STDMETHODCALLTYPE *GetAudio )( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [out] */ ISpStreamFormat **ppStream); + + HRESULT ( STDMETHODCALLTYPE *SpeakAudio )( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + HRESULT ( STDMETHODCALLTYPE *Serialize )( + ISpRecoResult * This, + /* [out] */ SPSERIALIZEDRESULT **ppCoMemSerializedResult); + + HRESULT ( STDMETHODCALLTYPE *ScaleAudio )( + ISpRecoResult * This, + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *GetRecoContext )( + ISpRecoResult * This, + /* [out] */ ISpRecoContext **ppRecoContext); + + END_INTERFACE + } ISpRecoResultVtbl; + + interface ISpRecoResult + { + CONST_VTBL struct ISpRecoResultVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpRecoResult_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpRecoResult_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpRecoResult_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpRecoResult_GetPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetPhrase(This,ppCoMemPhrase) + +#define ISpRecoResult_GetSerializedPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetSerializedPhrase(This,ppCoMemPhrase) + +#define ISpRecoResult_GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) \ + (This)->lpVtbl -> GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) + +#define ISpRecoResult_Discard(This,dwValueTypes) \ + (This)->lpVtbl -> Discard(This,dwValueTypes) + + +#define ISpRecoResult_GetResultTimes(This,pTimes) \ + (This)->lpVtbl -> GetResultTimes(This,pTimes) + +#define ISpRecoResult_GetAlternates(This,ulStartElement,cElements,ulRequestCount,ppPhrases,pcPhrasesReturned) \ + (This)->lpVtbl -> GetAlternates(This,ulStartElement,cElements,ulRequestCount,ppPhrases,pcPhrasesReturned) + +#define ISpRecoResult_GetAudio(This,ulStartElement,cElements,ppStream) \ + (This)->lpVtbl -> GetAudio(This,ulStartElement,cElements,ppStream) + +#define ISpRecoResult_SpeakAudio(This,ulStartElement,cElements,dwFlags,pulStreamNumber) \ + (This)->lpVtbl -> SpeakAudio(This,ulStartElement,cElements,dwFlags,pulStreamNumber) + +#define ISpRecoResult_Serialize(This,ppCoMemSerializedResult) \ + (This)->lpVtbl -> Serialize(This,ppCoMemSerializedResult) + +#define ISpRecoResult_ScaleAudio(This,pAudioFormatId,pWaveFormatEx) \ + (This)->lpVtbl -> ScaleAudio(This,pAudioFormatId,pWaveFormatEx) + +#define ISpRecoResult_GetRecoContext(This,ppRecoContext) \ + (This)->lpVtbl -> GetRecoContext(This,ppRecoContext) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_GetResultTimes_Proxy( + ISpRecoResult * This, + /* [out] */ SPRECORESULTTIMES *pTimes); + + +void __RPC_STUB ISpRecoResult_GetResultTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_GetAlternates_Proxy( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ ULONG ulRequestCount, + /* [out] */ ISpPhraseAlt **ppPhrases, + /* [out] */ ULONG *pcPhrasesReturned); + + +void __RPC_STUB ISpRecoResult_GetAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_GetAudio_Proxy( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [out] */ ISpStreamFormat **ppStream); + + +void __RPC_STUB ISpRecoResult_GetAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_SpeakAudio_Proxy( + ISpRecoResult * This, + /* [in] */ ULONG ulStartElement, + /* [in] */ ULONG cElements, + /* [in] */ DWORD dwFlags, + /* [out] */ ULONG *pulStreamNumber); + + +void __RPC_STUB ISpRecoResult_SpeakAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_Serialize_Proxy( + ISpRecoResult * This, + /* [out] */ SPSERIALIZEDRESULT **ppCoMemSerializedResult); + + +void __RPC_STUB ISpRecoResult_Serialize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_ScaleAudio_Proxy( + ISpRecoResult * This, + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + +void __RPC_STUB ISpRecoResult_ScaleAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoResult_GetRecoContext_Proxy( + ISpRecoResult * This, + /* [out] */ ISpRecoContext **ppRecoContext); + + +void __RPC_STUB ISpRecoResult_GetRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpRecoResult_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0277 */ +/* [local] */ + +typedef /* [hidden] */ struct tagSPTEXTSELECTIONINFO + { + ULONG ulStartActiveOffset; + ULONG cchActiveChars; + ULONG ulStartSelection; + ULONG cchSelection; + } SPTEXTSELECTIONINFO; + +typedef /* [hidden] */ +enum SPWORDPRONOUNCEABLE + { SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE = 0, + SPWP_UNKNOWN_WORD_PRONOUNCEABLE = 1, + SPWP_KNOWN_WORD_PRONOUNCEABLE = 2 + } SPWORDPRONOUNCEABLE; + +typedef /* [hidden] */ +enum SPGRAMMARSTATE + { SPGS_DISABLED = 0, + SPGS_ENABLED = 1, + SPGS_EXCLUSIVE = 3 + } SPGRAMMARSTATE; + +typedef /* [hidden] */ +enum SPCONTEXTSTATE + { SPCS_DISABLED = 0, + SPCS_ENABLED = 1 + } SPCONTEXTSTATE; + +typedef /* [hidden] */ +enum SPRULESTATE + { SPRS_INACTIVE = 0, + SPRS_ACTIVE = 1, + SPRS_ACTIVE_WITH_AUTO_PAUSE = 3 + } SPRULESTATE; + +#define SP_STREAMPOS_ASAP ( 0 ) + +#define SP_STREAMPOS_REALTIME ( -1 ) + +#define SPRULETRANS_TEXTBUFFER (SPSTATEHANDLE)(-1) +#define SPRULETRANS_WILDCARD (SPSTATEHANDLE)(-2) +#define SPRULETRANS_DICTATION (SPSTATEHANDLE)(-3) +typedef /* [hidden] */ +enum SPGRAMMARWORDTYPE + { SPWT_DISPLAY = 0, + SPWT_LEXICAL = SPWT_DISPLAY + 1, + SPWT_PRONUNCIATION = SPWT_LEXICAL + 1 + } SPGRAMMARWORDTYPE; + +typedef /* [hidden] */ struct tagSPPROPERTYINFO + { + const WCHAR *pszName; + ULONG ulId; + const WCHAR *pszValue; + VARIANT vValue; + } SPPROPERTYINFO; + +typedef /* [hidden] */ +enum SPCFGRULEATTRIBUTES + { SPRAF_TopLevel = 1 << 0, + SPRAF_Active = 1 << 1, + SPRAF_Export = 1 << 2, + SPRAF_Import = 1 << 3, + SPRAF_Interpreter = 1 << 4, + SPRAF_Dynamic = 1 << 5, + SPRAF_AutoPause = 1 << 16 + } SPCFGRULEATTRIBUTES; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0277_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0277_v0_0_s_ifspec; + +#ifndef __ISpGrammarBuilder_INTERFACE_DEFINED__ +#define __ISpGrammarBuilder_INTERFACE_DEFINED__ + +/* interface ISpGrammarBuilder */ +/* [local][restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpGrammarBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8137828F-591A-4A42-BE58-49EA7EBAAC68") + ISpGrammarBuilder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE ResetGrammar( + /* [in] */ WORD NewLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRule( + /* [in] */ const WCHAR *pszRuleName, + /* [in] */ DWORD dwRuleId, + /* [in] */ DWORD dwAttributes, + /* [in] */ BOOL fCreateIfNotExist, + /* [out] */ SPSTATEHANDLE *phInitialState) = 0; + + virtual HRESULT STDMETHODCALLTYPE ClearRule( + SPSTATEHANDLE hState) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateNewState( + SPSTATEHANDLE hState, + SPSTATEHANDLE *phState) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddWordTransition( + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + const WCHAR *psz, + const WCHAR *pszSeparators, + SPGRAMMARWORDTYPE eWordType, + float Weight, + const SPPROPERTYINFO *pPropInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRuleTransition( + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + SPSTATEHANDLE hRule, + float Weight, + const SPPROPERTYINFO *pPropInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddResource( + /* [in] */ SPSTATEHANDLE hRuleState, + /* [in] */ const WCHAR *pszResourceName, + /* [in] */ const WCHAR *pszResourceValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( + DWORD dwReserved) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpGrammarBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpGrammarBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpGrammarBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpGrammarBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *ResetGrammar )( + ISpGrammarBuilder * This, + /* [in] */ WORD NewLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetRule )( + ISpGrammarBuilder * This, + /* [in] */ const WCHAR *pszRuleName, + /* [in] */ DWORD dwRuleId, + /* [in] */ DWORD dwAttributes, + /* [in] */ BOOL fCreateIfNotExist, + /* [out] */ SPSTATEHANDLE *phInitialState); + + HRESULT ( STDMETHODCALLTYPE *ClearRule )( + ISpGrammarBuilder * This, + SPSTATEHANDLE hState); + + HRESULT ( STDMETHODCALLTYPE *CreateNewState )( + ISpGrammarBuilder * This, + SPSTATEHANDLE hState, + SPSTATEHANDLE *phState); + + HRESULT ( STDMETHODCALLTYPE *AddWordTransition )( + ISpGrammarBuilder * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + const WCHAR *psz, + const WCHAR *pszSeparators, + SPGRAMMARWORDTYPE eWordType, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddRuleTransition )( + ISpGrammarBuilder * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + SPSTATEHANDLE hRule, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddResource )( + ISpGrammarBuilder * This, + /* [in] */ SPSTATEHANDLE hRuleState, + /* [in] */ const WCHAR *pszResourceName, + /* [in] */ const WCHAR *pszResourceValue); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpGrammarBuilder * This, + DWORD dwReserved); + + END_INTERFACE + } ISpGrammarBuilderVtbl; + + interface ISpGrammarBuilder + { + CONST_VTBL struct ISpGrammarBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpGrammarBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpGrammarBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpGrammarBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpGrammarBuilder_ResetGrammar(This,NewLanguage) \ + (This)->lpVtbl -> ResetGrammar(This,NewLanguage) + +#define ISpGrammarBuilder_GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) \ + (This)->lpVtbl -> GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) + +#define ISpGrammarBuilder_ClearRule(This,hState) \ + (This)->lpVtbl -> ClearRule(This,hState) + +#define ISpGrammarBuilder_CreateNewState(This,hState,phState) \ + (This)->lpVtbl -> CreateNewState(This,hState,phState) + +#define ISpGrammarBuilder_AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) \ + (This)->lpVtbl -> AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) + +#define ISpGrammarBuilder_AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) \ + (This)->lpVtbl -> AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) + +#define ISpGrammarBuilder_AddResource(This,hRuleState,pszResourceName,pszResourceValue) \ + (This)->lpVtbl -> AddResource(This,hRuleState,pszResourceName,pszResourceValue) + +#define ISpGrammarBuilder_Commit(This,dwReserved) \ + (This)->lpVtbl -> Commit(This,dwReserved) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_ResetGrammar_Proxy( + ISpGrammarBuilder * This, + /* [in] */ WORD NewLanguage); + + +void __RPC_STUB ISpGrammarBuilder_ResetGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_GetRule_Proxy( + ISpGrammarBuilder * This, + /* [in] */ const WCHAR *pszRuleName, + /* [in] */ DWORD dwRuleId, + /* [in] */ DWORD dwAttributes, + /* [in] */ BOOL fCreateIfNotExist, + /* [out] */ SPSTATEHANDLE *phInitialState); + + +void __RPC_STUB ISpGrammarBuilder_GetRule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_ClearRule_Proxy( + ISpGrammarBuilder * This, + SPSTATEHANDLE hState); + + +void __RPC_STUB ISpGrammarBuilder_ClearRule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_CreateNewState_Proxy( + ISpGrammarBuilder * This, + SPSTATEHANDLE hState, + SPSTATEHANDLE *phState); + + +void __RPC_STUB ISpGrammarBuilder_CreateNewState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_AddWordTransition_Proxy( + ISpGrammarBuilder * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + const WCHAR *psz, + const WCHAR *pszSeparators, + SPGRAMMARWORDTYPE eWordType, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + +void __RPC_STUB ISpGrammarBuilder_AddWordTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_AddRuleTransition_Proxy( + ISpGrammarBuilder * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + SPSTATEHANDLE hRule, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + +void __RPC_STUB ISpGrammarBuilder_AddRuleTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_AddResource_Proxy( + ISpGrammarBuilder * This, + /* [in] */ SPSTATEHANDLE hRuleState, + /* [in] */ const WCHAR *pszResourceName, + /* [in] */ const WCHAR *pszResourceValue); + + +void __RPC_STUB ISpGrammarBuilder_AddResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGrammarBuilder_Commit_Proxy( + ISpGrammarBuilder * This, + DWORD dwReserved); + + +void __RPC_STUB ISpGrammarBuilder_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpGrammarBuilder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0278 */ +/* [local] */ + +typedef /* [hidden] */ +enum SPLOADOPTIONS + { SPLO_STATIC = 0, + SPLO_DYNAMIC = 1 + } SPLOADOPTIONS; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0278_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0278_v0_0_s_ifspec; + +#ifndef __ISpRecoGrammar_INTERFACE_DEFINED__ +#define __ISpRecoGrammar_INTERFACE_DEFINED__ + +/* interface ISpRecoGrammar */ +/* [local][restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpRecoGrammar; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2177DB29-7F45-47D0-8554-067E91C80502") + ISpRecoGrammar : public ISpGrammarBuilder + { + public: + virtual HRESULT STDMETHODCALLTYPE GetGrammarId( + /* [out] */ ULONGLONG *pullGrammarId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRecoContext( + /* [out] */ ISpRecoContext **ppRecoCtxt) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadCmdFromFile( + /* [string][in] */ const WCHAR *pszFileName, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadCmdFromObject( + /* [in] */ REFCLSID rcid, + /* [string][in] */ const WCHAR *pszGrammarName, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadCmdFromResource( + /* [in] */ HMODULE hModule, + /* [string][in] */ const WCHAR *pszResourceName, + /* [string][in] */ const WCHAR *pszResourceType, + /* [in] */ WORD wLanguage, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadCmdFromMemory( + /* [in] */ const SPBINARYGRAMMAR *pGrammar, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadCmdFromProprietaryGrammar( + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataPrarm, + /* [in] */ ULONG cbDataSize, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRuleState( + /* [string][in] */ const WCHAR *pszName, + void *pReserved, + /* [in] */ SPRULESTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRuleIdState( + /* [in] */ ULONG ulRuleId, + /* [in] */ SPRULESTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadDictation( + /* [string][in] */ const WCHAR *pszTopicName, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnloadDictation( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDictationState( + /* [in] */ SPRULESTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetWordSequenceData( + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTextSelection( + /* [in] */ const SPTEXTSELECTIONINFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsPronounceable( + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetGrammarState( + /* [in] */ SPGRAMMARSTATE eGrammarState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SaveCmd( + /* [in] */ IStream *pStream, + /* [optional][out] */ WCHAR **ppszCoMemErrorText) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGrammarState( + /* [out] */ SPGRAMMARSTATE *peGrammarState) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpRecoGrammarVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpRecoGrammar * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpRecoGrammar * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpRecoGrammar * This); + + HRESULT ( STDMETHODCALLTYPE *ResetGrammar )( + ISpRecoGrammar * This, + /* [in] */ WORD NewLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetRule )( + ISpRecoGrammar * This, + /* [in] */ const WCHAR *pszRuleName, + /* [in] */ DWORD dwRuleId, + /* [in] */ DWORD dwAttributes, + /* [in] */ BOOL fCreateIfNotExist, + /* [out] */ SPSTATEHANDLE *phInitialState); + + HRESULT ( STDMETHODCALLTYPE *ClearRule )( + ISpRecoGrammar * This, + SPSTATEHANDLE hState); + + HRESULT ( STDMETHODCALLTYPE *CreateNewState )( + ISpRecoGrammar * This, + SPSTATEHANDLE hState, + SPSTATEHANDLE *phState); + + HRESULT ( STDMETHODCALLTYPE *AddWordTransition )( + ISpRecoGrammar * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + const WCHAR *psz, + const WCHAR *pszSeparators, + SPGRAMMARWORDTYPE eWordType, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddRuleTransition )( + ISpRecoGrammar * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + SPSTATEHANDLE hRule, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddResource )( + ISpRecoGrammar * This, + /* [in] */ SPSTATEHANDLE hRuleState, + /* [in] */ const WCHAR *pszResourceName, + /* [in] */ const WCHAR *pszResourceValue); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpRecoGrammar * This, + DWORD dwReserved); + + HRESULT ( STDMETHODCALLTYPE *GetGrammarId )( + ISpRecoGrammar * This, + /* [out] */ ULONGLONG *pullGrammarId); + + HRESULT ( STDMETHODCALLTYPE *GetRecoContext )( + ISpRecoGrammar * This, + /* [out] */ ISpRecoContext **ppRecoCtxt); + + HRESULT ( STDMETHODCALLTYPE *LoadCmdFromFile )( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszFileName, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *LoadCmdFromObject )( + ISpRecoGrammar * This, + /* [in] */ REFCLSID rcid, + /* [string][in] */ const WCHAR *pszGrammarName, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *LoadCmdFromResource )( + ISpRecoGrammar * This, + /* [in] */ HMODULE hModule, + /* [string][in] */ const WCHAR *pszResourceName, + /* [string][in] */ const WCHAR *pszResourceType, + /* [in] */ WORD wLanguage, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *LoadCmdFromMemory )( + ISpRecoGrammar * This, + /* [in] */ const SPBINARYGRAMMAR *pGrammar, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *LoadCmdFromProprietaryGrammar )( + ISpRecoGrammar * This, + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataPrarm, + /* [in] */ ULONG cbDataSize, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *SetRuleState )( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszName, + void *pReserved, + /* [in] */ SPRULESTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *SetRuleIdState )( + ISpRecoGrammar * This, + /* [in] */ ULONG ulRuleId, + /* [in] */ SPRULESTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *LoadDictation )( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszTopicName, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *UnloadDictation )( + ISpRecoGrammar * This); + + HRESULT ( STDMETHODCALLTYPE *SetDictationState )( + ISpRecoGrammar * This, + /* [in] */ SPRULESTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *SetWordSequenceData )( + ISpRecoGrammar * This, + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetTextSelection )( + ISpRecoGrammar * This, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *IsPronounceable )( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable); + + HRESULT ( STDMETHODCALLTYPE *SetGrammarState )( + ISpRecoGrammar * This, + /* [in] */ SPGRAMMARSTATE eGrammarState); + + HRESULT ( STDMETHODCALLTYPE *SaveCmd )( + ISpRecoGrammar * This, + /* [in] */ IStream *pStream, + /* [optional][out] */ WCHAR **ppszCoMemErrorText); + + HRESULT ( STDMETHODCALLTYPE *GetGrammarState )( + ISpRecoGrammar * This, + /* [out] */ SPGRAMMARSTATE *peGrammarState); + + END_INTERFACE + } ISpRecoGrammarVtbl; + + interface ISpRecoGrammar + { + CONST_VTBL struct ISpRecoGrammarVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpRecoGrammar_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpRecoGrammar_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpRecoGrammar_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpRecoGrammar_ResetGrammar(This,NewLanguage) \ + (This)->lpVtbl -> ResetGrammar(This,NewLanguage) + +#define ISpRecoGrammar_GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) \ + (This)->lpVtbl -> GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) + +#define ISpRecoGrammar_ClearRule(This,hState) \ + (This)->lpVtbl -> ClearRule(This,hState) + +#define ISpRecoGrammar_CreateNewState(This,hState,phState) \ + (This)->lpVtbl -> CreateNewState(This,hState,phState) + +#define ISpRecoGrammar_AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) \ + (This)->lpVtbl -> AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) + +#define ISpRecoGrammar_AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) \ + (This)->lpVtbl -> AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) + +#define ISpRecoGrammar_AddResource(This,hRuleState,pszResourceName,pszResourceValue) \ + (This)->lpVtbl -> AddResource(This,hRuleState,pszResourceName,pszResourceValue) + +#define ISpRecoGrammar_Commit(This,dwReserved) \ + (This)->lpVtbl -> Commit(This,dwReserved) + + +#define ISpRecoGrammar_GetGrammarId(This,pullGrammarId) \ + (This)->lpVtbl -> GetGrammarId(This,pullGrammarId) + +#define ISpRecoGrammar_GetRecoContext(This,ppRecoCtxt) \ + (This)->lpVtbl -> GetRecoContext(This,ppRecoCtxt) + +#define ISpRecoGrammar_LoadCmdFromFile(This,pszFileName,Options) \ + (This)->lpVtbl -> LoadCmdFromFile(This,pszFileName,Options) + +#define ISpRecoGrammar_LoadCmdFromObject(This,rcid,pszGrammarName,Options) \ + (This)->lpVtbl -> LoadCmdFromObject(This,rcid,pszGrammarName,Options) + +#define ISpRecoGrammar_LoadCmdFromResource(This,hModule,pszResourceName,pszResourceType,wLanguage,Options) \ + (This)->lpVtbl -> LoadCmdFromResource(This,hModule,pszResourceName,pszResourceType,wLanguage,Options) + +#define ISpRecoGrammar_LoadCmdFromMemory(This,pGrammar,Options) \ + (This)->lpVtbl -> LoadCmdFromMemory(This,pGrammar,Options) + +#define ISpRecoGrammar_LoadCmdFromProprietaryGrammar(This,rguidParam,pszStringParam,pvDataPrarm,cbDataSize,Options) \ + (This)->lpVtbl -> LoadCmdFromProprietaryGrammar(This,rguidParam,pszStringParam,pvDataPrarm,cbDataSize,Options) + +#define ISpRecoGrammar_SetRuleState(This,pszName,pReserved,NewState) \ + (This)->lpVtbl -> SetRuleState(This,pszName,pReserved,NewState) + +#define ISpRecoGrammar_SetRuleIdState(This,ulRuleId,NewState) \ + (This)->lpVtbl -> SetRuleIdState(This,ulRuleId,NewState) + +#define ISpRecoGrammar_LoadDictation(This,pszTopicName,Options) \ + (This)->lpVtbl -> LoadDictation(This,pszTopicName,Options) + +#define ISpRecoGrammar_UnloadDictation(This) \ + (This)->lpVtbl -> UnloadDictation(This) + +#define ISpRecoGrammar_SetDictationState(This,NewState) \ + (This)->lpVtbl -> SetDictationState(This,NewState) + +#define ISpRecoGrammar_SetWordSequenceData(This,pText,cchText,pInfo) \ + (This)->lpVtbl -> SetWordSequenceData(This,pText,cchText,pInfo) + +#define ISpRecoGrammar_SetTextSelection(This,pInfo) \ + (This)->lpVtbl -> SetTextSelection(This,pInfo) + +#define ISpRecoGrammar_IsPronounceable(This,pszWord,pWordPronounceable) \ + (This)->lpVtbl -> IsPronounceable(This,pszWord,pWordPronounceable) + +#define ISpRecoGrammar_SetGrammarState(This,eGrammarState) \ + (This)->lpVtbl -> SetGrammarState(This,eGrammarState) + +#define ISpRecoGrammar_SaveCmd(This,pStream,ppszCoMemErrorText) \ + (This)->lpVtbl -> SaveCmd(This,pStream,ppszCoMemErrorText) + +#define ISpRecoGrammar_GetGrammarState(This,peGrammarState) \ + (This)->lpVtbl -> GetGrammarState(This,peGrammarState) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_GetGrammarId_Proxy( + ISpRecoGrammar * This, + /* [out] */ ULONGLONG *pullGrammarId); + + +void __RPC_STUB ISpRecoGrammar_GetGrammarId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_GetRecoContext_Proxy( + ISpRecoGrammar * This, + /* [out] */ ISpRecoContext **ppRecoCtxt); + + +void __RPC_STUB ISpRecoGrammar_GetRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadCmdFromFile_Proxy( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszFileName, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadCmdFromFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadCmdFromObject_Proxy( + ISpRecoGrammar * This, + /* [in] */ REFCLSID rcid, + /* [string][in] */ const WCHAR *pszGrammarName, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadCmdFromObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadCmdFromResource_Proxy( + ISpRecoGrammar * This, + /* [in] */ HMODULE hModule, + /* [string][in] */ const WCHAR *pszResourceName, + /* [string][in] */ const WCHAR *pszResourceType, + /* [in] */ WORD wLanguage, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadCmdFromResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadCmdFromMemory_Proxy( + ISpRecoGrammar * This, + /* [in] */ const SPBINARYGRAMMAR *pGrammar, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadCmdFromMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadCmdFromProprietaryGrammar_Proxy( + ISpRecoGrammar * This, + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataPrarm, + /* [in] */ ULONG cbDataSize, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadCmdFromProprietaryGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetRuleState_Proxy( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszName, + void *pReserved, + /* [in] */ SPRULESTATE NewState); + + +void __RPC_STUB ISpRecoGrammar_SetRuleState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetRuleIdState_Proxy( + ISpRecoGrammar * This, + /* [in] */ ULONG ulRuleId, + /* [in] */ SPRULESTATE NewState); + + +void __RPC_STUB ISpRecoGrammar_SetRuleIdState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_LoadDictation_Proxy( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszTopicName, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpRecoGrammar_LoadDictation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_UnloadDictation_Proxy( + ISpRecoGrammar * This); + + +void __RPC_STUB ISpRecoGrammar_UnloadDictation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetDictationState_Proxy( + ISpRecoGrammar * This, + /* [in] */ SPRULESTATE NewState); + + +void __RPC_STUB ISpRecoGrammar_SetDictationState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetWordSequenceData_Proxy( + ISpRecoGrammar * This, + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + +void __RPC_STUB ISpRecoGrammar_SetWordSequenceData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetTextSelection_Proxy( + ISpRecoGrammar * This, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + +void __RPC_STUB ISpRecoGrammar_SetTextSelection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_IsPronounceable_Proxy( + ISpRecoGrammar * This, + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable); + + +void __RPC_STUB ISpRecoGrammar_IsPronounceable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SetGrammarState_Proxy( + ISpRecoGrammar * This, + /* [in] */ SPGRAMMARSTATE eGrammarState); + + +void __RPC_STUB ISpRecoGrammar_SetGrammarState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_SaveCmd_Proxy( + ISpRecoGrammar * This, + /* [in] */ IStream *pStream, + /* [optional][out] */ WCHAR **ppszCoMemErrorText); + + +void __RPC_STUB ISpRecoGrammar_SaveCmd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoGrammar_GetGrammarState_Proxy( + ISpRecoGrammar * This, + /* [out] */ SPGRAMMARSTATE *peGrammarState); + + +void __RPC_STUB ISpRecoGrammar_GetGrammarState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpRecoGrammar_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0279 */ +/* [local] */ + +typedef /* [hidden][restricted] */ struct SPRECOCONTEXTSTATUS + { + SPINTERFERENCE eInterference; + WCHAR szRequestTypeOfUI[ 255 ]; + DWORD dwReserved1; + DWORD dwReserved2; + } SPRECOCONTEXTSTATUS; + +typedef /* [hidden] */ +enum SPBOOKMARKOPTIONS + { SPBO_NONE = 0, + SPBO_PAUSE = 1 + } SPBOOKMARKOPTIONS; + +typedef /* [hidden] */ +enum SPAUDIOOPTIONS + { SPAO_NONE = 0, + SPAO_RETAIN_AUDIO = 1 << 0 + } SPAUDIOOPTIONS; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0279_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0279_v0_0_s_ifspec; + +#ifndef __ISpRecoContext_INTERFACE_DEFINED__ +#define __ISpRecoContext_INTERFACE_DEFINED__ + +/* interface ISpRecoContext */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpRecoContext; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F740A62F-7C15-489E-8234-940A33D9272D") + ISpRecoContext : public ISpEventSource + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRecognizer( + /* [out] */ ISpRecognizer **ppRecognizer) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateGrammar( + /* [in] */ ULONGLONG ullGrammarId, + /* [out] */ ISpRecoGrammar **ppGrammar) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ SPRECOCONTEXTSTATUS *pStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxAlternates( + /* [in] */ ULONG *pcAlternates) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMaxAlternates( + /* [in] */ ULONG cAlternates) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAudioOptions( + /* [in] */ SPAUDIOOPTIONS Options, + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAudioOptions( + /* [in] */ SPAUDIOOPTIONS *pOptions, + /* [out] */ GUID *pAudioFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeserializeResult( + /* [in] */ const SPSERIALIZEDRESULT *pSerializedResult, + /* [out] */ ISpRecoResult **ppResult) = 0; + + virtual HRESULT STDMETHODCALLTYPE Bookmark( + /* [in] */ SPBOOKMARKOPTIONS Options, + /* [in] */ ULONGLONG ullStreamPosition, + /* [in] */ LPARAM lparamEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAdaptationData( + /* [string][in] */ const WCHAR *pAdaptationData, + /* [in] */ const ULONG cch) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( + DWORD dwReserved) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( + DWORD dwReserved) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVoice( + /* [in] */ ISpVoice *pVoice, + /* [in] */ BOOL fAllowFormatChanges) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVoice( + /* [out] */ ISpVoice **ppVoice) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetVoicePurgeEvent( + /* [in] */ ULONGLONG ullEventInterest) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVoicePurgeEvent( + /* [out] */ ULONGLONG *pullEventInterest) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetContextState( + /* [in] */ SPCONTEXTSTATE eContextState) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetContextState( + /* [in] */ SPCONTEXTSTATE *peContextState) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpRecoContextVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpRecoContext * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpRecoContext * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpRecoContext * This); + + HRESULT ( STDMETHODCALLTYPE *SetNotifySink )( + ISpRecoContext * This, + /* [in] */ ISpNotifySink *pNotifySink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWindowMessage )( + ISpRecoContext * This, + /* [in] */ HWND hWnd, + /* [in] */ UINT Msg, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackFunction )( + ISpRecoContext * This, + /* [in] */ SPNOTIFYCALLBACK *pfnCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyCallbackInterface )( + ISpRecoContext * This, + /* [in] */ ISpNotifyCallback *pSpCallback, + /* [in] */ WPARAM wParam, + /* [in] */ LPARAM lParam); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *SetNotifyWin32Event )( + ISpRecoContext * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *WaitForNotifyEvent )( + ISpRecoContext * This, + /* [in] */ DWORD dwMilliseconds); + + /* [local] */ HANDLE ( STDMETHODCALLTYPE *GetNotifyEventHandle )( + ISpRecoContext * This); + + HRESULT ( STDMETHODCALLTYPE *SetInterest )( + ISpRecoContext * This, + /* [in] */ ULONGLONG ullEventInterest, + /* [in] */ ULONGLONG ullQueuedInterest); + + HRESULT ( STDMETHODCALLTYPE *GetEvents )( + ISpRecoContext * This, + /* [in] */ ULONG ulCount, + /* [size_is][out] */ SPEVENT *pEventArray, + /* [out] */ ULONG *pulFetched); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + ISpRecoContext * This, + /* [out] */ SPEVENTSOURCEINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *GetRecognizer )( + ISpRecoContext * This, + /* [out] */ ISpRecognizer **ppRecognizer); + + HRESULT ( STDMETHODCALLTYPE *CreateGrammar )( + ISpRecoContext * This, + /* [in] */ ULONGLONG ullGrammarId, + /* [out] */ ISpRecoGrammar **ppGrammar); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + ISpRecoContext * This, + /* [out] */ SPRECOCONTEXTSTATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *GetMaxAlternates )( + ISpRecoContext * This, + /* [in] */ ULONG *pcAlternates); + + HRESULT ( STDMETHODCALLTYPE *SetMaxAlternates )( + ISpRecoContext * This, + /* [in] */ ULONG cAlternates); + + HRESULT ( STDMETHODCALLTYPE *SetAudioOptions )( + ISpRecoContext * This, + /* [in] */ SPAUDIOOPTIONS Options, + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *GetAudioOptions )( + ISpRecoContext * This, + /* [in] */ SPAUDIOOPTIONS *pOptions, + /* [out] */ GUID *pAudioFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX); + + HRESULT ( STDMETHODCALLTYPE *DeserializeResult )( + ISpRecoContext * This, + /* [in] */ const SPSERIALIZEDRESULT *pSerializedResult, + /* [out] */ ISpRecoResult **ppResult); + + HRESULT ( STDMETHODCALLTYPE *Bookmark )( + ISpRecoContext * This, + /* [in] */ SPBOOKMARKOPTIONS Options, + /* [in] */ ULONGLONG ullStreamPosition, + /* [in] */ LPARAM lparamEvent); + + HRESULT ( STDMETHODCALLTYPE *SetAdaptationData )( + ISpRecoContext * This, + /* [string][in] */ const WCHAR *pAdaptationData, + /* [in] */ const ULONG cch); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + ISpRecoContext * This, + DWORD dwReserved); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + ISpRecoContext * This, + DWORD dwReserved); + + HRESULT ( STDMETHODCALLTYPE *SetVoice )( + ISpRecoContext * This, + /* [in] */ ISpVoice *pVoice, + /* [in] */ BOOL fAllowFormatChanges); + + HRESULT ( STDMETHODCALLTYPE *GetVoice )( + ISpRecoContext * This, + /* [out] */ ISpVoice **ppVoice); + + HRESULT ( STDMETHODCALLTYPE *SetVoicePurgeEvent )( + ISpRecoContext * This, + /* [in] */ ULONGLONG ullEventInterest); + + HRESULT ( STDMETHODCALLTYPE *GetVoicePurgeEvent )( + ISpRecoContext * This, + /* [out] */ ULONGLONG *pullEventInterest); + + HRESULT ( STDMETHODCALLTYPE *SetContextState )( + ISpRecoContext * This, + /* [in] */ SPCONTEXTSTATE eContextState); + + HRESULT ( STDMETHODCALLTYPE *GetContextState )( + ISpRecoContext * This, + /* [in] */ SPCONTEXTSTATE *peContextState); + + END_INTERFACE + } ISpRecoContextVtbl; + + interface ISpRecoContext + { + CONST_VTBL struct ISpRecoContextVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpRecoContext_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpRecoContext_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpRecoContext_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpRecoContext_SetNotifySink(This,pNotifySink) \ + (This)->lpVtbl -> SetNotifySink(This,pNotifySink) + +#define ISpRecoContext_SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyWindowMessage(This,hWnd,Msg,wParam,lParam) + +#define ISpRecoContext_SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackFunction(This,pfnCallback,wParam,lParam) + +#define ISpRecoContext_SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) \ + (This)->lpVtbl -> SetNotifyCallbackInterface(This,pSpCallback,wParam,lParam) + +#define ISpRecoContext_SetNotifyWin32Event(This) \ + (This)->lpVtbl -> SetNotifyWin32Event(This) + +#define ISpRecoContext_WaitForNotifyEvent(This,dwMilliseconds) \ + (This)->lpVtbl -> WaitForNotifyEvent(This,dwMilliseconds) + +#define ISpRecoContext_GetNotifyEventHandle(This) \ + (This)->lpVtbl -> GetNotifyEventHandle(This) + + +#define ISpRecoContext_SetInterest(This,ullEventInterest,ullQueuedInterest) \ + (This)->lpVtbl -> SetInterest(This,ullEventInterest,ullQueuedInterest) + +#define ISpRecoContext_GetEvents(This,ulCount,pEventArray,pulFetched) \ + (This)->lpVtbl -> GetEvents(This,ulCount,pEventArray,pulFetched) + +#define ISpRecoContext_GetInfo(This,pInfo) \ + (This)->lpVtbl -> GetInfo(This,pInfo) + + +#define ISpRecoContext_GetRecognizer(This,ppRecognizer) \ + (This)->lpVtbl -> GetRecognizer(This,ppRecognizer) + +#define ISpRecoContext_CreateGrammar(This,ullGrammarId,ppGrammar) \ + (This)->lpVtbl -> CreateGrammar(This,ullGrammarId,ppGrammar) + +#define ISpRecoContext_GetStatus(This,pStatus) \ + (This)->lpVtbl -> GetStatus(This,pStatus) + +#define ISpRecoContext_GetMaxAlternates(This,pcAlternates) \ + (This)->lpVtbl -> GetMaxAlternates(This,pcAlternates) + +#define ISpRecoContext_SetMaxAlternates(This,cAlternates) \ + (This)->lpVtbl -> SetMaxAlternates(This,cAlternates) + +#define ISpRecoContext_SetAudioOptions(This,Options,pAudioFormatId,pWaveFormatEx) \ + (This)->lpVtbl -> SetAudioOptions(This,Options,pAudioFormatId,pWaveFormatEx) + +#define ISpRecoContext_GetAudioOptions(This,pOptions,pAudioFormatId,ppCoMemWFEX) \ + (This)->lpVtbl -> GetAudioOptions(This,pOptions,pAudioFormatId,ppCoMemWFEX) + +#define ISpRecoContext_DeserializeResult(This,pSerializedResult,ppResult) \ + (This)->lpVtbl -> DeserializeResult(This,pSerializedResult,ppResult) + +#define ISpRecoContext_Bookmark(This,Options,ullStreamPosition,lparamEvent) \ + (This)->lpVtbl -> Bookmark(This,Options,ullStreamPosition,lparamEvent) + +#define ISpRecoContext_SetAdaptationData(This,pAdaptationData,cch) \ + (This)->lpVtbl -> SetAdaptationData(This,pAdaptationData,cch) + +#define ISpRecoContext_Pause(This,dwReserved) \ + (This)->lpVtbl -> Pause(This,dwReserved) + +#define ISpRecoContext_Resume(This,dwReserved) \ + (This)->lpVtbl -> Resume(This,dwReserved) + +#define ISpRecoContext_SetVoice(This,pVoice,fAllowFormatChanges) \ + (This)->lpVtbl -> SetVoice(This,pVoice,fAllowFormatChanges) + +#define ISpRecoContext_GetVoice(This,ppVoice) \ + (This)->lpVtbl -> GetVoice(This,ppVoice) + +#define ISpRecoContext_SetVoicePurgeEvent(This,ullEventInterest) \ + (This)->lpVtbl -> SetVoicePurgeEvent(This,ullEventInterest) + +#define ISpRecoContext_GetVoicePurgeEvent(This,pullEventInterest) \ + (This)->lpVtbl -> GetVoicePurgeEvent(This,pullEventInterest) + +#define ISpRecoContext_SetContextState(This,eContextState) \ + (This)->lpVtbl -> SetContextState(This,eContextState) + +#define ISpRecoContext_GetContextState(This,peContextState) \ + (This)->lpVtbl -> GetContextState(This,peContextState) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetRecognizer_Proxy( + ISpRecoContext * This, + /* [out] */ ISpRecognizer **ppRecognizer); + + +void __RPC_STUB ISpRecoContext_GetRecognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_CreateGrammar_Proxy( + ISpRecoContext * This, + /* [in] */ ULONGLONG ullGrammarId, + /* [out] */ ISpRecoGrammar **ppGrammar); + + +void __RPC_STUB ISpRecoContext_CreateGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetStatus_Proxy( + ISpRecoContext * This, + /* [out] */ SPRECOCONTEXTSTATUS *pStatus); + + +void __RPC_STUB ISpRecoContext_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetMaxAlternates_Proxy( + ISpRecoContext * This, + /* [in] */ ULONG *pcAlternates); + + +void __RPC_STUB ISpRecoContext_GetMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetMaxAlternates_Proxy( + ISpRecoContext * This, + /* [in] */ ULONG cAlternates); + + +void __RPC_STUB ISpRecoContext_SetMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetAudioOptions_Proxy( + ISpRecoContext * This, + /* [in] */ SPAUDIOOPTIONS Options, + /* [in] */ const GUID *pAudioFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx); + + +void __RPC_STUB ISpRecoContext_SetAudioOptions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetAudioOptions_Proxy( + ISpRecoContext * This, + /* [in] */ SPAUDIOOPTIONS *pOptions, + /* [out] */ GUID *pAudioFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX); + + +void __RPC_STUB ISpRecoContext_GetAudioOptions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_DeserializeResult_Proxy( + ISpRecoContext * This, + /* [in] */ const SPSERIALIZEDRESULT *pSerializedResult, + /* [out] */ ISpRecoResult **ppResult); + + +void __RPC_STUB ISpRecoContext_DeserializeResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_Bookmark_Proxy( + ISpRecoContext * This, + /* [in] */ SPBOOKMARKOPTIONS Options, + /* [in] */ ULONGLONG ullStreamPosition, + /* [in] */ LPARAM lparamEvent); + + +void __RPC_STUB ISpRecoContext_Bookmark_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetAdaptationData_Proxy( + ISpRecoContext * This, + /* [string][in] */ const WCHAR *pAdaptationData, + /* [in] */ const ULONG cch); + + +void __RPC_STUB ISpRecoContext_SetAdaptationData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_Pause_Proxy( + ISpRecoContext * This, + DWORD dwReserved); + + +void __RPC_STUB ISpRecoContext_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_Resume_Proxy( + ISpRecoContext * This, + DWORD dwReserved); + + +void __RPC_STUB ISpRecoContext_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetVoice_Proxy( + ISpRecoContext * This, + /* [in] */ ISpVoice *pVoice, + /* [in] */ BOOL fAllowFormatChanges); + + +void __RPC_STUB ISpRecoContext_SetVoice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetVoice_Proxy( + ISpRecoContext * This, + /* [out] */ ISpVoice **ppVoice); + + +void __RPC_STUB ISpRecoContext_GetVoice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetVoicePurgeEvent_Proxy( + ISpRecoContext * This, + /* [in] */ ULONGLONG ullEventInterest); + + +void __RPC_STUB ISpRecoContext_SetVoicePurgeEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetVoicePurgeEvent_Proxy( + ISpRecoContext * This, + /* [out] */ ULONGLONG *pullEventInterest); + + +void __RPC_STUB ISpRecoContext_GetVoicePurgeEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_SetContextState_Proxy( + ISpRecoContext * This, + /* [in] */ SPCONTEXTSTATE eContextState); + + +void __RPC_STUB ISpRecoContext_SetContextState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecoContext_GetContextState_Proxy( + ISpRecoContext * This, + /* [in] */ SPCONTEXTSTATE *peContextState); + + +void __RPC_STUB ISpRecoContext_GetContextState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpRecoContext_INTERFACE_DEFINED__ */ + + +#ifndef __ISpProperties_INTERFACE_DEFINED__ +#define __ISpProperties_INTERFACE_DEFINED__ + +/* interface ISpProperties */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5B4FB971-B115-4DE1-AD97-E482E3BF6EE4") + ISpProperties : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetPropertyNum( + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyNum( + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *plValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPropertyString( + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyString( + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpPropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpProperties * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpProperties * This); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyNum )( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyNum )( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *plValue); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyString )( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyString )( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue); + + END_INTERFACE + } ISpPropertiesVtbl; + + interface ISpProperties + { + CONST_VTBL struct ISpPropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpProperties_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpProperties_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpProperties_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpProperties_SetPropertyNum(This,pName,lValue) \ + (This)->lpVtbl -> SetPropertyNum(This,pName,lValue) + +#define ISpProperties_GetPropertyNum(This,pName,plValue) \ + (This)->lpVtbl -> GetPropertyNum(This,pName,plValue) + +#define ISpProperties_SetPropertyString(This,pName,pValue) \ + (This)->lpVtbl -> SetPropertyString(This,pName,pValue) + +#define ISpProperties_GetPropertyString(This,pName,ppCoMemValue) \ + (This)->lpVtbl -> GetPropertyString(This,pName,ppCoMemValue) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpProperties_SetPropertyNum_Proxy( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue); + + +void __RPC_STUB ISpProperties_SetPropertyNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpProperties_GetPropertyNum_Proxy( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *plValue); + + +void __RPC_STUB ISpProperties_GetPropertyNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpProperties_SetPropertyString_Proxy( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue); + + +void __RPC_STUB ISpProperties_SetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpProperties_GetPropertyString_Proxy( + ISpProperties * This, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue); + + +void __RPC_STUB ISpProperties_GetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpProperties_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapi_0281 */ +/* [local] */ + +#define SP_MAX_LANGIDS ( 20 ) + +typedef /* [hidden][restricted] */ struct SPRECOGNIZERSTATUS + { + SPAUDIOSTATUS AudioStatus; + ULONGLONG ullRecognitionStreamPos; + ULONG ulStreamNumber; + ULONG ulNumActive; + CLSID clsidEngine; + ULONG cLangIDs; + WORD aLangID[ 20 ]; + DWORD dwReserved1; + DWORD dwReserved2; + } SPRECOGNIZERSTATUS; + +typedef /* [hidden] */ +enum SPWAVEFORMATTYPE + { SPWF_INPUT = 0, + SPWF_SRENGINE = SPWF_INPUT + 1 + } SPSTREAMFORMATTYPE; + +typedef /* [hidden] */ +enum SPRECOSTATE + { SPRST_INACTIVE = 0, + SPRST_ACTIVE = SPRST_INACTIVE + 1, + SPRST_ACTIVE_ALWAYS = SPRST_ACTIVE + 1, + SPRST_INACTIVE_WITH_PURGE = SPRST_ACTIVE_ALWAYS + 1, + SPRST_NUM_STATES = SPRST_INACTIVE_WITH_PURGE + 1 + } SPRECOSTATE; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapi_0281_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapi_0281_v0_0_s_ifspec; + +#ifndef __ISpRecognizer_INTERFACE_DEFINED__ +#define __ISpRecognizer_INTERFACE_DEFINED__ + +/* interface ISpRecognizer */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpRecognizer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C2B5F241-DAA0-4507-9E16-5A1EAA2B7A5C") + ISpRecognizer : public ISpProperties + { + public: + virtual HRESULT STDMETHODCALLTYPE SetRecognizer( + /* [in] */ ISpObjectToken *pRecognizer) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRecognizer( + /* [out] */ ISpObjectToken **ppRecognizer) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetInput( + /* [in] */ IUnknown *pUnkInput, + /* [in] */ BOOL fAllowFormatChanges) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputObjectToken( + /* [out] */ ISpObjectToken **ppToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputStream( + /* [out] */ ISpStreamFormat **ppStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateRecoContext( + /* [out] */ ISpRecoContext **ppNewCtxt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRecoProfile( + /* [out] */ ISpObjectToken **ppToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRecoProfile( + /* [in] */ ISpObjectToken *pToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSharedInstance( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRecoState( + /* [out] */ SPRECOSTATE *pState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRecoState( + /* [in] */ SPRECOSTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ SPRECOGNIZERSTATUS *pStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [in] */ SPSTREAMFORMATTYPE WaveFormatType, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData) = 0; + + virtual HRESULT STDMETHODCALLTYPE EmulateRecognition( + /* [in] */ ISpPhrase *pPhrase) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpRecognizerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpRecognizer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpRecognizer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpRecognizer * This); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyNum )( + ISpRecognizer * This, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyNum )( + ISpRecognizer * This, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *plValue); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyString )( + ISpRecognizer * This, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyString )( + ISpRecognizer * This, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue); + + HRESULT ( STDMETHODCALLTYPE *SetRecognizer )( + ISpRecognizer * This, + /* [in] */ ISpObjectToken *pRecognizer); + + HRESULT ( STDMETHODCALLTYPE *GetRecognizer )( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppRecognizer); + + HRESULT ( STDMETHODCALLTYPE *SetInput )( + ISpRecognizer * This, + /* [in] */ IUnknown *pUnkInput, + /* [in] */ BOOL fAllowFormatChanges); + + HRESULT ( STDMETHODCALLTYPE *GetInputObjectToken )( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *GetInputStream )( + ISpRecognizer * This, + /* [out] */ ISpStreamFormat **ppStream); + + HRESULT ( STDMETHODCALLTYPE *CreateRecoContext )( + ISpRecognizer * This, + /* [out] */ ISpRecoContext **ppNewCtxt); + + HRESULT ( STDMETHODCALLTYPE *GetRecoProfile )( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *SetRecoProfile )( + ISpRecognizer * This, + /* [in] */ ISpObjectToken *pToken); + + HRESULT ( STDMETHODCALLTYPE *IsSharedInstance )( + ISpRecognizer * This); + + HRESULT ( STDMETHODCALLTYPE *GetRecoState )( + ISpRecognizer * This, + /* [out] */ SPRECOSTATE *pState); + + HRESULT ( STDMETHODCALLTYPE *SetRecoState )( + ISpRecognizer * This, + /* [in] */ SPRECOSTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + ISpRecognizer * This, + /* [out] */ SPRECOGNIZERSTATUS *pStatus); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpRecognizer * This, + /* [in] */ SPSTREAMFORMATTYPE WaveFormatType, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpRecognizer * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpRecognizer * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData); + + HRESULT ( STDMETHODCALLTYPE *EmulateRecognition )( + ISpRecognizer * This, + /* [in] */ ISpPhrase *pPhrase); + + END_INTERFACE + } ISpRecognizerVtbl; + + interface ISpRecognizer + { + CONST_VTBL struct ISpRecognizerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpRecognizer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpRecognizer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpRecognizer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpRecognizer_SetPropertyNum(This,pName,lValue) \ + (This)->lpVtbl -> SetPropertyNum(This,pName,lValue) + +#define ISpRecognizer_GetPropertyNum(This,pName,plValue) \ + (This)->lpVtbl -> GetPropertyNum(This,pName,plValue) + +#define ISpRecognizer_SetPropertyString(This,pName,pValue) \ + (This)->lpVtbl -> SetPropertyString(This,pName,pValue) + +#define ISpRecognizer_GetPropertyString(This,pName,ppCoMemValue) \ + (This)->lpVtbl -> GetPropertyString(This,pName,ppCoMemValue) + + +#define ISpRecognizer_SetRecognizer(This,pRecognizer) \ + (This)->lpVtbl -> SetRecognizer(This,pRecognizer) + +#define ISpRecognizer_GetRecognizer(This,ppRecognizer) \ + (This)->lpVtbl -> GetRecognizer(This,ppRecognizer) + +#define ISpRecognizer_SetInput(This,pUnkInput,fAllowFormatChanges) \ + (This)->lpVtbl -> SetInput(This,pUnkInput,fAllowFormatChanges) + +#define ISpRecognizer_GetInputObjectToken(This,ppToken) \ + (This)->lpVtbl -> GetInputObjectToken(This,ppToken) + +#define ISpRecognizer_GetInputStream(This,ppStream) \ + (This)->lpVtbl -> GetInputStream(This,ppStream) + +#define ISpRecognizer_CreateRecoContext(This,ppNewCtxt) \ + (This)->lpVtbl -> CreateRecoContext(This,ppNewCtxt) + +#define ISpRecognizer_GetRecoProfile(This,ppToken) \ + (This)->lpVtbl -> GetRecoProfile(This,ppToken) + +#define ISpRecognizer_SetRecoProfile(This,pToken) \ + (This)->lpVtbl -> SetRecoProfile(This,pToken) + +#define ISpRecognizer_IsSharedInstance(This) \ + (This)->lpVtbl -> IsSharedInstance(This) + +#define ISpRecognizer_GetRecoState(This,pState) \ + (This)->lpVtbl -> GetRecoState(This,pState) + +#define ISpRecognizer_SetRecoState(This,NewState) \ + (This)->lpVtbl -> SetRecoState(This,NewState) + +#define ISpRecognizer_GetStatus(This,pStatus) \ + (This)->lpVtbl -> GetStatus(This,pStatus) + +#define ISpRecognizer_GetFormat(This,WaveFormatType,pFormatId,ppCoMemWFEX) \ + (This)->lpVtbl -> GetFormat(This,WaveFormatType,pFormatId,ppCoMemWFEX) + +#define ISpRecognizer_IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,pfSupported) \ + (This)->lpVtbl -> IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,pfSupported) + +#define ISpRecognizer_DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData) \ + (This)->lpVtbl -> DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData) + +#define ISpRecognizer_EmulateRecognition(This,pPhrase) \ + (This)->lpVtbl -> EmulateRecognition(This,pPhrase) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_SetRecognizer_Proxy( + ISpRecognizer * This, + /* [in] */ ISpObjectToken *pRecognizer); + + +void __RPC_STUB ISpRecognizer_SetRecognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetRecognizer_Proxy( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppRecognizer); + + +void __RPC_STUB ISpRecognizer_GetRecognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_SetInput_Proxy( + ISpRecognizer * This, + /* [in] */ IUnknown *pUnkInput, + /* [in] */ BOOL fAllowFormatChanges); + + +void __RPC_STUB ISpRecognizer_SetInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetInputObjectToken_Proxy( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppToken); + + +void __RPC_STUB ISpRecognizer_GetInputObjectToken_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetInputStream_Proxy( + ISpRecognizer * This, + /* [out] */ ISpStreamFormat **ppStream); + + +void __RPC_STUB ISpRecognizer_GetInputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_CreateRecoContext_Proxy( + ISpRecognizer * This, + /* [out] */ ISpRecoContext **ppNewCtxt); + + +void __RPC_STUB ISpRecognizer_CreateRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetRecoProfile_Proxy( + ISpRecognizer * This, + /* [out] */ ISpObjectToken **ppToken); + + +void __RPC_STUB ISpRecognizer_GetRecoProfile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_SetRecoProfile_Proxy( + ISpRecognizer * This, + /* [in] */ ISpObjectToken *pToken); + + +void __RPC_STUB ISpRecognizer_SetRecoProfile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_IsSharedInstance_Proxy( + ISpRecognizer * This); + + +void __RPC_STUB ISpRecognizer_IsSharedInstance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetRecoState_Proxy( + ISpRecognizer * This, + /* [out] */ SPRECOSTATE *pState); + + +void __RPC_STUB ISpRecognizer_GetRecoState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_SetRecoState_Proxy( + ISpRecognizer * This, + /* [in] */ SPRECOSTATE NewState); + + +void __RPC_STUB ISpRecognizer_SetRecoState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetStatus_Proxy( + ISpRecognizer * This, + /* [out] */ SPRECOGNIZERSTATUS *pStatus); + + +void __RPC_STUB ISpRecognizer_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_GetFormat_Proxy( + ISpRecognizer * This, + /* [in] */ SPSTREAMFORMATTYPE WaveFormatType, + /* [out] */ GUID *pFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemWFEX); + + +void __RPC_STUB ISpRecognizer_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpRecognizer_IsUISupported_Proxy( + ISpRecognizer * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [out] */ BOOL *pfSupported); + + +void __RPC_STUB ISpRecognizer_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpRecognizer_DisplayUI_Proxy( + ISpRecognizer * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData); + + +void __RPC_STUB ISpRecognizer_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpRecognizer_EmulateRecognition_Proxy( + ISpRecognizer * This, + /* [in] */ ISpPhrase *pPhrase); + + +void __RPC_STUB ISpRecognizer_EmulateRecognition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpRecognizer_INTERFACE_DEFINED__ */ + + + +#ifndef __SpeechLib_LIBRARY_DEFINED__ +#define __SpeechLib_LIBRARY_DEFINED__ + +/* library SpeechLib */ +/* [version][uuid][helpstring] */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +typedef long SpeechLanguageId; + +#define __SpeechStringConstants_MODULE_DEFINED__ +typedef /* [hidden] */ +enum DISPID_SpeechDataKey + { DISPID_SDKSetBinaryValue = 1, + DISPID_SDKGetBinaryValue = DISPID_SDKSetBinaryValue + 1, + DISPID_SDKSetStringValue = DISPID_SDKGetBinaryValue + 1, + DISPID_SDKGetStringValue = DISPID_SDKSetStringValue + 1, + DISPID_SDKSetLongValue = DISPID_SDKGetStringValue + 1, + DISPID_SDKGetlongValue = DISPID_SDKSetLongValue + 1, + DISPID_SDKOpenKey = DISPID_SDKGetlongValue + 1, + DISPID_SDKCreateKey = DISPID_SDKOpenKey + 1, + DISPID_SDKDeleteKey = DISPID_SDKCreateKey + 1, + DISPID_SDKDeleteValue = DISPID_SDKDeleteKey + 1, + DISPID_SDKEnumKeys = DISPID_SDKDeleteValue + 1, + DISPID_SDKEnumValues = DISPID_SDKEnumKeys + 1 + } DISPID_SpeechDataKey; + +typedef /* [hidden] */ +enum DISPID_SpeechObjectToken + { DISPID_SOTId = 1, + DISPID_SOTDataKey = DISPID_SOTId + 1, + DISPID_SOTCategory = DISPID_SOTDataKey + 1, + DISPID_SOTGetDescription = DISPID_SOTCategory + 1, + DISPID_SOTSetId = DISPID_SOTGetDescription + 1, + DISPID_SOTGetAttribute = DISPID_SOTSetId + 1, + DISPID_SOTCreateInstance = DISPID_SOTGetAttribute + 1, + DISPID_SOTRemove = DISPID_SOTCreateInstance + 1, + DISPID_SOTGetStorageFileName = DISPID_SOTRemove + 1, + DISPID_SOTRemoveStorageFileName = DISPID_SOTGetStorageFileName + 1, + DISPID_SOTIsUISupported = DISPID_SOTRemoveStorageFileName + 1, + DISPID_SOTDisplayUI = DISPID_SOTIsUISupported + 1, + DISPID_SOTMatchesAttributes = DISPID_SOTDisplayUI + 1 + } DISPID_SpeechObjectToken; + +typedef +enum SpeechDataKeyLocation + { SDKLDefaultLocation = SPDKL_DefaultLocation, + SDKLCurrentUser = SPDKL_CurrentUser, + SDKLLocalMachine = SPDKL_LocalMachine, + SDKLCurrentConfig = SPDKL_CurrentConfig + } SpeechDataKeyLocation; + +typedef +enum SpeechTokenContext + { STCInprocServer = CLSCTX_INPROC_SERVER, + STCInprocHandler = CLSCTX_INPROC_HANDLER, + STCLocalServer = CLSCTX_LOCAL_SERVER, + STCRemoteServer = CLSCTX_REMOTE_SERVER, + STCAll = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER + } SpeechTokenContext; + +typedef +enum SpeechTokenShellFolder + { STSF_AppData = 0x1a, + STSF_LocalAppData = 0x1c, + STSF_CommonAppData = 0x23, + STSF_FlagCreate = 0x8000 + } SpeechTokenShellFolder; + +typedef /* [hidden] */ +enum DISPID_SpeechObjectTokens + { DISPID_SOTsCount = 1, + DISPID_SOTsItem = DISPID_VALUE, + DISPID_SOTs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechObjectTokens; + +typedef /* [hidden] */ +enum DISPID_SpeechObjectTokenCategory + { DISPID_SOTCId = 1, + DISPID_SOTCDefault = DISPID_SOTCId + 1, + DISPID_SOTCSetId = DISPID_SOTCDefault + 1, + DISPID_SOTCGetDataKey = DISPID_SOTCSetId + 1, + DISPID_SOTCEnumerateTokens = DISPID_SOTCGetDataKey + 1 + } DISPID_SpeechObjectTokenCategory; + +typedef +enum SpeechAudioFormatType + { SAFTDefault = -1, + SAFTNoAssignedFormat = 0, + SAFTText = SAFTNoAssignedFormat + 1, + SAFTNonStandardFormat = SAFTText + 1, + SAFTExtendedAudioFormat = SAFTNonStandardFormat + 1, + SAFT8kHz8BitMono = SAFTExtendedAudioFormat + 1, + SAFT8kHz8BitStereo = SAFT8kHz8BitMono + 1, + SAFT8kHz16BitMono = SAFT8kHz8BitStereo + 1, + SAFT8kHz16BitStereo = SAFT8kHz16BitMono + 1, + SAFT11kHz8BitMono = SAFT8kHz16BitStereo + 1, + SAFT11kHz8BitStereo = SAFT11kHz8BitMono + 1, + SAFT11kHz16BitMono = SAFT11kHz8BitStereo + 1, + SAFT11kHz16BitStereo = SAFT11kHz16BitMono + 1, + SAFT12kHz8BitMono = SAFT11kHz16BitStereo + 1, + SAFT12kHz8BitStereo = SAFT12kHz8BitMono + 1, + SAFT12kHz16BitMono = SAFT12kHz8BitStereo + 1, + SAFT12kHz16BitStereo = SAFT12kHz16BitMono + 1, + SAFT16kHz8BitMono = SAFT12kHz16BitStereo + 1, + SAFT16kHz8BitStereo = SAFT16kHz8BitMono + 1, + SAFT16kHz16BitMono = SAFT16kHz8BitStereo + 1, + SAFT16kHz16BitStereo = SAFT16kHz16BitMono + 1, + SAFT22kHz8BitMono = SAFT16kHz16BitStereo + 1, + SAFT22kHz8BitStereo = SAFT22kHz8BitMono + 1, + SAFT22kHz16BitMono = SAFT22kHz8BitStereo + 1, + SAFT22kHz16BitStereo = SAFT22kHz16BitMono + 1, + SAFT24kHz8BitMono = SAFT22kHz16BitStereo + 1, + SAFT24kHz8BitStereo = SAFT24kHz8BitMono + 1, + SAFT24kHz16BitMono = SAFT24kHz8BitStereo + 1, + SAFT24kHz16BitStereo = SAFT24kHz16BitMono + 1, + SAFT32kHz8BitMono = SAFT24kHz16BitStereo + 1, + SAFT32kHz8BitStereo = SAFT32kHz8BitMono + 1, + SAFT32kHz16BitMono = SAFT32kHz8BitStereo + 1, + SAFT32kHz16BitStereo = SAFT32kHz16BitMono + 1, + SAFT44kHz8BitMono = SAFT32kHz16BitStereo + 1, + SAFT44kHz8BitStereo = SAFT44kHz8BitMono + 1, + SAFT44kHz16BitMono = SAFT44kHz8BitStereo + 1, + SAFT44kHz16BitStereo = SAFT44kHz16BitMono + 1, + SAFT48kHz8BitMono = SAFT44kHz16BitStereo + 1, + SAFT48kHz8BitStereo = SAFT48kHz8BitMono + 1, + SAFT48kHz16BitMono = SAFT48kHz8BitStereo + 1, + SAFT48kHz16BitStereo = SAFT48kHz16BitMono + 1, + SAFTTrueSpeech_8kHz1BitMono = SAFT48kHz16BitStereo + 1, + SAFTCCITT_ALaw_8kHzMono = SAFTTrueSpeech_8kHz1BitMono + 1, + SAFTCCITT_ALaw_8kHzStereo = SAFTCCITT_ALaw_8kHzMono + 1, + SAFTCCITT_ALaw_11kHzMono = SAFTCCITT_ALaw_8kHzStereo + 1, + SAFTCCITT_ALaw_11kHzStereo = SAFTCCITT_ALaw_11kHzMono + 1, + SAFTCCITT_ALaw_22kHzMono = SAFTCCITT_ALaw_11kHzStereo + 1, + SAFTCCITT_ALaw_22kHzStereo = SAFTCCITT_ALaw_22kHzMono + 1, + SAFTCCITT_ALaw_44kHzMono = SAFTCCITT_ALaw_22kHzStereo + 1, + SAFTCCITT_ALaw_44kHzStereo = SAFTCCITT_ALaw_44kHzMono + 1, + SAFTCCITT_uLaw_8kHzMono = SAFTCCITT_ALaw_44kHzStereo + 1, + SAFTCCITT_uLaw_8kHzStereo = SAFTCCITT_uLaw_8kHzMono + 1, + SAFTCCITT_uLaw_11kHzMono = SAFTCCITT_uLaw_8kHzStereo + 1, + SAFTCCITT_uLaw_11kHzStereo = SAFTCCITT_uLaw_11kHzMono + 1, + SAFTCCITT_uLaw_22kHzMono = SAFTCCITT_uLaw_11kHzStereo + 1, + SAFTCCITT_uLaw_22kHzStereo = SAFTCCITT_uLaw_22kHzMono + 1, + SAFTCCITT_uLaw_44kHzMono = SAFTCCITT_uLaw_22kHzStereo + 1, + SAFTCCITT_uLaw_44kHzStereo = SAFTCCITT_uLaw_44kHzMono + 1, + SAFTADPCM_8kHzMono = SAFTCCITT_uLaw_44kHzStereo + 1, + SAFTADPCM_8kHzStereo = SAFTADPCM_8kHzMono + 1, + SAFTADPCM_11kHzMono = SAFTADPCM_8kHzStereo + 1, + SAFTADPCM_11kHzStereo = SAFTADPCM_11kHzMono + 1, + SAFTADPCM_22kHzMono = SAFTADPCM_11kHzStereo + 1, + SAFTADPCM_22kHzStereo = SAFTADPCM_22kHzMono + 1, + SAFTADPCM_44kHzMono = SAFTADPCM_22kHzStereo + 1, + SAFTADPCM_44kHzStereo = SAFTADPCM_44kHzMono + 1, + SAFTGSM610_8kHzMono = SAFTADPCM_44kHzStereo + 1, + SAFTGSM610_11kHzMono = SAFTGSM610_8kHzMono + 1, + SAFTGSM610_22kHzMono = SAFTGSM610_11kHzMono + 1, + SAFTGSM610_44kHzMono = SAFTGSM610_22kHzMono + 1 + } SpeechAudioFormatType; + +typedef /* [hidden] */ +enum DISPID_SpeechAudioFormat + { DISPID_SAFType = 1, + DISPID_SAFGuid = DISPID_SAFType + 1, + DISPID_SAFGetWaveFormatEx = DISPID_SAFGuid + 1, + DISPID_SAFSetWaveFormatEx = DISPID_SAFGetWaveFormatEx + 1 + } DISPID_SpeechAudioFormat; + +typedef /* [hidden] */ +enum DISPID_SpeechBaseStream + { DISPID_SBSFormat = 1, + DISPID_SBSRead = DISPID_SBSFormat + 1, + DISPID_SBSWrite = DISPID_SBSRead + 1, + DISPID_SBSSeek = DISPID_SBSWrite + 1 + } DISPID_SpeechBaseStream; + +typedef +enum SpeechStreamSeekPositionType + { SSSPTRelativeToStart = STREAM_SEEK_SET, + SSSPTRelativeToCurrentPosition = STREAM_SEEK_CUR, + SSSPTRelativeToEnd = STREAM_SEEK_END + } SpeechStreamSeekPositionType; + +typedef /* [hidden] */ +enum DISPID_SpeechAudio + { DISPID_SAStatus = 200, + DISPID_SABufferInfo = DISPID_SAStatus + 1, + DISPID_SADefaultFormat = DISPID_SABufferInfo + 1, + DISPID_SAVolume = DISPID_SADefaultFormat + 1, + DISPID_SABufferNotifySize = DISPID_SAVolume + 1, + DISPID_SAEventHandle = DISPID_SABufferNotifySize + 1, + DISPID_SASetState = DISPID_SAEventHandle + 1 + } DISPID_SpeechAudio; + +typedef +enum SpeechAudioState + { SASClosed = SPAS_CLOSED, + SASStop = SPAS_STOP, + SASPause = SPAS_PAUSE, + SASRun = SPAS_RUN + } SpeechAudioState; + +typedef /* [hidden] */ +enum DISPID_SpeechMMSysAudio + { DISPID_SMSADeviceId = 300, + DISPID_SMSALineId = DISPID_SMSADeviceId + 1, + DISPID_SMSAMMHandle = DISPID_SMSALineId + 1 + } DISPID_SpeechMMSysAudio; + +typedef /* [hidden] */ +enum DISPID_SpeechFileStream + { DISPID_SFSOpen = 100, + DISPID_SFSClose = DISPID_SFSOpen + 1 + } DISPID_SpeechFileStream; + +typedef +enum SpeechStreamFileMode + { SSFMOpenForRead = SPFM_OPEN_READONLY, + SSFMOpenReadWrite = SPFM_OPEN_READWRITE, + SSFMCreate = SPFM_CREATE, + SSFMCreateForWrite = SPFM_CREATE_ALWAYS + } SpeechStreamFileMode; + +typedef /* [hidden] */ +enum DISPID_SpeechCustomStream + { DISPID_SCSBaseStream = 100 + } DISPID_SpeechCustomStream; + +typedef /* [hidden] */ +enum DISPID_SpeechMemoryStream + { DISPID_SMSSetData = 100, + DISPID_SMSGetData = DISPID_SMSSetData + 1 + } DISPID_SpeechMemoryStream; + +typedef /* [hidden] */ +enum DISPID_SpeechAudioStatus + { DISPID_SASFreeBufferSpace = 1, + DISPID_SASNonBlockingIO = DISPID_SASFreeBufferSpace + 1, + DISPID_SASState = DISPID_SASNonBlockingIO + 1, + DISPID_SASCurrentSeekPosition = DISPID_SASState + 1, + DISPID_SASCurrentDevicePosition = DISPID_SASCurrentSeekPosition + 1 + } DISPID_SpeechAudioStatus; + +typedef /* [hidden] */ +enum DISPID_SpeechAudioBufferInfo + { DISPID_SABIMinNotification = 1, + DISPID_SABIBufferSize = DISPID_SABIMinNotification + 1, + DISPID_SABIEventBias = DISPID_SABIBufferSize + 1 + } DISPID_SpeechAudioBufferInfo; + +typedef /* [hidden] */ +enum DISPID_SpeechWaveFormatEx + { DISPID_SWFEFormatTag = 1, + DISPID_SWFEChannels = DISPID_SWFEFormatTag + 1, + DISPID_SWFESamplesPerSec = DISPID_SWFEChannels + 1, + DISPID_SWFEAvgBytesPerSec = DISPID_SWFESamplesPerSec + 1, + DISPID_SWFEBlockAlign = DISPID_SWFEAvgBytesPerSec + 1, + DISPID_SWFEBitsPerSample = DISPID_SWFEBlockAlign + 1, + DISPID_SWFEExtraData = DISPID_SWFEBitsPerSample + 1 + } DISPID_SpeechWaveFormatEx; + +typedef /* [hidden] */ +enum DISPID_SpeechVoice + { DISPID_SVStatus = 1, + DISPID_SVVoice = DISPID_SVStatus + 1, + DISPID_SVAudioOutput = DISPID_SVVoice + 1, + DISPID_SVAudioOutputStream = DISPID_SVAudioOutput + 1, + DISPID_SVRate = DISPID_SVAudioOutputStream + 1, + DISPID_SVVolume = DISPID_SVRate + 1, + DISPID_SVAllowAudioOuputFormatChangesOnNextSet = DISPID_SVVolume + 1, + DISPID_SVEventInterests = DISPID_SVAllowAudioOuputFormatChangesOnNextSet + 1, + DISPID_SVPriority = DISPID_SVEventInterests + 1, + DISPID_SVAlertBoundary = DISPID_SVPriority + 1, + DISPID_SVSyncronousSpeakTimeout = DISPID_SVAlertBoundary + 1, + DISPID_SVSpeak = DISPID_SVSyncronousSpeakTimeout + 1, + DISPID_SVSpeakStream = DISPID_SVSpeak + 1, + DISPID_SVPause = DISPID_SVSpeakStream + 1, + DISPID_SVResume = DISPID_SVPause + 1, + DISPID_SVSkip = DISPID_SVResume + 1, + DISPID_SVGetVoices = DISPID_SVSkip + 1, + DISPID_SVGetAudioOutputs = DISPID_SVGetVoices + 1, + DISPID_SVWaitUntilDone = DISPID_SVGetAudioOutputs + 1, + DISPID_SVSpeakCompleteEvent = DISPID_SVWaitUntilDone + 1, + DISPID_SVIsUISupported = DISPID_SVSpeakCompleteEvent + 1, + DISPID_SVDisplayUI = DISPID_SVIsUISupported + 1 + } DISPID_SpeechVoice; + +typedef +enum SpeechVoicePriority + { SVPNormal = SPVPRI_NORMAL, + SVPAlert = SPVPRI_ALERT, + SVPOver = SPVPRI_OVER + } SpeechVoicePriority; + +typedef +enum SpeechVoiceSpeakFlags + { SVSFDefault = SPF_DEFAULT, + SVSFlagsAsync = SPF_ASYNC, + SVSFPurgeBeforeSpeak = SPF_PURGEBEFORESPEAK, + SVSFIsFilename = SPF_IS_FILENAME, + SVSFIsXML = SPF_IS_XML, + SVSFIsNotXML = SPF_IS_NOT_XML, + SVSFPersistXML = SPF_PERSIST_XML, + SVSFNLPSpeakPunc = SPF_NLP_SPEAK_PUNC, + SVSFNLPMask = SPF_NLP_MASK, + SVSFVoiceMask = SPF_VOICE_MASK, + SVSFUnusedFlags = SPF_UNUSED_FLAGS + } SpeechVoiceSpeakFlags; + +typedef +enum SpeechVoiceEvents + { SVEStartInputStream = 1L << 1, + SVEEndInputStream = 1L << 2, + SVEVoiceChange = 1L << 3, + SVEBookmark = 1L << 4, + SVEWordBoundary = 1L << 5, + SVEPhoneme = 1L << 6, + SVESentenceBoundary = 1L << 7, + SVEViseme = 1L << 8, + SVEAudioLevel = 1L << 9, + SVEPrivate = 1L << 15, + SVEAllEvents = 0x83fe + } SpeechVoiceEvents; + +typedef /* [hidden] */ +enum DISPID_SpeechVoiceStatus + { DISPID_SVSCurrentStreamNumber = 1, + DISPID_SVSLastStreamNumberQueued = DISPID_SVSCurrentStreamNumber + 1, + DISPID_SVSLastResult = DISPID_SVSLastStreamNumberQueued + 1, + DISPID_SVSRunningState = DISPID_SVSLastResult + 1, + DISPID_SVSInputWordPosition = DISPID_SVSRunningState + 1, + DISPID_SVSInputWordLength = DISPID_SVSInputWordPosition + 1, + DISPID_SVSInputSentencePosition = DISPID_SVSInputWordLength + 1, + DISPID_SVSInputSentenceLength = DISPID_SVSInputSentencePosition + 1, + DISPID_SVSLastBookmark = DISPID_SVSInputSentenceLength + 1, + DISPID_SVSLastBookmarkId = DISPID_SVSLastBookmark + 1, + DISPID_SVSPhonemeId = DISPID_SVSLastBookmarkId + 1, + DISPID_SVSVisemeId = DISPID_SVSPhonemeId + 1 + } DISPID_SpeechVoiceStatus; + +typedef +enum SpeechRunState + { SRSEDone = SPRS_DONE, + SRSEIsSpeaking = SPRS_IS_SPEAKING + } SpeechRunState; + +typedef +enum SpeechVisemeType + { SVP_0 = 0, + SVP_1 = SVP_0 + 1, + SVP_2 = SVP_1 + 1, + SVP_3 = SVP_2 + 1, + SVP_4 = SVP_3 + 1, + SVP_5 = SVP_4 + 1, + SVP_6 = SVP_5 + 1, + SVP_7 = SVP_6 + 1, + SVP_8 = SVP_7 + 1, + SVP_9 = SVP_8 + 1, + SVP_10 = SVP_9 + 1, + SVP_11 = SVP_10 + 1, + SVP_12 = SVP_11 + 1, + SVP_13 = SVP_12 + 1, + SVP_14 = SVP_13 + 1, + SVP_15 = SVP_14 + 1, + SVP_16 = SVP_15 + 1, + SVP_17 = SVP_16 + 1, + SVP_18 = SVP_17 + 1, + SVP_19 = SVP_18 + 1, + SVP_20 = SVP_19 + 1, + SVP_21 = SVP_20 + 1 + } SpeechVisemeType; + +typedef +enum SpeechVisemeFeature + { SVF_None = 0, + SVF_Stressed = SPVFEATURE_STRESSED, + SVF_Emphasis = SPVFEATURE_EMPHASIS + } SpeechVisemeFeature; + +typedef /* [hidden] */ +enum DISPID_SpeechVoiceEvent + { DISPID_SVEStreamStart = 1, + DISPID_SVEStreamEnd = DISPID_SVEStreamStart + 1, + DISPID_SVEVoiceChange = DISPID_SVEStreamEnd + 1, + DISPID_SVEBookmark = DISPID_SVEVoiceChange + 1, + DISPID_SVEWord = DISPID_SVEBookmark + 1, + DISPID_SVEPhoneme = DISPID_SVEWord + 1, + DISPID_SVESentenceBoundary = DISPID_SVEPhoneme + 1, + DISPID_SVEViseme = DISPID_SVESentenceBoundary + 1, + DISPID_SVEAudioLevel = DISPID_SVEViseme + 1, + DISPID_SVEEnginePrivate = DISPID_SVEAudioLevel + 1 + } DISPID_SpeechVoiceEvent; + +typedef /* [hidden] */ +enum DISPID_SpeechRecognizer + { DISPID_SRRecognizer = 1, + DISPID_SRAllowAudioInputFormatChangesOnNextSet = DISPID_SRRecognizer + 1, + DISPID_SRAudioInput = DISPID_SRAllowAudioInputFormatChangesOnNextSet + 1, + DISPID_SRAudioInputStream = DISPID_SRAudioInput + 1, + DISPID_SRIsShared = DISPID_SRAudioInputStream + 1, + DISPID_SRState = DISPID_SRIsShared + 1, + DISPID_SRStatus = DISPID_SRState + 1, + DISPID_SRProfile = DISPID_SRStatus + 1, + DISPID_SREmulateRecognition = DISPID_SRProfile + 1, + DISPID_SRCreateRecoContext = DISPID_SREmulateRecognition + 1, + DISPID_SRGetFormat = DISPID_SRCreateRecoContext + 1, + DISPID_SRSetPropertyNumber = DISPID_SRGetFormat + 1, + DISPID_SRGetPropertyNumber = DISPID_SRSetPropertyNumber + 1, + DISPID_SRSetPropertyString = DISPID_SRGetPropertyNumber + 1, + DISPID_SRGetPropertyString = DISPID_SRSetPropertyString + 1, + DISPID_SRIsUISupported = DISPID_SRGetPropertyString + 1, + DISPID_SRDisplayUI = DISPID_SRIsUISupported + 1, + DISPID_SRGetRecognizers = DISPID_SRDisplayUI + 1, + DISPID_SVGetAudioInputs = DISPID_SRGetRecognizers + 1, + DISPID_SVGetProfiles = DISPID_SVGetAudioInputs + 1 + } DISPID_SpeechRecognizer; + +typedef +enum SpeechRecognizerState + { SRSInactive = SPRST_INACTIVE, + SRSActive = SPRST_ACTIVE, + SRSActiveAlways = SPRST_ACTIVE_ALWAYS, + SRSInactiveWithPurge = SPRST_INACTIVE_WITH_PURGE + } SpeechRecognizerState; + +typedef +enum SpeechDisplayAttributes + { SDA_No_Trailing_Space = 0, + SDA_One_Trailing_Space = SPAF_ONE_TRAILING_SPACE, + SDA_Two_Trailing_Spaces = SPAF_TWO_TRAILING_SPACES, + SDA_Consume_Leading_Spaces = SPAF_CONSUME_LEADING_SPACES + } SpeechDisplayAttributes; + +typedef +enum SpeechFormatType + { SFTInput = SPWF_INPUT, + SFTSREngine = SPWF_SRENGINE + } SpeechFormatType; + +typedef /* [hidden] */ +enum DISPID_SpeechRecognizerStatus + { DISPID_SRSAudioStatus = 1, + DISPID_SRSCurrentStreamPosition = DISPID_SRSAudioStatus + 1, + DISPID_SRSCurrentStreamNumber = DISPID_SRSCurrentStreamPosition + 1, + DISPID_SRSNumberOfActiveRules = DISPID_SRSCurrentStreamNumber + 1, + DISPID_SRSClsidEngine = DISPID_SRSNumberOfActiveRules + 1, + DISPID_SRSSupportedLanguages = DISPID_SRSClsidEngine + 1 + } DISPID_SpeechRecognizerStatus; + +typedef /* [hidden] */ +enum DISPID_SpeechRecoContext + { DISPID_SRCRecognizer = 1, + DISPID_SRCAudioInInterferenceStatus = DISPID_SRCRecognizer + 1, + DISPID_SRCRequestedUIType = DISPID_SRCAudioInInterferenceStatus + 1, + DISPID_SRCVoice = DISPID_SRCRequestedUIType + 1, + DISPID_SRAllowVoiceFormatMatchingOnNextSet = DISPID_SRCVoice + 1, + DISPID_SRCVoicePurgeEvent = DISPID_SRAllowVoiceFormatMatchingOnNextSet + 1, + DISPID_SRCEventInterests = DISPID_SRCVoicePurgeEvent + 1, + DISPID_SRCCmdMaxAlternates = DISPID_SRCEventInterests + 1, + DISPID_SRCState = DISPID_SRCCmdMaxAlternates + 1, + DISPID_SRCRetainedAudio = DISPID_SRCState + 1, + DISPID_SRCRetainedAudioFormat = DISPID_SRCRetainedAudio + 1, + DISPID_SRCPause = DISPID_SRCRetainedAudioFormat + 1, + DISPID_SRCResume = DISPID_SRCPause + 1, + DISPID_SRCCreateGrammar = DISPID_SRCResume + 1, + DISPID_SRCCreateResultFromMemory = DISPID_SRCCreateGrammar + 1, + DISPID_SRCBookmark = DISPID_SRCCreateResultFromMemory + 1, + DISPID_SRCSetAdaptationData = DISPID_SRCBookmark + 1 + } DISPID_SpeechRecoContext; + +typedef +enum SpeechRetainedAudioOptions + { SRAONone = SPAO_NONE, + SRAORetainAudio = SPAO_RETAIN_AUDIO + } SpeechRetainedAudioOptions; + +typedef +enum SpeechBookmarkOptions + { SBONone = SPBO_NONE, + SBOPause = SPBO_PAUSE + } SpeechBookmarkOptions; + +typedef +enum SpeechInterference + { SINone = SPINTERFERENCE_NONE, + SINoise = SPINTERFERENCE_NOISE, + SINoSignal = SPINTERFERENCE_NOSIGNAL, + SITooLoud = SPINTERFERENCE_TOOLOUD, + SITooQuiet = SPINTERFERENCE_TOOQUIET, + SITooFast = SPINTERFERENCE_TOOFAST, + SITooSlow = SPINTERFERENCE_TOOSLOW + } SpeechInterference; + +typedef +enum SpeechRecoEvents + { SREStreamEnd = 1L << 0, + SRESoundStart = 1L << 1, + SRESoundEnd = 1L << 2, + SREPhraseStart = 1L << 3, + SRERecognition = 1L << 4, + SREHypothesis = 1L << 5, + SREBookmark = 1L << 6, + SREPropertyNumChange = 1L << 7, + SREPropertyStringChange = 1L << 8, + SREFalseRecognition = 1L << 9, + SREInterference = 1L << 10, + SRERequestUI = 1L << 11, + SREStateChange = 1L << 12, + SREAdaptation = 1L << 13, + SREStreamStart = 1L << 14, + SRERecoOtherContext = 1L << 15, + SREAudioLevel = 1L << 16, + SREPrivate = 1L << 18, + SREAllEvents = 0x5ffff + } SpeechRecoEvents; + +typedef +enum SpeechRecoContextState + { SRCS_Disabled = SPCS_DISABLED, + SRCS_Enabled = SPCS_ENABLED + } SpeechRecoContextState; + +typedef /* [hidden] */ +enum DISPIDSPRG + { DISPID_SRGId = 1, + DISPID_SRGRecoContext = DISPID_SRGId + 1, + DISPID_SRGState = DISPID_SRGRecoContext + 1, + DISPID_SRGRules = DISPID_SRGState + 1, + DISPID_SRGReset = DISPID_SRGRules + 1, + DISPID_SRGCommit = DISPID_SRGReset + 1, + DISPID_SRGCmdLoadFromFile = DISPID_SRGCommit + 1, + DISPID_SRGCmdLoadFromObject = DISPID_SRGCmdLoadFromFile + 1, + DISPID_SRGCmdLoadFromResource = DISPID_SRGCmdLoadFromObject + 1, + DISPID_SRGCmdLoadFromMemory = DISPID_SRGCmdLoadFromResource + 1, + DISPID_SRGCmdLoadFromProprietaryGrammar = DISPID_SRGCmdLoadFromMemory + 1, + DISPID_SRGCmdSetRuleState = DISPID_SRGCmdLoadFromProprietaryGrammar + 1, + DISPID_SRGCmdSetRuleIdState = DISPID_SRGCmdSetRuleState + 1, + DISPID_SRGDictationLoad = DISPID_SRGCmdSetRuleIdState + 1, + DISPID_SRGDictationUnload = DISPID_SRGDictationLoad + 1, + DISPID_SRGDictationSetState = DISPID_SRGDictationUnload + 1, + DISPID_SRGSetWordSequenceData = DISPID_SRGDictationSetState + 1, + DISPID_SRGSetTextSelection = DISPID_SRGSetWordSequenceData + 1, + DISPID_SRGIsPronounceable = DISPID_SRGSetTextSelection + 1 + } DISPIDSPRG; + +typedef +enum SpeechLoadOption + { SLOStatic = SPLO_STATIC, + SLODynamic = SPLO_DYNAMIC + } SpeechLoadOption; + +typedef +enum SpeechWordPronounceable + { SWPUnknownWordUnpronounceable = SPWP_UNKNOWN_WORD_UNPRONOUNCEABLE, + SWPUnknownWordPronounceable = SPWP_UNKNOWN_WORD_PRONOUNCEABLE, + SWPKnownWordPronounceable = SPWP_KNOWN_WORD_PRONOUNCEABLE + } SpeechWordPronounceable; + +typedef +enum SpeechGrammarState + { SGSEnabled = SPGS_ENABLED, + SGSDisabled = SPGS_DISABLED, + SGSExclusive = SPGS_EXCLUSIVE + } SpeechGrammarState; + +typedef +enum SpeechRuleState + { SGDSInactive = SPRS_INACTIVE, + SGDSActive = SPRS_ACTIVE, + SGDSActiveWithAutoPause = SPRS_ACTIVE_WITH_AUTO_PAUSE + } SpeechRuleState; + +typedef +enum SpeechRuleAttributes + { SRATopLevel = SPRAF_TopLevel, + SRADefaultToActive = SPRAF_Active, + SRAExport = SPRAF_Export, + SRAImport = SPRAF_Import, + SRAInterpreter = SPRAF_Interpreter, + SRADynamic = SPRAF_Dynamic + } SpeechRuleAttributes; + +typedef +enum SpeechGrammarWordType + { SGDisplay = SPWT_DISPLAY, + SGLexical = SPWT_LEXICAL, + SGPronounciation = SPWT_PRONUNCIATION + } SpeechGrammarWordType; + +typedef /* [hidden] */ +enum DISPID_SpeechRecoContextEvents + { DISPID_SRCEStartStream = 1, + DISPID_SRCEEndStream = DISPID_SRCEStartStream + 1, + DISPID_SRCEBookmark = DISPID_SRCEEndStream + 1, + DISPID_SRCESoundStart = DISPID_SRCEBookmark + 1, + DISPID_SRCESoundEnd = DISPID_SRCESoundStart + 1, + DISPID_SRCEPhraseStart = DISPID_SRCESoundEnd + 1, + DISPID_SRCERecognition = DISPID_SRCEPhraseStart + 1, + DISPID_SRCEHypothesis = DISPID_SRCERecognition + 1, + DISPID_SRCEPropertyNumberChange = DISPID_SRCEHypothesis + 1, + DISPID_SRCEPropertyStringChange = DISPID_SRCEPropertyNumberChange + 1, + DISPID_SRCEFalseRecognition = DISPID_SRCEPropertyStringChange + 1, + DISPID_SRCEInterference = DISPID_SRCEFalseRecognition + 1, + DISPID_SRCERequestUI = DISPID_SRCEInterference + 1, + DISPID_SRCERecognizerStateChange = DISPID_SRCERequestUI + 1, + DISPID_SRCEAdaptation = DISPID_SRCERecognizerStateChange + 1, + DISPID_SRCERecognitionForOtherContext = DISPID_SRCEAdaptation + 1, + DISPID_SRCEAudioLevel = DISPID_SRCERecognitionForOtherContext + 1, + DISPID_SRCEEnginePrivate = DISPID_SRCEAudioLevel + 1 + } DISPID_SpeechRecoContextEvents; + +typedef +enum SpeechRecognitionType + { SRTStandard = 0, + SRTAutopause = SPREF_AutoPause, + SRTEmulated = SPREF_Emulated + } SpeechRecognitionType; + +typedef /* [hidden] */ +enum DISPID_SpeechGrammarRule + { DISPID_SGRAttributes = 1, + DISPID_SGRInitialState = DISPID_SGRAttributes + 1, + DISPID_SGRName = DISPID_SGRInitialState + 1, + DISPID_SGRId = DISPID_SGRName + 1, + DISPID_SGRClear = DISPID_SGRId + 1, + DISPID_SGRAddResource = DISPID_SGRClear + 1, + DISPID_SGRAddState = DISPID_SGRAddResource + 1 + } DISPID_SpeechGrammarRule; + +typedef /* [hidden] */ +enum DISPID_SpeechGrammarRules + { DISPID_SGRsCount = 1, + DISPID_SGRsDynamic = DISPID_SGRsCount + 1, + DISPID_SGRsAdd = DISPID_SGRsDynamic + 1, + DISPID_SGRsCommit = DISPID_SGRsAdd + 1, + DISPID_SGRsCommitAndSave = DISPID_SGRsCommit + 1, + DISPID_SGRsFindRule = DISPID_SGRsCommitAndSave + 1, + DISPID_SGRsItem = DISPID_VALUE, + DISPID_SGRs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechGrammarRules; + +typedef /* [hidden] */ +enum DISPID_SpeechGrammarRuleState + { DISPID_SGRSRule = 1, + DISPID_SGRSTransitions = DISPID_SGRSRule + 1, + DISPID_SGRSAddWordTransition = DISPID_SGRSTransitions + 1, + DISPID_SGRSAddRuleTransition = DISPID_SGRSAddWordTransition + 1, + DISPID_SGRSAddSpecialTransition = DISPID_SGRSAddRuleTransition + 1 + } DISPID_SpeechGrammarRuleState; + +typedef +enum SpeechSpecialTransitionType + { SSTTWildcard = 1, + SSTTDictation = SSTTWildcard + 1, + SSTTTextBuffer = SSTTDictation + 1 + } SpeechSpecialTransitionType; + +typedef /* [hidden] */ +enum DISPID_SpeechGrammarRuleStateTransitions + { DISPID_SGRSTsCount = 1, + DISPID_SGRSTsItem = DISPID_VALUE, + DISPID_SGRSTs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechGrammarRuleStateTransitions; + +typedef /* [hidden] */ +enum DISPID_SpeechGrammarRuleStateTransition + { DISPID_SGRSTType = 1, + DISPID_SGRSTText = DISPID_SGRSTType + 1, + DISPID_SGRSTRule = DISPID_SGRSTText + 1, + DISPID_SGRSTWeight = DISPID_SGRSTRule + 1, + DISPID_SGRSTPropertyName = DISPID_SGRSTWeight + 1, + DISPID_SGRSTPropertyId = DISPID_SGRSTPropertyName + 1, + DISPID_SGRSTPropertyValue = DISPID_SGRSTPropertyId + 1, + DISPID_SGRSTNextState = DISPID_SGRSTPropertyValue + 1 + } DISPID_SpeechGrammarRuleStateTransition; + +typedef +enum SpeechGrammarRuleStateTransitionType + { SGRSTTEpsilon = 0, + SGRSTTWord = SGRSTTEpsilon + 1, + SGRSTTRule = SGRSTTWord + 1, + SGRSTTDictation = SGRSTTRule + 1, + SGRSTTWildcard = SGRSTTDictation + 1, + SGRSTTTextBuffer = SGRSTTWildcard + 1 + } SpeechGrammarRuleStateTransitionType; + +typedef /* [hidden] */ +enum DISPIDSPTSI + { DISPIDSPTSI_ActiveOffset = 1, + DISPIDSPTSI_ActiveLength = DISPIDSPTSI_ActiveOffset + 1, + DISPIDSPTSI_SelectionOffset = DISPIDSPTSI_ActiveLength + 1, + DISPIDSPTSI_SelectionLength = DISPIDSPTSI_SelectionOffset + 1 + } DISPIDSPTSI; + +typedef /* [hidden] */ +enum DISPID_SpeechRecoResult + { DISPID_SRRRecoContext = 1, + DISPID_SRRTimes = DISPID_SRRRecoContext + 1, + DISPID_SRRAudioFormat = DISPID_SRRTimes + 1, + DISPID_SRRPhraseInfo = DISPID_SRRAudioFormat + 1, + DISPID_SRRAlternates = DISPID_SRRPhraseInfo + 1, + DISPID_SRRAudio = DISPID_SRRAlternates + 1, + DISPID_SRRSpeakAudio = DISPID_SRRAudio + 1, + DISPID_SRRSaveToMemory = DISPID_SRRSpeakAudio + 1, + DISPID_SRRDiscardResultInfo = DISPID_SRRSaveToMemory + 1 + } DISPID_SpeechRecoResult; + +typedef +enum SpeechDiscardType + { SDTProperty = SPDF_PROPERTY, + SDTReplacement = SPDF_REPLACEMENT, + SDTRule = SPDF_RULE, + SDTDisplayText = SPDF_DISPLAYTEXT, + SDTLexicalForm = SPDF_LEXICALFORM, + SDTPronunciation = SPDF_PRONUNCIATION, + SDTAudio = SPDF_AUDIO, + SDTAlternates = SPDF_ALTERNATES, + SDTAll = SPDF_ALL + } SpeechDiscardType; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseBuilder + { DISPID_SPPBRestorePhraseFromMemory = 1 + } DISPID_SpeechPhraseBuilder; + +typedef /* [hidden] */ +enum DISPID_SpeechRecoResultTimes + { DISPID_SRRTStreamTime = 1, + DISPID_SRRTLength = DISPID_SRRTStreamTime + 1, + DISPID_SRRTTickCount = DISPID_SRRTLength + 1, + DISPID_SRRTOffsetFromStart = DISPID_SRRTTickCount + 1 + } DISPID_SpeechRecoResultTimes; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseAlternate + { DISPID_SPARecoResult = 1, + DISPID_SPAStartElementInResult = DISPID_SPARecoResult + 1, + DISPID_SPANumberOfElementsInResult = DISPID_SPAStartElementInResult + 1, + DISPID_SPAPhraseInfo = DISPID_SPANumberOfElementsInResult + 1, + DISPID_SPACommit = DISPID_SPAPhraseInfo + 1 + } DISPID_SpeechPhraseAlternate; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseAlternates + { DISPID_SPAsCount = 1, + DISPID_SPAsItem = DISPID_VALUE, + DISPID_SPAs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechPhraseAlternates; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseInfo + { DISPID_SPILanguageId = 1, + DISPID_SPIGrammarId = DISPID_SPILanguageId + 1, + DISPID_SPIStartTime = DISPID_SPIGrammarId + 1, + DISPID_SPIAudioStreamPosition = DISPID_SPIStartTime + 1, + DISPID_SPIAudioSizeBytes = DISPID_SPIAudioStreamPosition + 1, + DISPID_SPIRetainedSizeBytes = DISPID_SPIAudioSizeBytes + 1, + DISPID_SPIAudioSizeTime = DISPID_SPIRetainedSizeBytes + 1, + DISPID_SPIRule = DISPID_SPIAudioSizeTime + 1, + DISPID_SPIProperties = DISPID_SPIRule + 1, + DISPID_SPIElements = DISPID_SPIProperties + 1, + DISPID_SPIReplacements = DISPID_SPIElements + 1, + DISPID_SPIEngineId = DISPID_SPIReplacements + 1, + DISPID_SPIEnginePrivateData = DISPID_SPIEngineId + 1, + DISPID_SPISaveToMemory = DISPID_SPIEnginePrivateData + 1, + DISPID_SPIGetText = DISPID_SPISaveToMemory + 1, + DISPID_SPIGetDisplayAttributes = DISPID_SPIGetText + 1 + } DISPID_SpeechPhraseInfo; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseElement + { DISPID_SPEAudioTimeOffset = 1, + DISPID_SPEAudioSizeTime = DISPID_SPEAudioTimeOffset + 1, + DISPID_SPEAudioStreamOffset = DISPID_SPEAudioSizeTime + 1, + DISPID_SPEAudioSizeBytes = DISPID_SPEAudioStreamOffset + 1, + DISPID_SPERetainedStreamOffset = DISPID_SPEAudioSizeBytes + 1, + DISPID_SPERetainedSizeBytes = DISPID_SPERetainedStreamOffset + 1, + DISPID_SPEDisplayText = DISPID_SPERetainedSizeBytes + 1, + DISPID_SPELexicalForm = DISPID_SPEDisplayText + 1, + DISPID_SPEPronunciation = DISPID_SPELexicalForm + 1, + DISPID_SPEDisplayAttributes = DISPID_SPEPronunciation + 1, + DISPID_SPERequiredConfidence = DISPID_SPEDisplayAttributes + 1, + DISPID_SPEActualConfidence = DISPID_SPERequiredConfidence + 1, + DISPID_SPEEngineConfidence = DISPID_SPEActualConfidence + 1 + } DISPID_SpeechPhraseElement; + +typedef +enum SpeechEngineConfidence + { SECLowConfidence = -1, + SECNormalConfidence = 0, + SECHighConfidence = 1 + } SpeechEngineConfidence; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseElements + { DISPID_SPEsCount = 1, + DISPID_SPEsItem = DISPID_VALUE, + DISPID_SPEs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechPhraseElements; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseReplacement + { DISPID_SPRDisplayAttributes = 1, + DISPID_SPRText = DISPID_SPRDisplayAttributes + 1, + DISPID_SPRFirstElement = DISPID_SPRText + 1, + DISPID_SPRNumberOfElements = DISPID_SPRFirstElement + 1 + } DISPID_SpeechPhraseReplacement; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseReplacements + { DISPID_SPRsCount = 1, + DISPID_SPRsItem = DISPID_VALUE, + DISPID_SPRs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechPhraseReplacements; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseProperty + { DISPID_SPPName = 1, + DISPID_SPPId = DISPID_SPPName + 1, + DISPID_SPPValue = DISPID_SPPId + 1, + DISPID_SPPFirstElement = DISPID_SPPValue + 1, + DISPID_SPPNumberOfElements = DISPID_SPPFirstElement + 1, + DISPID_SPPEngineConfidence = DISPID_SPPNumberOfElements + 1, + DISPID_SPPConfidence = DISPID_SPPEngineConfidence + 1, + DISPID_SPPParent = DISPID_SPPConfidence + 1, + DISPID_SPPChildren = DISPID_SPPParent + 1 + } DISPID_SpeechPhraseProperty; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseProperties + { DISPID_SPPsCount = 1, + DISPID_SPPsItem = DISPID_VALUE, + DISPID_SPPs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechPhraseProperties; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseRule + { DISPID_SPRuleName = 1, + DISPID_SPRuleId = DISPID_SPRuleName + 1, + DISPID_SPRuleFirstElement = DISPID_SPRuleId + 1, + DISPID_SPRuleNumberOfElements = DISPID_SPRuleFirstElement + 1, + DISPID_SPRuleParent = DISPID_SPRuleNumberOfElements + 1, + DISPID_SPRuleChildren = DISPID_SPRuleParent + 1, + DISPID_SPRuleConfidence = DISPID_SPRuleChildren + 1, + DISPID_SPRuleEngineConfidence = DISPID_SPRuleConfidence + 1 + } DISPID_SpeechPhraseRule; + +typedef /* [hidden] */ +enum DISPID_SpeechPhraseRules + { DISPID_SPRulesCount = 1, + DISPID_SPRulesItem = DISPID_VALUE, + DISPID_SPRules_NewEnum = DISPID_NEWENUM + } DISPID_SpeechPhraseRules; + +typedef /* [hidden] */ +enum DISPID_SpeechLexicon + { DISPID_SLGenerationId = 1, + DISPID_SLGetWords = DISPID_SLGenerationId + 1, + DISPID_SLAddPronunciation = DISPID_SLGetWords + 1, + DISPID_SLAddPronunciationByPhoneIds = DISPID_SLAddPronunciation + 1, + DISPID_SLRemovePronunciation = DISPID_SLAddPronunciationByPhoneIds + 1, + DISPID_SLRemovePronunciationByPhoneIds = DISPID_SLRemovePronunciation + 1, + DISPID_SLGetPronunciations = DISPID_SLRemovePronunciationByPhoneIds + 1, + DISPID_SLGetGenerationChange = DISPID_SLGetPronunciations + 1 + } DISPID_SpeechLexicon; + +typedef +enum SpeechLexiconType + { SLTUser = eLEXTYPE_USER, + SLTApp = eLEXTYPE_APP + } SpeechLexiconType; + +typedef +enum SpeechPartOfSpeech + { SPSNotOverriden = SPPS_NotOverriden, + SPSUnknown = SPPS_Unknown, + SPSNoun = SPPS_Noun, + SPSVerb = SPPS_Verb, + SPSModifier = SPPS_Modifier, + SPSFunction = SPPS_Function, + SPSInterjection = SPPS_Interjection + } SpeechPartOfSpeech; + +typedef /* [hidden] */ +enum DISPID_SpeechLexiconWords + { DISPID_SLWsCount = 1, + DISPID_SLWsItem = DISPID_VALUE, + DISPID_SLWs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechLexiconWords; + +typedef +enum SpeechWordType + { SWTAdded = eWORDTYPE_ADDED, + SWTDeleted = eWORDTYPE_DELETED + } SpeechWordType; + +typedef /* [hidden] */ +enum DISPID_SpeechLexiconWord + { DISPID_SLWLangId = 1, + DISPID_SLWType = DISPID_SLWLangId + 1, + DISPID_SLWWord = DISPID_SLWType + 1, + DISPID_SLWPronunciations = DISPID_SLWWord + 1 + } DISPID_SpeechLexiconWord; + +typedef /* [hidden] */ +enum DISPID_SpeechLexiconProns + { DISPID_SLPsCount = 1, + DISPID_SLPsItem = DISPID_VALUE, + DISPID_SLPs_NewEnum = DISPID_NEWENUM + } DISPID_SpeechLexiconProns; + +typedef /* [hidden] */ +enum DISPID_SpeechLexiconPronunciation + { DISPID_SLPType = 1, + DISPID_SLPLangId = DISPID_SLPType + 1, + DISPID_SLPPartOfSpeech = DISPID_SLPLangId + 1, + DISPID_SLPPhoneIds = DISPID_SLPPartOfSpeech + 1, + DISPID_SLPSymbolic = DISPID_SLPPhoneIds + 1 + } DISPID_SpeechLexiconPronunciation; + +typedef /* [hidden] */ +enum DISPID_SpeechPhoneConverter + { DISPID_SPCLangId = 1, + DISPID_SPCPhoneToId = DISPID_SPCLangId + 1, + DISPID_SPCIdToPhone = DISPID_SPCPhoneToId + 1 + } DISPID_SpeechPhoneConverter; + + +EXTERN_C const IID LIBID_SpeechLib; + +#ifndef __ISpeechDataKey_INTERFACE_DEFINED__ +#define __ISpeechDataKey_INTERFACE_DEFINED__ + +/* interface ISpeechDataKey */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechDataKey; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CE17C09B-4EFA-44d5-A4C9-59D9585AB0CD") + ISpeechDataKey : public IDispatch + { + public: + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetBinaryValue( + /* [in] */ const BSTR ValueName, + /* [in] */ VARIANT Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetBinaryValue( + /* [in] */ const BSTR ValueName, + /* [retval][out] */ VARIANT *Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetStringValue( + /* [in] */ const BSTR ValueName, + /* [in] */ const BSTR Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetStringValue( + /* [in] */ const BSTR ValueName, + /* [retval][out] */ BSTR *Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetLongValue( + /* [in] */ const BSTR ValueName, + /* [in] */ long Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetLongValue( + /* [in] */ const BSTR ValueName, + /* [retval][out] */ long *Value) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE OpenKey( + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CreateKey( + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DeleteKey( + /* [in] */ const BSTR SubKeyName) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DeleteValue( + /* [in] */ const BSTR ValueName) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE EnumKeys( + /* [in] */ long Index, + /* [retval][out] */ BSTR *SubKeyName) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE EnumValues( + /* [in] */ long Index, + /* [retval][out] */ BSTR *ValueName) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechDataKeyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechDataKey * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechDataKey * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechDataKey * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechDataKey * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechDataKey * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechDataKey * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechDataKey * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetBinaryValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ VARIANT Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetBinaryValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ VARIANT *Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStringValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ const BSTR Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStringValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ BSTR *Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLongValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ long Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetLongValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ long *Value); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *OpenKey )( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateKey )( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DeleteKey )( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DeleteValue )( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnumKeys )( + ISpeechDataKey * This, + /* [in] */ long Index, + /* [retval][out] */ BSTR *SubKeyName); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnumValues )( + ISpeechDataKey * This, + /* [in] */ long Index, + /* [retval][out] */ BSTR *ValueName); + + END_INTERFACE + } ISpeechDataKeyVtbl; + + interface ISpeechDataKey + { + CONST_VTBL struct ISpeechDataKeyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechDataKey_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechDataKey_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechDataKey_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechDataKey_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechDataKey_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechDataKey_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechDataKey_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechDataKey_SetBinaryValue(This,ValueName,Value) \ + (This)->lpVtbl -> SetBinaryValue(This,ValueName,Value) + +#define ISpeechDataKey_GetBinaryValue(This,ValueName,Value) \ + (This)->lpVtbl -> GetBinaryValue(This,ValueName,Value) + +#define ISpeechDataKey_SetStringValue(This,ValueName,Value) \ + (This)->lpVtbl -> SetStringValue(This,ValueName,Value) + +#define ISpeechDataKey_GetStringValue(This,ValueName,Value) \ + (This)->lpVtbl -> GetStringValue(This,ValueName,Value) + +#define ISpeechDataKey_SetLongValue(This,ValueName,Value) \ + (This)->lpVtbl -> SetLongValue(This,ValueName,Value) + +#define ISpeechDataKey_GetLongValue(This,ValueName,Value) \ + (This)->lpVtbl -> GetLongValue(This,ValueName,Value) + +#define ISpeechDataKey_OpenKey(This,SubKeyName,SubKey) \ + (This)->lpVtbl -> OpenKey(This,SubKeyName,SubKey) + +#define ISpeechDataKey_CreateKey(This,SubKeyName,SubKey) \ + (This)->lpVtbl -> CreateKey(This,SubKeyName,SubKey) + +#define ISpeechDataKey_DeleteKey(This,SubKeyName) \ + (This)->lpVtbl -> DeleteKey(This,SubKeyName) + +#define ISpeechDataKey_DeleteValue(This,ValueName) \ + (This)->lpVtbl -> DeleteValue(This,ValueName) + +#define ISpeechDataKey_EnumKeys(This,Index,SubKeyName) \ + (This)->lpVtbl -> EnumKeys(This,Index,SubKeyName) + +#define ISpeechDataKey_EnumValues(This,Index,ValueName) \ + (This)->lpVtbl -> EnumValues(This,Index,ValueName) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_SetBinaryValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ VARIANT Value); + + +void __RPC_STUB ISpeechDataKey_SetBinaryValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_GetBinaryValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ VARIANT *Value); + + +void __RPC_STUB ISpeechDataKey_GetBinaryValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_SetStringValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ const BSTR Value); + + +void __RPC_STUB ISpeechDataKey_SetStringValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_GetStringValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ BSTR *Value); + + +void __RPC_STUB ISpeechDataKey_GetStringValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_SetLongValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [in] */ long Value); + + +void __RPC_STUB ISpeechDataKey_SetLongValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_GetLongValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName, + /* [retval][out] */ long *Value); + + +void __RPC_STUB ISpeechDataKey_GetLongValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_OpenKey_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey); + + +void __RPC_STUB ISpeechDataKey_OpenKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_CreateKey_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName, + /* [retval][out] */ ISpeechDataKey **SubKey); + + +void __RPC_STUB ISpeechDataKey_CreateKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_DeleteKey_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR SubKeyName); + + +void __RPC_STUB ISpeechDataKey_DeleteKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_DeleteValue_Proxy( + ISpeechDataKey * This, + /* [in] */ const BSTR ValueName); + + +void __RPC_STUB ISpeechDataKey_DeleteValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_EnumKeys_Proxy( + ISpeechDataKey * This, + /* [in] */ long Index, + /* [retval][out] */ BSTR *SubKeyName); + + +void __RPC_STUB ISpeechDataKey_EnumKeys_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechDataKey_EnumValues_Proxy( + ISpeechDataKey * This, + /* [in] */ long Index, + /* [retval][out] */ BSTR *ValueName); + + +void __RPC_STUB ISpeechDataKey_EnumValues_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechDataKey_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechObjectToken_INTERFACE_DEFINED__ +#define __ISpeechObjectToken_INTERFACE_DEFINED__ + +/* interface ISpeechObjectToken */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechObjectToken; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C74A3ADC-B727-4500-A84A-B526721C8B8C") + ISpeechObjectToken : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ BSTR *ObjectId) = 0; + + virtual /* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DataKey( + /* [retval][out] */ ISpeechDataKey **DataKey) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Category( + /* [retval][out] */ ISpeechObjectTokenCategory **Category) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetDescription( + /* [defaultvalue][in] */ long Locale, + /* [retval][out] */ BSTR *Description) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE SetId( + /* [in] */ BSTR Id, + /* [defaultvalue][in] */ BSTR CategoryID = L"", + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetAttribute( + /* [in] */ BSTR AttributeName, + /* [retval][out] */ BSTR *AttributeValue) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CreateInstance( + /* [defaultvalue][in] */ IUnknown *pUnkOuter, + /* [defaultvalue][in] */ SpeechTokenContext ClsContext, + /* [retval][out] */ IUnknown **Object) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE Remove( + /* [in] */ BSTR ObjectStorageCLSID) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE GetStorageFileName( + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ BSTR FileName, + /* [in] */ SpeechTokenShellFolder Folder, + /* [retval][out] */ BSTR *FilePath) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE RemoveStorageFileName( + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ VARIANT_BOOL DeleteFile) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [defaultvalue][in] */ IUnknown *Object, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ long hWnd, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData = 0, + /* [defaultvalue][in] */ IUnknown *Object = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE MatchesAttributes( + /* [in] */ BSTR Attributes, + /* [retval][out] */ VARIANT_BOOL *Matches) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechObjectTokenVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechObjectToken * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechObjectToken * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechObjectToken * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechObjectToken * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechObjectToken * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechObjectToken * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechObjectToken * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechObjectToken * This, + /* [retval][out] */ BSTR *ObjectId); + + /* [hidden][id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DataKey )( + ISpeechObjectToken * This, + /* [retval][out] */ ISpeechDataKey **DataKey); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Category )( + ISpeechObjectToken * This, + /* [retval][out] */ ISpeechObjectTokenCategory **Category); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDescription )( + ISpeechObjectToken * This, + /* [defaultvalue][in] */ long Locale, + /* [retval][out] */ BSTR *Description); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetId )( + ISpeechObjectToken * This, + /* [in] */ BSTR Id, + /* [defaultvalue][in] */ BSTR CategoryID, + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetAttribute )( + ISpeechObjectToken * This, + /* [in] */ BSTR AttributeName, + /* [retval][out] */ BSTR *AttributeValue); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateInstance )( + ISpeechObjectToken * This, + /* [defaultvalue][in] */ IUnknown *pUnkOuter, + /* [defaultvalue][in] */ SpeechTokenContext ClsContext, + /* [retval][out] */ IUnknown **Object); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Remove )( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStorageFileName )( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ BSTR FileName, + /* [in] */ SpeechTokenShellFolder Folder, + /* [retval][out] */ BSTR *FilePath); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveStorageFileName )( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ VARIANT_BOOL DeleteFile); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpeechObjectToken * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [defaultvalue][in] */ IUnknown *Object, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpeechObjectToken * This, + /* [in] */ long hWnd, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [defaultvalue][in] */ IUnknown *Object); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *MatchesAttributes )( + ISpeechObjectToken * This, + /* [in] */ BSTR Attributes, + /* [retval][out] */ VARIANT_BOOL *Matches); + + END_INTERFACE + } ISpeechObjectTokenVtbl; + + interface ISpeechObjectToken + { + CONST_VTBL struct ISpeechObjectTokenVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechObjectToken_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechObjectToken_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechObjectToken_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechObjectToken_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechObjectToken_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechObjectToken_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechObjectToken_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechObjectToken_get_Id(This,ObjectId) \ + (This)->lpVtbl -> get_Id(This,ObjectId) + +#define ISpeechObjectToken_get_DataKey(This,DataKey) \ + (This)->lpVtbl -> get_DataKey(This,DataKey) + +#define ISpeechObjectToken_get_Category(This,Category) \ + (This)->lpVtbl -> get_Category(This,Category) + +#define ISpeechObjectToken_GetDescription(This,Locale,Description) \ + (This)->lpVtbl -> GetDescription(This,Locale,Description) + +#define ISpeechObjectToken_SetId(This,Id,CategoryID,CreateIfNotExist) \ + (This)->lpVtbl -> SetId(This,Id,CategoryID,CreateIfNotExist) + +#define ISpeechObjectToken_GetAttribute(This,AttributeName,AttributeValue) \ + (This)->lpVtbl -> GetAttribute(This,AttributeName,AttributeValue) + +#define ISpeechObjectToken_CreateInstance(This,pUnkOuter,ClsContext,Object) \ + (This)->lpVtbl -> CreateInstance(This,pUnkOuter,ClsContext,Object) + +#define ISpeechObjectToken_Remove(This,ObjectStorageCLSID) \ + (This)->lpVtbl -> Remove(This,ObjectStorageCLSID) + +#define ISpeechObjectToken_GetStorageFileName(This,ObjectStorageCLSID,KeyName,FileName,Folder,FilePath) \ + (This)->lpVtbl -> GetStorageFileName(This,ObjectStorageCLSID,KeyName,FileName,Folder,FilePath) + +#define ISpeechObjectToken_RemoveStorageFileName(This,ObjectStorageCLSID,KeyName,DeleteFile) \ + (This)->lpVtbl -> RemoveStorageFileName(This,ObjectStorageCLSID,KeyName,DeleteFile) + +#define ISpeechObjectToken_IsUISupported(This,TypeOfUI,ExtraData,Object,Supported) \ + (This)->lpVtbl -> IsUISupported(This,TypeOfUI,ExtraData,Object,Supported) + +#define ISpeechObjectToken_DisplayUI(This,hWnd,Title,TypeOfUI,ExtraData,Object) \ + (This)->lpVtbl -> DisplayUI(This,hWnd,Title,TypeOfUI,ExtraData,Object) + +#define ISpeechObjectToken_MatchesAttributes(This,Attributes,Matches) \ + (This)->lpVtbl -> MatchesAttributes(This,Attributes,Matches) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_get_Id_Proxy( + ISpeechObjectToken * This, + /* [retval][out] */ BSTR *ObjectId); + + +void __RPC_STUB ISpeechObjectToken_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_get_DataKey_Proxy( + ISpeechObjectToken * This, + /* [retval][out] */ ISpeechDataKey **DataKey); + + +void __RPC_STUB ISpeechObjectToken_get_DataKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_get_Category_Proxy( + ISpeechObjectToken * This, + /* [retval][out] */ ISpeechObjectTokenCategory **Category); + + +void __RPC_STUB ISpeechObjectToken_get_Category_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_GetDescription_Proxy( + ISpeechObjectToken * This, + /* [defaultvalue][in] */ long Locale, + /* [retval][out] */ BSTR *Description); + + +void __RPC_STUB ISpeechObjectToken_GetDescription_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_SetId_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR Id, + /* [defaultvalue][in] */ BSTR CategoryID, + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist); + + +void __RPC_STUB ISpeechObjectToken_SetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_GetAttribute_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR AttributeName, + /* [retval][out] */ BSTR *AttributeValue); + + +void __RPC_STUB ISpeechObjectToken_GetAttribute_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_CreateInstance_Proxy( + ISpeechObjectToken * This, + /* [defaultvalue][in] */ IUnknown *pUnkOuter, + /* [defaultvalue][in] */ SpeechTokenContext ClsContext, + /* [retval][out] */ IUnknown **Object); + + +void __RPC_STUB ISpeechObjectToken_CreateInstance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_Remove_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID); + + +void __RPC_STUB ISpeechObjectToken_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_GetStorageFileName_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ BSTR FileName, + /* [in] */ SpeechTokenShellFolder Folder, + /* [retval][out] */ BSTR *FilePath); + + +void __RPC_STUB ISpeechObjectToken_GetStorageFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_RemoveStorageFileName_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR ObjectStorageCLSID, + /* [in] */ BSTR KeyName, + /* [in] */ VARIANT_BOOL DeleteFile); + + +void __RPC_STUB ISpeechObjectToken_RemoveStorageFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_IsUISupported_Proxy( + ISpeechObjectToken * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [defaultvalue][in] */ IUnknown *Object, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechObjectToken_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_DisplayUI_Proxy( + ISpeechObjectToken * This, + /* [in] */ long hWnd, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [defaultvalue][in] */ IUnknown *Object); + + +void __RPC_STUB ISpeechObjectToken_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectToken_MatchesAttributes_Proxy( + ISpeechObjectToken * This, + /* [in] */ BSTR Attributes, + /* [retval][out] */ VARIANT_BOOL *Matches); + + +void __RPC_STUB ISpeechObjectToken_MatchesAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechObjectToken_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechObjectTokens_INTERFACE_DEFINED__ +#define __ISpeechObjectTokens_INTERFACE_DEFINED__ + +/* interface ISpeechObjectTokens */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechObjectTokens; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9285B776-2E7B-4bc0-B53E-580EB6FA967F") + ISpeechObjectTokens : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechObjectToken **Token) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **ppEnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechObjectTokensVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechObjectTokens * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechObjectTokens * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechObjectTokens * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechObjectTokens * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechObjectTokens * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechObjectTokens * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechObjectTokens * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechObjectTokens * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechObjectTokens * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechObjectToken **Token); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechObjectTokens * This, + /* [retval][out] */ IUnknown **ppEnumVARIANT); + + END_INTERFACE + } ISpeechObjectTokensVtbl; + + interface ISpeechObjectTokens + { + CONST_VTBL struct ISpeechObjectTokensVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechObjectTokens_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechObjectTokens_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechObjectTokens_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechObjectTokens_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechObjectTokens_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechObjectTokens_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechObjectTokens_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechObjectTokens_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechObjectTokens_Item(This,Index,Token) \ + (This)->lpVtbl -> Item(This,Index,Token) + +#define ISpeechObjectTokens_get__NewEnum(This,ppEnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,ppEnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokens_get_Count_Proxy( + ISpeechObjectTokens * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechObjectTokens_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokens_Item_Proxy( + ISpeechObjectTokens * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechObjectToken **Token); + + +void __RPC_STUB ISpeechObjectTokens_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokens_get__NewEnum_Proxy( + ISpeechObjectTokens * This, + /* [retval][out] */ IUnknown **ppEnumVARIANT); + + +void __RPC_STUB ISpeechObjectTokens_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechObjectTokens_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechObjectTokenCategory_INTERFACE_DEFINED__ +#define __ISpeechObjectTokenCategory_INTERFACE_DEFINED__ + +/* interface ISpeechObjectTokenCategory */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechObjectTokenCategory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CA7EAC50-2D01-4145-86D4-5AE7D70F4469") + ISpeechObjectTokenCategory : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ BSTR *Id) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Default( + /* [in] */ const BSTR TokenId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Default( + /* [retval][out] */ BSTR *TokenId) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetId( + /* [in] */ const BSTR Id, + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist = 0) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE GetDataKey( + /* [defaultvalue][in] */ SpeechDataKeyLocation Location, + /* [retval][out] */ ISpeechDataKey **DataKey) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE EnumerateTokens( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **Tokens) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechObjectTokenCategoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechObjectTokenCategory * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechObjectTokenCategory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechObjectTokenCategory * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechObjectTokenCategory * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechObjectTokenCategory * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechObjectTokenCategory * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechObjectTokenCategory * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechObjectTokenCategory * This, + /* [retval][out] */ BSTR *Id); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Default )( + ISpeechObjectTokenCategory * This, + /* [in] */ const BSTR TokenId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Default )( + ISpeechObjectTokenCategory * This, + /* [retval][out] */ BSTR *TokenId); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetId )( + ISpeechObjectTokenCategory * This, + /* [in] */ const BSTR Id, + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDataKey )( + ISpeechObjectTokenCategory * This, + /* [defaultvalue][in] */ SpeechDataKeyLocation Location, + /* [retval][out] */ ISpeechDataKey **DataKey); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnumerateTokens )( + ISpeechObjectTokenCategory * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **Tokens); + + END_INTERFACE + } ISpeechObjectTokenCategoryVtbl; + + interface ISpeechObjectTokenCategory + { + CONST_VTBL struct ISpeechObjectTokenCategoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechObjectTokenCategory_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechObjectTokenCategory_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechObjectTokenCategory_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechObjectTokenCategory_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechObjectTokenCategory_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechObjectTokenCategory_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechObjectTokenCategory_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechObjectTokenCategory_get_Id(This,Id) \ + (This)->lpVtbl -> get_Id(This,Id) + +#define ISpeechObjectTokenCategory_put_Default(This,TokenId) \ + (This)->lpVtbl -> put_Default(This,TokenId) + +#define ISpeechObjectTokenCategory_get_Default(This,TokenId) \ + (This)->lpVtbl -> get_Default(This,TokenId) + +#define ISpeechObjectTokenCategory_SetId(This,Id,CreateIfNotExist) \ + (This)->lpVtbl -> SetId(This,Id,CreateIfNotExist) + +#define ISpeechObjectTokenCategory_GetDataKey(This,Location,DataKey) \ + (This)->lpVtbl -> GetDataKey(This,Location,DataKey) + +#define ISpeechObjectTokenCategory_EnumerateTokens(This,RequiredAttributes,OptionalAttributes,Tokens) \ + (This)->lpVtbl -> EnumerateTokens(This,RequiredAttributes,OptionalAttributes,Tokens) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_get_Id_Proxy( + ISpeechObjectTokenCategory * This, + /* [retval][out] */ BSTR *Id); + + +void __RPC_STUB ISpeechObjectTokenCategory_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_put_Default_Proxy( + ISpeechObjectTokenCategory * This, + /* [in] */ const BSTR TokenId); + + +void __RPC_STUB ISpeechObjectTokenCategory_put_Default_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_get_Default_Proxy( + ISpeechObjectTokenCategory * This, + /* [retval][out] */ BSTR *TokenId); + + +void __RPC_STUB ISpeechObjectTokenCategory_get_Default_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_SetId_Proxy( + ISpeechObjectTokenCategory * This, + /* [in] */ const BSTR Id, + /* [defaultvalue][in] */ VARIANT_BOOL CreateIfNotExist); + + +void __RPC_STUB ISpeechObjectTokenCategory_SetId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_GetDataKey_Proxy( + ISpeechObjectTokenCategory * This, + /* [defaultvalue][in] */ SpeechDataKeyLocation Location, + /* [retval][out] */ ISpeechDataKey **DataKey); + + +void __RPC_STUB ISpeechObjectTokenCategory_GetDataKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechObjectTokenCategory_EnumerateTokens_Proxy( + ISpeechObjectTokenCategory * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **Tokens); + + +void __RPC_STUB ISpeechObjectTokenCategory_EnumerateTokens_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechObjectTokenCategory_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechAudioBufferInfo_INTERFACE_DEFINED__ +#define __ISpeechAudioBufferInfo_INTERFACE_DEFINED__ + +/* interface ISpeechAudioBufferInfo */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechAudioBufferInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("11B103D8-1142-4edf-A093-82FB3915F8CC") + ISpeechAudioBufferInfo : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_MinNotification( + /* [retval][out] */ long *MinNotification) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_MinNotification( + /* [in] */ long MinNotification) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BufferSize( + /* [retval][out] */ long *BufferSize) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_BufferSize( + /* [in] */ long BufferSize) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EventBias( + /* [retval][out] */ long *EventBias) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_EventBias( + /* [in] */ long EventBias) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechAudioBufferInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechAudioBufferInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechAudioBufferInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechAudioBufferInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechAudioBufferInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechAudioBufferInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechAudioBufferInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechAudioBufferInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinNotification )( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *MinNotification); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinNotification )( + ISpeechAudioBufferInfo * This, + /* [in] */ long MinNotification); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BufferSize )( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *BufferSize); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BufferSize )( + ISpeechAudioBufferInfo * This, + /* [in] */ long BufferSize); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventBias )( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *EventBias); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EventBias )( + ISpeechAudioBufferInfo * This, + /* [in] */ long EventBias); + + END_INTERFACE + } ISpeechAudioBufferInfoVtbl; + + interface ISpeechAudioBufferInfo + { + CONST_VTBL struct ISpeechAudioBufferInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechAudioBufferInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechAudioBufferInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechAudioBufferInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechAudioBufferInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechAudioBufferInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechAudioBufferInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechAudioBufferInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechAudioBufferInfo_get_MinNotification(This,MinNotification) \ + (This)->lpVtbl -> get_MinNotification(This,MinNotification) + +#define ISpeechAudioBufferInfo_put_MinNotification(This,MinNotification) \ + (This)->lpVtbl -> put_MinNotification(This,MinNotification) + +#define ISpeechAudioBufferInfo_get_BufferSize(This,BufferSize) \ + (This)->lpVtbl -> get_BufferSize(This,BufferSize) + +#define ISpeechAudioBufferInfo_put_BufferSize(This,BufferSize) \ + (This)->lpVtbl -> put_BufferSize(This,BufferSize) + +#define ISpeechAudioBufferInfo_get_EventBias(This,EventBias) \ + (This)->lpVtbl -> get_EventBias(This,EventBias) + +#define ISpeechAudioBufferInfo_put_EventBias(This,EventBias) \ + (This)->lpVtbl -> put_EventBias(This,EventBias) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_get_MinNotification_Proxy( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *MinNotification); + + +void __RPC_STUB ISpeechAudioBufferInfo_get_MinNotification_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_put_MinNotification_Proxy( + ISpeechAudioBufferInfo * This, + /* [in] */ long MinNotification); + + +void __RPC_STUB ISpeechAudioBufferInfo_put_MinNotification_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_get_BufferSize_Proxy( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *BufferSize); + + +void __RPC_STUB ISpeechAudioBufferInfo_get_BufferSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_put_BufferSize_Proxy( + ISpeechAudioBufferInfo * This, + /* [in] */ long BufferSize); + + +void __RPC_STUB ISpeechAudioBufferInfo_put_BufferSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_get_EventBias_Proxy( + ISpeechAudioBufferInfo * This, + /* [retval][out] */ long *EventBias); + + +void __RPC_STUB ISpeechAudioBufferInfo_get_EventBias_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudioBufferInfo_put_EventBias_Proxy( + ISpeechAudioBufferInfo * This, + /* [in] */ long EventBias); + + +void __RPC_STUB ISpeechAudioBufferInfo_put_EventBias_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechAudioBufferInfo_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechAudioStatus_INTERFACE_DEFINED__ +#define __ISpeechAudioStatus_INTERFACE_DEFINED__ + +/* interface ISpeechAudioStatus */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechAudioStatus; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C62D9C91-7458-47f6-862D-1EF86FB0B278") + ISpeechAudioStatus : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FreeBufferSpace( + /* [retval][out] */ long *FreeBufferSpace) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NonBlockingIO( + /* [retval][out] */ long *NonBlockingIO) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( + /* [retval][out] */ SpeechAudioState *State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentSeekPosition( + /* [retval][out] */ VARIANT *CurrentSeekPosition) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentDevicePosition( + /* [retval][out] */ VARIANT *CurrentDevicePosition) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechAudioStatusVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechAudioStatus * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechAudioStatus * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechAudioStatus * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechAudioStatus * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechAudioStatus * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechAudioStatus * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechAudioStatus * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FreeBufferSpace )( + ISpeechAudioStatus * This, + /* [retval][out] */ long *FreeBufferSpace); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NonBlockingIO )( + ISpeechAudioStatus * This, + /* [retval][out] */ long *NonBlockingIO); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( + ISpeechAudioStatus * This, + /* [retval][out] */ SpeechAudioState *State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentSeekPosition )( + ISpeechAudioStatus * This, + /* [retval][out] */ VARIANT *CurrentSeekPosition); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentDevicePosition )( + ISpeechAudioStatus * This, + /* [retval][out] */ VARIANT *CurrentDevicePosition); + + END_INTERFACE + } ISpeechAudioStatusVtbl; + + interface ISpeechAudioStatus + { + CONST_VTBL struct ISpeechAudioStatusVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechAudioStatus_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechAudioStatus_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechAudioStatus_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechAudioStatus_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechAudioStatus_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechAudioStatus_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechAudioStatus_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechAudioStatus_get_FreeBufferSpace(This,FreeBufferSpace) \ + (This)->lpVtbl -> get_FreeBufferSpace(This,FreeBufferSpace) + +#define ISpeechAudioStatus_get_NonBlockingIO(This,NonBlockingIO) \ + (This)->lpVtbl -> get_NonBlockingIO(This,NonBlockingIO) + +#define ISpeechAudioStatus_get_State(This,State) \ + (This)->lpVtbl -> get_State(This,State) + +#define ISpeechAudioStatus_get_CurrentSeekPosition(This,CurrentSeekPosition) \ + (This)->lpVtbl -> get_CurrentSeekPosition(This,CurrentSeekPosition) + +#define ISpeechAudioStatus_get_CurrentDevicePosition(This,CurrentDevicePosition) \ + (This)->lpVtbl -> get_CurrentDevicePosition(This,CurrentDevicePosition) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioStatus_get_FreeBufferSpace_Proxy( + ISpeechAudioStatus * This, + /* [retval][out] */ long *FreeBufferSpace); + + +void __RPC_STUB ISpeechAudioStatus_get_FreeBufferSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioStatus_get_NonBlockingIO_Proxy( + ISpeechAudioStatus * This, + /* [retval][out] */ long *NonBlockingIO); + + +void __RPC_STUB ISpeechAudioStatus_get_NonBlockingIO_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioStatus_get_State_Proxy( + ISpeechAudioStatus * This, + /* [retval][out] */ SpeechAudioState *State); + + +void __RPC_STUB ISpeechAudioStatus_get_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioStatus_get_CurrentSeekPosition_Proxy( + ISpeechAudioStatus * This, + /* [retval][out] */ VARIANT *CurrentSeekPosition); + + +void __RPC_STUB ISpeechAudioStatus_get_CurrentSeekPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioStatus_get_CurrentDevicePosition_Proxy( + ISpeechAudioStatus * This, + /* [retval][out] */ VARIANT *CurrentDevicePosition); + + +void __RPC_STUB ISpeechAudioStatus_get_CurrentDevicePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechAudioStatus_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechAudioFormat_INTERFACE_DEFINED__ +#define __ISpeechAudioFormat_INTERFACE_DEFINED__ + +/* interface ISpeechAudioFormat */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechAudioFormat; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E6E9C590-3E18-40e3-8299-061F98BDE7C7") + ISpeechAudioFormat : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ SpeechAudioFormatType *AudioFormat) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Type( + /* [in] */ SpeechAudioFormatType AudioFormat) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_Guid( + /* [retval][out] */ BSTR *Guid) = 0; + + virtual /* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE put_Guid( + /* [in] */ BSTR Guid) = 0; + + virtual /* [id][helpstring][hidden] */ HRESULT STDMETHODCALLTYPE GetWaveFormatEx( + /* [retval][out] */ ISpeechWaveFormatEx **WaveFormatEx) = 0; + + virtual /* [id][helpstring][hidden] */ HRESULT STDMETHODCALLTYPE SetWaveFormatEx( + /* [in] */ ISpeechWaveFormatEx *WaveFormatEx) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechAudioFormatVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechAudioFormat * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechAudioFormat * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechAudioFormat * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechAudioFormat * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechAudioFormat * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechAudioFormat * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechAudioFormat * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + ISpeechAudioFormat * This, + /* [retval][out] */ SpeechAudioFormatType *AudioFormat); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( + ISpeechAudioFormat * This, + /* [in] */ SpeechAudioFormatType AudioFormat); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Guid )( + ISpeechAudioFormat * This, + /* [retval][out] */ BSTR *Guid); + + /* [id][helpstring][hidden][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Guid )( + ISpeechAudioFormat * This, + /* [in] */ BSTR Guid); + + /* [id][helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *GetWaveFormatEx )( + ISpeechAudioFormat * This, + /* [retval][out] */ ISpeechWaveFormatEx **WaveFormatEx); + + /* [id][helpstring][hidden] */ HRESULT ( STDMETHODCALLTYPE *SetWaveFormatEx )( + ISpeechAudioFormat * This, + /* [in] */ ISpeechWaveFormatEx *WaveFormatEx); + + END_INTERFACE + } ISpeechAudioFormatVtbl; + + interface ISpeechAudioFormat + { + CONST_VTBL struct ISpeechAudioFormatVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechAudioFormat_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechAudioFormat_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechAudioFormat_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechAudioFormat_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechAudioFormat_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechAudioFormat_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechAudioFormat_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechAudioFormat_get_Type(This,AudioFormat) \ + (This)->lpVtbl -> get_Type(This,AudioFormat) + +#define ISpeechAudioFormat_put_Type(This,AudioFormat) \ + (This)->lpVtbl -> put_Type(This,AudioFormat) + +#define ISpeechAudioFormat_get_Guid(This,Guid) \ + (This)->lpVtbl -> get_Guid(This,Guid) + +#define ISpeechAudioFormat_put_Guid(This,Guid) \ + (This)->lpVtbl -> put_Guid(This,Guid) + +#define ISpeechAudioFormat_GetWaveFormatEx(This,WaveFormatEx) \ + (This)->lpVtbl -> GetWaveFormatEx(This,WaveFormatEx) + +#define ISpeechAudioFormat_SetWaveFormatEx(This,WaveFormatEx) \ + (This)->lpVtbl -> SetWaveFormatEx(This,WaveFormatEx) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_get_Type_Proxy( + ISpeechAudioFormat * This, + /* [retval][out] */ SpeechAudioFormatType *AudioFormat); + + +void __RPC_STUB ISpeechAudioFormat_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_put_Type_Proxy( + ISpeechAudioFormat * This, + /* [in] */ SpeechAudioFormatType AudioFormat); + + +void __RPC_STUB ISpeechAudioFormat_put_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_get_Guid_Proxy( + ISpeechAudioFormat * This, + /* [retval][out] */ BSTR *Guid); + + +void __RPC_STUB ISpeechAudioFormat_get_Guid_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_put_Guid_Proxy( + ISpeechAudioFormat * This, + /* [in] */ BSTR Guid); + + +void __RPC_STUB ISpeechAudioFormat_put_Guid_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_GetWaveFormatEx_Proxy( + ISpeechAudioFormat * This, + /* [retval][out] */ ISpeechWaveFormatEx **WaveFormatEx); + + +void __RPC_STUB ISpeechAudioFormat_GetWaveFormatEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden] */ HRESULT STDMETHODCALLTYPE ISpeechAudioFormat_SetWaveFormatEx_Proxy( + ISpeechAudioFormat * This, + /* [in] */ ISpeechWaveFormatEx *WaveFormatEx); + + +void __RPC_STUB ISpeechAudioFormat_SetWaveFormatEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechAudioFormat_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechWaveFormatEx_INTERFACE_DEFINED__ +#define __ISpeechWaveFormatEx_INTERFACE_DEFINED__ + +/* interface ISpeechWaveFormatEx */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechWaveFormatEx; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7A1EF0D5-1581-4741-88E4-209A49F11A10") + ISpeechWaveFormatEx : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FormatTag( + /* [retval][out] */ short *FormatTag) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_FormatTag( + /* [in] */ short FormatTag) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Channels( + /* [retval][out] */ short *Channels) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Channels( + /* [in] */ short Channels) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SamplesPerSec( + /* [retval][out] */ long *SamplesPerSec) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SamplesPerSec( + /* [in] */ long SamplesPerSec) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AvgBytesPerSec( + /* [retval][out] */ long *AvgBytesPerSec) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AvgBytesPerSec( + /* [in] */ long AvgBytesPerSec) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BlockAlign( + /* [retval][out] */ short *BlockAlign) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_BlockAlign( + /* [in] */ short BlockAlign) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BitsPerSample( + /* [retval][out] */ short *BitsPerSample) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_BitsPerSample( + /* [in] */ short BitsPerSample) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ExtraData( + /* [retval][out] */ VARIANT *ExtraData) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ExtraData( + /* [in] */ VARIANT ExtraData) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechWaveFormatExVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechWaveFormatEx * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechWaveFormatEx * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechWaveFormatEx * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechWaveFormatEx * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechWaveFormatEx * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechWaveFormatEx * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechWaveFormatEx * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FormatTag )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *FormatTag); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FormatTag )( + ISpeechWaveFormatEx * This, + /* [in] */ short FormatTag); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channels )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *Channels); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Channels )( + ISpeechWaveFormatEx * This, + /* [in] */ short Channels); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SamplesPerSec )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ long *SamplesPerSec); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SamplesPerSec )( + ISpeechWaveFormatEx * This, + /* [in] */ long SamplesPerSec); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AvgBytesPerSec )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ long *AvgBytesPerSec); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AvgBytesPerSec )( + ISpeechWaveFormatEx * This, + /* [in] */ long AvgBytesPerSec); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BlockAlign )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *BlockAlign); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BlockAlign )( + ISpeechWaveFormatEx * This, + /* [in] */ short BlockAlign); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BitsPerSample )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *BitsPerSample); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BitsPerSample )( + ISpeechWaveFormatEx * This, + /* [in] */ short BitsPerSample); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ExtraData )( + ISpeechWaveFormatEx * This, + /* [retval][out] */ VARIANT *ExtraData); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ExtraData )( + ISpeechWaveFormatEx * This, + /* [in] */ VARIANT ExtraData); + + END_INTERFACE + } ISpeechWaveFormatExVtbl; + + interface ISpeechWaveFormatEx + { + CONST_VTBL struct ISpeechWaveFormatExVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechWaveFormatEx_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechWaveFormatEx_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechWaveFormatEx_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechWaveFormatEx_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechWaveFormatEx_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechWaveFormatEx_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechWaveFormatEx_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechWaveFormatEx_get_FormatTag(This,FormatTag) \ + (This)->lpVtbl -> get_FormatTag(This,FormatTag) + +#define ISpeechWaveFormatEx_put_FormatTag(This,FormatTag) \ + (This)->lpVtbl -> put_FormatTag(This,FormatTag) + +#define ISpeechWaveFormatEx_get_Channels(This,Channels) \ + (This)->lpVtbl -> get_Channels(This,Channels) + +#define ISpeechWaveFormatEx_put_Channels(This,Channels) \ + (This)->lpVtbl -> put_Channels(This,Channels) + +#define ISpeechWaveFormatEx_get_SamplesPerSec(This,SamplesPerSec) \ + (This)->lpVtbl -> get_SamplesPerSec(This,SamplesPerSec) + +#define ISpeechWaveFormatEx_put_SamplesPerSec(This,SamplesPerSec) \ + (This)->lpVtbl -> put_SamplesPerSec(This,SamplesPerSec) + +#define ISpeechWaveFormatEx_get_AvgBytesPerSec(This,AvgBytesPerSec) \ + (This)->lpVtbl -> get_AvgBytesPerSec(This,AvgBytesPerSec) + +#define ISpeechWaveFormatEx_put_AvgBytesPerSec(This,AvgBytesPerSec) \ + (This)->lpVtbl -> put_AvgBytesPerSec(This,AvgBytesPerSec) + +#define ISpeechWaveFormatEx_get_BlockAlign(This,BlockAlign) \ + (This)->lpVtbl -> get_BlockAlign(This,BlockAlign) + +#define ISpeechWaveFormatEx_put_BlockAlign(This,BlockAlign) \ + (This)->lpVtbl -> put_BlockAlign(This,BlockAlign) + +#define ISpeechWaveFormatEx_get_BitsPerSample(This,BitsPerSample) \ + (This)->lpVtbl -> get_BitsPerSample(This,BitsPerSample) + +#define ISpeechWaveFormatEx_put_BitsPerSample(This,BitsPerSample) \ + (This)->lpVtbl -> put_BitsPerSample(This,BitsPerSample) + +#define ISpeechWaveFormatEx_get_ExtraData(This,ExtraData) \ + (This)->lpVtbl -> get_ExtraData(This,ExtraData) + +#define ISpeechWaveFormatEx_put_ExtraData(This,ExtraData) \ + (This)->lpVtbl -> put_ExtraData(This,ExtraData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_FormatTag_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *FormatTag); + + +void __RPC_STUB ISpeechWaveFormatEx_get_FormatTag_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_FormatTag_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ short FormatTag); + + +void __RPC_STUB ISpeechWaveFormatEx_put_FormatTag_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_Channels_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *Channels); + + +void __RPC_STUB ISpeechWaveFormatEx_get_Channels_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_Channels_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ short Channels); + + +void __RPC_STUB ISpeechWaveFormatEx_put_Channels_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_SamplesPerSec_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ long *SamplesPerSec); + + +void __RPC_STUB ISpeechWaveFormatEx_get_SamplesPerSec_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_SamplesPerSec_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ long SamplesPerSec); + + +void __RPC_STUB ISpeechWaveFormatEx_put_SamplesPerSec_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_AvgBytesPerSec_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ long *AvgBytesPerSec); + + +void __RPC_STUB ISpeechWaveFormatEx_get_AvgBytesPerSec_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_AvgBytesPerSec_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ long AvgBytesPerSec); + + +void __RPC_STUB ISpeechWaveFormatEx_put_AvgBytesPerSec_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_BlockAlign_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *BlockAlign); + + +void __RPC_STUB ISpeechWaveFormatEx_get_BlockAlign_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_BlockAlign_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ short BlockAlign); + + +void __RPC_STUB ISpeechWaveFormatEx_put_BlockAlign_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_BitsPerSample_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ short *BitsPerSample); + + +void __RPC_STUB ISpeechWaveFormatEx_get_BitsPerSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_BitsPerSample_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ short BitsPerSample); + + +void __RPC_STUB ISpeechWaveFormatEx_put_BitsPerSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_get_ExtraData_Proxy( + ISpeechWaveFormatEx * This, + /* [retval][out] */ VARIANT *ExtraData); + + +void __RPC_STUB ISpeechWaveFormatEx_get_ExtraData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechWaveFormatEx_put_ExtraData_Proxy( + ISpeechWaveFormatEx * This, + /* [in] */ VARIANT ExtraData); + + +void __RPC_STUB ISpeechWaveFormatEx_put_ExtraData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechWaveFormatEx_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechBaseStream_INTERFACE_DEFINED__ +#define __ISpeechBaseStream_INTERFACE_DEFINED__ + +/* interface ISpeechBaseStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechBaseStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6450336F-7D49-4ced-8097-49D6DEE37294") + ISpeechBaseStream : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Format( + /* [retval][out] */ ISpeechAudioFormat **AudioFormat) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_Format( + /* [in] */ ISpeechAudioFormat *AudioFormat) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Read( + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Write( + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Seek( + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechBaseStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechBaseStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechBaseStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechBaseStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechBaseStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechBaseStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechBaseStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechBaseStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechBaseStream * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechBaseStream * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechBaseStream * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechBaseStream * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechBaseStream * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + END_INTERFACE + } ISpeechBaseStreamVtbl; + + interface ISpeechBaseStream + { + CONST_VTBL struct ISpeechBaseStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechBaseStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechBaseStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechBaseStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechBaseStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechBaseStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechBaseStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechBaseStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechBaseStream_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechBaseStream_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechBaseStream_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechBaseStream_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechBaseStream_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechBaseStream_get_Format_Proxy( + ISpeechBaseStream * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + +void __RPC_STUB ISpeechBaseStream_get_Format_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechBaseStream_putref_Format_Proxy( + ISpeechBaseStream * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + +void __RPC_STUB ISpeechBaseStream_putref_Format_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechBaseStream_Read_Proxy( + ISpeechBaseStream * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + +void __RPC_STUB ISpeechBaseStream_Read_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechBaseStream_Write_Proxy( + ISpeechBaseStream * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + +void __RPC_STUB ISpeechBaseStream_Write_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechBaseStream_Seek_Proxy( + ISpeechBaseStream * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + +void __RPC_STUB ISpeechBaseStream_Seek_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechBaseStream_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechFileStream_INTERFACE_DEFINED__ +#define __ISpeechFileStream_INTERFACE_DEFINED__ + +/* interface ISpeechFileStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechFileStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AF67F125-AB39-4e93-B4A2-CC2E66E182A7") + ISpeechFileStream : public ISpeechBaseStream + { + public: + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Open( + /* [in] */ BSTR FileName, + /* [defaultvalue][in] */ SpeechStreamFileMode FileMode = SSFMOpenForRead, + /* [defaultvalue][in] */ VARIANT_BOOL DoEvents = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Close( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechFileStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechFileStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechFileStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechFileStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechFileStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechFileStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechFileStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechFileStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechFileStream * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechFileStream * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechFileStream * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechFileStream * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechFileStream * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Open )( + ISpeechFileStream * This, + /* [in] */ BSTR FileName, + /* [defaultvalue][in] */ SpeechStreamFileMode FileMode, + /* [defaultvalue][in] */ VARIANT_BOOL DoEvents); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Close )( + ISpeechFileStream * This); + + END_INTERFACE + } ISpeechFileStreamVtbl; + + interface ISpeechFileStream + { + CONST_VTBL struct ISpeechFileStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechFileStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechFileStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechFileStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechFileStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechFileStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechFileStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechFileStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechFileStream_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechFileStream_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechFileStream_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechFileStream_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechFileStream_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + + +#define ISpeechFileStream_Open(This,FileName,FileMode,DoEvents) \ + (This)->lpVtbl -> Open(This,FileName,FileMode,DoEvents) + +#define ISpeechFileStream_Close(This) \ + (This)->lpVtbl -> Close(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechFileStream_Open_Proxy( + ISpeechFileStream * This, + /* [in] */ BSTR FileName, + /* [defaultvalue][in] */ SpeechStreamFileMode FileMode, + /* [defaultvalue][in] */ VARIANT_BOOL DoEvents); + + +void __RPC_STUB ISpeechFileStream_Open_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechFileStream_Close_Proxy( + ISpeechFileStream * This); + + +void __RPC_STUB ISpeechFileStream_Close_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechFileStream_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechMemoryStream_INTERFACE_DEFINED__ +#define __ISpeechMemoryStream_INTERFACE_DEFINED__ + +/* interface ISpeechMemoryStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechMemoryStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EEB14B68-808B-4abe-A5EA-B51DA7588008") + ISpeechMemoryStream : public ISpeechBaseStream + { + public: + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetData( + /* [in] */ VARIANT Data) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetData( + /* [retval][out] */ VARIANT *pData) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechMemoryStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechMemoryStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechMemoryStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechMemoryStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechMemoryStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechMemoryStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechMemoryStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechMemoryStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechMemoryStream * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechMemoryStream * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechMemoryStream * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechMemoryStream * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechMemoryStream * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetData )( + ISpeechMemoryStream * This, + /* [in] */ VARIANT Data); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetData )( + ISpeechMemoryStream * This, + /* [retval][out] */ VARIANT *pData); + + END_INTERFACE + } ISpeechMemoryStreamVtbl; + + interface ISpeechMemoryStream + { + CONST_VTBL struct ISpeechMemoryStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechMemoryStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechMemoryStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechMemoryStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechMemoryStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechMemoryStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechMemoryStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechMemoryStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechMemoryStream_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechMemoryStream_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechMemoryStream_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechMemoryStream_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechMemoryStream_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + + +#define ISpeechMemoryStream_SetData(This,Data) \ + (This)->lpVtbl -> SetData(This,Data) + +#define ISpeechMemoryStream_GetData(This,pData) \ + (This)->lpVtbl -> GetData(This,pData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechMemoryStream_SetData_Proxy( + ISpeechMemoryStream * This, + /* [in] */ VARIANT Data); + + +void __RPC_STUB ISpeechMemoryStream_SetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechMemoryStream_GetData_Proxy( + ISpeechMemoryStream * This, + /* [retval][out] */ VARIANT *pData); + + +void __RPC_STUB ISpeechMemoryStream_GetData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechMemoryStream_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechCustomStream_INTERFACE_DEFINED__ +#define __ISpeechCustomStream_INTERFACE_DEFINED__ + +/* interface ISpeechCustomStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechCustomStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1A9E9F4F-104F-4db8-A115-EFD7FD0C97AE") + ISpeechCustomStream : public ISpeechBaseStream + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BaseStream( + /* [retval][out] */ IUnknown **ppUnkStream) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_BaseStream( + /* [in] */ IUnknown *pUnkStream) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechCustomStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechCustomStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechCustomStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechCustomStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechCustomStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechCustomStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechCustomStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechCustomStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechCustomStream * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechCustomStream * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechCustomStream * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechCustomStream * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechCustomStream * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BaseStream )( + ISpeechCustomStream * This, + /* [retval][out] */ IUnknown **ppUnkStream); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_BaseStream )( + ISpeechCustomStream * This, + /* [in] */ IUnknown *pUnkStream); + + END_INTERFACE + } ISpeechCustomStreamVtbl; + + interface ISpeechCustomStream + { + CONST_VTBL struct ISpeechCustomStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechCustomStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechCustomStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechCustomStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechCustomStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechCustomStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechCustomStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechCustomStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechCustomStream_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechCustomStream_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechCustomStream_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechCustomStream_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechCustomStream_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + + +#define ISpeechCustomStream_get_BaseStream(This,ppUnkStream) \ + (This)->lpVtbl -> get_BaseStream(This,ppUnkStream) + +#define ISpeechCustomStream_putref_BaseStream(This,pUnkStream) \ + (This)->lpVtbl -> putref_BaseStream(This,pUnkStream) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechCustomStream_get_BaseStream_Proxy( + ISpeechCustomStream * This, + /* [retval][out] */ IUnknown **ppUnkStream); + + +void __RPC_STUB ISpeechCustomStream_get_BaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechCustomStream_putref_BaseStream_Proxy( + ISpeechCustomStream * This, + /* [in] */ IUnknown *pUnkStream); + + +void __RPC_STUB ISpeechCustomStream_putref_BaseStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechCustomStream_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechAudio_INTERFACE_DEFINED__ +#define __ISpeechAudio_INTERFACE_DEFINED__ + +/* interface ISpeechAudio */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechAudio; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CFF8E175-019E-11d3-A08E-00C04F8EF9B5") + ISpeechAudio : public ISpeechBaseStream + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Status( + /* [retval][out] */ ISpeechAudioStatus **Status) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BufferInfo( + /* [retval][out] */ ISpeechAudioBufferInfo **BufferInfo) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultFormat( + /* [retval][out] */ ISpeechAudioFormat **StreamFormat) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( + /* [retval][out] */ long *Volume) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( + /* [in] */ long Volume) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_BufferNotifySize( + /* [retval][out] */ long *BufferNotifySize) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_BufferNotifySize( + /* [in] */ long BufferNotifySize) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_EventHandle( + /* [retval][out] */ long *EventHandle) = 0; + + virtual /* [hidden][id][helpstring] */ HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ SpeechAudioState State) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechAudio * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechAudio * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechAudio * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechAudio * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechAudio * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechAudio * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechAudio * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechAudio * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioStatus **Status); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BufferInfo )( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioBufferInfo **BufferInfo); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultFormat )( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioFormat **StreamFormat); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( + ISpeechAudio * This, + /* [retval][out] */ long *Volume); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( + ISpeechAudio * This, + /* [in] */ long Volume); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BufferNotifySize )( + ISpeechAudio * This, + /* [retval][out] */ long *BufferNotifySize); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BufferNotifySize )( + ISpeechAudio * This, + /* [in] */ long BufferNotifySize); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventHandle )( + ISpeechAudio * This, + /* [retval][out] */ long *EventHandle); + + /* [hidden][id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetState )( + ISpeechAudio * This, + /* [in] */ SpeechAudioState State); + + END_INTERFACE + } ISpeechAudioVtbl; + + interface ISpeechAudio + { + CONST_VTBL struct ISpeechAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechAudio_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechAudio_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechAudio_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechAudio_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechAudio_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechAudio_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechAudio_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechAudio_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechAudio_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + + +#define ISpeechAudio_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define ISpeechAudio_get_BufferInfo(This,BufferInfo) \ + (This)->lpVtbl -> get_BufferInfo(This,BufferInfo) + +#define ISpeechAudio_get_DefaultFormat(This,StreamFormat) \ + (This)->lpVtbl -> get_DefaultFormat(This,StreamFormat) + +#define ISpeechAudio_get_Volume(This,Volume) \ + (This)->lpVtbl -> get_Volume(This,Volume) + +#define ISpeechAudio_put_Volume(This,Volume) \ + (This)->lpVtbl -> put_Volume(This,Volume) + +#define ISpeechAudio_get_BufferNotifySize(This,BufferNotifySize) \ + (This)->lpVtbl -> get_BufferNotifySize(This,BufferNotifySize) + +#define ISpeechAudio_put_BufferNotifySize(This,BufferNotifySize) \ + (This)->lpVtbl -> put_BufferNotifySize(This,BufferNotifySize) + +#define ISpeechAudio_get_EventHandle(This,EventHandle) \ + (This)->lpVtbl -> get_EventHandle(This,EventHandle) + +#define ISpeechAudio_SetState(This,State) \ + (This)->lpVtbl -> SetState(This,State) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_Status_Proxy( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioStatus **Status); + + +void __RPC_STUB ISpeechAudio_get_Status_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_BufferInfo_Proxy( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioBufferInfo **BufferInfo); + + +void __RPC_STUB ISpeechAudio_get_BufferInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_DefaultFormat_Proxy( + ISpeechAudio * This, + /* [retval][out] */ ISpeechAudioFormat **StreamFormat); + + +void __RPC_STUB ISpeechAudio_get_DefaultFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_Volume_Proxy( + ISpeechAudio * This, + /* [retval][out] */ long *Volume); + + +void __RPC_STUB ISpeechAudio_get_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_put_Volume_Proxy( + ISpeechAudio * This, + /* [in] */ long Volume); + + +void __RPC_STUB ISpeechAudio_put_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_BufferNotifySize_Proxy( + ISpeechAudio * This, + /* [retval][out] */ long *BufferNotifySize); + + +void __RPC_STUB ISpeechAudio_get_BufferNotifySize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_put_BufferNotifySize_Proxy( + ISpeechAudio * This, + /* [in] */ long BufferNotifySize); + + +void __RPC_STUB ISpeechAudio_put_BufferNotifySize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_get_EventHandle_Proxy( + ISpeechAudio * This, + /* [retval][out] */ long *EventHandle); + + +void __RPC_STUB ISpeechAudio_get_EventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [hidden][id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechAudio_SetState_Proxy( + ISpeechAudio * This, + /* [in] */ SpeechAudioState State); + + +void __RPC_STUB ISpeechAudio_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechAudio_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechMMSysAudio_INTERFACE_DEFINED__ +#define __ISpeechMMSysAudio_INTERFACE_DEFINED__ + +/* interface ISpeechMMSysAudio */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechMMSysAudio; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3C76AF6D-1FD7-4831-81D1-3B71D5A13C44") + ISpeechMMSysAudio : public ISpeechAudio + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DeviceId( + /* [retval][out] */ long *DeviceId) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_DeviceId( + /* [in] */ long DeviceId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LineId( + /* [retval][out] */ long *LineId) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_LineId( + /* [in] */ long LineId) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_MMHandle( + /* [retval][out] */ long *Handle) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechMMSysAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechMMSysAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechMMSysAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechMMSysAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechMMSysAudio * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechMMSysAudio * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechMMSysAudio * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechMMSysAudio * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Format )( + ISpeechMMSysAudio * This, + /* [retval][out] */ ISpeechAudioFormat **AudioFormat); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Format )( + ISpeechMMSysAudio * This, + /* [in] */ ISpeechAudioFormat *AudioFormat); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Read )( + ISpeechMMSysAudio * This, + /* [out] */ VARIANT *Buffer, + /* [in] */ long NumberOfBytes, + /* [retval][out] */ long *BytesRead); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Write )( + ISpeechMMSysAudio * This, + /* [in] */ VARIANT Buffer, + /* [retval][out] */ long *BytesWritten); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Seek )( + ISpeechMMSysAudio * This, + /* [in] */ VARIANT Position, + /* [defaultvalue][in] */ SpeechStreamSeekPositionType Origin, + /* [retval][out] */ VARIANT *NewPosition); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + ISpeechMMSysAudio * This, + /* [retval][out] */ ISpeechAudioStatus **Status); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BufferInfo )( + ISpeechMMSysAudio * This, + /* [retval][out] */ ISpeechAudioBufferInfo **BufferInfo); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultFormat )( + ISpeechMMSysAudio * This, + /* [retval][out] */ ISpeechAudioFormat **StreamFormat); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *Volume); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( + ISpeechMMSysAudio * This, + /* [in] */ long Volume); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BufferNotifySize )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *BufferNotifySize); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BufferNotifySize )( + ISpeechMMSysAudio * This, + /* [in] */ long BufferNotifySize); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventHandle )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *EventHandle); + + /* [hidden][id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetState )( + ISpeechMMSysAudio * This, + /* [in] */ SpeechAudioState State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DeviceId )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *DeviceId); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DeviceId )( + ISpeechMMSysAudio * This, + /* [in] */ long DeviceId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LineId )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *LineId); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LineId )( + ISpeechMMSysAudio * This, + /* [in] */ long LineId); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MMHandle )( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *Handle); + + END_INTERFACE + } ISpeechMMSysAudioVtbl; + + interface ISpeechMMSysAudio + { + CONST_VTBL struct ISpeechMMSysAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechMMSysAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechMMSysAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechMMSysAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechMMSysAudio_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechMMSysAudio_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechMMSysAudio_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechMMSysAudio_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechMMSysAudio_get_Format(This,AudioFormat) \ + (This)->lpVtbl -> get_Format(This,AudioFormat) + +#define ISpeechMMSysAudio_putref_Format(This,AudioFormat) \ + (This)->lpVtbl -> putref_Format(This,AudioFormat) + +#define ISpeechMMSysAudio_Read(This,Buffer,NumberOfBytes,BytesRead) \ + (This)->lpVtbl -> Read(This,Buffer,NumberOfBytes,BytesRead) + +#define ISpeechMMSysAudio_Write(This,Buffer,BytesWritten) \ + (This)->lpVtbl -> Write(This,Buffer,BytesWritten) + +#define ISpeechMMSysAudio_Seek(This,Position,Origin,NewPosition) \ + (This)->lpVtbl -> Seek(This,Position,Origin,NewPosition) + + +#define ISpeechMMSysAudio_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define ISpeechMMSysAudio_get_BufferInfo(This,BufferInfo) \ + (This)->lpVtbl -> get_BufferInfo(This,BufferInfo) + +#define ISpeechMMSysAudio_get_DefaultFormat(This,StreamFormat) \ + (This)->lpVtbl -> get_DefaultFormat(This,StreamFormat) + +#define ISpeechMMSysAudio_get_Volume(This,Volume) \ + (This)->lpVtbl -> get_Volume(This,Volume) + +#define ISpeechMMSysAudio_put_Volume(This,Volume) \ + (This)->lpVtbl -> put_Volume(This,Volume) + +#define ISpeechMMSysAudio_get_BufferNotifySize(This,BufferNotifySize) \ + (This)->lpVtbl -> get_BufferNotifySize(This,BufferNotifySize) + +#define ISpeechMMSysAudio_put_BufferNotifySize(This,BufferNotifySize) \ + (This)->lpVtbl -> put_BufferNotifySize(This,BufferNotifySize) + +#define ISpeechMMSysAudio_get_EventHandle(This,EventHandle) \ + (This)->lpVtbl -> get_EventHandle(This,EventHandle) + +#define ISpeechMMSysAudio_SetState(This,State) \ + (This)->lpVtbl -> SetState(This,State) + + +#define ISpeechMMSysAudio_get_DeviceId(This,DeviceId) \ + (This)->lpVtbl -> get_DeviceId(This,DeviceId) + +#define ISpeechMMSysAudio_put_DeviceId(This,DeviceId) \ + (This)->lpVtbl -> put_DeviceId(This,DeviceId) + +#define ISpeechMMSysAudio_get_LineId(This,LineId) \ + (This)->lpVtbl -> get_LineId(This,LineId) + +#define ISpeechMMSysAudio_put_LineId(This,LineId) \ + (This)->lpVtbl -> put_LineId(This,LineId) + +#define ISpeechMMSysAudio_get_MMHandle(This,Handle) \ + (This)->lpVtbl -> get_MMHandle(This,Handle) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechMMSysAudio_get_DeviceId_Proxy( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *DeviceId); + + +void __RPC_STUB ISpeechMMSysAudio_get_DeviceId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechMMSysAudio_put_DeviceId_Proxy( + ISpeechMMSysAudio * This, + /* [in] */ long DeviceId); + + +void __RPC_STUB ISpeechMMSysAudio_put_DeviceId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechMMSysAudio_get_LineId_Proxy( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *LineId); + + +void __RPC_STUB ISpeechMMSysAudio_get_LineId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechMMSysAudio_put_LineId_Proxy( + ISpeechMMSysAudio * This, + /* [in] */ long LineId); + + +void __RPC_STUB ISpeechMMSysAudio_put_LineId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechMMSysAudio_get_MMHandle_Proxy( + ISpeechMMSysAudio * This, + /* [retval][out] */ long *Handle); + + +void __RPC_STUB ISpeechMMSysAudio_get_MMHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechMMSysAudio_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechVoice_INTERFACE_DEFINED__ +#define __ISpeechVoice_INTERFACE_DEFINED__ + +/* interface ISpeechVoice */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechVoice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("269316D8-57BD-11D2-9EEE-00C04F797396") + ISpeechVoice : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Status( + /* [retval][out] */ ISpeechVoiceStatus **Status) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Voice( + /* [retval][out] */ ISpeechObjectToken **Voice) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_Voice( + /* [in] */ ISpeechObjectToken *Voice) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioOutput( + /* [retval][out] */ ISpeechObjectToken **AudioOutput) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_AudioOutput( + /* [in] */ ISpeechObjectToken *AudioOutput) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioOutputStream( + /* [retval][out] */ ISpeechBaseStream **AudioOutputStream) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_AudioOutputStream( + /* [in] */ ISpeechBaseStream *AudioOutputStream) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Rate( + /* [retval][out] */ long *Rate) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Rate( + /* [in] */ long Rate) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Volume( + /* [retval][out] */ long *Volume) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Volume( + /* [in] */ long Volume) = 0; + + virtual /* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE put_AllowAudioOutputFormatChangesOnNextSet( + /* [in] */ VARIANT_BOOL Allow) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_AllowAudioOutputFormatChangesOnNextSet( + /* [retval][out] */ VARIANT_BOOL *Allow) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EventInterests( + /* [retval][out] */ SpeechVoiceEvents *EventInterestFlags) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_EventInterests( + /* [in] */ SpeechVoiceEvents EventInterestFlags) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_Priority( + /* [in] */ SpeechVoicePriority Priority) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Priority( + /* [retval][out] */ SpeechVoicePriority *Priority) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_AlertBoundary( + /* [in] */ SpeechVoiceEvents Boundary) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AlertBoundary( + /* [retval][out] */ SpeechVoiceEvents *Boundary) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SynchronousSpeakTimeout( + /* [in] */ long msTimeout) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SynchronousSpeakTimeout( + /* [retval][out] */ long *msTimeout) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Speak( + /* [in] */ BSTR Text, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SpeakStream( + /* [in] */ ISpeechBaseStream *Stream, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ const BSTR Type, + /* [in] */ long NumItems, + /* [retval][out] */ long *NumSkipped) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetVoices( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetAudioOutputs( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE WaitUntilDone( + /* [in] */ long msTimeout, + /* [retval][out] */ VARIANT_BOOL *Done) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE SpeakCompleteEvent( + /* [retval][out] */ long *Handle) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData = 0) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechVoiceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechVoice * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechVoice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechVoice * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechVoice * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechVoice * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechVoice * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechVoice * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + ISpeechVoice * This, + /* [retval][out] */ ISpeechVoiceStatus **Status); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Voice )( + ISpeechVoice * This, + /* [retval][out] */ ISpeechObjectToken **Voice); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Voice )( + ISpeechVoice * This, + /* [in] */ ISpeechObjectToken *Voice); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioOutput )( + ISpeechVoice * This, + /* [retval][out] */ ISpeechObjectToken **AudioOutput); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_AudioOutput )( + ISpeechVoice * This, + /* [in] */ ISpeechObjectToken *AudioOutput); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioOutputStream )( + ISpeechVoice * This, + /* [retval][out] */ ISpeechBaseStream **AudioOutputStream); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_AudioOutputStream )( + ISpeechVoice * This, + /* [in] */ ISpeechBaseStream *AudioOutputStream); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rate )( + ISpeechVoice * This, + /* [retval][out] */ long *Rate); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Rate )( + ISpeechVoice * This, + /* [in] */ long Rate); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( + ISpeechVoice * This, + /* [retval][out] */ long *Volume); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( + ISpeechVoice * This, + /* [in] */ long Volume); + + /* [id][helpstring][hidden][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowAudioOutputFormatChangesOnNextSet )( + ISpeechVoice * This, + /* [in] */ VARIANT_BOOL Allow); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowAudioOutputFormatChangesOnNextSet )( + ISpeechVoice * This, + /* [retval][out] */ VARIANT_BOOL *Allow); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventInterests )( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoiceEvents *EventInterestFlags); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EventInterests )( + ISpeechVoice * This, + /* [in] */ SpeechVoiceEvents EventInterestFlags); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Priority )( + ISpeechVoice * This, + /* [in] */ SpeechVoicePriority Priority); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Priority )( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoicePriority *Priority); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AlertBoundary )( + ISpeechVoice * This, + /* [in] */ SpeechVoiceEvents Boundary); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AlertBoundary )( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoiceEvents *Boundary); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SynchronousSpeakTimeout )( + ISpeechVoice * This, + /* [in] */ long msTimeout); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SynchronousSpeakTimeout )( + ISpeechVoice * This, + /* [retval][out] */ long *msTimeout); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Speak )( + ISpeechVoice * This, + /* [in] */ BSTR Text, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SpeakStream )( + ISpeechVoice * This, + /* [in] */ ISpeechBaseStream *Stream, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Pause )( + ISpeechVoice * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Resume )( + ISpeechVoice * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Skip )( + ISpeechVoice * This, + /* [in] */ const BSTR Type, + /* [in] */ long NumItems, + /* [retval][out] */ long *NumSkipped); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVoices )( + ISpeechVoice * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetAudioOutputs )( + ISpeechVoice * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *WaitUntilDone )( + ISpeechVoice * This, + /* [in] */ long msTimeout, + /* [retval][out] */ VARIANT_BOOL *Done); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SpeakCompleteEvent )( + ISpeechVoice * This, + /* [retval][out] */ long *Handle); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpeechVoice * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpeechVoice * This, + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData); + + END_INTERFACE + } ISpeechVoiceVtbl; + + interface ISpeechVoice + { + CONST_VTBL struct ISpeechVoiceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechVoice_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechVoice_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechVoice_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechVoice_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechVoice_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechVoice_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechVoice_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechVoice_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define ISpeechVoice_get_Voice(This,Voice) \ + (This)->lpVtbl -> get_Voice(This,Voice) + +#define ISpeechVoice_putref_Voice(This,Voice) \ + (This)->lpVtbl -> putref_Voice(This,Voice) + +#define ISpeechVoice_get_AudioOutput(This,AudioOutput) \ + (This)->lpVtbl -> get_AudioOutput(This,AudioOutput) + +#define ISpeechVoice_putref_AudioOutput(This,AudioOutput) \ + (This)->lpVtbl -> putref_AudioOutput(This,AudioOutput) + +#define ISpeechVoice_get_AudioOutputStream(This,AudioOutputStream) \ + (This)->lpVtbl -> get_AudioOutputStream(This,AudioOutputStream) + +#define ISpeechVoice_putref_AudioOutputStream(This,AudioOutputStream) \ + (This)->lpVtbl -> putref_AudioOutputStream(This,AudioOutputStream) + +#define ISpeechVoice_get_Rate(This,Rate) \ + (This)->lpVtbl -> get_Rate(This,Rate) + +#define ISpeechVoice_put_Rate(This,Rate) \ + (This)->lpVtbl -> put_Rate(This,Rate) + +#define ISpeechVoice_get_Volume(This,Volume) \ + (This)->lpVtbl -> get_Volume(This,Volume) + +#define ISpeechVoice_put_Volume(This,Volume) \ + (This)->lpVtbl -> put_Volume(This,Volume) + +#define ISpeechVoice_put_AllowAudioOutputFormatChangesOnNextSet(This,Allow) \ + (This)->lpVtbl -> put_AllowAudioOutputFormatChangesOnNextSet(This,Allow) + +#define ISpeechVoice_get_AllowAudioOutputFormatChangesOnNextSet(This,Allow) \ + (This)->lpVtbl -> get_AllowAudioOutputFormatChangesOnNextSet(This,Allow) + +#define ISpeechVoice_get_EventInterests(This,EventInterestFlags) \ + (This)->lpVtbl -> get_EventInterests(This,EventInterestFlags) + +#define ISpeechVoice_put_EventInterests(This,EventInterestFlags) \ + (This)->lpVtbl -> put_EventInterests(This,EventInterestFlags) + +#define ISpeechVoice_put_Priority(This,Priority) \ + (This)->lpVtbl -> put_Priority(This,Priority) + +#define ISpeechVoice_get_Priority(This,Priority) \ + (This)->lpVtbl -> get_Priority(This,Priority) + +#define ISpeechVoice_put_AlertBoundary(This,Boundary) \ + (This)->lpVtbl -> put_AlertBoundary(This,Boundary) + +#define ISpeechVoice_get_AlertBoundary(This,Boundary) \ + (This)->lpVtbl -> get_AlertBoundary(This,Boundary) + +#define ISpeechVoice_put_SynchronousSpeakTimeout(This,msTimeout) \ + (This)->lpVtbl -> put_SynchronousSpeakTimeout(This,msTimeout) + +#define ISpeechVoice_get_SynchronousSpeakTimeout(This,msTimeout) \ + (This)->lpVtbl -> get_SynchronousSpeakTimeout(This,msTimeout) + +#define ISpeechVoice_Speak(This,Text,Flags,StreamNumber) \ + (This)->lpVtbl -> Speak(This,Text,Flags,StreamNumber) + +#define ISpeechVoice_SpeakStream(This,Stream,Flags,StreamNumber) \ + (This)->lpVtbl -> SpeakStream(This,Stream,Flags,StreamNumber) + +#define ISpeechVoice_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define ISpeechVoice_Resume(This) \ + (This)->lpVtbl -> Resume(This) + +#define ISpeechVoice_Skip(This,Type,NumItems,NumSkipped) \ + (This)->lpVtbl -> Skip(This,Type,NumItems,NumSkipped) + +#define ISpeechVoice_GetVoices(This,RequiredAttributes,OptionalAttributes,ObjectTokens) \ + (This)->lpVtbl -> GetVoices(This,RequiredAttributes,OptionalAttributes,ObjectTokens) + +#define ISpeechVoice_GetAudioOutputs(This,RequiredAttributes,OptionalAttributes,ObjectTokens) \ + (This)->lpVtbl -> GetAudioOutputs(This,RequiredAttributes,OptionalAttributes,ObjectTokens) + +#define ISpeechVoice_WaitUntilDone(This,msTimeout,Done) \ + (This)->lpVtbl -> WaitUntilDone(This,msTimeout,Done) + +#define ISpeechVoice_SpeakCompleteEvent(This,Handle) \ + (This)->lpVtbl -> SpeakCompleteEvent(This,Handle) + +#define ISpeechVoice_IsUISupported(This,TypeOfUI,ExtraData,Supported) \ + (This)->lpVtbl -> IsUISupported(This,TypeOfUI,ExtraData,Supported) + +#define ISpeechVoice_DisplayUI(This,hWndParent,Title,TypeOfUI,ExtraData) \ + (This)->lpVtbl -> DisplayUI(This,hWndParent,Title,TypeOfUI,ExtraData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_Status_Proxy( + ISpeechVoice * This, + /* [retval][out] */ ISpeechVoiceStatus **Status); + + +void __RPC_STUB ISpeechVoice_get_Status_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_Voice_Proxy( + ISpeechVoice * This, + /* [retval][out] */ ISpeechObjectToken **Voice); + + +void __RPC_STUB ISpeechVoice_get_Voice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_putref_Voice_Proxy( + ISpeechVoice * This, + /* [in] */ ISpeechObjectToken *Voice); + + +void __RPC_STUB ISpeechVoice_putref_Voice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_AudioOutput_Proxy( + ISpeechVoice * This, + /* [retval][out] */ ISpeechObjectToken **AudioOutput); + + +void __RPC_STUB ISpeechVoice_get_AudioOutput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_putref_AudioOutput_Proxy( + ISpeechVoice * This, + /* [in] */ ISpeechObjectToken *AudioOutput); + + +void __RPC_STUB ISpeechVoice_putref_AudioOutput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_AudioOutputStream_Proxy( + ISpeechVoice * This, + /* [retval][out] */ ISpeechBaseStream **AudioOutputStream); + + +void __RPC_STUB ISpeechVoice_get_AudioOutputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_putref_AudioOutputStream_Proxy( + ISpeechVoice * This, + /* [in] */ ISpeechBaseStream *AudioOutputStream); + + +void __RPC_STUB ISpeechVoice_putref_AudioOutputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_Rate_Proxy( + ISpeechVoice * This, + /* [retval][out] */ long *Rate); + + +void __RPC_STUB ISpeechVoice_get_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_Rate_Proxy( + ISpeechVoice * This, + /* [in] */ long Rate); + + +void __RPC_STUB ISpeechVoice_put_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_Volume_Proxy( + ISpeechVoice * This, + /* [retval][out] */ long *Volume); + + +void __RPC_STUB ISpeechVoice_get_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_Volume_Proxy( + ISpeechVoice * This, + /* [in] */ long Volume); + + +void __RPC_STUB ISpeechVoice_put_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_AllowAudioOutputFormatChangesOnNextSet_Proxy( + ISpeechVoice * This, + /* [in] */ VARIANT_BOOL Allow); + + +void __RPC_STUB ISpeechVoice_put_AllowAudioOutputFormatChangesOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_AllowAudioOutputFormatChangesOnNextSet_Proxy( + ISpeechVoice * This, + /* [retval][out] */ VARIANT_BOOL *Allow); + + +void __RPC_STUB ISpeechVoice_get_AllowAudioOutputFormatChangesOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_EventInterests_Proxy( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoiceEvents *EventInterestFlags); + + +void __RPC_STUB ISpeechVoice_get_EventInterests_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_EventInterests_Proxy( + ISpeechVoice * This, + /* [in] */ SpeechVoiceEvents EventInterestFlags); + + +void __RPC_STUB ISpeechVoice_put_EventInterests_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_Priority_Proxy( + ISpeechVoice * This, + /* [in] */ SpeechVoicePriority Priority); + + +void __RPC_STUB ISpeechVoice_put_Priority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_Priority_Proxy( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoicePriority *Priority); + + +void __RPC_STUB ISpeechVoice_get_Priority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_AlertBoundary_Proxy( + ISpeechVoice * This, + /* [in] */ SpeechVoiceEvents Boundary); + + +void __RPC_STUB ISpeechVoice_put_AlertBoundary_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_AlertBoundary_Proxy( + ISpeechVoice * This, + /* [retval][out] */ SpeechVoiceEvents *Boundary); + + +void __RPC_STUB ISpeechVoice_get_AlertBoundary_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_put_SynchronousSpeakTimeout_Proxy( + ISpeechVoice * This, + /* [in] */ long msTimeout); + + +void __RPC_STUB ISpeechVoice_put_SynchronousSpeakTimeout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_get_SynchronousSpeakTimeout_Proxy( + ISpeechVoice * This, + /* [retval][out] */ long *msTimeout); + + +void __RPC_STUB ISpeechVoice_get_SynchronousSpeakTimeout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_Speak_Proxy( + ISpeechVoice * This, + /* [in] */ BSTR Text, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechVoice_Speak_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_SpeakStream_Proxy( + ISpeechVoice * This, + /* [in] */ ISpeechBaseStream *Stream, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechVoice_SpeakStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_Pause_Proxy( + ISpeechVoice * This); + + +void __RPC_STUB ISpeechVoice_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_Resume_Proxy( + ISpeechVoice * This); + + +void __RPC_STUB ISpeechVoice_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_Skip_Proxy( + ISpeechVoice * This, + /* [in] */ const BSTR Type, + /* [in] */ long NumItems, + /* [retval][out] */ long *NumSkipped); + + +void __RPC_STUB ISpeechVoice_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_GetVoices_Proxy( + ISpeechVoice * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + +void __RPC_STUB ISpeechVoice_GetVoices_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_GetAudioOutputs_Proxy( + ISpeechVoice * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + +void __RPC_STUB ISpeechVoice_GetAudioOutputs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_WaitUntilDone_Proxy( + ISpeechVoice * This, + /* [in] */ long msTimeout, + /* [retval][out] */ VARIANT_BOOL *Done); + + +void __RPC_STUB ISpeechVoice_WaitUntilDone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_SpeakCompleteEvent_Proxy( + ISpeechVoice * This, + /* [retval][out] */ long *Handle); + + +void __RPC_STUB ISpeechVoice_SpeakCompleteEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_IsUISupported_Proxy( + ISpeechVoice * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechVoice_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechVoice_DisplayUI_Proxy( + ISpeechVoice * This, + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData); + + +void __RPC_STUB ISpeechVoice_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechVoice_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechVoiceStatus_INTERFACE_DEFINED__ +#define __ISpeechVoiceStatus_INTERFACE_DEFINED__ + +/* interface ISpeechVoiceStatus */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechVoiceStatus; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8BE47B07-57F6-11d2-9EEE-00C04F797396") + ISpeechVoiceStatus : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentStreamNumber( + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LastStreamNumberQueued( + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LastHResult( + /* [retval][out] */ long *HResult) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RunningState( + /* [retval][out] */ SpeechRunState *State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_InputWordPosition( + /* [retval][out] */ long *Position) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_InputWordLength( + /* [retval][out] */ long *Length) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_InputSentencePosition( + /* [retval][out] */ long *Position) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_InputSentenceLength( + /* [retval][out] */ long *Length) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LastBookmark( + /* [retval][out] */ BSTR *Bookmark) = 0; + + virtual /* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LastBookmarkId( + /* [retval][out] */ long *BookmarkId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PhonemeId( + /* [retval][out] */ short *PhoneId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_VisemeId( + /* [retval][out] */ short *VisemeId) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechVoiceStatusVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechVoiceStatus * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechVoiceStatus * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechVoiceStatus * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechVoiceStatus * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechVoiceStatus * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechVoiceStatus * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechVoiceStatus * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentStreamNumber )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LastStreamNumberQueued )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LastHResult )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *HResult); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RunningState )( + ISpeechVoiceStatus * This, + /* [retval][out] */ SpeechRunState *State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputWordPosition )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Position); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputWordLength )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Length); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputSentencePosition )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Position); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputSentenceLength )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Length); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LastBookmark )( + ISpeechVoiceStatus * This, + /* [retval][out] */ BSTR *Bookmark); + + /* [hidden][id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LastBookmarkId )( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *BookmarkId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PhonemeId )( + ISpeechVoiceStatus * This, + /* [retval][out] */ short *PhoneId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VisemeId )( + ISpeechVoiceStatus * This, + /* [retval][out] */ short *VisemeId); + + END_INTERFACE + } ISpeechVoiceStatusVtbl; + + interface ISpeechVoiceStatus + { + CONST_VTBL struct ISpeechVoiceStatusVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechVoiceStatus_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechVoiceStatus_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechVoiceStatus_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechVoiceStatus_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechVoiceStatus_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechVoiceStatus_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechVoiceStatus_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechVoiceStatus_get_CurrentStreamNumber(This,StreamNumber) \ + (This)->lpVtbl -> get_CurrentStreamNumber(This,StreamNumber) + +#define ISpeechVoiceStatus_get_LastStreamNumberQueued(This,StreamNumber) \ + (This)->lpVtbl -> get_LastStreamNumberQueued(This,StreamNumber) + +#define ISpeechVoiceStatus_get_LastHResult(This,HResult) \ + (This)->lpVtbl -> get_LastHResult(This,HResult) + +#define ISpeechVoiceStatus_get_RunningState(This,State) \ + (This)->lpVtbl -> get_RunningState(This,State) + +#define ISpeechVoiceStatus_get_InputWordPosition(This,Position) \ + (This)->lpVtbl -> get_InputWordPosition(This,Position) + +#define ISpeechVoiceStatus_get_InputWordLength(This,Length) \ + (This)->lpVtbl -> get_InputWordLength(This,Length) + +#define ISpeechVoiceStatus_get_InputSentencePosition(This,Position) \ + (This)->lpVtbl -> get_InputSentencePosition(This,Position) + +#define ISpeechVoiceStatus_get_InputSentenceLength(This,Length) \ + (This)->lpVtbl -> get_InputSentenceLength(This,Length) + +#define ISpeechVoiceStatus_get_LastBookmark(This,Bookmark) \ + (This)->lpVtbl -> get_LastBookmark(This,Bookmark) + +#define ISpeechVoiceStatus_get_LastBookmarkId(This,BookmarkId) \ + (This)->lpVtbl -> get_LastBookmarkId(This,BookmarkId) + +#define ISpeechVoiceStatus_get_PhonemeId(This,PhoneId) \ + (This)->lpVtbl -> get_PhonemeId(This,PhoneId) + +#define ISpeechVoiceStatus_get_VisemeId(This,VisemeId) \ + (This)->lpVtbl -> get_VisemeId(This,VisemeId) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_CurrentStreamNumber_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechVoiceStatus_get_CurrentStreamNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_LastStreamNumberQueued_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechVoiceStatus_get_LastStreamNumberQueued_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_LastHResult_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *HResult); + + +void __RPC_STUB ISpeechVoiceStatus_get_LastHResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_RunningState_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ SpeechRunState *State); + + +void __RPC_STUB ISpeechVoiceStatus_get_RunningState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_InputWordPosition_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Position); + + +void __RPC_STUB ISpeechVoiceStatus_get_InputWordPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_InputWordLength_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Length); + + +void __RPC_STUB ISpeechVoiceStatus_get_InputWordLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_InputSentencePosition_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Position); + + +void __RPC_STUB ISpeechVoiceStatus_get_InputSentencePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_InputSentenceLength_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *Length); + + +void __RPC_STUB ISpeechVoiceStatus_get_InputSentenceLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_LastBookmark_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ BSTR *Bookmark); + + +void __RPC_STUB ISpeechVoiceStatus_get_LastBookmark_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_LastBookmarkId_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ long *BookmarkId); + + +void __RPC_STUB ISpeechVoiceStatus_get_LastBookmarkId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_PhonemeId_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ short *PhoneId); + + +void __RPC_STUB ISpeechVoiceStatus_get_PhonemeId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechVoiceStatus_get_VisemeId_Proxy( + ISpeechVoiceStatus * This, + /* [retval][out] */ short *VisemeId); + + +void __RPC_STUB ISpeechVoiceStatus_get_VisemeId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechVoiceStatus_INTERFACE_DEFINED__ */ + + +#ifndef ___ISpeechVoiceEvents_DISPINTERFACE_DEFINED__ +#define ___ISpeechVoiceEvents_DISPINTERFACE_DEFINED__ + +/* dispinterface _ISpeechVoiceEvents */ +/* [uuid] */ + + +EXTERN_C const IID DIID__ISpeechVoiceEvents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A372ACD1-3BEF-4bbd-8FFB-CB3E2B416AF8") + _ISpeechVoiceEvents : public IDispatch + { + }; + +#else /* C style interface */ + + typedef struct _ISpeechVoiceEventsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + _ISpeechVoiceEvents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + _ISpeechVoiceEvents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + _ISpeechVoiceEvents * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + _ISpeechVoiceEvents * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + _ISpeechVoiceEvents * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + _ISpeechVoiceEvents * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + _ISpeechVoiceEvents * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + END_INTERFACE + } _ISpeechVoiceEventsVtbl; + + interface _ISpeechVoiceEvents + { + CONST_VTBL struct _ISpeechVoiceEventsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define _ISpeechVoiceEvents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define _ISpeechVoiceEvents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define _ISpeechVoiceEvents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define _ISpeechVoiceEvents_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define _ISpeechVoiceEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define _ISpeechVoiceEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define _ISpeechVoiceEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + +#endif /* ___ISpeechVoiceEvents_DISPINTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecognizer_INTERFACE_DEFINED__ +#define __ISpeechRecognizer_INTERFACE_DEFINED__ + +/* interface ISpeechRecognizer */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecognizer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2D5F1C0C-BD75-4b08-9478-3B11FEA2586C") + ISpeechRecognizer : public IDispatch + { + public: + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_Recognizer( + /* [in] */ ISpeechObjectToken *Recognizer) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Recognizer( + /* [retval][out] */ ISpeechObjectToken **Recognizer) = 0; + + virtual /* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE put_AllowAudioInputFormatChangesOnNextSet( + /* [in] */ VARIANT_BOOL Allow) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_AllowAudioInputFormatChangesOnNextSet( + /* [retval][out] */ VARIANT_BOOL *Allow) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_AudioInput( + /* [defaultvalue][in] */ ISpeechObjectToken *AudioInput = 0) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioInput( + /* [retval][out] */ ISpeechObjectToken **AudioInput) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_AudioInputStream( + /* [defaultvalue][in] */ ISpeechBaseStream *AudioInputStream = 0) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioInputStream( + /* [retval][out] */ ISpeechBaseStream **AudioInputStream) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_IsShared( + /* [retval][out] */ VARIANT_BOOL *Shared) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_State( + /* [in] */ SpeechRecognizerState State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( + /* [retval][out] */ SpeechRecognizerState *State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Status( + /* [retval][out] */ ISpeechRecognizerStatus **Status) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_Profile( + /* [defaultvalue][in] */ ISpeechObjectToken *Profile = 0) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Profile( + /* [retval][out] */ ISpeechObjectToken **Profile) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE EmulateRecognition( + /* [in] */ VARIANT TextElements, + /* [defaultvalue][in] */ VARIANT *ElementDisplayAttributes = 0, + /* [defaultvalue][in] */ long LanguageId = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CreateRecoContext( + /* [retval][out] */ ISpeechRecoContext **NewContext) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetFormat( + /* [in] */ SpeechFormatType Type, + /* [retval][out] */ ISpeechAudioFormat **Format) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE SetPropertyNumber( + /* [in] */ const BSTR Name, + /* [in] */ long Value, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertyNumber( + /* [in] */ const BSTR Name, + /* [out][in] */ long *Value, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE SetPropertyString( + /* [in] */ const BSTR Name, + /* [in] */ const BSTR Value, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertyString( + /* [in] */ const BSTR Name, + /* [out][in] */ BSTR *Value, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetRecognizers( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetAudioInputs( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetProfiles( + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecognizerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecognizer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecognizer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecognizer * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecognizer * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecognizer * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecognizer * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecognizer * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Recognizer )( + ISpeechRecognizer * This, + /* [in] */ ISpeechObjectToken *Recognizer); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Recognizer )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **Recognizer); + + /* [id][helpstring][hidden][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowAudioInputFormatChangesOnNextSet )( + ISpeechRecognizer * This, + /* [in] */ VARIANT_BOOL Allow); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowAudioInputFormatChangesOnNextSet )( + ISpeechRecognizer * This, + /* [retval][out] */ VARIANT_BOOL *Allow); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_AudioInput )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechObjectToken *AudioInput); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioInput )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **AudioInput); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_AudioInputStream )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechBaseStream *AudioInputStream); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioInputStream )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechBaseStream **AudioInputStream); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsShared )( + ISpeechRecognizer * This, + /* [retval][out] */ VARIANT_BOOL *Shared); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( + ISpeechRecognizer * This, + /* [in] */ SpeechRecognizerState State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( + ISpeechRecognizer * This, + /* [retval][out] */ SpeechRecognizerState *State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechRecognizerStatus **Status); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Profile )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechObjectToken *Profile); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Profile )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **Profile); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *EmulateRecognition )( + ISpeechRecognizer * This, + /* [in] */ VARIANT TextElements, + /* [defaultvalue][in] */ VARIANT *ElementDisplayAttributes, + /* [defaultvalue][in] */ long LanguageId); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateRecoContext )( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechRecoContext **NewContext); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetFormat )( + ISpeechRecognizer * This, + /* [in] */ SpeechFormatType Type, + /* [retval][out] */ ISpeechAudioFormat **Format); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPropertyNumber )( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [in] */ long Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertyNumber )( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [out][in] */ long *Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPropertyString )( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [in] */ const BSTR Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertyString )( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [out][in] */ BSTR *Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpeechRecognizer * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpeechRecognizer * This, + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRecognizers )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetAudioInputs )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetProfiles )( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + END_INTERFACE + } ISpeechRecognizerVtbl; + + interface ISpeechRecognizer + { + CONST_VTBL struct ISpeechRecognizerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecognizer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecognizer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecognizer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecognizer_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecognizer_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecognizer_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecognizer_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecognizer_putref_Recognizer(This,Recognizer) \ + (This)->lpVtbl -> putref_Recognizer(This,Recognizer) + +#define ISpeechRecognizer_get_Recognizer(This,Recognizer) \ + (This)->lpVtbl -> get_Recognizer(This,Recognizer) + +#define ISpeechRecognizer_put_AllowAudioInputFormatChangesOnNextSet(This,Allow) \ + (This)->lpVtbl -> put_AllowAudioInputFormatChangesOnNextSet(This,Allow) + +#define ISpeechRecognizer_get_AllowAudioInputFormatChangesOnNextSet(This,Allow) \ + (This)->lpVtbl -> get_AllowAudioInputFormatChangesOnNextSet(This,Allow) + +#define ISpeechRecognizer_putref_AudioInput(This,AudioInput) \ + (This)->lpVtbl -> putref_AudioInput(This,AudioInput) + +#define ISpeechRecognizer_get_AudioInput(This,AudioInput) \ + (This)->lpVtbl -> get_AudioInput(This,AudioInput) + +#define ISpeechRecognizer_putref_AudioInputStream(This,AudioInputStream) \ + (This)->lpVtbl -> putref_AudioInputStream(This,AudioInputStream) + +#define ISpeechRecognizer_get_AudioInputStream(This,AudioInputStream) \ + (This)->lpVtbl -> get_AudioInputStream(This,AudioInputStream) + +#define ISpeechRecognizer_get_IsShared(This,Shared) \ + (This)->lpVtbl -> get_IsShared(This,Shared) + +#define ISpeechRecognizer_put_State(This,State) \ + (This)->lpVtbl -> put_State(This,State) + +#define ISpeechRecognizer_get_State(This,State) \ + (This)->lpVtbl -> get_State(This,State) + +#define ISpeechRecognizer_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define ISpeechRecognizer_putref_Profile(This,Profile) \ + (This)->lpVtbl -> putref_Profile(This,Profile) + +#define ISpeechRecognizer_get_Profile(This,Profile) \ + (This)->lpVtbl -> get_Profile(This,Profile) + +#define ISpeechRecognizer_EmulateRecognition(This,TextElements,ElementDisplayAttributes,LanguageId) \ + (This)->lpVtbl -> EmulateRecognition(This,TextElements,ElementDisplayAttributes,LanguageId) + +#define ISpeechRecognizer_CreateRecoContext(This,NewContext) \ + (This)->lpVtbl -> CreateRecoContext(This,NewContext) + +#define ISpeechRecognizer_GetFormat(This,Type,Format) \ + (This)->lpVtbl -> GetFormat(This,Type,Format) + +#define ISpeechRecognizer_SetPropertyNumber(This,Name,Value,Supported) \ + (This)->lpVtbl -> SetPropertyNumber(This,Name,Value,Supported) + +#define ISpeechRecognizer_GetPropertyNumber(This,Name,Value,Supported) \ + (This)->lpVtbl -> GetPropertyNumber(This,Name,Value,Supported) + +#define ISpeechRecognizer_SetPropertyString(This,Name,Value,Supported) \ + (This)->lpVtbl -> SetPropertyString(This,Name,Value,Supported) + +#define ISpeechRecognizer_GetPropertyString(This,Name,Value,Supported) \ + (This)->lpVtbl -> GetPropertyString(This,Name,Value,Supported) + +#define ISpeechRecognizer_IsUISupported(This,TypeOfUI,ExtraData,Supported) \ + (This)->lpVtbl -> IsUISupported(This,TypeOfUI,ExtraData,Supported) + +#define ISpeechRecognizer_DisplayUI(This,hWndParent,Title,TypeOfUI,ExtraData) \ + (This)->lpVtbl -> DisplayUI(This,hWndParent,Title,TypeOfUI,ExtraData) + +#define ISpeechRecognizer_GetRecognizers(This,RequiredAttributes,OptionalAttributes,ObjectTokens) \ + (This)->lpVtbl -> GetRecognizers(This,RequiredAttributes,OptionalAttributes,ObjectTokens) + +#define ISpeechRecognizer_GetAudioInputs(This,RequiredAttributes,OptionalAttributes,ObjectTokens) \ + (This)->lpVtbl -> GetAudioInputs(This,RequiredAttributes,OptionalAttributes,ObjectTokens) + +#define ISpeechRecognizer_GetProfiles(This,RequiredAttributes,OptionalAttributes,ObjectTokens) \ + (This)->lpVtbl -> GetProfiles(This,RequiredAttributes,OptionalAttributes,ObjectTokens) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_putref_Recognizer_Proxy( + ISpeechRecognizer * This, + /* [in] */ ISpeechObjectToken *Recognizer); + + +void __RPC_STUB ISpeechRecognizer_putref_Recognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_Recognizer_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **Recognizer); + + +void __RPC_STUB ISpeechRecognizer_get_Recognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_put_AllowAudioInputFormatChangesOnNextSet_Proxy( + ISpeechRecognizer * This, + /* [in] */ VARIANT_BOOL Allow); + + +void __RPC_STUB ISpeechRecognizer_put_AllowAudioInputFormatChangesOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_AllowAudioInputFormatChangesOnNextSet_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ VARIANT_BOOL *Allow); + + +void __RPC_STUB ISpeechRecognizer_get_AllowAudioInputFormatChangesOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_putref_AudioInput_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechObjectToken *AudioInput); + + +void __RPC_STUB ISpeechRecognizer_putref_AudioInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_AudioInput_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **AudioInput); + + +void __RPC_STUB ISpeechRecognizer_get_AudioInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_putref_AudioInputStream_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechBaseStream *AudioInputStream); + + +void __RPC_STUB ISpeechRecognizer_putref_AudioInputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_AudioInputStream_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechBaseStream **AudioInputStream); + + +void __RPC_STUB ISpeechRecognizer_get_AudioInputStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_IsShared_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ VARIANT_BOOL *Shared); + + +void __RPC_STUB ISpeechRecognizer_get_IsShared_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_put_State_Proxy( + ISpeechRecognizer * This, + /* [in] */ SpeechRecognizerState State); + + +void __RPC_STUB ISpeechRecognizer_put_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_State_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ SpeechRecognizerState *State); + + +void __RPC_STUB ISpeechRecognizer_get_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_Status_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechRecognizerStatus **Status); + + +void __RPC_STUB ISpeechRecognizer_get_Status_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_putref_Profile_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ ISpeechObjectToken *Profile); + + +void __RPC_STUB ISpeechRecognizer_putref_Profile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_get_Profile_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechObjectToken **Profile); + + +void __RPC_STUB ISpeechRecognizer_get_Profile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_EmulateRecognition_Proxy( + ISpeechRecognizer * This, + /* [in] */ VARIANT TextElements, + /* [defaultvalue][in] */ VARIANT *ElementDisplayAttributes, + /* [defaultvalue][in] */ long LanguageId); + + +void __RPC_STUB ISpeechRecognizer_EmulateRecognition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_CreateRecoContext_Proxy( + ISpeechRecognizer * This, + /* [retval][out] */ ISpeechRecoContext **NewContext); + + +void __RPC_STUB ISpeechRecognizer_CreateRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetFormat_Proxy( + ISpeechRecognizer * This, + /* [in] */ SpeechFormatType Type, + /* [retval][out] */ ISpeechAudioFormat **Format); + + +void __RPC_STUB ISpeechRecognizer_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_SetPropertyNumber_Proxy( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [in] */ long Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechRecognizer_SetPropertyNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetPropertyNumber_Proxy( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [out][in] */ long *Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechRecognizer_GetPropertyNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_SetPropertyString_Proxy( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [in] */ const BSTR Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechRecognizer_SetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetPropertyString_Proxy( + ISpeechRecognizer * This, + /* [in] */ const BSTR Name, + /* [out][in] */ BSTR *Value, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechRecognizer_GetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_IsUISupported_Proxy( + ISpeechRecognizer * This, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData, + /* [retval][out] */ VARIANT_BOOL *Supported); + + +void __RPC_STUB ISpeechRecognizer_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_DisplayUI_Proxy( + ISpeechRecognizer * This, + /* [in] */ long hWndParent, + /* [in] */ BSTR Title, + /* [in] */ const BSTR TypeOfUI, + /* [defaultvalue][in] */ const VARIANT *ExtraData); + + +void __RPC_STUB ISpeechRecognizer_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetRecognizers_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + +void __RPC_STUB ISpeechRecognizer_GetRecognizers_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetAudioInputs_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + +void __RPC_STUB ISpeechRecognizer_GetAudioInputs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizer_GetProfiles_Proxy( + ISpeechRecognizer * This, + /* [defaultvalue][in] */ BSTR RequiredAttributes, + /* [defaultvalue][in] */ BSTR OptionalAttributes, + /* [retval][out] */ ISpeechObjectTokens **ObjectTokens); + + +void __RPC_STUB ISpeechRecognizer_GetProfiles_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecognizer_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecognizerStatus_INTERFACE_DEFINED__ +#define __ISpeechRecognizerStatus_INTERFACE_DEFINED__ + +/* interface ISpeechRecognizerStatus */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecognizerStatus; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BFF9E781-53EC-484e-BB8A-0E1B5551E35C") + ISpeechRecognizerStatus : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioStatus( + /* [retval][out] */ ISpeechAudioStatus **AudioStatus) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentStreamPosition( + /* [retval][out] */ VARIANT *pCurrentStreamPos) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentStreamNumber( + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NumberOfActiveRules( + /* [retval][out] */ long *NumberOfActiveRules) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ClsidEngine( + /* [retval][out] */ BSTR *ClsidEngine) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SupportedLanguages( + /* [retval][out] */ VARIANT *SupportedLanguages) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecognizerStatusVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecognizerStatus * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecognizerStatus * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecognizerStatus * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecognizerStatus * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecognizerStatus * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecognizerStatus * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecognizerStatus * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioStatus )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ ISpeechAudioStatus **AudioStatus); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentStreamPosition )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ VARIANT *pCurrentStreamPos); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentStreamNumber )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NumberOfActiveRules )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ long *NumberOfActiveRules); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ClsidEngine )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ BSTR *ClsidEngine); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SupportedLanguages )( + ISpeechRecognizerStatus * This, + /* [retval][out] */ VARIANT *SupportedLanguages); + + END_INTERFACE + } ISpeechRecognizerStatusVtbl; + + interface ISpeechRecognizerStatus + { + CONST_VTBL struct ISpeechRecognizerStatusVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecognizerStatus_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecognizerStatus_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecognizerStatus_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecognizerStatus_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecognizerStatus_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecognizerStatus_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecognizerStatus_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecognizerStatus_get_AudioStatus(This,AudioStatus) \ + (This)->lpVtbl -> get_AudioStatus(This,AudioStatus) + +#define ISpeechRecognizerStatus_get_CurrentStreamPosition(This,pCurrentStreamPos) \ + (This)->lpVtbl -> get_CurrentStreamPosition(This,pCurrentStreamPos) + +#define ISpeechRecognizerStatus_get_CurrentStreamNumber(This,StreamNumber) \ + (This)->lpVtbl -> get_CurrentStreamNumber(This,StreamNumber) + +#define ISpeechRecognizerStatus_get_NumberOfActiveRules(This,NumberOfActiveRules) \ + (This)->lpVtbl -> get_NumberOfActiveRules(This,NumberOfActiveRules) + +#define ISpeechRecognizerStatus_get_ClsidEngine(This,ClsidEngine) \ + (This)->lpVtbl -> get_ClsidEngine(This,ClsidEngine) + +#define ISpeechRecognizerStatus_get_SupportedLanguages(This,SupportedLanguages) \ + (This)->lpVtbl -> get_SupportedLanguages(This,SupportedLanguages) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_AudioStatus_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ ISpeechAudioStatus **AudioStatus); + + +void __RPC_STUB ISpeechRecognizerStatus_get_AudioStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_CurrentStreamPosition_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ VARIANT *pCurrentStreamPos); + + +void __RPC_STUB ISpeechRecognizerStatus_get_CurrentStreamPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_CurrentStreamNumber_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechRecognizerStatus_get_CurrentStreamNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_NumberOfActiveRules_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ long *NumberOfActiveRules); + + +void __RPC_STUB ISpeechRecognizerStatus_get_NumberOfActiveRules_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_ClsidEngine_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ BSTR *ClsidEngine); + + +void __RPC_STUB ISpeechRecognizerStatus_get_ClsidEngine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecognizerStatus_get_SupportedLanguages_Proxy( + ISpeechRecognizerStatus * This, + /* [retval][out] */ VARIANT *SupportedLanguages); + + +void __RPC_STUB ISpeechRecognizerStatus_get_SupportedLanguages_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecognizerStatus_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecoContext_INTERFACE_DEFINED__ +#define __ISpeechRecoContext_INTERFACE_DEFINED__ + +/* interface ISpeechRecoContext */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecoContext; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("580AA49D-7E1E-4809-B8E2-57DA806104B8") + ISpeechRecoContext : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Recognizer( + /* [retval][out] */ ISpeechRecognizer **Recognizer) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioInputInterferenceStatus( + /* [retval][out] */ SpeechInterference *Interference) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RequestedUIType( + /* [retval][out] */ BSTR *UIType) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_Voice( + /* [in] */ ISpeechVoice *Voice) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Voice( + /* [retval][out] */ ISpeechVoice **Voice) = 0; + + virtual /* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE put_AllowVoiceFormatMatchingOnNextSet( + /* [in] */ VARIANT_BOOL Allow) = 0; + + virtual /* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_AllowVoiceFormatMatchingOnNextSet( + /* [retval][out] */ VARIANT_BOOL *pAllow) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_VoicePurgeEvent( + /* [in] */ SpeechRecoEvents EventInterest) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_VoicePurgeEvent( + /* [retval][out] */ SpeechRecoEvents *EventInterest) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_EventInterests( + /* [in] */ SpeechRecoEvents EventInterest) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EventInterests( + /* [retval][out] */ SpeechRecoEvents *EventInterest) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_CmdMaxAlternates( + /* [in] */ long MaxAlternates) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_CmdMaxAlternates( + /* [retval][out] */ long *MaxAlternates) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_State( + /* [in] */ SpeechRecoContextState State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( + /* [retval][out] */ SpeechRecoContextState *State) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_RetainedAudio( + /* [in] */ SpeechRetainedAudioOptions Option) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RetainedAudio( + /* [retval][out] */ SpeechRetainedAudioOptions *Option) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_RetainedAudioFormat( + /* [in] */ ISpeechAudioFormat *Format) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RetainedAudioFormat( + /* [retval][out] */ ISpeechAudioFormat **Format) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CreateGrammar( + /* [defaultvalue][in] */ VARIANT GrammarId, + /* [retval][out] */ ISpeechRecoGrammar **Grammar) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CreateResultFromMemory( + /* [in] */ VARIANT *ResultBlock, + /* [retval][out] */ ISpeechRecoResult **Result) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Bookmark( + /* [in] */ SpeechBookmarkOptions Options, + /* [in] */ VARIANT StreamPos, + /* [in] */ VARIANT BookmarkId) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetAdaptationData( + /* [in] */ BSTR AdaptationString) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecoContextVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecoContext * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecoContext * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecoContext * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecoContext * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecoContext * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecoContext * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecoContext * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Recognizer )( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechRecognizer **Recognizer); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioInputInterferenceStatus )( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechInterference *Interference); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RequestedUIType )( + ISpeechRecoContext * This, + /* [retval][out] */ BSTR *UIType); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_Voice )( + ISpeechRecoContext * This, + /* [in] */ ISpeechVoice *Voice); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Voice )( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechVoice **Voice); + + /* [id][helpstring][hidden][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AllowVoiceFormatMatchingOnNextSet )( + ISpeechRecoContext * This, + /* [in] */ VARIANT_BOOL Allow); + + /* [id][helpstring][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AllowVoiceFormatMatchingOnNextSet )( + ISpeechRecoContext * This, + /* [retval][out] */ VARIANT_BOOL *pAllow); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_VoicePurgeEvent )( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoEvents EventInterest); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_VoicePurgeEvent )( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoEvents *EventInterest); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_EventInterests )( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoEvents EventInterest); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EventInterests )( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoEvents *EventInterest); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CmdMaxAlternates )( + ISpeechRecoContext * This, + /* [in] */ long MaxAlternates); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CmdMaxAlternates )( + ISpeechRecoContext * This, + /* [retval][out] */ long *MaxAlternates); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoContextState State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoContextState *State); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_RetainedAudio )( + ISpeechRecoContext * This, + /* [in] */ SpeechRetainedAudioOptions Option); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RetainedAudio )( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRetainedAudioOptions *Option); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_RetainedAudioFormat )( + ISpeechRecoContext * This, + /* [in] */ ISpeechAudioFormat *Format); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RetainedAudioFormat )( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechAudioFormat **Format); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Pause )( + ISpeechRecoContext * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Resume )( + ISpeechRecoContext * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateGrammar )( + ISpeechRecoContext * This, + /* [defaultvalue][in] */ VARIANT GrammarId, + /* [retval][out] */ ISpeechRecoGrammar **Grammar); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateResultFromMemory )( + ISpeechRecoContext * This, + /* [in] */ VARIANT *ResultBlock, + /* [retval][out] */ ISpeechRecoResult **Result); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Bookmark )( + ISpeechRecoContext * This, + /* [in] */ SpeechBookmarkOptions Options, + /* [in] */ VARIANT StreamPos, + /* [in] */ VARIANT BookmarkId); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetAdaptationData )( + ISpeechRecoContext * This, + /* [in] */ BSTR AdaptationString); + + END_INTERFACE + } ISpeechRecoContextVtbl; + + interface ISpeechRecoContext + { + CONST_VTBL struct ISpeechRecoContextVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecoContext_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecoContext_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecoContext_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecoContext_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecoContext_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecoContext_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecoContext_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecoContext_get_Recognizer(This,Recognizer) \ + (This)->lpVtbl -> get_Recognizer(This,Recognizer) + +#define ISpeechRecoContext_get_AudioInputInterferenceStatus(This,Interference) \ + (This)->lpVtbl -> get_AudioInputInterferenceStatus(This,Interference) + +#define ISpeechRecoContext_get_RequestedUIType(This,UIType) \ + (This)->lpVtbl -> get_RequestedUIType(This,UIType) + +#define ISpeechRecoContext_putref_Voice(This,Voice) \ + (This)->lpVtbl -> putref_Voice(This,Voice) + +#define ISpeechRecoContext_get_Voice(This,Voice) \ + (This)->lpVtbl -> get_Voice(This,Voice) + +#define ISpeechRecoContext_put_AllowVoiceFormatMatchingOnNextSet(This,Allow) \ + (This)->lpVtbl -> put_AllowVoiceFormatMatchingOnNextSet(This,Allow) + +#define ISpeechRecoContext_get_AllowVoiceFormatMatchingOnNextSet(This,pAllow) \ + (This)->lpVtbl -> get_AllowVoiceFormatMatchingOnNextSet(This,pAllow) + +#define ISpeechRecoContext_put_VoicePurgeEvent(This,EventInterest) \ + (This)->lpVtbl -> put_VoicePurgeEvent(This,EventInterest) + +#define ISpeechRecoContext_get_VoicePurgeEvent(This,EventInterest) \ + (This)->lpVtbl -> get_VoicePurgeEvent(This,EventInterest) + +#define ISpeechRecoContext_put_EventInterests(This,EventInterest) \ + (This)->lpVtbl -> put_EventInterests(This,EventInterest) + +#define ISpeechRecoContext_get_EventInterests(This,EventInterest) \ + (This)->lpVtbl -> get_EventInterests(This,EventInterest) + +#define ISpeechRecoContext_put_CmdMaxAlternates(This,MaxAlternates) \ + (This)->lpVtbl -> put_CmdMaxAlternates(This,MaxAlternates) + +#define ISpeechRecoContext_get_CmdMaxAlternates(This,MaxAlternates) \ + (This)->lpVtbl -> get_CmdMaxAlternates(This,MaxAlternates) + +#define ISpeechRecoContext_put_State(This,State) \ + (This)->lpVtbl -> put_State(This,State) + +#define ISpeechRecoContext_get_State(This,State) \ + (This)->lpVtbl -> get_State(This,State) + +#define ISpeechRecoContext_put_RetainedAudio(This,Option) \ + (This)->lpVtbl -> put_RetainedAudio(This,Option) + +#define ISpeechRecoContext_get_RetainedAudio(This,Option) \ + (This)->lpVtbl -> get_RetainedAudio(This,Option) + +#define ISpeechRecoContext_putref_RetainedAudioFormat(This,Format) \ + (This)->lpVtbl -> putref_RetainedAudioFormat(This,Format) + +#define ISpeechRecoContext_get_RetainedAudioFormat(This,Format) \ + (This)->lpVtbl -> get_RetainedAudioFormat(This,Format) + +#define ISpeechRecoContext_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define ISpeechRecoContext_Resume(This) \ + (This)->lpVtbl -> Resume(This) + +#define ISpeechRecoContext_CreateGrammar(This,GrammarId,Grammar) \ + (This)->lpVtbl -> CreateGrammar(This,GrammarId,Grammar) + +#define ISpeechRecoContext_CreateResultFromMemory(This,ResultBlock,Result) \ + (This)->lpVtbl -> CreateResultFromMemory(This,ResultBlock,Result) + +#define ISpeechRecoContext_Bookmark(This,Options,StreamPos,BookmarkId) \ + (This)->lpVtbl -> Bookmark(This,Options,StreamPos,BookmarkId) + +#define ISpeechRecoContext_SetAdaptationData(This,AdaptationString) \ + (This)->lpVtbl -> SetAdaptationData(This,AdaptationString) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_Recognizer_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechRecognizer **Recognizer); + + +void __RPC_STUB ISpeechRecoContext_get_Recognizer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_AudioInputInterferenceStatus_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechInterference *Interference); + + +void __RPC_STUB ISpeechRecoContext_get_AudioInputInterferenceStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_RequestedUIType_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ BSTR *UIType); + + +void __RPC_STUB ISpeechRecoContext_get_RequestedUIType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_putref_Voice_Proxy( + ISpeechRecoContext * This, + /* [in] */ ISpeechVoice *Voice); + + +void __RPC_STUB ISpeechRecoContext_putref_Voice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_Voice_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechVoice **Voice); + + +void __RPC_STUB ISpeechRecoContext_get_Voice_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_AllowVoiceFormatMatchingOnNextSet_Proxy( + ISpeechRecoContext * This, + /* [in] */ VARIANT_BOOL Allow); + + +void __RPC_STUB ISpeechRecoContext_put_AllowVoiceFormatMatchingOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][hidden][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_AllowVoiceFormatMatchingOnNextSet_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ VARIANT_BOOL *pAllow); + + +void __RPC_STUB ISpeechRecoContext_get_AllowVoiceFormatMatchingOnNextSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_VoicePurgeEvent_Proxy( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoEvents EventInterest); + + +void __RPC_STUB ISpeechRecoContext_put_VoicePurgeEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_VoicePurgeEvent_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoEvents *EventInterest); + + +void __RPC_STUB ISpeechRecoContext_get_VoicePurgeEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_EventInterests_Proxy( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoEvents EventInterest); + + +void __RPC_STUB ISpeechRecoContext_put_EventInterests_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_EventInterests_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoEvents *EventInterest); + + +void __RPC_STUB ISpeechRecoContext_get_EventInterests_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_CmdMaxAlternates_Proxy( + ISpeechRecoContext * This, + /* [in] */ long MaxAlternates); + + +void __RPC_STUB ISpeechRecoContext_put_CmdMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_CmdMaxAlternates_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ long *MaxAlternates); + + +void __RPC_STUB ISpeechRecoContext_get_CmdMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_State_Proxy( + ISpeechRecoContext * This, + /* [in] */ SpeechRecoContextState State); + + +void __RPC_STUB ISpeechRecoContext_put_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_State_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRecoContextState *State); + + +void __RPC_STUB ISpeechRecoContext_get_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_put_RetainedAudio_Proxy( + ISpeechRecoContext * This, + /* [in] */ SpeechRetainedAudioOptions Option); + + +void __RPC_STUB ISpeechRecoContext_put_RetainedAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_RetainedAudio_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ SpeechRetainedAudioOptions *Option); + + +void __RPC_STUB ISpeechRecoContext_get_RetainedAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_putref_RetainedAudioFormat_Proxy( + ISpeechRecoContext * This, + /* [in] */ ISpeechAudioFormat *Format); + + +void __RPC_STUB ISpeechRecoContext_putref_RetainedAudioFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_get_RetainedAudioFormat_Proxy( + ISpeechRecoContext * This, + /* [retval][out] */ ISpeechAudioFormat **Format); + + +void __RPC_STUB ISpeechRecoContext_get_RetainedAudioFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_Pause_Proxy( + ISpeechRecoContext * This); + + +void __RPC_STUB ISpeechRecoContext_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_Resume_Proxy( + ISpeechRecoContext * This); + + +void __RPC_STUB ISpeechRecoContext_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_CreateGrammar_Proxy( + ISpeechRecoContext * This, + /* [defaultvalue][in] */ VARIANT GrammarId, + /* [retval][out] */ ISpeechRecoGrammar **Grammar); + + +void __RPC_STUB ISpeechRecoContext_CreateGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_CreateResultFromMemory_Proxy( + ISpeechRecoContext * This, + /* [in] */ VARIANT *ResultBlock, + /* [retval][out] */ ISpeechRecoResult **Result); + + +void __RPC_STUB ISpeechRecoContext_CreateResultFromMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_Bookmark_Proxy( + ISpeechRecoContext * This, + /* [in] */ SpeechBookmarkOptions Options, + /* [in] */ VARIANT StreamPos, + /* [in] */ VARIANT BookmarkId); + + +void __RPC_STUB ISpeechRecoContext_Bookmark_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoContext_SetAdaptationData_Proxy( + ISpeechRecoContext * This, + /* [in] */ BSTR AdaptationString); + + +void __RPC_STUB ISpeechRecoContext_SetAdaptationData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecoContext_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecoGrammar_INTERFACE_DEFINED__ +#define __ISpeechRecoGrammar_INTERFACE_DEFINED__ + +/* interface ISpeechRecoGrammar */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecoGrammar; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B6D6F79F-2158-4e50-B5BC-9A9CCD852A09") + ISpeechRecoGrammar : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ VARIANT *Id) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RecoContext( + /* [retval][out] */ ISpeechRecoContext **RecoContext) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_State( + /* [in] */ SpeechGrammarState State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_State( + /* [retval][out] */ SpeechGrammarState *State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Rules( + /* [retval][out] */ ISpeechGrammarRules **Rules) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Reset( + /* [defaultvalue][in] */ SpeechLanguageId NewLanguage = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdLoadFromFile( + /* [in] */ const BSTR FileName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdLoadFromObject( + /* [in] */ const BSTR ClassId, + /* [in] */ const BSTR GrammarName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdLoadFromResource( + /* [in] */ long hModule, + /* [in] */ VARIANT ResourceName, + /* [in] */ VARIANT ResourceType, + /* [in] */ SpeechLanguageId LanguageId, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdLoadFromMemory( + /* [in] */ VARIANT GrammarData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdLoadFromProprietaryGrammar( + /* [in] */ const BSTR ProprietaryGuid, + /* [in] */ const BSTR ProprietaryString, + /* [in] */ VARIANT ProprietaryData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdSetRuleState( + /* [in] */ const BSTR Name, + /* [in] */ SpeechRuleState State) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CmdSetRuleIdState( + /* [in] */ long RuleId, + /* [in] */ SpeechRuleState State) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DictationLoad( + /* [defaultvalue][in] */ const BSTR TopicName = L"", + /* [defaultvalue][in] */ SpeechLoadOption LoadOption = SLOStatic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DictationUnload( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DictationSetState( + /* [in] */ SpeechRuleState State) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetWordSequenceData( + /* [in] */ const BSTR Text, + /* [in] */ long TextLength, + /* [in] */ ISpeechTextSelectionInformation *Info) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SetTextSelection( + /* [in] */ ISpeechTextSelectionInformation *Info) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE IsPronounceable( + /* [in] */ const BSTR Word, + /* [retval][out] */ SpeechWordPronounceable *WordPronounceable) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecoGrammarVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecoGrammar * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecoGrammar * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecoGrammar * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecoGrammar * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecoGrammar * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecoGrammar * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecoGrammar * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechRecoGrammar * This, + /* [retval][out] */ VARIANT *Id); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RecoContext )( + ISpeechRecoGrammar * This, + /* [retval][out] */ ISpeechRecoContext **RecoContext); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_State )( + ISpeechRecoGrammar * This, + /* [in] */ SpeechGrammarState State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_State )( + ISpeechRecoGrammar * This, + /* [retval][out] */ SpeechGrammarState *State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rules )( + ISpeechRecoGrammar * This, + /* [retval][out] */ ISpeechGrammarRules **Rules); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Reset )( + ISpeechRecoGrammar * This, + /* [defaultvalue][in] */ SpeechLanguageId NewLanguage); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdLoadFromFile )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR FileName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdLoadFromObject )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR ClassId, + /* [in] */ const BSTR GrammarName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdLoadFromResource )( + ISpeechRecoGrammar * This, + /* [in] */ long hModule, + /* [in] */ VARIANT ResourceName, + /* [in] */ VARIANT ResourceType, + /* [in] */ SpeechLanguageId LanguageId, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdLoadFromMemory )( + ISpeechRecoGrammar * This, + /* [in] */ VARIANT GrammarData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdLoadFromProprietaryGrammar )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR ProprietaryGuid, + /* [in] */ const BSTR ProprietaryString, + /* [in] */ VARIANT ProprietaryData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdSetRuleState )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Name, + /* [in] */ SpeechRuleState State); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CmdSetRuleIdState )( + ISpeechRecoGrammar * This, + /* [in] */ long RuleId, + /* [in] */ SpeechRuleState State); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DictationLoad )( + ISpeechRecoGrammar * This, + /* [defaultvalue][in] */ const BSTR TopicName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DictationUnload )( + ISpeechRecoGrammar * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DictationSetState )( + ISpeechRecoGrammar * This, + /* [in] */ SpeechRuleState State); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetWordSequenceData )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Text, + /* [in] */ long TextLength, + /* [in] */ ISpeechTextSelectionInformation *Info); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTextSelection )( + ISpeechRecoGrammar * This, + /* [in] */ ISpeechTextSelectionInformation *Info); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsPronounceable )( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Word, + /* [retval][out] */ SpeechWordPronounceable *WordPronounceable); + + END_INTERFACE + } ISpeechRecoGrammarVtbl; + + interface ISpeechRecoGrammar + { + CONST_VTBL struct ISpeechRecoGrammarVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecoGrammar_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecoGrammar_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecoGrammar_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecoGrammar_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecoGrammar_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecoGrammar_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecoGrammar_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecoGrammar_get_Id(This,Id) \ + (This)->lpVtbl -> get_Id(This,Id) + +#define ISpeechRecoGrammar_get_RecoContext(This,RecoContext) \ + (This)->lpVtbl -> get_RecoContext(This,RecoContext) + +#define ISpeechRecoGrammar_put_State(This,State) \ + (This)->lpVtbl -> put_State(This,State) + +#define ISpeechRecoGrammar_get_State(This,State) \ + (This)->lpVtbl -> get_State(This,State) + +#define ISpeechRecoGrammar_get_Rules(This,Rules) \ + (This)->lpVtbl -> get_Rules(This,Rules) + +#define ISpeechRecoGrammar_Reset(This,NewLanguage) \ + (This)->lpVtbl -> Reset(This,NewLanguage) + +#define ISpeechRecoGrammar_CmdLoadFromFile(This,FileName,LoadOption) \ + (This)->lpVtbl -> CmdLoadFromFile(This,FileName,LoadOption) + +#define ISpeechRecoGrammar_CmdLoadFromObject(This,ClassId,GrammarName,LoadOption) \ + (This)->lpVtbl -> CmdLoadFromObject(This,ClassId,GrammarName,LoadOption) + +#define ISpeechRecoGrammar_CmdLoadFromResource(This,hModule,ResourceName,ResourceType,LanguageId,LoadOption) \ + (This)->lpVtbl -> CmdLoadFromResource(This,hModule,ResourceName,ResourceType,LanguageId,LoadOption) + +#define ISpeechRecoGrammar_CmdLoadFromMemory(This,GrammarData,LoadOption) \ + (This)->lpVtbl -> CmdLoadFromMemory(This,GrammarData,LoadOption) + +#define ISpeechRecoGrammar_CmdLoadFromProprietaryGrammar(This,ProprietaryGuid,ProprietaryString,ProprietaryData,LoadOption) \ + (This)->lpVtbl -> CmdLoadFromProprietaryGrammar(This,ProprietaryGuid,ProprietaryString,ProprietaryData,LoadOption) + +#define ISpeechRecoGrammar_CmdSetRuleState(This,Name,State) \ + (This)->lpVtbl -> CmdSetRuleState(This,Name,State) + +#define ISpeechRecoGrammar_CmdSetRuleIdState(This,RuleId,State) \ + (This)->lpVtbl -> CmdSetRuleIdState(This,RuleId,State) + +#define ISpeechRecoGrammar_DictationLoad(This,TopicName,LoadOption) \ + (This)->lpVtbl -> DictationLoad(This,TopicName,LoadOption) + +#define ISpeechRecoGrammar_DictationUnload(This) \ + (This)->lpVtbl -> DictationUnload(This) + +#define ISpeechRecoGrammar_DictationSetState(This,State) \ + (This)->lpVtbl -> DictationSetState(This,State) + +#define ISpeechRecoGrammar_SetWordSequenceData(This,Text,TextLength,Info) \ + (This)->lpVtbl -> SetWordSequenceData(This,Text,TextLength,Info) + +#define ISpeechRecoGrammar_SetTextSelection(This,Info) \ + (This)->lpVtbl -> SetTextSelection(This,Info) + +#define ISpeechRecoGrammar_IsPronounceable(This,Word,WordPronounceable) \ + (This)->lpVtbl -> IsPronounceable(This,Word,WordPronounceable) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_get_Id_Proxy( + ISpeechRecoGrammar * This, + /* [retval][out] */ VARIANT *Id); + + +void __RPC_STUB ISpeechRecoGrammar_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_get_RecoContext_Proxy( + ISpeechRecoGrammar * This, + /* [retval][out] */ ISpeechRecoContext **RecoContext); + + +void __RPC_STUB ISpeechRecoGrammar_get_RecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_put_State_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ SpeechGrammarState State); + + +void __RPC_STUB ISpeechRecoGrammar_put_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_get_State_Proxy( + ISpeechRecoGrammar * This, + /* [retval][out] */ SpeechGrammarState *State); + + +void __RPC_STUB ISpeechRecoGrammar_get_State_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_get_Rules_Proxy( + ISpeechRecoGrammar * This, + /* [retval][out] */ ISpeechGrammarRules **Rules); + + +void __RPC_STUB ISpeechRecoGrammar_get_Rules_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_Reset_Proxy( + ISpeechRecoGrammar * This, + /* [defaultvalue][in] */ SpeechLanguageId NewLanguage); + + +void __RPC_STUB ISpeechRecoGrammar_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdLoadFromFile_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR FileName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_CmdLoadFromFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdLoadFromObject_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR ClassId, + /* [in] */ const BSTR GrammarName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_CmdLoadFromObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdLoadFromResource_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ long hModule, + /* [in] */ VARIANT ResourceName, + /* [in] */ VARIANT ResourceType, + /* [in] */ SpeechLanguageId LanguageId, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_CmdLoadFromResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdLoadFromMemory_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ VARIANT GrammarData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_CmdLoadFromMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdLoadFromProprietaryGrammar_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR ProprietaryGuid, + /* [in] */ const BSTR ProprietaryString, + /* [in] */ VARIANT ProprietaryData, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_CmdLoadFromProprietaryGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdSetRuleState_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Name, + /* [in] */ SpeechRuleState State); + + +void __RPC_STUB ISpeechRecoGrammar_CmdSetRuleState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_CmdSetRuleIdState_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ long RuleId, + /* [in] */ SpeechRuleState State); + + +void __RPC_STUB ISpeechRecoGrammar_CmdSetRuleIdState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_DictationLoad_Proxy( + ISpeechRecoGrammar * This, + /* [defaultvalue][in] */ const BSTR TopicName, + /* [defaultvalue][in] */ SpeechLoadOption LoadOption); + + +void __RPC_STUB ISpeechRecoGrammar_DictationLoad_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_DictationUnload_Proxy( + ISpeechRecoGrammar * This); + + +void __RPC_STUB ISpeechRecoGrammar_DictationUnload_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_DictationSetState_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ SpeechRuleState State); + + +void __RPC_STUB ISpeechRecoGrammar_DictationSetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_SetWordSequenceData_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Text, + /* [in] */ long TextLength, + /* [in] */ ISpeechTextSelectionInformation *Info); + + +void __RPC_STUB ISpeechRecoGrammar_SetWordSequenceData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_SetTextSelection_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ ISpeechTextSelectionInformation *Info); + + +void __RPC_STUB ISpeechRecoGrammar_SetTextSelection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoGrammar_IsPronounceable_Proxy( + ISpeechRecoGrammar * This, + /* [in] */ const BSTR Word, + /* [retval][out] */ SpeechWordPronounceable *WordPronounceable); + + +void __RPC_STUB ISpeechRecoGrammar_IsPronounceable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecoGrammar_INTERFACE_DEFINED__ */ + + +#ifndef ___ISpeechRecoContextEvents_DISPINTERFACE_DEFINED__ +#define ___ISpeechRecoContextEvents_DISPINTERFACE_DEFINED__ + +/* dispinterface _ISpeechRecoContextEvents */ +/* [uuid] */ + + +EXTERN_C const IID DIID__ISpeechRecoContextEvents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7B8FCB42-0E9D-4f00-A048-7B04D6179D3D") + _ISpeechRecoContextEvents : public IDispatch + { + }; + +#else /* C style interface */ + + typedef struct _ISpeechRecoContextEventsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + _ISpeechRecoContextEvents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + _ISpeechRecoContextEvents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + _ISpeechRecoContextEvents * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + _ISpeechRecoContextEvents * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + _ISpeechRecoContextEvents * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + _ISpeechRecoContextEvents * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + _ISpeechRecoContextEvents * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + END_INTERFACE + } _ISpeechRecoContextEventsVtbl; + + interface _ISpeechRecoContextEvents + { + CONST_VTBL struct _ISpeechRecoContextEventsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define _ISpeechRecoContextEvents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define _ISpeechRecoContextEvents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define _ISpeechRecoContextEvents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define _ISpeechRecoContextEvents_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define _ISpeechRecoContextEvents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define _ISpeechRecoContextEvents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define _ISpeechRecoContextEvents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + +#endif /* ___ISpeechRecoContextEvents_DISPINTERFACE_DEFINED__ */ + + +#ifndef __ISpeechGrammarRule_INTERFACE_DEFINED__ +#define __ISpeechGrammarRule_INTERFACE_DEFINED__ + +/* interface ISpeechGrammarRule */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechGrammarRule; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AFE719CF-5DD1-44f2-999C-7A399F1CFCCC") + ISpeechGrammarRule : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Attributes( + /* [retval][out] */ SpeechRuleAttributes *Attributes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_InitialState( + /* [retval][out] */ ISpeechGrammarRuleState **State) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *Name) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ long *Id) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Clear( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddResource( + /* [in] */ const BSTR ResourceName, + /* [in] */ const BSTR ResourceValue) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddState( + /* [retval][out] */ ISpeechGrammarRuleState **State) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechGrammarRuleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechGrammarRule * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechGrammarRule * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechGrammarRule * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechGrammarRule * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechGrammarRule * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechGrammarRule * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechGrammarRule * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Attributes )( + ISpeechGrammarRule * This, + /* [retval][out] */ SpeechRuleAttributes *Attributes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InitialState )( + ISpeechGrammarRule * This, + /* [retval][out] */ ISpeechGrammarRuleState **State); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + ISpeechGrammarRule * This, + /* [retval][out] */ BSTR *Name); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechGrammarRule * This, + /* [retval][out] */ long *Id); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Clear )( + ISpeechGrammarRule * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddResource )( + ISpeechGrammarRule * This, + /* [in] */ const BSTR ResourceName, + /* [in] */ const BSTR ResourceValue); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddState )( + ISpeechGrammarRule * This, + /* [retval][out] */ ISpeechGrammarRuleState **State); + + END_INTERFACE + } ISpeechGrammarRuleVtbl; + + interface ISpeechGrammarRule + { + CONST_VTBL struct ISpeechGrammarRuleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechGrammarRule_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechGrammarRule_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechGrammarRule_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechGrammarRule_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechGrammarRule_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechGrammarRule_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechGrammarRule_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechGrammarRule_get_Attributes(This,Attributes) \ + (This)->lpVtbl -> get_Attributes(This,Attributes) + +#define ISpeechGrammarRule_get_InitialState(This,State) \ + (This)->lpVtbl -> get_InitialState(This,State) + +#define ISpeechGrammarRule_get_Name(This,Name) \ + (This)->lpVtbl -> get_Name(This,Name) + +#define ISpeechGrammarRule_get_Id(This,Id) \ + (This)->lpVtbl -> get_Id(This,Id) + +#define ISpeechGrammarRule_Clear(This) \ + (This)->lpVtbl -> Clear(This) + +#define ISpeechGrammarRule_AddResource(This,ResourceName,ResourceValue) \ + (This)->lpVtbl -> AddResource(This,ResourceName,ResourceValue) + +#define ISpeechGrammarRule_AddState(This,State) \ + (This)->lpVtbl -> AddState(This,State) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_get_Attributes_Proxy( + ISpeechGrammarRule * This, + /* [retval][out] */ SpeechRuleAttributes *Attributes); + + +void __RPC_STUB ISpeechGrammarRule_get_Attributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_get_InitialState_Proxy( + ISpeechGrammarRule * This, + /* [retval][out] */ ISpeechGrammarRuleState **State); + + +void __RPC_STUB ISpeechGrammarRule_get_InitialState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_get_Name_Proxy( + ISpeechGrammarRule * This, + /* [retval][out] */ BSTR *Name); + + +void __RPC_STUB ISpeechGrammarRule_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_get_Id_Proxy( + ISpeechGrammarRule * This, + /* [retval][out] */ long *Id); + + +void __RPC_STUB ISpeechGrammarRule_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_Clear_Proxy( + ISpeechGrammarRule * This); + + +void __RPC_STUB ISpeechGrammarRule_Clear_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_AddResource_Proxy( + ISpeechGrammarRule * This, + /* [in] */ const BSTR ResourceName, + /* [in] */ const BSTR ResourceValue); + + +void __RPC_STUB ISpeechGrammarRule_AddResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRule_AddState_Proxy( + ISpeechGrammarRule * This, + /* [retval][out] */ ISpeechGrammarRuleState **State); + + +void __RPC_STUB ISpeechGrammarRule_AddState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechGrammarRule_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechGrammarRules_INTERFACE_DEFINED__ +#define __ISpeechGrammarRules_INTERFACE_DEFINED__ + +/* interface ISpeechGrammarRules */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechGrammarRules; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6FFA3B44-FC2D-40d1-8AFC-32911C7F1AD1") + ISpeechGrammarRules : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE FindRule( + /* [in] */ VARIANT RuleNameOrId, + /* [retval][out] */ ISpeechGrammarRule **Rule) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRule **Rule) = 0; + + virtual /* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Dynamic( + /* [retval][out] */ VARIANT_BOOL *Dynamic) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Add( + /* [in] */ BSTR RuleName, + /* [in] */ SpeechRuleAttributes Attributes, + /* [defaultvalue][in] */ long RuleId, + /* [retval][out] */ ISpeechGrammarRule **Rule) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Commit( void) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE CommitAndSave( + /* [out] */ BSTR *ErrorText, + /* [retval][out] */ VARIANT *SaveStream) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechGrammarRulesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechGrammarRules * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechGrammarRules * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechGrammarRules * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechGrammarRules * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechGrammarRules * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechGrammarRules * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechGrammarRules * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechGrammarRules * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *FindRule )( + ISpeechGrammarRules * This, + /* [in] */ VARIANT RuleNameOrId, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechGrammarRules * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + /* [restricted][helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechGrammarRules * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Dynamic )( + ISpeechGrammarRules * This, + /* [retval][out] */ VARIANT_BOOL *Dynamic); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Add )( + ISpeechGrammarRules * This, + /* [in] */ BSTR RuleName, + /* [in] */ SpeechRuleAttributes Attributes, + /* [defaultvalue][in] */ long RuleId, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpeechGrammarRules * This); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *CommitAndSave )( + ISpeechGrammarRules * This, + /* [out] */ BSTR *ErrorText, + /* [retval][out] */ VARIANT *SaveStream); + + END_INTERFACE + } ISpeechGrammarRulesVtbl; + + interface ISpeechGrammarRules + { + CONST_VTBL struct ISpeechGrammarRulesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechGrammarRules_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechGrammarRules_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechGrammarRules_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechGrammarRules_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechGrammarRules_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechGrammarRules_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechGrammarRules_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechGrammarRules_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechGrammarRules_FindRule(This,RuleNameOrId,Rule) \ + (This)->lpVtbl -> FindRule(This,RuleNameOrId,Rule) + +#define ISpeechGrammarRules_Item(This,Index,Rule) \ + (This)->lpVtbl -> Item(This,Index,Rule) + +#define ISpeechGrammarRules_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#define ISpeechGrammarRules_get_Dynamic(This,Dynamic) \ + (This)->lpVtbl -> get_Dynamic(This,Dynamic) + +#define ISpeechGrammarRules_Add(This,RuleName,Attributes,RuleId,Rule) \ + (This)->lpVtbl -> Add(This,RuleName,Attributes,RuleId,Rule) + +#define ISpeechGrammarRules_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#define ISpeechGrammarRules_CommitAndSave(This,ErrorText,SaveStream) \ + (This)->lpVtbl -> CommitAndSave(This,ErrorText,SaveStream) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_get_Count_Proxy( + ISpeechGrammarRules * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechGrammarRules_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_FindRule_Proxy( + ISpeechGrammarRules * This, + /* [in] */ VARIANT RuleNameOrId, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + +void __RPC_STUB ISpeechGrammarRules_FindRule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_Item_Proxy( + ISpeechGrammarRules * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + +void __RPC_STUB ISpeechGrammarRules_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_get__NewEnum_Proxy( + ISpeechGrammarRules * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechGrammarRules_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_get_Dynamic_Proxy( + ISpeechGrammarRules * This, + /* [retval][out] */ VARIANT_BOOL *Dynamic); + + +void __RPC_STUB ISpeechGrammarRules_get_Dynamic_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_Add_Proxy( + ISpeechGrammarRules * This, + /* [in] */ BSTR RuleName, + /* [in] */ SpeechRuleAttributes Attributes, + /* [defaultvalue][in] */ long RuleId, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + +void __RPC_STUB ISpeechGrammarRules_Add_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_Commit_Proxy( + ISpeechGrammarRules * This); + + +void __RPC_STUB ISpeechGrammarRules_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRules_CommitAndSave_Proxy( + ISpeechGrammarRules * This, + /* [out] */ BSTR *ErrorText, + /* [retval][out] */ VARIANT *SaveStream); + + +void __RPC_STUB ISpeechGrammarRules_CommitAndSave_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechGrammarRules_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleState_INTERFACE_DEFINED__ +#define __ISpeechGrammarRuleState_INTERFACE_DEFINED__ + +/* interface ISpeechGrammarRuleState */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechGrammarRuleState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D4286F2C-EE67-45ae-B928-28D695362EDA") + ISpeechGrammarRuleState : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Rule( + /* [retval][out] */ ISpeechGrammarRule **Rule) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Transitions( + /* [retval][out] */ ISpeechGrammarRuleStateTransitions **Transitions) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddWordTransition( + /* [in] */ ISpeechGrammarRuleState *DestState, + /* [in] */ const BSTR Words, + /* [defaultvalue][in] */ const BSTR Separators = L" ", + /* [defaultvalue][in] */ SpeechGrammarWordType Type = SGLexical, + /* [defaultvalue][in] */ const BSTR PropertyName = L"", + /* [defaultvalue][in] */ long PropertyId = 0, + /* [defaultvalue][in] */ VARIANT *PropertyValue = 0, + /* [defaultvalue][in] */ float Weight = 1) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddRuleTransition( + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ ISpeechGrammarRule *Rule, + /* [defaultvalue][in] */ const BSTR PropertyName = L"", + /* [defaultvalue][in] */ long PropertyId = 0, + /* [defaultvalue][in] */ VARIANT *PropertyValue = 0, + /* [defaultvalue][in] */ float Weight = 1) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddSpecialTransition( + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ SpeechSpecialTransitionType Type, + /* [defaultvalue][in] */ const BSTR PropertyName = L"", + /* [defaultvalue][in] */ long PropertyId = 0, + /* [defaultvalue][in] */ VARIANT *PropertyValue = 0, + /* [defaultvalue][in] */ float Weight = 1) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechGrammarRuleStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechGrammarRuleState * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechGrammarRuleState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechGrammarRuleState * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechGrammarRuleState * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechGrammarRuleState * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechGrammarRuleState * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechGrammarRuleState * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rule )( + ISpeechGrammarRuleState * This, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Transitions )( + ISpeechGrammarRuleState * This, + /* [retval][out] */ ISpeechGrammarRuleStateTransitions **Transitions); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddWordTransition )( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestState, + /* [in] */ const BSTR Words, + /* [defaultvalue][in] */ const BSTR Separators, + /* [defaultvalue][in] */ SpeechGrammarWordType Type, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddRuleTransition )( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ ISpeechGrammarRule *Rule, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddSpecialTransition )( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ SpeechSpecialTransitionType Type, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + END_INTERFACE + } ISpeechGrammarRuleStateVtbl; + + interface ISpeechGrammarRuleState + { + CONST_VTBL struct ISpeechGrammarRuleStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechGrammarRuleState_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechGrammarRuleState_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechGrammarRuleState_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechGrammarRuleState_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechGrammarRuleState_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechGrammarRuleState_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechGrammarRuleState_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechGrammarRuleState_get_Rule(This,Rule) \ + (This)->lpVtbl -> get_Rule(This,Rule) + +#define ISpeechGrammarRuleState_get_Transitions(This,Transitions) \ + (This)->lpVtbl -> get_Transitions(This,Transitions) + +#define ISpeechGrammarRuleState_AddWordTransition(This,DestState,Words,Separators,Type,PropertyName,PropertyId,PropertyValue,Weight) \ + (This)->lpVtbl -> AddWordTransition(This,DestState,Words,Separators,Type,PropertyName,PropertyId,PropertyValue,Weight) + +#define ISpeechGrammarRuleState_AddRuleTransition(This,DestinationState,Rule,PropertyName,PropertyId,PropertyValue,Weight) \ + (This)->lpVtbl -> AddRuleTransition(This,DestinationState,Rule,PropertyName,PropertyId,PropertyValue,Weight) + +#define ISpeechGrammarRuleState_AddSpecialTransition(This,DestinationState,Type,PropertyName,PropertyId,PropertyValue,Weight) \ + (This)->lpVtbl -> AddSpecialTransition(This,DestinationState,Type,PropertyName,PropertyId,PropertyValue,Weight) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleState_get_Rule_Proxy( + ISpeechGrammarRuleState * This, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + +void __RPC_STUB ISpeechGrammarRuleState_get_Rule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleState_get_Transitions_Proxy( + ISpeechGrammarRuleState * This, + /* [retval][out] */ ISpeechGrammarRuleStateTransitions **Transitions); + + +void __RPC_STUB ISpeechGrammarRuleState_get_Transitions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleState_AddWordTransition_Proxy( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestState, + /* [in] */ const BSTR Words, + /* [defaultvalue][in] */ const BSTR Separators, + /* [defaultvalue][in] */ SpeechGrammarWordType Type, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + +void __RPC_STUB ISpeechGrammarRuleState_AddWordTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleState_AddRuleTransition_Proxy( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ ISpeechGrammarRule *Rule, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + +void __RPC_STUB ISpeechGrammarRuleState_AddRuleTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleState_AddSpecialTransition_Proxy( + ISpeechGrammarRuleState * This, + /* [in] */ ISpeechGrammarRuleState *DestinationState, + /* [in] */ SpeechSpecialTransitionType Type, + /* [defaultvalue][in] */ const BSTR PropertyName, + /* [defaultvalue][in] */ long PropertyId, + /* [defaultvalue][in] */ VARIANT *PropertyValue, + /* [defaultvalue][in] */ float Weight); + + +void __RPC_STUB ISpeechGrammarRuleState_AddSpecialTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechGrammarRuleState_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED__ +#define __ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED__ + +/* interface ISpeechGrammarRuleStateTransition */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechGrammarRuleStateTransition; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CAFD1DB1-41D1-4a06-9863-E2E81DA17A9A") + ISpeechGrammarRuleStateTransition : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ SpeechGrammarRuleStateTransitionType *Type) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Text( + /* [retval][out] */ BSTR *Text) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Rule( + /* [retval][out] */ ISpeechGrammarRule **Rule) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Weight( + /* [retval][out] */ VARIANT *Weight) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PropertyName( + /* [retval][out] */ BSTR *PropertyName) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PropertyId( + /* [retval][out] */ long *PropertyId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PropertyValue( + /* [retval][out] */ VARIANT *PropertyValue) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NextState( + /* [retval][out] */ ISpeechGrammarRuleState **NextState) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechGrammarRuleStateTransitionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechGrammarRuleStateTransition * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechGrammarRuleStateTransition * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechGrammarRuleStateTransition * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechGrammarRuleStateTransition * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechGrammarRuleStateTransition * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechGrammarRuleStateTransition * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechGrammarRuleStateTransition * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ SpeechGrammarRuleStateTransitionType *Type); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Text )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ BSTR *Text); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rule )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Weight )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ VARIANT *Weight); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PropertyName )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ BSTR *PropertyName); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PropertyId )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ long *PropertyId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PropertyValue )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ VARIANT *PropertyValue); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NextState )( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ ISpeechGrammarRuleState **NextState); + + END_INTERFACE + } ISpeechGrammarRuleStateTransitionVtbl; + + interface ISpeechGrammarRuleStateTransition + { + CONST_VTBL struct ISpeechGrammarRuleStateTransitionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechGrammarRuleStateTransition_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechGrammarRuleStateTransition_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechGrammarRuleStateTransition_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechGrammarRuleStateTransition_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechGrammarRuleStateTransition_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechGrammarRuleStateTransition_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechGrammarRuleStateTransition_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechGrammarRuleStateTransition_get_Type(This,Type) \ + (This)->lpVtbl -> get_Type(This,Type) + +#define ISpeechGrammarRuleStateTransition_get_Text(This,Text) \ + (This)->lpVtbl -> get_Text(This,Text) + +#define ISpeechGrammarRuleStateTransition_get_Rule(This,Rule) \ + (This)->lpVtbl -> get_Rule(This,Rule) + +#define ISpeechGrammarRuleStateTransition_get_Weight(This,Weight) \ + (This)->lpVtbl -> get_Weight(This,Weight) + +#define ISpeechGrammarRuleStateTransition_get_PropertyName(This,PropertyName) \ + (This)->lpVtbl -> get_PropertyName(This,PropertyName) + +#define ISpeechGrammarRuleStateTransition_get_PropertyId(This,PropertyId) \ + (This)->lpVtbl -> get_PropertyId(This,PropertyId) + +#define ISpeechGrammarRuleStateTransition_get_PropertyValue(This,PropertyValue) \ + (This)->lpVtbl -> get_PropertyValue(This,PropertyValue) + +#define ISpeechGrammarRuleStateTransition_get_NextState(This,NextState) \ + (This)->lpVtbl -> get_NextState(This,NextState) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_Type_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ SpeechGrammarRuleStateTransitionType *Type); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_Text_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ BSTR *Text); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_Text_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_Rule_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ ISpeechGrammarRule **Rule); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_Rule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_Weight_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ VARIANT *Weight); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_Weight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_PropertyName_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ BSTR *PropertyName); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_PropertyName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_PropertyId_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ long *PropertyId); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_PropertyId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_PropertyValue_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ VARIANT *PropertyValue); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_PropertyValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransition_get_NextState_Proxy( + ISpeechGrammarRuleStateTransition * This, + /* [retval][out] */ ISpeechGrammarRuleState **NextState); + + +void __RPC_STUB ISpeechGrammarRuleStateTransition_get_NextState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechGrammarRuleStateTransition_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED__ +#define __ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED__ + +/* interface ISpeechGrammarRuleStateTransitions */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechGrammarRuleStateTransitions; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EABCE657-75BC-44a2-AA7F-C56476742963") + ISpeechGrammarRuleStateTransitions : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRuleStateTransition **Transition) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechGrammarRuleStateTransitionsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechGrammarRuleStateTransitions * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechGrammarRuleStateTransitions * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechGrammarRuleStateTransitions * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechGrammarRuleStateTransitions * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRuleStateTransition **Transition); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechGrammarRuleStateTransitions * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechGrammarRuleStateTransitionsVtbl; + + interface ISpeechGrammarRuleStateTransitions + { + CONST_VTBL struct ISpeechGrammarRuleStateTransitionsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechGrammarRuleStateTransitions_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechGrammarRuleStateTransitions_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechGrammarRuleStateTransitions_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechGrammarRuleStateTransitions_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechGrammarRuleStateTransitions_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechGrammarRuleStateTransitions_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechGrammarRuleStateTransitions_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechGrammarRuleStateTransitions_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechGrammarRuleStateTransitions_Item(This,Index,Transition) \ + (This)->lpVtbl -> Item(This,Index,Transition) + +#define ISpeechGrammarRuleStateTransitions_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransitions_get_Count_Proxy( + ISpeechGrammarRuleStateTransitions * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechGrammarRuleStateTransitions_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransitions_Item_Proxy( + ISpeechGrammarRuleStateTransitions * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechGrammarRuleStateTransition **Transition); + + +void __RPC_STUB ISpeechGrammarRuleStateTransitions_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechGrammarRuleStateTransitions_get__NewEnum_Proxy( + ISpeechGrammarRuleStateTransitions * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechGrammarRuleStateTransitions_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechGrammarRuleStateTransitions_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechTextSelectionInformation_INTERFACE_DEFINED__ +#define __ISpeechTextSelectionInformation_INTERFACE_DEFINED__ + +/* interface ISpeechTextSelectionInformation */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechTextSelectionInformation; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3B9C7E7A-6EEE-4DED-9092-11657279ADBE") + ISpeechTextSelectionInformation : public IDispatch + { + public: + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ActiveOffset( + /* [in] */ long ActiveOffset) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ActiveOffset( + /* [retval][out] */ long *ActiveOffset) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ActiveLength( + /* [in] */ long ActiveLength) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ActiveLength( + /* [retval][out] */ long *ActiveLength) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionOffset( + /* [in] */ long SelectionOffset) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionOffset( + /* [retval][out] */ long *SelectionOffset) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_SelectionLength( + /* [in] */ long SelectionLength) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SelectionLength( + /* [retval][out] */ long *SelectionLength) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechTextSelectionInformationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechTextSelectionInformation * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechTextSelectionInformation * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechTextSelectionInformation * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechTextSelectionInformation * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechTextSelectionInformation * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechTextSelectionInformation * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechTextSelectionInformation * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveOffset )( + ISpeechTextSelectionInformation * This, + /* [in] */ long ActiveOffset); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveOffset )( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *ActiveOffset); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ActiveLength )( + ISpeechTextSelectionInformation * This, + /* [in] */ long ActiveLength); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ActiveLength )( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *ActiveLength); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SelectionOffset )( + ISpeechTextSelectionInformation * This, + /* [in] */ long SelectionOffset); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SelectionOffset )( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *SelectionOffset); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SelectionLength )( + ISpeechTextSelectionInformation * This, + /* [in] */ long SelectionLength); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SelectionLength )( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *SelectionLength); + + END_INTERFACE + } ISpeechTextSelectionInformationVtbl; + + interface ISpeechTextSelectionInformation + { + CONST_VTBL struct ISpeechTextSelectionInformationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechTextSelectionInformation_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechTextSelectionInformation_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechTextSelectionInformation_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechTextSelectionInformation_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechTextSelectionInformation_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechTextSelectionInformation_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechTextSelectionInformation_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechTextSelectionInformation_put_ActiveOffset(This,ActiveOffset) \ + (This)->lpVtbl -> put_ActiveOffset(This,ActiveOffset) + +#define ISpeechTextSelectionInformation_get_ActiveOffset(This,ActiveOffset) \ + (This)->lpVtbl -> get_ActiveOffset(This,ActiveOffset) + +#define ISpeechTextSelectionInformation_put_ActiveLength(This,ActiveLength) \ + (This)->lpVtbl -> put_ActiveLength(This,ActiveLength) + +#define ISpeechTextSelectionInformation_get_ActiveLength(This,ActiveLength) \ + (This)->lpVtbl -> get_ActiveLength(This,ActiveLength) + +#define ISpeechTextSelectionInformation_put_SelectionOffset(This,SelectionOffset) \ + (This)->lpVtbl -> put_SelectionOffset(This,SelectionOffset) + +#define ISpeechTextSelectionInformation_get_SelectionOffset(This,SelectionOffset) \ + (This)->lpVtbl -> get_SelectionOffset(This,SelectionOffset) + +#define ISpeechTextSelectionInformation_put_SelectionLength(This,SelectionLength) \ + (This)->lpVtbl -> put_SelectionLength(This,SelectionLength) + +#define ISpeechTextSelectionInformation_get_SelectionLength(This,SelectionLength) \ + (This)->lpVtbl -> get_SelectionLength(This,SelectionLength) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_put_ActiveOffset_Proxy( + ISpeechTextSelectionInformation * This, + /* [in] */ long ActiveOffset); + + +void __RPC_STUB ISpeechTextSelectionInformation_put_ActiveOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_get_ActiveOffset_Proxy( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *ActiveOffset); + + +void __RPC_STUB ISpeechTextSelectionInformation_get_ActiveOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_put_ActiveLength_Proxy( + ISpeechTextSelectionInformation * This, + /* [in] */ long ActiveLength); + + +void __RPC_STUB ISpeechTextSelectionInformation_put_ActiveLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_get_ActiveLength_Proxy( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *ActiveLength); + + +void __RPC_STUB ISpeechTextSelectionInformation_get_ActiveLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_put_SelectionOffset_Proxy( + ISpeechTextSelectionInformation * This, + /* [in] */ long SelectionOffset); + + +void __RPC_STUB ISpeechTextSelectionInformation_put_SelectionOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_get_SelectionOffset_Proxy( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *SelectionOffset); + + +void __RPC_STUB ISpeechTextSelectionInformation_get_SelectionOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_put_SelectionLength_Proxy( + ISpeechTextSelectionInformation * This, + /* [in] */ long SelectionLength); + + +void __RPC_STUB ISpeechTextSelectionInformation_put_SelectionLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechTextSelectionInformation_get_SelectionLength_Proxy( + ISpeechTextSelectionInformation * This, + /* [retval][out] */ long *SelectionLength); + + +void __RPC_STUB ISpeechTextSelectionInformation_get_SelectionLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechTextSelectionInformation_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecoResult_INTERFACE_DEFINED__ +#define __ISpeechRecoResult_INTERFACE_DEFINED__ + +/* interface ISpeechRecoResult */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecoResult; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ED2879CF-CED9-4ee6-A534-DE0191D5468D") + ISpeechRecoResult : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RecoContext( + /* [retval][out] */ ISpeechRecoContext **RecoContext) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Times( + /* [retval][out] */ ISpeechRecoResultTimes **Times) = 0; + + virtual /* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE putref_AudioFormat( + /* [in] */ ISpeechAudioFormat *Format) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioFormat( + /* [retval][out] */ ISpeechAudioFormat **Format) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PhraseInfo( + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Alternates( + /* [in] */ long RequestCount, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechPhraseAlternates **Alternates) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Audio( + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechMemoryStream **Stream) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SpeakAudio( + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SaveToMemory( + /* [retval][out] */ VARIANT *ResultBlock) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE DiscardResultInfo( + /* [in] */ SpeechDiscardType ValueTypes) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecoResultVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecoResult * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecoResult * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecoResult * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecoResult * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecoResult * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecoResult * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecoResult * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RecoContext )( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechRecoContext **RecoContext); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Times )( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechRecoResultTimes **Times); + + /* [id][helpstring][propputref] */ HRESULT ( STDMETHODCALLTYPE *putref_AudioFormat )( + ISpeechRecoResult * This, + /* [in] */ ISpeechAudioFormat *Format); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioFormat )( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechAudioFormat **Format); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PhraseInfo )( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Alternates )( + ISpeechRecoResult * This, + /* [in] */ long RequestCount, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechPhraseAlternates **Alternates); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Audio )( + ISpeechRecoResult * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechMemoryStream **Stream); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SpeakAudio )( + ISpeechRecoResult * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SaveToMemory )( + ISpeechRecoResult * This, + /* [retval][out] */ VARIANT *ResultBlock); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *DiscardResultInfo )( + ISpeechRecoResult * This, + /* [in] */ SpeechDiscardType ValueTypes); + + END_INTERFACE + } ISpeechRecoResultVtbl; + + interface ISpeechRecoResult + { + CONST_VTBL struct ISpeechRecoResultVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecoResult_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecoResult_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecoResult_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecoResult_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecoResult_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecoResult_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecoResult_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecoResult_get_RecoContext(This,RecoContext) \ + (This)->lpVtbl -> get_RecoContext(This,RecoContext) + +#define ISpeechRecoResult_get_Times(This,Times) \ + (This)->lpVtbl -> get_Times(This,Times) + +#define ISpeechRecoResult_putref_AudioFormat(This,Format) \ + (This)->lpVtbl -> putref_AudioFormat(This,Format) + +#define ISpeechRecoResult_get_AudioFormat(This,Format) \ + (This)->lpVtbl -> get_AudioFormat(This,Format) + +#define ISpeechRecoResult_get_PhraseInfo(This,PhraseInfo) \ + (This)->lpVtbl -> get_PhraseInfo(This,PhraseInfo) + +#define ISpeechRecoResult_Alternates(This,RequestCount,StartElement,Elements,Alternates) \ + (This)->lpVtbl -> Alternates(This,RequestCount,StartElement,Elements,Alternates) + +#define ISpeechRecoResult_Audio(This,StartElement,Elements,Stream) \ + (This)->lpVtbl -> Audio(This,StartElement,Elements,Stream) + +#define ISpeechRecoResult_SpeakAudio(This,StartElement,Elements,Flags,StreamNumber) \ + (This)->lpVtbl -> SpeakAudio(This,StartElement,Elements,Flags,StreamNumber) + +#define ISpeechRecoResult_SaveToMemory(This,ResultBlock) \ + (This)->lpVtbl -> SaveToMemory(This,ResultBlock) + +#define ISpeechRecoResult_DiscardResultInfo(This,ValueTypes) \ + (This)->lpVtbl -> DiscardResultInfo(This,ValueTypes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_get_RecoContext_Proxy( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechRecoContext **RecoContext); + + +void __RPC_STUB ISpeechRecoResult_get_RecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_get_Times_Proxy( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechRecoResultTimes **Times); + + +void __RPC_STUB ISpeechRecoResult_get_Times_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propputref] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_putref_AudioFormat_Proxy( + ISpeechRecoResult * This, + /* [in] */ ISpeechAudioFormat *Format); + + +void __RPC_STUB ISpeechRecoResult_putref_AudioFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_get_AudioFormat_Proxy( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechAudioFormat **Format); + + +void __RPC_STUB ISpeechRecoResult_get_AudioFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_get_PhraseInfo_Proxy( + ISpeechRecoResult * This, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + +void __RPC_STUB ISpeechRecoResult_get_PhraseInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_Alternates_Proxy( + ISpeechRecoResult * This, + /* [in] */ long RequestCount, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechPhraseAlternates **Alternates); + + +void __RPC_STUB ISpeechRecoResult_Alternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_Audio_Proxy( + ISpeechRecoResult * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [retval][out] */ ISpeechMemoryStream **Stream); + + +void __RPC_STUB ISpeechRecoResult_Audio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_SpeakAudio_Proxy( + ISpeechRecoResult * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ SpeechVoiceSpeakFlags Flags, + /* [retval][out] */ long *StreamNumber); + + +void __RPC_STUB ISpeechRecoResult_SpeakAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_SaveToMemory_Proxy( + ISpeechRecoResult * This, + /* [retval][out] */ VARIANT *ResultBlock); + + +void __RPC_STUB ISpeechRecoResult_SaveToMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResult_DiscardResultInfo_Proxy( + ISpeechRecoResult * This, + /* [in] */ SpeechDiscardType ValueTypes); + + +void __RPC_STUB ISpeechRecoResult_DiscardResultInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecoResult_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechRecoResultTimes_INTERFACE_DEFINED__ +#define __ISpeechRecoResultTimes_INTERFACE_DEFINED__ + +/* interface ISpeechRecoResultTimes */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechRecoResultTimes; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("62B3B8FB-F6E7-41be-BDCB-056B1C29EFC0") + ISpeechRecoResultTimes : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_StreamTime( + /* [retval][out] */ VARIANT *Time) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Length( + /* [retval][out] */ VARIANT *Length) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_TickCount( + /* [retval][out] */ long *TickCount) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetFromStart( + /* [retval][out] */ VARIANT *OffsetFromStart) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechRecoResultTimesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechRecoResultTimes * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechRecoResultTimes * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechRecoResultTimes * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechRecoResultTimes * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechRecoResultTimes * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechRecoResultTimes * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechRecoResultTimes * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamTime )( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *Time); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Length )( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *Length); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TickCount )( + ISpeechRecoResultTimes * This, + /* [retval][out] */ long *TickCount); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetFromStart )( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *OffsetFromStart); + + END_INTERFACE + } ISpeechRecoResultTimesVtbl; + + interface ISpeechRecoResultTimes + { + CONST_VTBL struct ISpeechRecoResultTimesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechRecoResultTimes_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechRecoResultTimes_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechRecoResultTimes_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechRecoResultTimes_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechRecoResultTimes_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechRecoResultTimes_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechRecoResultTimes_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechRecoResultTimes_get_StreamTime(This,Time) \ + (This)->lpVtbl -> get_StreamTime(This,Time) + +#define ISpeechRecoResultTimes_get_Length(This,Length) \ + (This)->lpVtbl -> get_Length(This,Length) + +#define ISpeechRecoResultTimes_get_TickCount(This,TickCount) \ + (This)->lpVtbl -> get_TickCount(This,TickCount) + +#define ISpeechRecoResultTimes_get_OffsetFromStart(This,OffsetFromStart) \ + (This)->lpVtbl -> get_OffsetFromStart(This,OffsetFromStart) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResultTimes_get_StreamTime_Proxy( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *Time); + + +void __RPC_STUB ISpeechRecoResultTimes_get_StreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResultTimes_get_Length_Proxy( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *Length); + + +void __RPC_STUB ISpeechRecoResultTimes_get_Length_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResultTimes_get_TickCount_Proxy( + ISpeechRecoResultTimes * This, + /* [retval][out] */ long *TickCount); + + +void __RPC_STUB ISpeechRecoResultTimes_get_TickCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechRecoResultTimes_get_OffsetFromStart_Proxy( + ISpeechRecoResultTimes * This, + /* [retval][out] */ VARIANT *OffsetFromStart); + + +void __RPC_STUB ISpeechRecoResultTimes_get_OffsetFromStart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechRecoResultTimes_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseAlternate_INTERFACE_DEFINED__ +#define __ISpeechPhraseAlternate_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseAlternate */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseAlternate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("27864A2A-2B9F-4cb8-92D3-0D2722FD1E73") + ISpeechPhraseAlternate : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RecoResult( + /* [retval][out] */ ISpeechRecoResult **RecoResult) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_StartElementInResult( + /* [retval][out] */ long *StartElement) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NumberOfElementsInResult( + /* [retval][out] */ long *NumberOfElements) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PhraseInfo( + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Commit( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseAlternateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseAlternate * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseAlternate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseAlternate * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseAlternate * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseAlternate * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseAlternate * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseAlternate * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RecoResult )( + ISpeechPhraseAlternate * This, + /* [retval][out] */ ISpeechRecoResult **RecoResult); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StartElementInResult )( + ISpeechPhraseAlternate * This, + /* [retval][out] */ long *StartElement); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NumberOfElementsInResult )( + ISpeechPhraseAlternate * This, + /* [retval][out] */ long *NumberOfElements); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PhraseInfo )( + ISpeechPhraseAlternate * This, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpeechPhraseAlternate * This); + + END_INTERFACE + } ISpeechPhraseAlternateVtbl; + + interface ISpeechPhraseAlternate + { + CONST_VTBL struct ISpeechPhraseAlternateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseAlternate_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseAlternate_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseAlternate_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseAlternate_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseAlternate_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseAlternate_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseAlternate_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseAlternate_get_RecoResult(This,RecoResult) \ + (This)->lpVtbl -> get_RecoResult(This,RecoResult) + +#define ISpeechPhraseAlternate_get_StartElementInResult(This,StartElement) \ + (This)->lpVtbl -> get_StartElementInResult(This,StartElement) + +#define ISpeechPhraseAlternate_get_NumberOfElementsInResult(This,NumberOfElements) \ + (This)->lpVtbl -> get_NumberOfElementsInResult(This,NumberOfElements) + +#define ISpeechPhraseAlternate_get_PhraseInfo(This,PhraseInfo) \ + (This)->lpVtbl -> get_PhraseInfo(This,PhraseInfo) + +#define ISpeechPhraseAlternate_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternate_get_RecoResult_Proxy( + ISpeechPhraseAlternate * This, + /* [retval][out] */ ISpeechRecoResult **RecoResult); + + +void __RPC_STUB ISpeechPhraseAlternate_get_RecoResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternate_get_StartElementInResult_Proxy( + ISpeechPhraseAlternate * This, + /* [retval][out] */ long *StartElement); + + +void __RPC_STUB ISpeechPhraseAlternate_get_StartElementInResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternate_get_NumberOfElementsInResult_Proxy( + ISpeechPhraseAlternate * This, + /* [retval][out] */ long *NumberOfElements); + + +void __RPC_STUB ISpeechPhraseAlternate_get_NumberOfElementsInResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternate_get_PhraseInfo_Proxy( + ISpeechPhraseAlternate * This, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + +void __RPC_STUB ISpeechPhraseAlternate_get_PhraseInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternate_Commit_Proxy( + ISpeechPhraseAlternate * This); + + +void __RPC_STUB ISpeechPhraseAlternate_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseAlternate_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseAlternates_INTERFACE_DEFINED__ +#define __ISpeechPhraseAlternates_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseAlternates */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseAlternates; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B238B6D5-F276-4c3d-A6C1-2974801C3CC2") + ISpeechPhraseAlternates : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseAlternate **PhraseAlternate) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseAlternatesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseAlternates * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseAlternates * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseAlternates * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseAlternates * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseAlternates * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseAlternates * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseAlternates * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechPhraseAlternates * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechPhraseAlternates * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseAlternate **PhraseAlternate); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechPhraseAlternates * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechPhraseAlternatesVtbl; + + interface ISpeechPhraseAlternates + { + CONST_VTBL struct ISpeechPhraseAlternatesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseAlternates_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseAlternates_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseAlternates_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseAlternates_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseAlternates_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseAlternates_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseAlternates_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseAlternates_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechPhraseAlternates_Item(This,Index,PhraseAlternate) \ + (This)->lpVtbl -> Item(This,Index,PhraseAlternate) + +#define ISpeechPhraseAlternates_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternates_get_Count_Proxy( + ISpeechPhraseAlternates * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechPhraseAlternates_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternates_Item_Proxy( + ISpeechPhraseAlternates * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseAlternate **PhraseAlternate); + + +void __RPC_STUB ISpeechPhraseAlternates_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseAlternates_get__NewEnum_Proxy( + ISpeechPhraseAlternates * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechPhraseAlternates_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseAlternates_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseInfo_INTERFACE_DEFINED__ +#define __ISpeechPhraseInfo_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseInfo */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("961559CF-4E67-4662-8BF0-D93F1FCD61B3") + ISpeechPhraseInfo : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LanguageId( + /* [retval][out] */ long *LanguageId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_GrammarId( + /* [retval][out] */ VARIANT *GrammarId) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_StartTime( + /* [retval][out] */ VARIANT *StartTime) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioStreamPosition( + /* [retval][out] */ VARIANT *AudioStreamPosition) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioSizeBytes( + /* [retval][out] */ long *pAudioSizeBytes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RetainedSizeBytes( + /* [retval][out] */ long *RetainedSizeBytes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioSizeTime( + /* [retval][out] */ long *AudioSizeTime) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Rule( + /* [retval][out] */ ISpeechPhraseRule **Rule) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Properties( + /* [retval][out] */ ISpeechPhraseProperties **Properties) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Elements( + /* [retval][out] */ ISpeechPhraseElements **Elements) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Replacements( + /* [retval][out] */ ISpeechPhraseReplacements **Replacements) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EngineId( + /* [retval][out] */ BSTR *EngineIdGuid) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EnginePrivateData( + /* [retval][out] */ VARIANT *PrivateData) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE SaveToMemory( + /* [retval][out] */ VARIANT *PhraseBlock) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetText( + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ BSTR *Text) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetDisplayAttributes( + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LanguageId )( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *LanguageId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_GrammarId )( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *GrammarId); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StartTime )( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *StartTime); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioStreamPosition )( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *AudioStreamPosition); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioSizeBytes )( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *pAudioSizeBytes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RetainedSizeBytes )( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *RetainedSizeBytes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioSizeTime )( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *AudioSizeTime); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rule )( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseRule **Rule); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Properties )( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseProperties **Properties); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Elements )( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseElements **Elements); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Replacements )( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseReplacements **Replacements); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EngineId )( + ISpeechPhraseInfo * This, + /* [retval][out] */ BSTR *EngineIdGuid); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EnginePrivateData )( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *PrivateData); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *SaveToMemory )( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *PhraseBlock); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetText )( + ISpeechPhraseInfo * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ BSTR *Text); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDisplayAttributes )( + ISpeechPhraseInfo * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + END_INTERFACE + } ISpeechPhraseInfoVtbl; + + interface ISpeechPhraseInfo + { + CONST_VTBL struct ISpeechPhraseInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseInfo_get_LanguageId(This,LanguageId) \ + (This)->lpVtbl -> get_LanguageId(This,LanguageId) + +#define ISpeechPhraseInfo_get_GrammarId(This,GrammarId) \ + (This)->lpVtbl -> get_GrammarId(This,GrammarId) + +#define ISpeechPhraseInfo_get_StartTime(This,StartTime) \ + (This)->lpVtbl -> get_StartTime(This,StartTime) + +#define ISpeechPhraseInfo_get_AudioStreamPosition(This,AudioStreamPosition) \ + (This)->lpVtbl -> get_AudioStreamPosition(This,AudioStreamPosition) + +#define ISpeechPhraseInfo_get_AudioSizeBytes(This,pAudioSizeBytes) \ + (This)->lpVtbl -> get_AudioSizeBytes(This,pAudioSizeBytes) + +#define ISpeechPhraseInfo_get_RetainedSizeBytes(This,RetainedSizeBytes) \ + (This)->lpVtbl -> get_RetainedSizeBytes(This,RetainedSizeBytes) + +#define ISpeechPhraseInfo_get_AudioSizeTime(This,AudioSizeTime) \ + (This)->lpVtbl -> get_AudioSizeTime(This,AudioSizeTime) + +#define ISpeechPhraseInfo_get_Rule(This,Rule) \ + (This)->lpVtbl -> get_Rule(This,Rule) + +#define ISpeechPhraseInfo_get_Properties(This,Properties) \ + (This)->lpVtbl -> get_Properties(This,Properties) + +#define ISpeechPhraseInfo_get_Elements(This,Elements) \ + (This)->lpVtbl -> get_Elements(This,Elements) + +#define ISpeechPhraseInfo_get_Replacements(This,Replacements) \ + (This)->lpVtbl -> get_Replacements(This,Replacements) + +#define ISpeechPhraseInfo_get_EngineId(This,EngineIdGuid) \ + (This)->lpVtbl -> get_EngineId(This,EngineIdGuid) + +#define ISpeechPhraseInfo_get_EnginePrivateData(This,PrivateData) \ + (This)->lpVtbl -> get_EnginePrivateData(This,PrivateData) + +#define ISpeechPhraseInfo_SaveToMemory(This,PhraseBlock) \ + (This)->lpVtbl -> SaveToMemory(This,PhraseBlock) + +#define ISpeechPhraseInfo_GetText(This,StartElement,Elements,UseReplacements,Text) \ + (This)->lpVtbl -> GetText(This,StartElement,Elements,UseReplacements,Text) + +#define ISpeechPhraseInfo_GetDisplayAttributes(This,StartElement,Elements,UseReplacements,DisplayAttributes) \ + (This)->lpVtbl -> GetDisplayAttributes(This,StartElement,Elements,UseReplacements,DisplayAttributes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_LanguageId_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *LanguageId); + + +void __RPC_STUB ISpeechPhraseInfo_get_LanguageId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_GrammarId_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *GrammarId); + + +void __RPC_STUB ISpeechPhraseInfo_get_GrammarId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_StartTime_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *StartTime); + + +void __RPC_STUB ISpeechPhraseInfo_get_StartTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_AudioStreamPosition_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *AudioStreamPosition); + + +void __RPC_STUB ISpeechPhraseInfo_get_AudioStreamPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_AudioSizeBytes_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *pAudioSizeBytes); + + +void __RPC_STUB ISpeechPhraseInfo_get_AudioSizeBytes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_RetainedSizeBytes_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *RetainedSizeBytes); + + +void __RPC_STUB ISpeechPhraseInfo_get_RetainedSizeBytes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_AudioSizeTime_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ long *AudioSizeTime); + + +void __RPC_STUB ISpeechPhraseInfo_get_AudioSizeTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_Rule_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseRule **Rule); + + +void __RPC_STUB ISpeechPhraseInfo_get_Rule_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_Properties_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseProperties **Properties); + + +void __RPC_STUB ISpeechPhraseInfo_get_Properties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_Elements_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseElements **Elements); + + +void __RPC_STUB ISpeechPhraseInfo_get_Elements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_Replacements_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ ISpeechPhraseReplacements **Replacements); + + +void __RPC_STUB ISpeechPhraseInfo_get_Replacements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_EngineId_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ BSTR *EngineIdGuid); + + +void __RPC_STUB ISpeechPhraseInfo_get_EngineId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_get_EnginePrivateData_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *PrivateData); + + +void __RPC_STUB ISpeechPhraseInfo_get_EnginePrivateData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_SaveToMemory_Proxy( + ISpeechPhraseInfo * This, + /* [retval][out] */ VARIANT *PhraseBlock); + + +void __RPC_STUB ISpeechPhraseInfo_SaveToMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_GetText_Proxy( + ISpeechPhraseInfo * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ BSTR *Text); + + +void __RPC_STUB ISpeechPhraseInfo_GetText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfo_GetDisplayAttributes_Proxy( + ISpeechPhraseInfo * This, + /* [defaultvalue][in] */ long StartElement, + /* [defaultvalue][in] */ long Elements, + /* [defaultvalue][in] */ VARIANT_BOOL UseReplacements, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + +void __RPC_STUB ISpeechPhraseInfo_GetDisplayAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseInfo_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseElement_INTERFACE_DEFINED__ +#define __ISpeechPhraseElement_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseElement */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseElement; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E6176F96-E373-4801-B223-3B62C068C0B4") + ISpeechPhraseElement : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioTimeOffset( + /* [retval][out] */ long *AudioTimeOffset) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioSizeTime( + /* [retval][out] */ long *AudioSizeTime) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioStreamOffset( + /* [retval][out] */ long *AudioStreamOffset) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_AudioSizeBytes( + /* [retval][out] */ long *AudioSizeBytes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RetainedStreamOffset( + /* [retval][out] */ long *RetainedStreamOffset) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RetainedSizeBytes( + /* [retval][out] */ long *RetainedSizeBytes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayText( + /* [retval][out] */ BSTR *DisplayText) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LexicalForm( + /* [retval][out] */ BSTR *LexicalForm) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Pronunciation( + /* [retval][out] */ VARIANT *Pronunciation) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayAttributes( + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_RequiredConfidence( + /* [retval][out] */ SpeechEngineConfidence *RequiredConfidence) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ActualConfidence( + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EngineConfidence( + /* [retval][out] */ float *EngineConfidence) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseElementVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseElement * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseElement * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseElement * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseElement * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseElement * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseElement * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseElement * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioTimeOffset )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioTimeOffset); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioSizeTime )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioSizeTime); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioStreamOffset )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioStreamOffset); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AudioSizeBytes )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioSizeBytes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RetainedStreamOffset )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *RetainedStreamOffset); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RetainedSizeBytes )( + ISpeechPhraseElement * This, + /* [retval][out] */ long *RetainedSizeBytes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DisplayText )( + ISpeechPhraseElement * This, + /* [retval][out] */ BSTR *DisplayText); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LexicalForm )( + ISpeechPhraseElement * This, + /* [retval][out] */ BSTR *LexicalForm); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Pronunciation )( + ISpeechPhraseElement * This, + /* [retval][out] */ VARIANT *Pronunciation); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DisplayAttributes )( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RequiredConfidence )( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechEngineConfidence *RequiredConfidence); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ActualConfidence )( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EngineConfidence )( + ISpeechPhraseElement * This, + /* [retval][out] */ float *EngineConfidence); + + END_INTERFACE + } ISpeechPhraseElementVtbl; + + interface ISpeechPhraseElement + { + CONST_VTBL struct ISpeechPhraseElementVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseElement_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseElement_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseElement_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseElement_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseElement_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseElement_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseElement_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseElement_get_AudioTimeOffset(This,AudioTimeOffset) \ + (This)->lpVtbl -> get_AudioTimeOffset(This,AudioTimeOffset) + +#define ISpeechPhraseElement_get_AudioSizeTime(This,AudioSizeTime) \ + (This)->lpVtbl -> get_AudioSizeTime(This,AudioSizeTime) + +#define ISpeechPhraseElement_get_AudioStreamOffset(This,AudioStreamOffset) \ + (This)->lpVtbl -> get_AudioStreamOffset(This,AudioStreamOffset) + +#define ISpeechPhraseElement_get_AudioSizeBytes(This,AudioSizeBytes) \ + (This)->lpVtbl -> get_AudioSizeBytes(This,AudioSizeBytes) + +#define ISpeechPhraseElement_get_RetainedStreamOffset(This,RetainedStreamOffset) \ + (This)->lpVtbl -> get_RetainedStreamOffset(This,RetainedStreamOffset) + +#define ISpeechPhraseElement_get_RetainedSizeBytes(This,RetainedSizeBytes) \ + (This)->lpVtbl -> get_RetainedSizeBytes(This,RetainedSizeBytes) + +#define ISpeechPhraseElement_get_DisplayText(This,DisplayText) \ + (This)->lpVtbl -> get_DisplayText(This,DisplayText) + +#define ISpeechPhraseElement_get_LexicalForm(This,LexicalForm) \ + (This)->lpVtbl -> get_LexicalForm(This,LexicalForm) + +#define ISpeechPhraseElement_get_Pronunciation(This,Pronunciation) \ + (This)->lpVtbl -> get_Pronunciation(This,Pronunciation) + +#define ISpeechPhraseElement_get_DisplayAttributes(This,DisplayAttributes) \ + (This)->lpVtbl -> get_DisplayAttributes(This,DisplayAttributes) + +#define ISpeechPhraseElement_get_RequiredConfidence(This,RequiredConfidence) \ + (This)->lpVtbl -> get_RequiredConfidence(This,RequiredConfidence) + +#define ISpeechPhraseElement_get_ActualConfidence(This,ActualConfidence) \ + (This)->lpVtbl -> get_ActualConfidence(This,ActualConfidence) + +#define ISpeechPhraseElement_get_EngineConfidence(This,EngineConfidence) \ + (This)->lpVtbl -> get_EngineConfidence(This,EngineConfidence) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_AudioTimeOffset_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioTimeOffset); + + +void __RPC_STUB ISpeechPhraseElement_get_AudioTimeOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_AudioSizeTime_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioSizeTime); + + +void __RPC_STUB ISpeechPhraseElement_get_AudioSizeTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_AudioStreamOffset_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioStreamOffset); + + +void __RPC_STUB ISpeechPhraseElement_get_AudioStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_AudioSizeBytes_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *AudioSizeBytes); + + +void __RPC_STUB ISpeechPhraseElement_get_AudioSizeBytes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_RetainedStreamOffset_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *RetainedStreamOffset); + + +void __RPC_STUB ISpeechPhraseElement_get_RetainedStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_RetainedSizeBytes_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ long *RetainedSizeBytes); + + +void __RPC_STUB ISpeechPhraseElement_get_RetainedSizeBytes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_DisplayText_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ BSTR *DisplayText); + + +void __RPC_STUB ISpeechPhraseElement_get_DisplayText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_LexicalForm_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ BSTR *LexicalForm); + + +void __RPC_STUB ISpeechPhraseElement_get_LexicalForm_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_Pronunciation_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ VARIANT *Pronunciation); + + +void __RPC_STUB ISpeechPhraseElement_get_Pronunciation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_DisplayAttributes_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + +void __RPC_STUB ISpeechPhraseElement_get_DisplayAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_RequiredConfidence_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechEngineConfidence *RequiredConfidence); + + +void __RPC_STUB ISpeechPhraseElement_get_RequiredConfidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_ActualConfidence_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence); + + +void __RPC_STUB ISpeechPhraseElement_get_ActualConfidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElement_get_EngineConfidence_Proxy( + ISpeechPhraseElement * This, + /* [retval][out] */ float *EngineConfidence); + + +void __RPC_STUB ISpeechPhraseElement_get_EngineConfidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseElement_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseElements_INTERFACE_DEFINED__ +#define __ISpeechPhraseElements_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseElements */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseElements; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0626B328-3478-467d-A0B3-D0853B93DDA3") + ISpeechPhraseElements : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseElement **Element) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseElementsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseElements * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseElements * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseElements * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseElements * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseElements * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseElements * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseElements * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechPhraseElements * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechPhraseElements * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseElement **Element); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechPhraseElements * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechPhraseElementsVtbl; + + interface ISpeechPhraseElements + { + CONST_VTBL struct ISpeechPhraseElementsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseElements_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseElements_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseElements_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseElements_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseElements_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseElements_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseElements_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseElements_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechPhraseElements_Item(This,Index,Element) \ + (This)->lpVtbl -> Item(This,Index,Element) + +#define ISpeechPhraseElements_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElements_get_Count_Proxy( + ISpeechPhraseElements * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechPhraseElements_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElements_Item_Proxy( + ISpeechPhraseElements * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseElement **Element); + + +void __RPC_STUB ISpeechPhraseElements_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseElements_get__NewEnum_Proxy( + ISpeechPhraseElements * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechPhraseElements_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseElements_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseReplacement_INTERFACE_DEFINED__ +#define __ISpeechPhraseReplacement_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseReplacement */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseReplacement; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2890A410-53A7-4fb5-94EC-06D4998E3D02") + ISpeechPhraseReplacement : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_DisplayAttributes( + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Text( + /* [retval][out] */ BSTR *Text) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FirstElement( + /* [retval][out] */ long *FirstElement) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NumberOfElements( + /* [retval][out] */ long *NumberOfElements) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseReplacementVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseReplacement * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseReplacement * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseReplacement * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseReplacement * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseReplacement * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseReplacement * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseReplacement * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DisplayAttributes )( + ISpeechPhraseReplacement * This, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Text )( + ISpeechPhraseReplacement * This, + /* [retval][out] */ BSTR *Text); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FirstElement )( + ISpeechPhraseReplacement * This, + /* [retval][out] */ long *FirstElement); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NumberOfElements )( + ISpeechPhraseReplacement * This, + /* [retval][out] */ long *NumberOfElements); + + END_INTERFACE + } ISpeechPhraseReplacementVtbl; + + interface ISpeechPhraseReplacement + { + CONST_VTBL struct ISpeechPhraseReplacementVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseReplacement_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseReplacement_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseReplacement_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseReplacement_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseReplacement_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseReplacement_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseReplacement_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseReplacement_get_DisplayAttributes(This,DisplayAttributes) \ + (This)->lpVtbl -> get_DisplayAttributes(This,DisplayAttributes) + +#define ISpeechPhraseReplacement_get_Text(This,Text) \ + (This)->lpVtbl -> get_Text(This,Text) + +#define ISpeechPhraseReplacement_get_FirstElement(This,FirstElement) \ + (This)->lpVtbl -> get_FirstElement(This,FirstElement) + +#define ISpeechPhraseReplacement_get_NumberOfElements(This,NumberOfElements) \ + (This)->lpVtbl -> get_NumberOfElements(This,NumberOfElements) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacement_get_DisplayAttributes_Proxy( + ISpeechPhraseReplacement * This, + /* [retval][out] */ SpeechDisplayAttributes *DisplayAttributes); + + +void __RPC_STUB ISpeechPhraseReplacement_get_DisplayAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacement_get_Text_Proxy( + ISpeechPhraseReplacement * This, + /* [retval][out] */ BSTR *Text); + + +void __RPC_STUB ISpeechPhraseReplacement_get_Text_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacement_get_FirstElement_Proxy( + ISpeechPhraseReplacement * This, + /* [retval][out] */ long *FirstElement); + + +void __RPC_STUB ISpeechPhraseReplacement_get_FirstElement_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacement_get_NumberOfElements_Proxy( + ISpeechPhraseReplacement * This, + /* [retval][out] */ long *NumberOfElements); + + +void __RPC_STUB ISpeechPhraseReplacement_get_NumberOfElements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseReplacement_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseReplacements_INTERFACE_DEFINED__ +#define __ISpeechPhraseReplacements_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseReplacements */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseReplacements; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("38BC662F-2257-4525-959E-2069D2596C05") + ISpeechPhraseReplacements : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseReplacement **Reps) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseReplacementsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseReplacements * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseReplacements * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseReplacements * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseReplacements * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseReplacements * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseReplacements * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseReplacements * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechPhraseReplacements * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechPhraseReplacements * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseReplacement **Reps); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechPhraseReplacements * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechPhraseReplacementsVtbl; + + interface ISpeechPhraseReplacements + { + CONST_VTBL struct ISpeechPhraseReplacementsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseReplacements_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseReplacements_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseReplacements_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseReplacements_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseReplacements_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseReplacements_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseReplacements_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseReplacements_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechPhraseReplacements_Item(This,Index,Reps) \ + (This)->lpVtbl -> Item(This,Index,Reps) + +#define ISpeechPhraseReplacements_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacements_get_Count_Proxy( + ISpeechPhraseReplacements * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechPhraseReplacements_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacements_Item_Proxy( + ISpeechPhraseReplacements * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseReplacement **Reps); + + +void __RPC_STUB ISpeechPhraseReplacements_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseReplacements_get__NewEnum_Proxy( + ISpeechPhraseReplacements * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechPhraseReplacements_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseReplacements_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseProperty_INTERFACE_DEFINED__ +#define __ISpeechPhraseProperty_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseProperty */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseProperty; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("CE563D48-961E-4732-A2E1-378A42B430BE") + ISpeechPhraseProperty : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *Name) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ long *Id) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Value( + /* [retval][out] */ VARIANT *Value) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FirstElement( + /* [retval][out] */ long *FirstElement) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NumberOfElements( + /* [retval][out] */ long *NumberOfElements) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EngineConfidence( + /* [retval][out] */ float *Confidence) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Confidence( + /* [retval][out] */ SpeechEngineConfidence *Confidence) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Parent( + /* [retval][out] */ ISpeechPhraseProperty **ParentProperty) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Children( + /* [retval][out] */ ISpeechPhraseProperties **Children) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhrasePropertyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseProperty * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseProperty * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseProperty * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseProperty * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseProperty * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseProperty * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseProperty * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + ISpeechPhraseProperty * This, + /* [retval][out] */ BSTR *Name); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *Id); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Value )( + ISpeechPhraseProperty * This, + /* [retval][out] */ VARIANT *Value); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FirstElement )( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *FirstElement); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NumberOfElements )( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *NumberOfElements); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EngineConfidence )( + ISpeechPhraseProperty * This, + /* [retval][out] */ float *Confidence); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Confidence )( + ISpeechPhraseProperty * This, + /* [retval][out] */ SpeechEngineConfidence *Confidence); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Parent )( + ISpeechPhraseProperty * This, + /* [retval][out] */ ISpeechPhraseProperty **ParentProperty); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Children )( + ISpeechPhraseProperty * This, + /* [retval][out] */ ISpeechPhraseProperties **Children); + + END_INTERFACE + } ISpeechPhrasePropertyVtbl; + + interface ISpeechPhraseProperty + { + CONST_VTBL struct ISpeechPhrasePropertyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseProperty_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseProperty_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseProperty_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseProperty_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseProperty_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseProperty_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseProperty_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseProperty_get_Name(This,Name) \ + (This)->lpVtbl -> get_Name(This,Name) + +#define ISpeechPhraseProperty_get_Id(This,Id) \ + (This)->lpVtbl -> get_Id(This,Id) + +#define ISpeechPhraseProperty_get_Value(This,Value) \ + (This)->lpVtbl -> get_Value(This,Value) + +#define ISpeechPhraseProperty_get_FirstElement(This,FirstElement) \ + (This)->lpVtbl -> get_FirstElement(This,FirstElement) + +#define ISpeechPhraseProperty_get_NumberOfElements(This,NumberOfElements) \ + (This)->lpVtbl -> get_NumberOfElements(This,NumberOfElements) + +#define ISpeechPhraseProperty_get_EngineConfidence(This,Confidence) \ + (This)->lpVtbl -> get_EngineConfidence(This,Confidence) + +#define ISpeechPhraseProperty_get_Confidence(This,Confidence) \ + (This)->lpVtbl -> get_Confidence(This,Confidence) + +#define ISpeechPhraseProperty_get_Parent(This,ParentProperty) \ + (This)->lpVtbl -> get_Parent(This,ParentProperty) + +#define ISpeechPhraseProperty_get_Children(This,Children) \ + (This)->lpVtbl -> get_Children(This,Children) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Name_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ BSTR *Name); + + +void __RPC_STUB ISpeechPhraseProperty_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Id_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *Id); + + +void __RPC_STUB ISpeechPhraseProperty_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Value_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ VARIANT *Value); + + +void __RPC_STUB ISpeechPhraseProperty_get_Value_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_FirstElement_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *FirstElement); + + +void __RPC_STUB ISpeechPhraseProperty_get_FirstElement_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_NumberOfElements_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ long *NumberOfElements); + + +void __RPC_STUB ISpeechPhraseProperty_get_NumberOfElements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_EngineConfidence_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ float *Confidence); + + +void __RPC_STUB ISpeechPhraseProperty_get_EngineConfidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Confidence_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ SpeechEngineConfidence *Confidence); + + +void __RPC_STUB ISpeechPhraseProperty_get_Confidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Parent_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ ISpeechPhraseProperty **ParentProperty); + + +void __RPC_STUB ISpeechPhraseProperty_get_Parent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperty_get_Children_Proxy( + ISpeechPhraseProperty * This, + /* [retval][out] */ ISpeechPhraseProperties **Children); + + +void __RPC_STUB ISpeechPhraseProperty_get_Children_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseProperty_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseProperties_INTERFACE_DEFINED__ +#define __ISpeechPhraseProperties_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseProperties */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("08166B47-102E-4b23-A599-BDB98DBFD1F4") + ISpeechPhraseProperties : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseProperty **Property) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhrasePropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseProperties * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseProperties * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseProperties * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseProperties * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseProperties * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseProperties * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechPhraseProperties * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechPhraseProperties * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseProperty **Property); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechPhraseProperties * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechPhrasePropertiesVtbl; + + interface ISpeechPhraseProperties + { + CONST_VTBL struct ISpeechPhrasePropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseProperties_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseProperties_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseProperties_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseProperties_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseProperties_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseProperties_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseProperties_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseProperties_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechPhraseProperties_Item(This,Index,Property) \ + (This)->lpVtbl -> Item(This,Index,Property) + +#define ISpeechPhraseProperties_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperties_get_Count_Proxy( + ISpeechPhraseProperties * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechPhraseProperties_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperties_Item_Proxy( + ISpeechPhraseProperties * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseProperty **Property); + + +void __RPC_STUB ISpeechPhraseProperties_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseProperties_get__NewEnum_Proxy( + ISpeechPhraseProperties * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechPhraseProperties_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseProperties_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseRule_INTERFACE_DEFINED__ +#define __ISpeechPhraseRule_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseRule */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseRule; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A7BFE112-A4A0-48d9-B602-C313843F6964") + ISpeechPhraseRule : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *Name) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Id( + /* [retval][out] */ long *Id) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_FirstElement( + /* [retval][out] */ long *FirstElement) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_NumberOfElements( + /* [retval][out] */ long *NumberOfElements) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Parent( + /* [retval][out] */ ISpeechPhraseRule **Parent) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Children( + /* [retval][out] */ ISpeechPhraseRules **Children) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Confidence( + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence) = 0; + + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_EngineConfidence( + /* [retval][out] */ float *EngineConfidence) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseRuleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseRule * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseRule * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseRule * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseRule * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseRule * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseRule * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseRule * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + ISpeechPhraseRule * This, + /* [retval][out] */ BSTR *Name); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Id )( + ISpeechPhraseRule * This, + /* [retval][out] */ long *Id); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FirstElement )( + ISpeechPhraseRule * This, + /* [retval][out] */ long *FirstElement); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NumberOfElements )( + ISpeechPhraseRule * This, + /* [retval][out] */ long *NumberOfElements); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Parent )( + ISpeechPhraseRule * This, + /* [retval][out] */ ISpeechPhraseRule **Parent); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Children )( + ISpeechPhraseRule * This, + /* [retval][out] */ ISpeechPhraseRules **Children); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Confidence )( + ISpeechPhraseRule * This, + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EngineConfidence )( + ISpeechPhraseRule * This, + /* [retval][out] */ float *EngineConfidence); + + END_INTERFACE + } ISpeechPhraseRuleVtbl; + + interface ISpeechPhraseRule + { + CONST_VTBL struct ISpeechPhraseRuleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseRule_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseRule_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseRule_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseRule_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseRule_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseRule_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseRule_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseRule_get_Name(This,Name) \ + (This)->lpVtbl -> get_Name(This,Name) + +#define ISpeechPhraseRule_get_Id(This,Id) \ + (This)->lpVtbl -> get_Id(This,Id) + +#define ISpeechPhraseRule_get_FirstElement(This,FirstElement) \ + (This)->lpVtbl -> get_FirstElement(This,FirstElement) + +#define ISpeechPhraseRule_get_NumberOfElements(This,NumberOfElements) \ + (This)->lpVtbl -> get_NumberOfElements(This,NumberOfElements) + +#define ISpeechPhraseRule_get_Parent(This,Parent) \ + (This)->lpVtbl -> get_Parent(This,Parent) + +#define ISpeechPhraseRule_get_Children(This,Children) \ + (This)->lpVtbl -> get_Children(This,Children) + +#define ISpeechPhraseRule_get_Confidence(This,ActualConfidence) \ + (This)->lpVtbl -> get_Confidence(This,ActualConfidence) + +#define ISpeechPhraseRule_get_EngineConfidence(This,EngineConfidence) \ + (This)->lpVtbl -> get_EngineConfidence(This,EngineConfidence) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_Name_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ BSTR *Name); + + +void __RPC_STUB ISpeechPhraseRule_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_Id_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ long *Id); + + +void __RPC_STUB ISpeechPhraseRule_get_Id_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_FirstElement_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ long *FirstElement); + + +void __RPC_STUB ISpeechPhraseRule_get_FirstElement_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_NumberOfElements_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ long *NumberOfElements); + + +void __RPC_STUB ISpeechPhraseRule_get_NumberOfElements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_Parent_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ ISpeechPhraseRule **Parent); + + +void __RPC_STUB ISpeechPhraseRule_get_Parent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_Children_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ ISpeechPhraseRules **Children); + + +void __RPC_STUB ISpeechPhraseRule_get_Children_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_Confidence_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ SpeechEngineConfidence *ActualConfidence); + + +void __RPC_STUB ISpeechPhraseRule_get_Confidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRule_get_EngineConfidence_Proxy( + ISpeechPhraseRule * This, + /* [retval][out] */ float *EngineConfidence); + + +void __RPC_STUB ISpeechPhraseRule_get_EngineConfidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseRule_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhraseRules_INTERFACE_DEFINED__ +#define __ISpeechPhraseRules_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseRules */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseRules; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9047D593-01DD-4b72-81A3-E4A0CA69F407") + ISpeechPhraseRules : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseRule **Rule) = 0; + + virtual /* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseRulesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseRules * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseRules * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseRules * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseRules * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseRules * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseRules * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseRules * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechPhraseRules * This, + /* [retval][out] */ long *Count); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechPhraseRules * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseRule **Rule); + + /* [id][restricted][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechPhraseRules * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechPhraseRulesVtbl; + + interface ISpeechPhraseRules + { + CONST_VTBL struct ISpeechPhraseRulesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseRules_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseRules_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseRules_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseRules_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseRules_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseRules_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseRules_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseRules_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechPhraseRules_Item(This,Index,Rule) \ + (This)->lpVtbl -> Item(This,Index,Rule) + +#define ISpeechPhraseRules_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRules_get_Count_Proxy( + ISpeechPhraseRules * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechPhraseRules_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRules_Item_Proxy( + ISpeechPhraseRules * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechPhraseRule **Rule); + + +void __RPC_STUB ISpeechPhraseRules_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][restricted][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseRules_get__NewEnum_Proxy( + ISpeechPhraseRules * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechPhraseRules_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseRules_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechLexicon_INTERFACE_DEFINED__ +#define __ISpeechLexicon_INTERFACE_DEFINED__ + +/* interface ISpeechLexicon */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechLexicon; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3DA7627A-C7AE-4b23-8708-638C50362C25") + ISpeechLexicon : public IDispatch + { + public: + virtual /* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_GenerationId( + /* [retval][out] */ long *GenerationId) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetWords( + /* [defaultvalue][in] */ SpeechLexiconType Flags, + /* [defaultvalue][out] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **Words) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE AddPronunciation( + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech = SPSUnknown, + /* [defaultvalue][in] */ BSTR bstrPronunciation = L"") = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE AddPronunciationByPhoneIds( + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech = SPSUnknown, + /* [defaultvalue][in] */ VARIANT *PhoneIds = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE RemovePronunciation( + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech = SPSUnknown, + /* [defaultvalue][in] */ BSTR bstrPronunciation = L"") = 0; + + virtual /* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE RemovePronunciationByPhoneIds( + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech = SPSUnknown, + /* [defaultvalue][in] */ VARIANT *PhoneIds = 0) = 0; + + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE GetPronunciations( + /* [in] */ BSTR bstrWord, + /* [defaultvalue][in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechLexiconType TypeFlags, + /* [retval][out] */ ISpeechLexiconPronunciations **ppPronunciations) = 0; + + virtual /* [hidden][id][helpstring] */ HRESULT STDMETHODCALLTYPE GetGenerationChange( + /* [out][in] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **ppWords) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechLexiconVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechLexicon * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechLexicon * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechLexicon * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechLexicon * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechLexicon * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechLexicon * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechLexicon * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [hidden][id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_GenerationId )( + ISpeechLexicon * This, + /* [retval][out] */ long *GenerationId); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetWords )( + ISpeechLexicon * This, + /* [defaultvalue][in] */ SpeechLexiconType Flags, + /* [defaultvalue][out] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **Words); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddPronunciation )( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ BSTR bstrPronunciation); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *AddPronunciationByPhoneIds )( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ VARIANT *PhoneIds); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemovePronunciation )( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ BSTR bstrPronunciation); + + /* [id][hidden][helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemovePronunciationByPhoneIds )( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ VARIANT *PhoneIds); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPronunciations )( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [defaultvalue][in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechLexiconType TypeFlags, + /* [retval][out] */ ISpeechLexiconPronunciations **ppPronunciations); + + /* [hidden][id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGenerationChange )( + ISpeechLexicon * This, + /* [out][in] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **ppWords); + + END_INTERFACE + } ISpeechLexiconVtbl; + + interface ISpeechLexicon + { + CONST_VTBL struct ISpeechLexiconVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechLexicon_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechLexicon_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechLexicon_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechLexicon_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechLexicon_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechLexicon_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechLexicon_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechLexicon_get_GenerationId(This,GenerationId) \ + (This)->lpVtbl -> get_GenerationId(This,GenerationId) + +#define ISpeechLexicon_GetWords(This,Flags,GenerationID,Words) \ + (This)->lpVtbl -> GetWords(This,Flags,GenerationID,Words) + +#define ISpeechLexicon_AddPronunciation(This,bstrWord,LangId,PartOfSpeech,bstrPronunciation) \ + (This)->lpVtbl -> AddPronunciation(This,bstrWord,LangId,PartOfSpeech,bstrPronunciation) + +#define ISpeechLexicon_AddPronunciationByPhoneIds(This,bstrWord,LangId,PartOfSpeech,PhoneIds) \ + (This)->lpVtbl -> AddPronunciationByPhoneIds(This,bstrWord,LangId,PartOfSpeech,PhoneIds) + +#define ISpeechLexicon_RemovePronunciation(This,bstrWord,LangId,PartOfSpeech,bstrPronunciation) \ + (This)->lpVtbl -> RemovePronunciation(This,bstrWord,LangId,PartOfSpeech,bstrPronunciation) + +#define ISpeechLexicon_RemovePronunciationByPhoneIds(This,bstrWord,LangId,PartOfSpeech,PhoneIds) \ + (This)->lpVtbl -> RemovePronunciationByPhoneIds(This,bstrWord,LangId,PartOfSpeech,PhoneIds) + +#define ISpeechLexicon_GetPronunciations(This,bstrWord,LangId,TypeFlags,ppPronunciations) \ + (This)->lpVtbl -> GetPronunciations(This,bstrWord,LangId,TypeFlags,ppPronunciations) + +#define ISpeechLexicon_GetGenerationChange(This,GenerationID,ppWords) \ + (This)->lpVtbl -> GetGenerationChange(This,GenerationID,ppWords) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [hidden][id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_get_GenerationId_Proxy( + ISpeechLexicon * This, + /* [retval][out] */ long *GenerationId); + + +void __RPC_STUB ISpeechLexicon_get_GenerationId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_GetWords_Proxy( + ISpeechLexicon * This, + /* [defaultvalue][in] */ SpeechLexiconType Flags, + /* [defaultvalue][out] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **Words); + + +void __RPC_STUB ISpeechLexicon_GetWords_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_AddPronunciation_Proxy( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ BSTR bstrPronunciation); + + +void __RPC_STUB ISpeechLexicon_AddPronunciation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_AddPronunciationByPhoneIds_Proxy( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ VARIANT *PhoneIds); + + +void __RPC_STUB ISpeechLexicon_AddPronunciationByPhoneIds_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_RemovePronunciation_Proxy( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ BSTR bstrPronunciation); + + +void __RPC_STUB ISpeechLexicon_RemovePronunciation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][hidden][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_RemovePronunciationByPhoneIds_Proxy( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechPartOfSpeech PartOfSpeech, + /* [defaultvalue][in] */ VARIANT *PhoneIds); + + +void __RPC_STUB ISpeechLexicon_RemovePronunciationByPhoneIds_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_GetPronunciations_Proxy( + ISpeechLexicon * This, + /* [in] */ BSTR bstrWord, + /* [defaultvalue][in] */ SpeechLanguageId LangId, + /* [defaultvalue][in] */ SpeechLexiconType TypeFlags, + /* [retval][out] */ ISpeechLexiconPronunciations **ppPronunciations); + + +void __RPC_STUB ISpeechLexicon_GetPronunciations_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [hidden][id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechLexicon_GetGenerationChange_Proxy( + ISpeechLexicon * This, + /* [out][in] */ long *GenerationID, + /* [retval][out] */ ISpeechLexiconWords **ppWords); + + +void __RPC_STUB ISpeechLexicon_GetGenerationChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechLexicon_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechLexiconWords_INTERFACE_DEFINED__ +#define __ISpeechLexiconWords_INTERFACE_DEFINED__ + +/* interface ISpeechLexiconWords */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechLexiconWords; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8D199862-415E-47d5-AC4F-FAA608B424E6") + ISpeechLexiconWords : public IDispatch + { + public: + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconWord **Word) = 0; + + virtual /* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechLexiconWordsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechLexiconWords * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechLexiconWords * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechLexiconWords * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechLexiconWords * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechLexiconWords * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechLexiconWords * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechLexiconWords * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechLexiconWords * This, + /* [retval][out] */ long *Count); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechLexiconWords * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconWord **Word); + + /* [restricted][helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechLexiconWords * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechLexiconWordsVtbl; + + interface ISpeechLexiconWords + { + CONST_VTBL struct ISpeechLexiconWordsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechLexiconWords_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechLexiconWords_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechLexiconWords_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechLexiconWords_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechLexiconWords_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechLexiconWords_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechLexiconWords_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechLexiconWords_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechLexiconWords_Item(This,Index,Word) \ + (This)->lpVtbl -> Item(This,Index,Word) + +#define ISpeechLexiconWords_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWords_get_Count_Proxy( + ISpeechLexiconWords * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechLexiconWords_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWords_Item_Proxy( + ISpeechLexiconWords * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconWord **Word); + + +void __RPC_STUB ISpeechLexiconWords_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWords_get__NewEnum_Proxy( + ISpeechLexiconWords * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechLexiconWords_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechLexiconWords_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechLexiconWord_INTERFACE_DEFINED__ +#define __ISpeechLexiconWord_INTERFACE_DEFINED__ + +/* interface ISpeechLexiconWord */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechLexiconWord; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4E5B933C-C9BE-48ed-8842-1EE51BB1D4FF") + ISpeechLexiconWord : public IDispatch + { + public: + virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_LangId( + /* [retval][out] */ SpeechLanguageId *LangId) = 0; + + virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ SpeechWordType *WordType) = 0; + + virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Word( + /* [retval][out] */ BSTR *Word) = 0; + + virtual /* [propget][id] */ HRESULT STDMETHODCALLTYPE get_Pronunciations( + /* [retval][out] */ ISpeechLexiconPronunciations **Pronunciations) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechLexiconWordVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechLexiconWord * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechLexiconWord * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechLexiconWord * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechLexiconWord * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechLexiconWord * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechLexiconWord * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechLexiconWord * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LangId )( + ISpeechLexiconWord * This, + /* [retval][out] */ SpeechLanguageId *LangId); + + /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + ISpeechLexiconWord * This, + /* [retval][out] */ SpeechWordType *WordType); + + /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Word )( + ISpeechLexiconWord * This, + /* [retval][out] */ BSTR *Word); + + /* [propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Pronunciations )( + ISpeechLexiconWord * This, + /* [retval][out] */ ISpeechLexiconPronunciations **Pronunciations); + + END_INTERFACE + } ISpeechLexiconWordVtbl; + + interface ISpeechLexiconWord + { + CONST_VTBL struct ISpeechLexiconWordVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechLexiconWord_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechLexiconWord_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechLexiconWord_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechLexiconWord_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechLexiconWord_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechLexiconWord_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechLexiconWord_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechLexiconWord_get_LangId(This,LangId) \ + (This)->lpVtbl -> get_LangId(This,LangId) + +#define ISpeechLexiconWord_get_Type(This,WordType) \ + (This)->lpVtbl -> get_Type(This,WordType) + +#define ISpeechLexiconWord_get_Word(This,Word) \ + (This)->lpVtbl -> get_Word(This,Word) + +#define ISpeechLexiconWord_get_Pronunciations(This,Pronunciations) \ + (This)->lpVtbl -> get_Pronunciations(This,Pronunciations) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWord_get_LangId_Proxy( + ISpeechLexiconWord * This, + /* [retval][out] */ SpeechLanguageId *LangId); + + +void __RPC_STUB ISpeechLexiconWord_get_LangId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWord_get_Type_Proxy( + ISpeechLexiconWord * This, + /* [retval][out] */ SpeechWordType *WordType); + + +void __RPC_STUB ISpeechLexiconWord_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWord_get_Word_Proxy( + ISpeechLexiconWord * This, + /* [retval][out] */ BSTR *Word); + + +void __RPC_STUB ISpeechLexiconWord_get_Word_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconWord_get_Pronunciations_Proxy( + ISpeechLexiconWord * This, + /* [retval][out] */ ISpeechLexiconPronunciations **Pronunciations); + + +void __RPC_STUB ISpeechLexiconWord_get_Pronunciations_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechLexiconWord_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechLexiconPronunciations_INTERFACE_DEFINED__ +#define __ISpeechLexiconPronunciations_INTERFACE_DEFINED__ + +/* interface ISpeechLexiconPronunciations */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechLexiconPronunciations; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("72829128-5682-4704-A0D4-3E2BB6F2EAD3") + ISpeechLexiconPronunciations : public IDispatch + { + public: + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconPronunciation **Pronunciation) = 0; + + virtual /* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **EnumVARIANT) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechLexiconPronunciationsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechLexiconPronunciations * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechLexiconPronunciations * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechLexiconPronunciations * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechLexiconPronunciations * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechLexiconPronunciations * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechLexiconPronunciations * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechLexiconPronunciations * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ISpeechLexiconPronunciations * This, + /* [retval][out] */ long *Count); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Item )( + ISpeechLexiconPronunciations * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconPronunciation **Pronunciation); + + /* [restricted][helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ISpeechLexiconPronunciations * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + END_INTERFACE + } ISpeechLexiconPronunciationsVtbl; + + interface ISpeechLexiconPronunciations + { + CONST_VTBL struct ISpeechLexiconPronunciationsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechLexiconPronunciations_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechLexiconPronunciations_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechLexiconPronunciations_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechLexiconPronunciations_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechLexiconPronunciations_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechLexiconPronunciations_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechLexiconPronunciations_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechLexiconPronunciations_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ISpeechLexiconPronunciations_Item(This,Index,Pronunciation) \ + (This)->lpVtbl -> Item(This,Index,Pronunciation) + +#define ISpeechLexiconPronunciations_get__NewEnum(This,EnumVARIANT) \ + (This)->lpVtbl -> get__NewEnum(This,EnumVARIANT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciations_get_Count_Proxy( + ISpeechLexiconPronunciations * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ISpeechLexiconPronunciations_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciations_Item_Proxy( + ISpeechLexiconPronunciations * This, + /* [in] */ long Index, + /* [retval][out] */ ISpeechLexiconPronunciation **Pronunciation); + + +void __RPC_STUB ISpeechLexiconPronunciations_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciations_get__NewEnum_Proxy( + ISpeechLexiconPronunciations * This, + /* [retval][out] */ IUnknown **EnumVARIANT); + + +void __RPC_STUB ISpeechLexiconPronunciations_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechLexiconPronunciations_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechLexiconPronunciation_INTERFACE_DEFINED__ +#define __ISpeechLexiconPronunciation_INTERFACE_DEFINED__ + +/* interface ISpeechLexiconPronunciation */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechLexiconPronunciation; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("95252C5D-9E43-4f4a-9899-48EE73352F9F") + ISpeechLexiconPronunciation : public IDispatch + { + public: + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ SpeechLexiconType *LexiconType) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_LangId( + /* [retval][out] */ SpeechLanguageId *LangId) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_PartOfSpeech( + /* [retval][out] */ SpeechPartOfSpeech *PartOfSpeech) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_PhoneIds( + /* [retval][out] */ VARIANT *PhoneIds) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Symbolic( + /* [retval][out] */ BSTR *Symbolic) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechLexiconPronunciationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechLexiconPronunciation * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechLexiconPronunciation * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechLexiconPronunciation * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechLexiconPronunciation * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechLexiconPronunciation * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechLexiconPronunciation * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechLexiconPronunciation * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechLexiconType *LexiconType); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_LangId )( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechLanguageId *LangId); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PartOfSpeech )( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechPartOfSpeech *PartOfSpeech); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_PhoneIds )( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ VARIANT *PhoneIds); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Symbolic )( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ BSTR *Symbolic); + + END_INTERFACE + } ISpeechLexiconPronunciationVtbl; + + interface ISpeechLexiconPronunciation + { + CONST_VTBL struct ISpeechLexiconPronunciationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechLexiconPronunciation_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechLexiconPronunciation_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechLexiconPronunciation_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechLexiconPronunciation_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechLexiconPronunciation_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechLexiconPronunciation_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechLexiconPronunciation_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechLexiconPronunciation_get_Type(This,LexiconType) \ + (This)->lpVtbl -> get_Type(This,LexiconType) + +#define ISpeechLexiconPronunciation_get_LangId(This,LangId) \ + (This)->lpVtbl -> get_LangId(This,LangId) + +#define ISpeechLexiconPronunciation_get_PartOfSpeech(This,PartOfSpeech) \ + (This)->lpVtbl -> get_PartOfSpeech(This,PartOfSpeech) + +#define ISpeechLexiconPronunciation_get_PhoneIds(This,PhoneIds) \ + (This)->lpVtbl -> get_PhoneIds(This,PhoneIds) + +#define ISpeechLexiconPronunciation_get_Symbolic(This,Symbolic) \ + (This)->lpVtbl -> get_Symbolic(This,Symbolic) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciation_get_Type_Proxy( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechLexiconType *LexiconType); + + +void __RPC_STUB ISpeechLexiconPronunciation_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciation_get_LangId_Proxy( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechLanguageId *LangId); + + +void __RPC_STUB ISpeechLexiconPronunciation_get_LangId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciation_get_PartOfSpeech_Proxy( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ SpeechPartOfSpeech *PartOfSpeech); + + +void __RPC_STUB ISpeechLexiconPronunciation_get_PartOfSpeech_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciation_get_PhoneIds_Proxy( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ VARIANT *PhoneIds); + + +void __RPC_STUB ISpeechLexiconPronunciation_get_PhoneIds_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ISpeechLexiconPronunciation_get_Symbolic_Proxy( + ISpeechLexiconPronunciation * This, + /* [retval][out] */ BSTR *Symbolic); + + +void __RPC_STUB ISpeechLexiconPronunciation_get_Symbolic_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechLexiconPronunciation_INTERFACE_DEFINED__ */ + + + +#ifndef __SpeechStringConstants_MODULE_DEFINED__ +#define __SpeechStringConstants_MODULE_DEFINED__ + + +/* module SpeechStringConstants */ +/* [uuid] */ + +const BSTR SpeechRegistryUserRoot = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech"; + +const BSTR SpeechRegistryLocalMachineRoot = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech"; + +const BSTR SpeechCategoryAudioOut = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioOutput"; + +const BSTR SpeechCategoryAudioIn = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AudioInput"; + +const BSTR SpeechCategoryVoices = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices"; + +const BSTR SpeechCategoryRecognizers = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Recognizers"; + +const BSTR SpeechCategoryAppLexicons = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\AppLexicons"; + +const BSTR SpeechCategoryPhoneConverters = L"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\PhoneConverters"; + +const BSTR SpeechCategoryRecoProfiles = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\RecoProfiles"; + +const BSTR SpeechTokenIdUserLexicon = L"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Speech\CurrentUserLexicon"; + +const BSTR SpeechTokenValueCLSID = L"CLSID"; + +const BSTR SpeechTokenKeyFiles = L"Files"; + +const BSTR SpeechTokenKeyUI = L"UI"; + +const BSTR SpeechTokenKeyAttributes = L"Attributes"; + +const BSTR SpeechVoiceCategoryTTSRate = L"DefaultTTSRate"; + +const BSTR SpeechPropertyResourceUsage = L"ResourceUsage"; + +const BSTR SpeechPropertyHighConfidenceThreshold = L"HighConfidenceThreshold"; + +const BSTR SpeechPropertyNormalConfidenceThreshold = L"NormalConfidenceThreshold"; + +const BSTR SpeechPropertyLowConfidenceThreshold = L"LowConfidenceThreshold"; + +const BSTR SpeechPropertyResponseSpeed = L"ResponseSpeed"; + +const BSTR SpeechPropertyComplexResponseSpeed = L"ComplexResponseSpeed"; + +const BSTR SpeechPropertyAdaptationOn = L"AdaptationOn"; + +const BSTR SpeechDictationTopicSpelling = L"Spelling"; + +const BSTR SpeechGrammarTagWildcard = L"..."; + +const BSTR SpeechGrammarTagDictation = L"*"; + +const BSTR SpeechGrammarTagUnlimitedDictation = L"*+"; + +const BSTR SpeechEngineProperties = L"EngineProperties"; + +const BSTR SpeechAddRemoveWord = L"AddRemoveWord"; + +const BSTR SpeechUserTraining = L"UserTraining"; + +const BSTR SpeechMicTraining = L"MicTraining"; + +const BSTR SpeechRecoProfileProperties = L"RecoProfileProperties"; + +const BSTR SpeechAudioProperties = L"AudioProperties"; + +const BSTR SpeechAudioVolume = L"AudioVolume"; + +const BSTR SpeechVoiceSkipTypeSentence = L"Sentence"; + +const BSTR SpeechAudioFormatGUIDWave = L"{C31ADBAE-527F-4ff5-A230-F62BB61FF70C}"; + +const BSTR SpeechAudioFormatGUIDText = L"{7CEEF9F9-3D13-11d2-9EE7-00C04F797396}"; + +#endif /* __SpeechStringConstants_MODULE_DEFINED__ */ + + +#ifndef __SpeechConstants_MODULE_DEFINED__ +#define __SpeechConstants_MODULE_DEFINED__ + + +/* module SpeechConstants */ +/* [uuid] */ + +const float Speech_Default_Weight = DEFAULT_WEIGHT; + +const LONG Speech_Max_Word_Length = SP_MAX_WORD_LENGTH; + +const LONG Speech_Max_Pron_Length = SP_MAX_PRON_LENGTH; + +const LONG Speech_StreamPos_Asap = SP_STREAMPOS_ASAP; + +const LONG Speech_StreamPos_RealTime = SP_STREAMPOS_REALTIME; + +const LONG SpeechAllElements = SPPR_ALL_ELEMENTS; + +#endif /* __SpeechConstants_MODULE_DEFINED__ */ + +#ifndef __ISpeechPhraseInfoBuilder_INTERFACE_DEFINED__ +#define __ISpeechPhraseInfoBuilder_INTERFACE_DEFINED__ + +/* interface ISpeechPhraseInfoBuilder */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhraseInfoBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3B151836-DF3A-4E0A-846C-D2ADC9334333") + ISpeechPhraseInfoBuilder : public IDispatch + { + public: + virtual /* [id][helpstring] */ HRESULT STDMETHODCALLTYPE RestorePhraseFromMemory( + /* [in] */ VARIANT *PhraseInMemory, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhraseInfoBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhraseInfoBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhraseInfoBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhraseInfoBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhraseInfoBuilder * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhraseInfoBuilder * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhraseInfoBuilder * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhraseInfoBuilder * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring] */ HRESULT ( STDMETHODCALLTYPE *RestorePhraseFromMemory )( + ISpeechPhraseInfoBuilder * This, + /* [in] */ VARIANT *PhraseInMemory, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + END_INTERFACE + } ISpeechPhraseInfoBuilderVtbl; + + interface ISpeechPhraseInfoBuilder + { + CONST_VTBL struct ISpeechPhraseInfoBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhraseInfoBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhraseInfoBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhraseInfoBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhraseInfoBuilder_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhraseInfoBuilder_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhraseInfoBuilder_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhraseInfoBuilder_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhraseInfoBuilder_RestorePhraseFromMemory(This,PhraseInMemory,PhraseInfo) \ + (This)->lpVtbl -> RestorePhraseFromMemory(This,PhraseInMemory,PhraseInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring] */ HRESULT STDMETHODCALLTYPE ISpeechPhraseInfoBuilder_RestorePhraseFromMemory_Proxy( + ISpeechPhraseInfoBuilder * This, + /* [in] */ VARIANT *PhraseInMemory, + /* [retval][out] */ ISpeechPhraseInfo **PhraseInfo); + + +void __RPC_STUB ISpeechPhraseInfoBuilder_RestorePhraseFromMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhraseInfoBuilder_INTERFACE_DEFINED__ */ + + +#ifndef __ISpeechPhoneConverter_INTERFACE_DEFINED__ +#define __ISpeechPhoneConverter_INTERFACE_DEFINED__ + +/* interface ISpeechPhoneConverter */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_ISpeechPhoneConverter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C3E4F353-433F-43d6-89A1-6A62A7054C3D") + ISpeechPhoneConverter : public IDispatch + { + public: + virtual /* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_LanguageId( + /* [retval][out] */ SpeechLanguageId *LanguageId) = 0; + + virtual /* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_LanguageId( + /* [in] */ SpeechLanguageId LanguageId) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE PhoneToId( + /* [in] */ const BSTR Phonemes, + /* [retval][out] */ VARIANT *IdArray) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IdToPhone( + /* [in] */ const VARIANT IdArray, + /* [retval][out] */ BSTR *Phonemes) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpeechPhoneConverterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpeechPhoneConverter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpeechPhoneConverter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpeechPhoneConverter * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ISpeechPhoneConverter * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ISpeechPhoneConverter * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ISpeechPhoneConverter * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ISpeechPhoneConverter * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LanguageId )( + ISpeechPhoneConverter * This, + /* [retval][out] */ SpeechLanguageId *LanguageId); + + /* [id][helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LanguageId )( + ISpeechPhoneConverter * This, + /* [in] */ SpeechLanguageId LanguageId); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *PhoneToId )( + ISpeechPhoneConverter * This, + /* [in] */ const BSTR Phonemes, + /* [retval][out] */ VARIANT *IdArray); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *IdToPhone )( + ISpeechPhoneConverter * This, + /* [in] */ const VARIANT IdArray, + /* [retval][out] */ BSTR *Phonemes); + + END_INTERFACE + } ISpeechPhoneConverterVtbl; + + interface ISpeechPhoneConverter + { + CONST_VTBL struct ISpeechPhoneConverterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpeechPhoneConverter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpeechPhoneConverter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpeechPhoneConverter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpeechPhoneConverter_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ISpeechPhoneConverter_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ISpeechPhoneConverter_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ISpeechPhoneConverter_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ISpeechPhoneConverter_get_LanguageId(This,LanguageId) \ + (This)->lpVtbl -> get_LanguageId(This,LanguageId) + +#define ISpeechPhoneConverter_put_LanguageId(This,LanguageId) \ + (This)->lpVtbl -> put_LanguageId(This,LanguageId) + +#define ISpeechPhoneConverter_PhoneToId(This,Phonemes,IdArray) \ + (This)->lpVtbl -> PhoneToId(This,Phonemes,IdArray) + +#define ISpeechPhoneConverter_IdToPhone(This,IdArray,Phonemes) \ + (This)->lpVtbl -> IdToPhone(This,IdArray,Phonemes) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][helpstring][propget] */ HRESULT STDMETHODCALLTYPE ISpeechPhoneConverter_get_LanguageId_Proxy( + ISpeechPhoneConverter * This, + /* [retval][out] */ SpeechLanguageId *LanguageId); + + +void __RPC_STUB ISpeechPhoneConverter_get_LanguageId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][helpstring][propput] */ HRESULT STDMETHODCALLTYPE ISpeechPhoneConverter_put_LanguageId_Proxy( + ISpeechPhoneConverter * This, + /* [in] */ SpeechLanguageId LanguageId); + + +void __RPC_STUB ISpeechPhoneConverter_put_LanguageId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISpeechPhoneConverter_PhoneToId_Proxy( + ISpeechPhoneConverter * This, + /* [in] */ const BSTR Phonemes, + /* [retval][out] */ VARIANT *IdArray); + + +void __RPC_STUB ISpeechPhoneConverter_PhoneToId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ISpeechPhoneConverter_IdToPhone_Proxy( + ISpeechPhoneConverter * This, + /* [in] */ const VARIANT IdArray, + /* [retval][out] */ BSTR *Phonemes); + + +void __RPC_STUB ISpeechPhoneConverter_IdToPhone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpeechPhoneConverter_INTERFACE_DEFINED__ */ + + +EXTERN_C const CLSID CLSID_SpNotifyTranslator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("E2AE5372-5D40-11D2-960E-00C04F8EE628") +SpNotifyTranslator; +#endif + +EXTERN_C const CLSID CLSID_SpObjectTokenCategory; + +#ifdef __cplusplus + +class DECLSPEC_UUID("A910187F-0C7A-45AC-92CC-59EDAFB77B53") +SpObjectTokenCategory; +#endif + +EXTERN_C const CLSID CLSID_SpObjectToken; + +#ifdef __cplusplus + +class DECLSPEC_UUID("EF411752-3736-4CB4-9C8C-8EF4CCB58EFE") +SpObjectToken; +#endif + +EXTERN_C const CLSID CLSID_SpResourceManager; + +#ifdef __cplusplus + +class DECLSPEC_UUID("96749373-3391-11D2-9EE3-00C04F797396") +SpResourceManager; +#endif + +EXTERN_C const CLSID CLSID_SpStreamFormatConverter; + +#ifdef __cplusplus + +class DECLSPEC_UUID("7013943A-E2EC-11D2-A086-00C04F8EF9B5") +SpStreamFormatConverter; +#endif + +EXTERN_C const CLSID CLSID_SpMMAudioEnum; + +#ifdef __cplusplus + +class DECLSPEC_UUID("AB1890A0-E91F-11D2-BB91-00C04F8EE6C0") +SpMMAudioEnum; +#endif + +EXTERN_C const CLSID CLSID_SpMMAudioIn; + +#ifdef __cplusplus + +class DECLSPEC_UUID("CF3D2E50-53F2-11D2-960C-00C04F8EE628") +SpMMAudioIn; +#endif + +EXTERN_C const CLSID CLSID_SpMMAudioOut; + +#ifdef __cplusplus + +class DECLSPEC_UUID("A8C680EB-3D32-11D2-9EE7-00C04F797396") +SpMMAudioOut; +#endif + +EXTERN_C const CLSID CLSID_SpRecPlayAudio; + +#ifdef __cplusplus + +class DECLSPEC_UUID("FEE225FC-7AFD-45E9-95D0-5A318079D911") +SpRecPlayAudio; +#endif + +EXTERN_C const CLSID CLSID_SpStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("715D9C59-4442-11D2-9605-00C04F8EE628") +SpStream; +#endif + +EXTERN_C const CLSID CLSID_SpVoice; + +#ifdef __cplusplus + +class DECLSPEC_UUID("96749377-3391-11D2-9EE3-00C04F797396") +SpVoice; +#endif + +EXTERN_C const CLSID CLSID_SpSharedRecoContext; + +#ifdef __cplusplus + +class DECLSPEC_UUID("47206204-5ECA-11D2-960F-00C04F8EE628") +SpSharedRecoContext; +#endif + +EXTERN_C const CLSID CLSID_SpInprocRecognizer; + +#ifdef __cplusplus + +class DECLSPEC_UUID("41B89B6B-9399-11D2-9623-00C04F8EE628") +SpInprocRecognizer; +#endif + +EXTERN_C const CLSID CLSID_SpSharedRecognizer; + +#ifdef __cplusplus + +class DECLSPEC_UUID("3BEE4890-4FE9-4A37-8C1E-5E7E12791C1F") +SpSharedRecognizer; +#endif + +EXTERN_C const CLSID CLSID_SpLexicon; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0655E396-25D0-11D3-9C26-00C04F8EF87C") +SpLexicon; +#endif + +EXTERN_C const CLSID CLSID_SpUnCompressedLexicon; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C9E37C15-DF92-4727-85D6-72E5EEB6995A") +SpUnCompressedLexicon; +#endif + +EXTERN_C const CLSID CLSID_SpCompressedLexicon; + +#ifdef __cplusplus + +class DECLSPEC_UUID("90903716-2F42-11D3-9C26-00C04F8EF87C") +SpCompressedLexicon; +#endif + +EXTERN_C const CLSID CLSID_SpPhoneConverter; + +#ifdef __cplusplus + +class DECLSPEC_UUID("9185F743-1143-4C28-86B5-BFF14F20E5C8") +SpPhoneConverter; +#endif + +EXTERN_C const CLSID CLSID_SpNullPhoneConverter; + +#ifdef __cplusplus + +class DECLSPEC_UUID("455F24E9-7396-4A16-9715-7C0FDBE3EFE3") +SpNullPhoneConverter; +#endif + +EXTERN_C const CLSID CLSID_SpTextSelectionInformation; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0F92030A-CBFD-4AB8-A164-FF5985547FF6") +SpTextSelectionInformation; +#endif + +EXTERN_C const CLSID CLSID_SpPhraseInfoBuilder; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C23FC28D-C55F-4720-8B32-91F73C2BD5D1") +SpPhraseInfoBuilder; +#endif + +EXTERN_C const CLSID CLSID_SpAudioFormat; + +#ifdef __cplusplus + +class DECLSPEC_UUID("9EF96870-E160-4792-820D-48CF0649E4EC") +SpAudioFormat; +#endif + +EXTERN_C const CLSID CLSID_SpWaveFormatEx; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C79A574C-63BE-44b9-801F-283F87F898BE") +SpWaveFormatEx; +#endif + +EXTERN_C const CLSID CLSID_SpInProcRecoContext; + +#ifdef __cplusplus + +class DECLSPEC_UUID("73AD6842-ACE0-45E8-A4DD-8795881A2C2A") +SpInProcRecoContext; +#endif + +EXTERN_C const CLSID CLSID_SpCustomStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8DBEF13F-1948-4aa8-8CF0-048EEBED95D8") +SpCustomStream; +#endif + +EXTERN_C const CLSID CLSID_SpFileStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("947812B3-2AE1-4644-BA86-9E90DED7EC91") +SpFileStream; +#endif + +EXTERN_C const CLSID CLSID_SpMemoryStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("5FB7EF7D-DFF4-468a-B6B7-2FCBD188F994") +SpMemoryStream; +#endif +#endif /* __SpeechLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/speech/include/sapiddk.h b/speech/include/sapiddk.h new file mode 100644 index 0000000000..6e8b8d2ebc --- /dev/null +++ b/speech/include/sapiddk.h @@ -0,0 +1,4557 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0347 */ +/* Compiler settings for sapiddk.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __sapiddk_h__ +#define __sapiddk_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ISpTokenUI_FWD_DEFINED__ +#define __ISpTokenUI_FWD_DEFINED__ +typedef interface ISpTokenUI ISpTokenUI; +#endif /* __ISpTokenUI_FWD_DEFINED__ */ + + +#ifndef __ISpObjectTokenEnumBuilder_FWD_DEFINED__ +#define __ISpObjectTokenEnumBuilder_FWD_DEFINED__ +typedef interface ISpObjectTokenEnumBuilder ISpObjectTokenEnumBuilder; +#endif /* __ISpObjectTokenEnumBuilder_FWD_DEFINED__ */ + + +#ifndef __ISpErrorLog_FWD_DEFINED__ +#define __ISpErrorLog_FWD_DEFINED__ +typedef interface ISpErrorLog ISpErrorLog; +#endif /* __ISpErrorLog_FWD_DEFINED__ */ + + +#ifndef __ISpGrammarCompiler_FWD_DEFINED__ +#define __ISpGrammarCompiler_FWD_DEFINED__ +typedef interface ISpGrammarCompiler ISpGrammarCompiler; +#endif /* __ISpGrammarCompiler_FWD_DEFINED__ */ + + +#ifndef __ISpGramCompBackend_FWD_DEFINED__ +#define __ISpGramCompBackend_FWD_DEFINED__ +typedef interface ISpGramCompBackend ISpGramCompBackend; +#endif /* __ISpGramCompBackend_FWD_DEFINED__ */ + + +#ifndef __ISpITNProcessor_FWD_DEFINED__ +#define __ISpITNProcessor_FWD_DEFINED__ +typedef interface ISpITNProcessor ISpITNProcessor; +#endif /* __ISpITNProcessor_FWD_DEFINED__ */ + + +#ifndef __ISpPhraseBuilder_FWD_DEFINED__ +#define __ISpPhraseBuilder_FWD_DEFINED__ +typedef interface ISpPhraseBuilder ISpPhraseBuilder; +#endif /* __ISpPhraseBuilder_FWD_DEFINED__ */ + + +#ifndef __ISpThreadControl_FWD_DEFINED__ +#define __ISpThreadControl_FWD_DEFINED__ +typedef interface ISpThreadControl ISpThreadControl; +#endif /* __ISpThreadControl_FWD_DEFINED__ */ + + +#ifndef __ISpTaskManager_FWD_DEFINED__ +#define __ISpTaskManager_FWD_DEFINED__ +typedef interface ISpTaskManager ISpTaskManager; +#endif /* __ISpTaskManager_FWD_DEFINED__ */ + + +#ifndef __ISpTTSEngineSite_FWD_DEFINED__ +#define __ISpTTSEngineSite_FWD_DEFINED__ +typedef interface ISpTTSEngineSite ISpTTSEngineSite; +#endif /* __ISpTTSEngineSite_FWD_DEFINED__ */ + + +#ifndef __ISpTTSEngine_FWD_DEFINED__ +#define __ISpTTSEngine_FWD_DEFINED__ +typedef interface ISpTTSEngine ISpTTSEngine; +#endif /* __ISpTTSEngine_FWD_DEFINED__ */ + + +#ifndef __ISpCFGInterpreterSite_FWD_DEFINED__ +#define __ISpCFGInterpreterSite_FWD_DEFINED__ +typedef interface ISpCFGInterpreterSite ISpCFGInterpreterSite; +#endif /* __ISpCFGInterpreterSite_FWD_DEFINED__ */ + + +#ifndef __ISpCFGInterpreter_FWD_DEFINED__ +#define __ISpCFGInterpreter_FWD_DEFINED__ +typedef interface ISpCFGInterpreter ISpCFGInterpreter; +#endif /* __ISpCFGInterpreter_FWD_DEFINED__ */ + + +#ifndef __ISpSREngineSite_FWD_DEFINED__ +#define __ISpSREngineSite_FWD_DEFINED__ +typedef interface ISpSREngineSite ISpSREngineSite; +#endif /* __ISpSREngineSite_FWD_DEFINED__ */ + + +#ifndef __ISpSREngine_FWD_DEFINED__ +#define __ISpSREngine_FWD_DEFINED__ +typedef interface ISpSREngine ISpSREngine; +#endif /* __ISpSREngine_FWD_DEFINED__ */ + + +#ifndef __ISpSRAlternates_FWD_DEFINED__ +#define __ISpSRAlternates_FWD_DEFINED__ +typedef interface ISpSRAlternates ISpSRAlternates; +#endif /* __ISpSRAlternates_FWD_DEFINED__ */ + + +#ifndef ___ISpPrivateEngineCall_FWD_DEFINED__ +#define ___ISpPrivateEngineCall_FWD_DEFINED__ +typedef interface _ISpPrivateEngineCall _ISpPrivateEngineCall; +#endif /* ___ISpPrivateEngineCall_FWD_DEFINED__ */ + + +#ifndef __SpDataKey_FWD_DEFINED__ +#define __SpDataKey_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpDataKey SpDataKey; +#else +typedef struct SpDataKey SpDataKey; +#endif /* __cplusplus */ + +#endif /* __SpDataKey_FWD_DEFINED__ */ + + +#ifndef __SpObjectTokenEnum_FWD_DEFINED__ +#define __SpObjectTokenEnum_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpObjectTokenEnum SpObjectTokenEnum; +#else +typedef struct SpObjectTokenEnum SpObjectTokenEnum; +#endif /* __cplusplus */ + +#endif /* __SpObjectTokenEnum_FWD_DEFINED__ */ + + +#ifndef __SpPhraseBuilder_FWD_DEFINED__ +#define __SpPhraseBuilder_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpPhraseBuilder SpPhraseBuilder; +#else +typedef struct SpPhraseBuilder SpPhraseBuilder; +#endif /* __cplusplus */ + +#endif /* __SpPhraseBuilder_FWD_DEFINED__ */ + + +#ifndef __SpITNProcessor_FWD_DEFINED__ +#define __SpITNProcessor_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpITNProcessor SpITNProcessor; +#else +typedef struct SpITNProcessor SpITNProcessor; +#endif /* __cplusplus */ + +#endif /* __SpITNProcessor_FWD_DEFINED__ */ + + +#ifndef __SpGrammarCompiler_FWD_DEFINED__ +#define __SpGrammarCompiler_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpGrammarCompiler SpGrammarCompiler; +#else +typedef struct SpGrammarCompiler SpGrammarCompiler; +#endif /* __cplusplus */ + +#endif /* __SpGrammarCompiler_FWD_DEFINED__ */ + + +#ifndef __SpGramCompBackend_FWD_DEFINED__ +#define __SpGramCompBackend_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SpGramCompBackend SpGramCompBackend; +#else +typedef struct SpGramCompBackend SpGramCompBackend; +#endif /* __cplusplus */ + +#endif /* __SpGramCompBackend_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "sapi.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_sapiddk_0000 */ +/* [local] */ + + + + + + +#define SPRECOEXTENSION L"RecoExtension" +#define SPALTERNATESCLSID L"AlternatesCLSID" + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0000_v0_0_s_ifspec; + +#ifndef __ISpTokenUI_INTERFACE_DEFINED__ +#define __ISpTokenUI_INTERFACE_DEFINED__ + +/* interface ISpTokenUI */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpTokenUI; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F8E690F0-39CB-4843-B8D7-C84696E1119D") + ISpTokenUI : public IUnknown + { + public: + virtual /* [local] */ HRESULT STDMETHODCALLTYPE IsUISupported( + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE DisplayUI( + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ ISpObjectToken *pToken, + /* [in] */ IUnknown *punkObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpTokenUIVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpTokenUI * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpTokenUI * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpTokenUI * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *IsUISupported )( + ISpTokenUI * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *DisplayUI )( + ISpTokenUI * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ ISpObjectToken *pToken, + /* [in] */ IUnknown *punkObject); + + END_INTERFACE + } ISpTokenUIVtbl; + + interface ISpTokenUI + { + CONST_VTBL struct ISpTokenUIVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpTokenUI_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpTokenUI_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpTokenUI_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpTokenUI_IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) \ + (This)->lpVtbl -> IsUISupported(This,pszTypeOfUI,pvExtraData,cbExtraData,punkObject,pfSupported) + +#define ISpTokenUI_DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,pToken,punkObject) \ + (This)->lpVtbl -> DisplayUI(This,hwndParent,pszTitle,pszTypeOfUI,pvExtraData,cbExtraData,pToken,punkObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpTokenUI_IsUISupported_Proxy( + ISpTokenUI * This, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ IUnknown *punkObject, + /* [out] */ BOOL *pfSupported); + + +void __RPC_STUB ISpTokenUI_IsUISupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE ISpTokenUI_DisplayUI_Proxy( + ISpTokenUI * This, + /* [in] */ HWND hwndParent, + /* [in] */ const WCHAR *pszTitle, + /* [in] */ const WCHAR *pszTypeOfUI, + /* [in] */ void *pvExtraData, + /* [in] */ ULONG cbExtraData, + /* [in] */ ISpObjectToken *pToken, + /* [in] */ IUnknown *punkObject); + + +void __RPC_STUB ISpTokenUI_DisplayUI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpTokenUI_INTERFACE_DEFINED__ */ + + +#ifndef __ISpObjectTokenEnumBuilder_INTERFACE_DEFINED__ +#define __ISpObjectTokenEnumBuilder_INTERFACE_DEFINED__ + +/* interface ISpObjectTokenEnumBuilder */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpObjectTokenEnumBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("06B64F9F-7FDA-11d2-B4F2-00C04F797396") + ISpObjectTokenEnumBuilder : public IEnumSpObjectTokens + { + public: + virtual HRESULT STDMETHODCALLTYPE SetAttribs( + const WCHAR *pszReqAttribs, + const WCHAR *pszOptAttribs) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddTokens( + ULONG cTokens, + ISpObjectToken **pToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddTokensFromDataKey( + ISpDataKey *pDataKey, + const WCHAR *pszSubKey, + const WCHAR *pszCategoryId) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddTokensFromTokenEnum( + IEnumSpObjectTokens *pTokenEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE Sort( + const WCHAR *pszTokenIdToListFirst) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpObjectTokenEnumBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpObjectTokenEnumBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpObjectTokenEnumBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpObjectTokenEnumBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + ISpObjectTokenEnumBuilder * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ISpObjectToken **pelt, + /* [out] */ ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + ISpObjectTokenEnumBuilder * This, + /* [in] */ ULONG celt); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + ISpObjectTokenEnumBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ISpObjectTokenEnumBuilder * This, + /* [out] */ IEnumSpObjectTokens **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *Item )( + ISpObjectTokenEnumBuilder * This, + /* [in] */ ULONG Index, + /* [out] */ ISpObjectToken **ppToken); + + HRESULT ( STDMETHODCALLTYPE *GetCount )( + ISpObjectTokenEnumBuilder * This, + /* [out] */ ULONG *pCount); + + HRESULT ( STDMETHODCALLTYPE *SetAttribs )( + ISpObjectTokenEnumBuilder * This, + const WCHAR *pszReqAttribs, + const WCHAR *pszOptAttribs); + + HRESULT ( STDMETHODCALLTYPE *AddTokens )( + ISpObjectTokenEnumBuilder * This, + ULONG cTokens, + ISpObjectToken **pToken); + + HRESULT ( STDMETHODCALLTYPE *AddTokensFromDataKey )( + ISpObjectTokenEnumBuilder * This, + ISpDataKey *pDataKey, + const WCHAR *pszSubKey, + const WCHAR *pszCategoryId); + + HRESULT ( STDMETHODCALLTYPE *AddTokensFromTokenEnum )( + ISpObjectTokenEnumBuilder * This, + IEnumSpObjectTokens *pTokenEnum); + + HRESULT ( STDMETHODCALLTYPE *Sort )( + ISpObjectTokenEnumBuilder * This, + const WCHAR *pszTokenIdToListFirst); + + END_INTERFACE + } ISpObjectTokenEnumBuilderVtbl; + + interface ISpObjectTokenEnumBuilder + { + CONST_VTBL struct ISpObjectTokenEnumBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpObjectTokenEnumBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpObjectTokenEnumBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpObjectTokenEnumBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpObjectTokenEnumBuilder_Next(This,celt,pelt,pceltFetched) \ + (This)->lpVtbl -> Next(This,celt,pelt,pceltFetched) + +#define ISpObjectTokenEnumBuilder_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + +#define ISpObjectTokenEnumBuilder_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define ISpObjectTokenEnumBuilder_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#define ISpObjectTokenEnumBuilder_Item(This,Index,ppToken) \ + (This)->lpVtbl -> Item(This,Index,ppToken) + +#define ISpObjectTokenEnumBuilder_GetCount(This,pCount) \ + (This)->lpVtbl -> GetCount(This,pCount) + + +#define ISpObjectTokenEnumBuilder_SetAttribs(This,pszReqAttribs,pszOptAttribs) \ + (This)->lpVtbl -> SetAttribs(This,pszReqAttribs,pszOptAttribs) + +#define ISpObjectTokenEnumBuilder_AddTokens(This,cTokens,pToken) \ + (This)->lpVtbl -> AddTokens(This,cTokens,pToken) + +#define ISpObjectTokenEnumBuilder_AddTokensFromDataKey(This,pDataKey,pszSubKey,pszCategoryId) \ + (This)->lpVtbl -> AddTokensFromDataKey(This,pDataKey,pszSubKey,pszCategoryId) + +#define ISpObjectTokenEnumBuilder_AddTokensFromTokenEnum(This,pTokenEnum) \ + (This)->lpVtbl -> AddTokensFromTokenEnum(This,pTokenEnum) + +#define ISpObjectTokenEnumBuilder_Sort(This,pszTokenIdToListFirst) \ + (This)->lpVtbl -> Sort(This,pszTokenIdToListFirst) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenEnumBuilder_SetAttribs_Proxy( + ISpObjectTokenEnumBuilder * This, + const WCHAR *pszReqAttribs, + const WCHAR *pszOptAttribs); + + +void __RPC_STUB ISpObjectTokenEnumBuilder_SetAttribs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenEnumBuilder_AddTokens_Proxy( + ISpObjectTokenEnumBuilder * This, + ULONG cTokens, + ISpObjectToken **pToken); + + +void __RPC_STUB ISpObjectTokenEnumBuilder_AddTokens_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenEnumBuilder_AddTokensFromDataKey_Proxy( + ISpObjectTokenEnumBuilder * This, + ISpDataKey *pDataKey, + const WCHAR *pszSubKey, + const WCHAR *pszCategoryId); + + +void __RPC_STUB ISpObjectTokenEnumBuilder_AddTokensFromDataKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenEnumBuilder_AddTokensFromTokenEnum_Proxy( + ISpObjectTokenEnumBuilder * This, + IEnumSpObjectTokens *pTokenEnum); + + +void __RPC_STUB ISpObjectTokenEnumBuilder_AddTokensFromTokenEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpObjectTokenEnumBuilder_Sort_Proxy( + ISpObjectTokenEnumBuilder * This, + const WCHAR *pszTokenIdToListFirst); + + +void __RPC_STUB ISpObjectTokenEnumBuilder_Sort_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpObjectTokenEnumBuilder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0339 */ +/* [local] */ + +#if 0 +typedef void *SPWORDHANDLE; + +typedef void *SPRULEHANDLE; + +typedef void *SPGRAMMARHANDLE; + +typedef void *SPRECOCONTEXTHANDLE; + +typedef void *SPPHRASERULEHANDLE; + +typedef void *SPPHRASEPROPERTYHANDLE; + +typedef void *SPTRANSITIONID; + +#else +DECLARE_HANDLE(SPWORDHANDLE); +DECLARE_HANDLE(SPRULEHANDLE); +DECLARE_HANDLE(SPGRAMMARHANDLE); +DECLARE_HANDLE(SPRECOCONTEXTHANDLE); +DECLARE_HANDLE(SPPHRASERULEHANDLE); +DECLARE_HANDLE(SPPHRASEPROPERTYHANDLE); +DECLARE_HANDLE(SPTRANSITIONID); +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0339_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0339_v0_0_s_ifspec; + +#ifndef __ISpErrorLog_INTERFACE_DEFINED__ +#define __ISpErrorLog_INTERFACE_DEFINED__ + +/* interface ISpErrorLog */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpErrorLog; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F4711347-E608-11d2-A086-00C04F8EF9B5") + ISpErrorLog : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AddError( + const long lLineNumber, + HRESULT hr, + const WCHAR *pszDescription, + const WCHAR *pszHelpFile, + DWORD dwHelpContext) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpErrorLogVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpErrorLog * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpErrorLog * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpErrorLog * This); + + HRESULT ( STDMETHODCALLTYPE *AddError )( + ISpErrorLog * This, + const long lLineNumber, + HRESULT hr, + const WCHAR *pszDescription, + const WCHAR *pszHelpFile, + DWORD dwHelpContext); + + END_INTERFACE + } ISpErrorLogVtbl; + + interface ISpErrorLog + { + CONST_VTBL struct ISpErrorLogVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpErrorLog_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpErrorLog_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpErrorLog_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpErrorLog_AddError(This,lLineNumber,hr,pszDescription,pszHelpFile,dwHelpContext) \ + (This)->lpVtbl -> AddError(This,lLineNumber,hr,pszDescription,pszHelpFile,dwHelpContext) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpErrorLog_AddError_Proxy( + ISpErrorLog * This, + const long lLineNumber, + HRESULT hr, + const WCHAR *pszDescription, + const WCHAR *pszHelpFile, + DWORD dwHelpContext); + + +void __RPC_STUB ISpErrorLog_AddError_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpErrorLog_INTERFACE_DEFINED__ */ + + +#ifndef __ISpGrammarCompiler_INTERFACE_DEFINED__ +#define __ISpGrammarCompiler_INTERFACE_DEFINED__ + +/* interface ISpGrammarCompiler */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpGrammarCompiler; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B1E29D58-A675-11D2-8302-00C04F8EE6C0") + ISpGrammarCompiler : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CompileStream( + IStream *pSource, + IStream *pDest, + IStream *pHeader, + IUnknown *pReserved, + ISpErrorLog *pErrorLog, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpGrammarCompilerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpGrammarCompiler * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpGrammarCompiler * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpGrammarCompiler * This); + + HRESULT ( STDMETHODCALLTYPE *CompileStream )( + ISpGrammarCompiler * This, + IStream *pSource, + IStream *pDest, + IStream *pHeader, + IUnknown *pReserved, + ISpErrorLog *pErrorLog, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } ISpGrammarCompilerVtbl; + + interface ISpGrammarCompiler + { + CONST_VTBL struct ISpGrammarCompilerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpGrammarCompiler_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpGrammarCompiler_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpGrammarCompiler_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpGrammarCompiler_CompileStream(This,pSource,pDest,pHeader,pReserved,pErrorLog,dwFlags) \ + (This)->lpVtbl -> CompileStream(This,pSource,pDest,pHeader,pReserved,pErrorLog,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpGrammarCompiler_CompileStream_Proxy( + ISpGrammarCompiler * This, + IStream *pSource, + IStream *pDest, + IStream *pHeader, + IUnknown *pReserved, + ISpErrorLog *pErrorLog, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB ISpGrammarCompiler_CompileStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpGrammarCompiler_INTERFACE_DEFINED__ */ + + +#ifndef __ISpGramCompBackend_INTERFACE_DEFINED__ +#define __ISpGramCompBackend_INTERFACE_DEFINED__ + +/* interface ISpGramCompBackend */ +/* [restricted][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpGramCompBackend; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3DDCA27C-665C-4786-9F97-8C90C3488B61") + ISpGramCompBackend : public ISpGrammarBuilder + { + public: + virtual HRESULT STDMETHODCALLTYPE SetSaveObjects( + IStream *pStream, + ISpErrorLog *pErrorLog) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitFromBinaryGrammar( + const SPBINARYGRAMMAR *pBinaryData) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpGramCompBackendVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpGramCompBackend * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpGramCompBackend * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpGramCompBackend * This); + + HRESULT ( STDMETHODCALLTYPE *ResetGrammar )( + ISpGramCompBackend * This, + /* [in] */ WORD NewLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetRule )( + ISpGramCompBackend * This, + /* [in] */ const WCHAR *pszRuleName, + /* [in] */ DWORD dwRuleId, + /* [in] */ DWORD dwAttributes, + /* [in] */ BOOL fCreateIfNotExist, + /* [out] */ SPSTATEHANDLE *phInitialState); + + HRESULT ( STDMETHODCALLTYPE *ClearRule )( + ISpGramCompBackend * This, + SPSTATEHANDLE hState); + + HRESULT ( STDMETHODCALLTYPE *CreateNewState )( + ISpGramCompBackend * This, + SPSTATEHANDLE hState, + SPSTATEHANDLE *phState); + + HRESULT ( STDMETHODCALLTYPE *AddWordTransition )( + ISpGramCompBackend * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + const WCHAR *psz, + const WCHAR *pszSeparators, + SPGRAMMARWORDTYPE eWordType, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddRuleTransition )( + ISpGramCompBackend * This, + SPSTATEHANDLE hFromState, + SPSTATEHANDLE hToState, + SPSTATEHANDLE hRule, + float Weight, + const SPPROPERTYINFO *pPropInfo); + + HRESULT ( STDMETHODCALLTYPE *AddResource )( + ISpGramCompBackend * This, + /* [in] */ SPSTATEHANDLE hRuleState, + /* [in] */ const WCHAR *pszResourceName, + /* [in] */ const WCHAR *pszResourceValue); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpGramCompBackend * This, + DWORD dwReserved); + + HRESULT ( STDMETHODCALLTYPE *SetSaveObjects )( + ISpGramCompBackend * This, + IStream *pStream, + ISpErrorLog *pErrorLog); + + HRESULT ( STDMETHODCALLTYPE *InitFromBinaryGrammar )( + ISpGramCompBackend * This, + const SPBINARYGRAMMAR *pBinaryData); + + END_INTERFACE + } ISpGramCompBackendVtbl; + + interface ISpGramCompBackend + { + CONST_VTBL struct ISpGramCompBackendVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpGramCompBackend_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpGramCompBackend_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpGramCompBackend_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpGramCompBackend_ResetGrammar(This,NewLanguage) \ + (This)->lpVtbl -> ResetGrammar(This,NewLanguage) + +#define ISpGramCompBackend_GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) \ + (This)->lpVtbl -> GetRule(This,pszRuleName,dwRuleId,dwAttributes,fCreateIfNotExist,phInitialState) + +#define ISpGramCompBackend_ClearRule(This,hState) \ + (This)->lpVtbl -> ClearRule(This,hState) + +#define ISpGramCompBackend_CreateNewState(This,hState,phState) \ + (This)->lpVtbl -> CreateNewState(This,hState,phState) + +#define ISpGramCompBackend_AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) \ + (This)->lpVtbl -> AddWordTransition(This,hFromState,hToState,psz,pszSeparators,eWordType,Weight,pPropInfo) + +#define ISpGramCompBackend_AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) \ + (This)->lpVtbl -> AddRuleTransition(This,hFromState,hToState,hRule,Weight,pPropInfo) + +#define ISpGramCompBackend_AddResource(This,hRuleState,pszResourceName,pszResourceValue) \ + (This)->lpVtbl -> AddResource(This,hRuleState,pszResourceName,pszResourceValue) + +#define ISpGramCompBackend_Commit(This,dwReserved) \ + (This)->lpVtbl -> Commit(This,dwReserved) + + +#define ISpGramCompBackend_SetSaveObjects(This,pStream,pErrorLog) \ + (This)->lpVtbl -> SetSaveObjects(This,pStream,pErrorLog) + +#define ISpGramCompBackend_InitFromBinaryGrammar(This,pBinaryData) \ + (This)->lpVtbl -> InitFromBinaryGrammar(This,pBinaryData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpGramCompBackend_SetSaveObjects_Proxy( + ISpGramCompBackend * This, + IStream *pStream, + ISpErrorLog *pErrorLog); + + +void __RPC_STUB ISpGramCompBackend_SetSaveObjects_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpGramCompBackend_InitFromBinaryGrammar_Proxy( + ISpGramCompBackend * This, + const SPBINARYGRAMMAR *pBinaryData); + + +void __RPC_STUB ISpGramCompBackend_InitFromBinaryGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpGramCompBackend_INTERFACE_DEFINED__ */ + + +#ifndef __ISpITNProcessor_INTERFACE_DEFINED__ +#define __ISpITNProcessor_INTERFACE_DEFINED__ + +/* interface ISpITNProcessor */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpITNProcessor; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("12D7360F-A1C9-11d3-BC90-00C04F72DF9F") + ISpITNProcessor : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE LoadITNGrammar( + WCHAR *pszCLSID) = 0; + + virtual HRESULT STDMETHODCALLTYPE ITNPhrase( + ISpPhraseBuilder *pPhrase) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpITNProcessorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpITNProcessor * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpITNProcessor * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpITNProcessor * This); + + HRESULT ( STDMETHODCALLTYPE *LoadITNGrammar )( + ISpITNProcessor * This, + WCHAR *pszCLSID); + + HRESULT ( STDMETHODCALLTYPE *ITNPhrase )( + ISpITNProcessor * This, + ISpPhraseBuilder *pPhrase); + + END_INTERFACE + } ISpITNProcessorVtbl; + + interface ISpITNProcessor + { + CONST_VTBL struct ISpITNProcessorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpITNProcessor_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpITNProcessor_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpITNProcessor_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpITNProcessor_LoadITNGrammar(This,pszCLSID) \ + (This)->lpVtbl -> LoadITNGrammar(This,pszCLSID) + +#define ISpITNProcessor_ITNPhrase(This,pPhrase) \ + (This)->lpVtbl -> ITNPhrase(This,pPhrase) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpITNProcessor_LoadITNGrammar_Proxy( + ISpITNProcessor * This, + WCHAR *pszCLSID); + + +void __RPC_STUB ISpITNProcessor_LoadITNGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpITNProcessor_ITNPhrase_Proxy( + ISpITNProcessor * This, + ISpPhraseBuilder *pPhrase); + + +void __RPC_STUB ISpITNProcessor_ITNPhrase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpITNProcessor_INTERFACE_DEFINED__ */ + + +#ifndef __ISpPhraseBuilder_INTERFACE_DEFINED__ +#define __ISpPhraseBuilder_INTERFACE_DEFINED__ + +/* interface ISpPhraseBuilder */ +/* [restricted][unique][helpstring][local][uuid][object] */ + + +EXTERN_C const IID IID_ISpPhraseBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("88A3342A-0BED-4834-922B-88D43173162F") + ISpPhraseBuilder : public ISpPhrase + { + public: + virtual HRESULT STDMETHODCALLTYPE InitFromPhrase( + const SPPHRASE *pPhrase) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitFromSerializedPhrase( + const SPSERIALIZEDPHRASE *pPhrase) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddElements( + ULONG cElements, + const SPPHRASEELEMENT *pElement) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddRules( + const SPPHRASERULEHANDLE hParent, + const SPPHRASERULE *pRule, + SPPHRASERULEHANDLE *phNewRule) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddProperties( + const SPPHRASEPROPERTYHANDLE hParent, + const SPPHRASEPROPERTY *pProperty, + SPPHRASEPROPERTYHANDLE *phNewProperty) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddReplacements( + ULONG cReplacements, + const SPPHRASEREPLACEMENT *pReplacements) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpPhraseBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpPhraseBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpPhraseBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpPhraseBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *GetPhrase )( + ISpPhraseBuilder * This, + /* [out] */ SPPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetSerializedPhrase )( + ISpPhraseBuilder * This, + /* [out] */ SPSERIALIZEDPHRASE **ppCoMemPhrase); + + HRESULT ( STDMETHODCALLTYPE *GetText )( + ISpPhraseBuilder * This, + /* [in] */ ULONG ulStart, + /* [in] */ ULONG ulCount, + /* [in] */ BOOL fUseTextReplacements, + /* [out] */ WCHAR **ppszCoMemText, + /* [out] */ BYTE *pbDisplayAttributes); + + HRESULT ( STDMETHODCALLTYPE *Discard )( + ISpPhraseBuilder * This, + /* [in] */ DWORD dwValueTypes); + + HRESULT ( STDMETHODCALLTYPE *InitFromPhrase )( + ISpPhraseBuilder * This, + const SPPHRASE *pPhrase); + + HRESULT ( STDMETHODCALLTYPE *InitFromSerializedPhrase )( + ISpPhraseBuilder * This, + const SPSERIALIZEDPHRASE *pPhrase); + + HRESULT ( STDMETHODCALLTYPE *AddElements )( + ISpPhraseBuilder * This, + ULONG cElements, + const SPPHRASEELEMENT *pElement); + + HRESULT ( STDMETHODCALLTYPE *AddRules )( + ISpPhraseBuilder * This, + const SPPHRASERULEHANDLE hParent, + const SPPHRASERULE *pRule, + SPPHRASERULEHANDLE *phNewRule); + + HRESULT ( STDMETHODCALLTYPE *AddProperties )( + ISpPhraseBuilder * This, + const SPPHRASEPROPERTYHANDLE hParent, + const SPPHRASEPROPERTY *pProperty, + SPPHRASEPROPERTYHANDLE *phNewProperty); + + HRESULT ( STDMETHODCALLTYPE *AddReplacements )( + ISpPhraseBuilder * This, + ULONG cReplacements, + const SPPHRASEREPLACEMENT *pReplacements); + + END_INTERFACE + } ISpPhraseBuilderVtbl; + + interface ISpPhraseBuilder + { + CONST_VTBL struct ISpPhraseBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpPhraseBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpPhraseBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpPhraseBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpPhraseBuilder_GetPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetPhrase(This,ppCoMemPhrase) + +#define ISpPhraseBuilder_GetSerializedPhrase(This,ppCoMemPhrase) \ + (This)->lpVtbl -> GetSerializedPhrase(This,ppCoMemPhrase) + +#define ISpPhraseBuilder_GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) \ + (This)->lpVtbl -> GetText(This,ulStart,ulCount,fUseTextReplacements,ppszCoMemText,pbDisplayAttributes) + +#define ISpPhraseBuilder_Discard(This,dwValueTypes) \ + (This)->lpVtbl -> Discard(This,dwValueTypes) + + +#define ISpPhraseBuilder_InitFromPhrase(This,pPhrase) \ + (This)->lpVtbl -> InitFromPhrase(This,pPhrase) + +#define ISpPhraseBuilder_InitFromSerializedPhrase(This,pPhrase) \ + (This)->lpVtbl -> InitFromSerializedPhrase(This,pPhrase) + +#define ISpPhraseBuilder_AddElements(This,cElements,pElement) \ + (This)->lpVtbl -> AddElements(This,cElements,pElement) + +#define ISpPhraseBuilder_AddRules(This,hParent,pRule,phNewRule) \ + (This)->lpVtbl -> AddRules(This,hParent,pRule,phNewRule) + +#define ISpPhraseBuilder_AddProperties(This,hParent,pProperty,phNewProperty) \ + (This)->lpVtbl -> AddProperties(This,hParent,pProperty,phNewProperty) + +#define ISpPhraseBuilder_AddReplacements(This,cReplacements,pReplacements) \ + (This)->lpVtbl -> AddReplacements(This,cReplacements,pReplacements) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_InitFromPhrase_Proxy( + ISpPhraseBuilder * This, + const SPPHRASE *pPhrase); + + +void __RPC_STUB ISpPhraseBuilder_InitFromPhrase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_InitFromSerializedPhrase_Proxy( + ISpPhraseBuilder * This, + const SPSERIALIZEDPHRASE *pPhrase); + + +void __RPC_STUB ISpPhraseBuilder_InitFromSerializedPhrase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_AddElements_Proxy( + ISpPhraseBuilder * This, + ULONG cElements, + const SPPHRASEELEMENT *pElement); + + +void __RPC_STUB ISpPhraseBuilder_AddElements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_AddRules_Proxy( + ISpPhraseBuilder * This, + const SPPHRASERULEHANDLE hParent, + const SPPHRASERULE *pRule, + SPPHRASERULEHANDLE *phNewRule); + + +void __RPC_STUB ISpPhraseBuilder_AddRules_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_AddProperties_Proxy( + ISpPhraseBuilder * This, + const SPPHRASEPROPERTYHANDLE hParent, + const SPPHRASEPROPERTY *pProperty, + SPPHRASEPROPERTYHANDLE *phNewProperty); + + +void __RPC_STUB ISpPhraseBuilder_AddProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpPhraseBuilder_AddReplacements_Proxy( + ISpPhraseBuilder * This, + ULONG cReplacements, + const SPPHRASEREPLACEMENT *pReplacements); + + +void __RPC_STUB ISpPhraseBuilder_AddReplacements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpPhraseBuilder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0344 */ +/* [local] */ + +#if defined(__cplusplus) +interface ISpTask +{ +virtual HRESULT STDMETHODCALLTYPE Execute( + void *pvTaskData, + volatile const BOOL* pfContinueProcessing) = 0; +}; +#else +typedef void *ISpTask; + +#endif +#if defined(__cplusplus) +interface ISpThreadTask +{ +virtual HRESULT STDMETHODCALLTYPE InitThread( + void * pvTaskData, + HWND hwnd) = 0; +virtual HRESULT STDMETHODCALLTYPE ThreadProc( + void *pvTaskData, + HANDLE hExitThreadEvent, + HANDLE hNotifyEvent, + HWND hwndWorker, + volatile const BOOL * pfContinueProcessing) = 0; +virtual LRESULT STDMETHODCALLTYPE WindowMessage( + void *pvTaskData, + HWND hWnd, + UINT Msg, + WPARAM wParam, + LPARAM lParam) = 0; +}; +#else +typedef void *ISpThreadTask; + +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0344_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0344_v0_0_s_ifspec; + +#ifndef __ISpThreadControl_INTERFACE_DEFINED__ +#define __ISpThreadControl_INTERFACE_DEFINED__ + +/* interface ISpThreadControl */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpThreadControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A6BE4D73-4403-4358-B22D-0346E23B1764") + ISpThreadControl : public ISpNotifySink + { + public: + virtual HRESULT STDMETHODCALLTYPE StartThread( + DWORD dwFlags, + HWND *phwnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForThreadDone( + BOOL fForceStop, + HRESULT *phrThreadResult, + ULONG msTimeOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE TerminateThread( void) = 0; + + virtual HANDLE STDMETHODCALLTYPE ThreadHandle( void) = 0; + + virtual DWORD STDMETHODCALLTYPE ThreadId( void) = 0; + + virtual HANDLE STDMETHODCALLTYPE NotifyEvent( void) = 0; + + virtual HWND STDMETHODCALLTYPE WindowHandle( void) = 0; + + virtual HANDLE STDMETHODCALLTYPE ThreadCompleteEvent( void) = 0; + + virtual HANDLE STDMETHODCALLTYPE ExitThreadEvent( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpThreadControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpThreadControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpThreadControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpThreadControl * This); + + HRESULT ( STDMETHODCALLTYPE *Notify )( + ISpThreadControl * This); + + HRESULT ( STDMETHODCALLTYPE *StartThread )( + ISpThreadControl * This, + DWORD dwFlags, + HWND *phwnd); + + HRESULT ( STDMETHODCALLTYPE *WaitForThreadDone )( + ISpThreadControl * This, + BOOL fForceStop, + HRESULT *phrThreadResult, + ULONG msTimeOut); + + HRESULT ( STDMETHODCALLTYPE *TerminateThread )( + ISpThreadControl * This); + + HANDLE ( STDMETHODCALLTYPE *ThreadHandle )( + ISpThreadControl * This); + + DWORD ( STDMETHODCALLTYPE *ThreadId )( + ISpThreadControl * This); + + HANDLE ( STDMETHODCALLTYPE *NotifyEvent )( + ISpThreadControl * This); + + HWND ( STDMETHODCALLTYPE *WindowHandle )( + ISpThreadControl * This); + + HANDLE ( STDMETHODCALLTYPE *ThreadCompleteEvent )( + ISpThreadControl * This); + + HANDLE ( STDMETHODCALLTYPE *ExitThreadEvent )( + ISpThreadControl * This); + + END_INTERFACE + } ISpThreadControlVtbl; + + interface ISpThreadControl + { + CONST_VTBL struct ISpThreadControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpThreadControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpThreadControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpThreadControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpThreadControl_Notify(This) \ + (This)->lpVtbl -> Notify(This) + + +#define ISpThreadControl_StartThread(This,dwFlags,phwnd) \ + (This)->lpVtbl -> StartThread(This,dwFlags,phwnd) + +#define ISpThreadControl_WaitForThreadDone(This,fForceStop,phrThreadResult,msTimeOut) \ + (This)->lpVtbl -> WaitForThreadDone(This,fForceStop,phrThreadResult,msTimeOut) + +#define ISpThreadControl_TerminateThread(This) \ + (This)->lpVtbl -> TerminateThread(This) + +#define ISpThreadControl_ThreadHandle(This) \ + (This)->lpVtbl -> ThreadHandle(This) + +#define ISpThreadControl_ThreadId(This) \ + (This)->lpVtbl -> ThreadId(This) + +#define ISpThreadControl_NotifyEvent(This) \ + (This)->lpVtbl -> NotifyEvent(This) + +#define ISpThreadControl_WindowHandle(This) \ + (This)->lpVtbl -> WindowHandle(This) + +#define ISpThreadControl_ThreadCompleteEvent(This) \ + (This)->lpVtbl -> ThreadCompleteEvent(This) + +#define ISpThreadControl_ExitThreadEvent(This) \ + (This)->lpVtbl -> ExitThreadEvent(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpThreadControl_StartThread_Proxy( + ISpThreadControl * This, + DWORD dwFlags, + HWND *phwnd); + + +void __RPC_STUB ISpThreadControl_StartThread_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpThreadControl_WaitForThreadDone_Proxy( + ISpThreadControl * This, + BOOL fForceStop, + HRESULT *phrThreadResult, + ULONG msTimeOut); + + +void __RPC_STUB ISpThreadControl_WaitForThreadDone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpThreadControl_TerminateThread_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_TerminateThread_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpThreadControl_ThreadHandle_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_ThreadHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +DWORD STDMETHODCALLTYPE ISpThreadControl_ThreadId_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_ThreadId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpThreadControl_NotifyEvent_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_NotifyEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HWND STDMETHODCALLTYPE ISpThreadControl_WindowHandle_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_WindowHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpThreadControl_ThreadCompleteEvent_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_ThreadCompleteEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HANDLE STDMETHODCALLTYPE ISpThreadControl_ExitThreadEvent_Proxy( + ISpThreadControl * This); + + +void __RPC_STUB ISpThreadControl_ExitThreadEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpThreadControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0345 */ +/* [local] */ + +typedef /* [restricted] */ struct SPTMTHREADINFO + { + long lPoolSize; + long lPriority; + ULONG ulConcurrencyLimit; + ULONG ulMaxQuickAllocThreads; + } SPTMTHREADINFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0345_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0345_v0_0_s_ifspec; + +#ifndef __ISpTaskManager_INTERFACE_DEFINED__ +#define __ISpTaskManager_INTERFACE_DEFINED__ + +/* interface ISpTaskManager */ +/* [object][restricted][unique][helpstring][uuid][local] */ + + +EXTERN_C const IID IID_ISpTaskManager; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2BAEEF81-2CA3-4331-98F3-26EC5ABEFB03") + ISpTaskManager : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetThreadPoolInfo( + /* [in] */ const SPTMTHREADINFO *pPoolInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetThreadPoolInfo( + /* [out] */ SPTMTHREADINFO *pPoolInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueueTask( + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out][in] */ DWORD *pdwGroupId, + /* [out] */ DWORD *pTaskID) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateReoccurringTask( + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out] */ ISpNotifySink **ppTaskCtrl) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateThreadControl( + /* [in] */ ISpThreadTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ long nPriority, + /* [out] */ ISpThreadControl **ppTaskCtrl) = 0; + + virtual HRESULT STDMETHODCALLTYPE TerminateTask( + /* [in] */ DWORD dwTaskId, + /* [in] */ ULONG ulWaitPeriod) = 0; + + virtual HRESULT STDMETHODCALLTYPE TerminateTaskGroup( + /* [in] */ DWORD dwGroupId, + /* [in] */ ULONG ulWaitPeriod) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpTaskManagerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpTaskManager * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpTaskManager * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpTaskManager * This); + + HRESULT ( STDMETHODCALLTYPE *SetThreadPoolInfo )( + ISpTaskManager * This, + /* [in] */ const SPTMTHREADINFO *pPoolInfo); + + HRESULT ( STDMETHODCALLTYPE *GetThreadPoolInfo )( + ISpTaskManager * This, + /* [out] */ SPTMTHREADINFO *pPoolInfo); + + HRESULT ( STDMETHODCALLTYPE *QueueTask )( + ISpTaskManager * This, + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out][in] */ DWORD *pdwGroupId, + /* [out] */ DWORD *pTaskID); + + HRESULT ( STDMETHODCALLTYPE *CreateReoccurringTask )( + ISpTaskManager * This, + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out] */ ISpNotifySink **ppTaskCtrl); + + HRESULT ( STDMETHODCALLTYPE *CreateThreadControl )( + ISpTaskManager * This, + /* [in] */ ISpThreadTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ long nPriority, + /* [out] */ ISpThreadControl **ppTaskCtrl); + + HRESULT ( STDMETHODCALLTYPE *TerminateTask )( + ISpTaskManager * This, + /* [in] */ DWORD dwTaskId, + /* [in] */ ULONG ulWaitPeriod); + + HRESULT ( STDMETHODCALLTYPE *TerminateTaskGroup )( + ISpTaskManager * This, + /* [in] */ DWORD dwGroupId, + /* [in] */ ULONG ulWaitPeriod); + + END_INTERFACE + } ISpTaskManagerVtbl; + + interface ISpTaskManager + { + CONST_VTBL struct ISpTaskManagerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpTaskManager_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpTaskManager_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpTaskManager_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpTaskManager_SetThreadPoolInfo(This,pPoolInfo) \ + (This)->lpVtbl -> SetThreadPoolInfo(This,pPoolInfo) + +#define ISpTaskManager_GetThreadPoolInfo(This,pPoolInfo) \ + (This)->lpVtbl -> GetThreadPoolInfo(This,pPoolInfo) + +#define ISpTaskManager_QueueTask(This,pTask,pvTaskData,hCompEvent,pdwGroupId,pTaskID) \ + (This)->lpVtbl -> QueueTask(This,pTask,pvTaskData,hCompEvent,pdwGroupId,pTaskID) + +#define ISpTaskManager_CreateReoccurringTask(This,pTask,pvTaskData,hCompEvent,ppTaskCtrl) \ + (This)->lpVtbl -> CreateReoccurringTask(This,pTask,pvTaskData,hCompEvent,ppTaskCtrl) + +#define ISpTaskManager_CreateThreadControl(This,pTask,pvTaskData,nPriority,ppTaskCtrl) \ + (This)->lpVtbl -> CreateThreadControl(This,pTask,pvTaskData,nPriority,ppTaskCtrl) + +#define ISpTaskManager_TerminateTask(This,dwTaskId,ulWaitPeriod) \ + (This)->lpVtbl -> TerminateTask(This,dwTaskId,ulWaitPeriod) + +#define ISpTaskManager_TerminateTaskGroup(This,dwGroupId,ulWaitPeriod) \ + (This)->lpVtbl -> TerminateTaskGroup(This,dwGroupId,ulWaitPeriod) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_SetThreadPoolInfo_Proxy( + ISpTaskManager * This, + /* [in] */ const SPTMTHREADINFO *pPoolInfo); + + +void __RPC_STUB ISpTaskManager_SetThreadPoolInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_GetThreadPoolInfo_Proxy( + ISpTaskManager * This, + /* [out] */ SPTMTHREADINFO *pPoolInfo); + + +void __RPC_STUB ISpTaskManager_GetThreadPoolInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_QueueTask_Proxy( + ISpTaskManager * This, + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out][in] */ DWORD *pdwGroupId, + /* [out] */ DWORD *pTaskID); + + +void __RPC_STUB ISpTaskManager_QueueTask_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_CreateReoccurringTask_Proxy( + ISpTaskManager * This, + /* [in] */ ISpTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ HANDLE hCompEvent, + /* [out] */ ISpNotifySink **ppTaskCtrl); + + +void __RPC_STUB ISpTaskManager_CreateReoccurringTask_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_CreateThreadControl_Proxy( + ISpTaskManager * This, + /* [in] */ ISpThreadTask *pTask, + /* [in] */ void *pvTaskData, + /* [in] */ long nPriority, + /* [out] */ ISpThreadControl **ppTaskCtrl); + + +void __RPC_STUB ISpTaskManager_CreateThreadControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_TerminateTask_Proxy( + ISpTaskManager * This, + /* [in] */ DWORD dwTaskId, + /* [in] */ ULONG ulWaitPeriod); + + +void __RPC_STUB ISpTaskManager_TerminateTask_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTaskManager_TerminateTaskGroup_Proxy( + ISpTaskManager * This, + /* [in] */ DWORD dwGroupId, + /* [in] */ ULONG ulWaitPeriod); + + +void __RPC_STUB ISpTaskManager_TerminateTaskGroup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpTaskManager_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0346 */ +/* [local] */ + +typedef +enum SPVSKIPTYPE + { SPVST_SENTENCE = 1L << 0 + } SPVSKIPTYPE; + +typedef +enum SPVESACTIONS + { SPVES_CONTINUE = 0, + SPVES_ABORT = 1L << 0, + SPVES_SKIP = 1L << 1, + SPVES_RATE = 1L << 2, + SPVES_VOLUME = 1L << 3 + } SPVESACTIONS; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0346_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0346_v0_0_s_ifspec; + +#ifndef __ISpTTSEngineSite_INTERFACE_DEFINED__ +#define __ISpTTSEngineSite_INTERFACE_DEFINED__ + +/* interface ISpTTSEngineSite */ +/* [unique][helpstring][uuid][local][object] */ + + +EXTERN_C const IID IID_ISpTTSEngineSite; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9880499B-CCE9-11d2-B503-00C04F797396") + ISpTTSEngineSite : public ISpEventSink + { + public: + virtual DWORD STDMETHODCALLTYPE GetActions( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Write( + /* [in] */ const void *pBuff, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRate( + /* [out] */ long *pRateAdjust) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVolume( + /* [out] */ USHORT *pusVolume) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSkipInfo( + /* [out] */ SPVSKIPTYPE *peType, + /* [out] */ long *plNumItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE CompleteSkip( + /* [in] */ long ulNumSkipped) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpTTSEngineSiteVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpTTSEngineSite * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpTTSEngineSite * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpTTSEngineSite * This); + + HRESULT ( STDMETHODCALLTYPE *AddEvents )( + ISpTTSEngineSite * This, + /* [in] */ const SPEVENT *pEventArray, + /* [in] */ ULONG ulCount); + + HRESULT ( STDMETHODCALLTYPE *GetEventInterest )( + ISpTTSEngineSite * This, + /* [out] */ ULONGLONG *pullEventInterest); + + DWORD ( STDMETHODCALLTYPE *GetActions )( + ISpTTSEngineSite * This); + + HRESULT ( STDMETHODCALLTYPE *Write )( + ISpTTSEngineSite * This, + /* [in] */ const void *pBuff, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + HRESULT ( STDMETHODCALLTYPE *GetRate )( + ISpTTSEngineSite * This, + /* [out] */ long *pRateAdjust); + + HRESULT ( STDMETHODCALLTYPE *GetVolume )( + ISpTTSEngineSite * This, + /* [out] */ USHORT *pusVolume); + + HRESULT ( STDMETHODCALLTYPE *GetSkipInfo )( + ISpTTSEngineSite * This, + /* [out] */ SPVSKIPTYPE *peType, + /* [out] */ long *plNumItems); + + HRESULT ( STDMETHODCALLTYPE *CompleteSkip )( + ISpTTSEngineSite * This, + /* [in] */ long ulNumSkipped); + + END_INTERFACE + } ISpTTSEngineSiteVtbl; + + interface ISpTTSEngineSite + { + CONST_VTBL struct ISpTTSEngineSiteVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpTTSEngineSite_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpTTSEngineSite_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpTTSEngineSite_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpTTSEngineSite_AddEvents(This,pEventArray,ulCount) \ + (This)->lpVtbl -> AddEvents(This,pEventArray,ulCount) + +#define ISpTTSEngineSite_GetEventInterest(This,pullEventInterest) \ + (This)->lpVtbl -> GetEventInterest(This,pullEventInterest) + + +#define ISpTTSEngineSite_GetActions(This) \ + (This)->lpVtbl -> GetActions(This) + +#define ISpTTSEngineSite_Write(This,pBuff,cb,pcbWritten) \ + (This)->lpVtbl -> Write(This,pBuff,cb,pcbWritten) + +#define ISpTTSEngineSite_GetRate(This,pRateAdjust) \ + (This)->lpVtbl -> GetRate(This,pRateAdjust) + +#define ISpTTSEngineSite_GetVolume(This,pusVolume) \ + (This)->lpVtbl -> GetVolume(This,pusVolume) + +#define ISpTTSEngineSite_GetSkipInfo(This,peType,plNumItems) \ + (This)->lpVtbl -> GetSkipInfo(This,peType,plNumItems) + +#define ISpTTSEngineSite_CompleteSkip(This,ulNumSkipped) \ + (This)->lpVtbl -> CompleteSkip(This,ulNumSkipped) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +DWORD STDMETHODCALLTYPE ISpTTSEngineSite_GetActions_Proxy( + ISpTTSEngineSite * This); + + +void __RPC_STUB ISpTTSEngineSite_GetActions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngineSite_Write_Proxy( + ISpTTSEngineSite * This, + /* [in] */ const void *pBuff, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbWritten); + + +void __RPC_STUB ISpTTSEngineSite_Write_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngineSite_GetRate_Proxy( + ISpTTSEngineSite * This, + /* [out] */ long *pRateAdjust); + + +void __RPC_STUB ISpTTSEngineSite_GetRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngineSite_GetVolume_Proxy( + ISpTTSEngineSite * This, + /* [out] */ USHORT *pusVolume); + + +void __RPC_STUB ISpTTSEngineSite_GetVolume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngineSite_GetSkipInfo_Proxy( + ISpTTSEngineSite * This, + /* [out] */ SPVSKIPTYPE *peType, + /* [out] */ long *plNumItems); + + +void __RPC_STUB ISpTTSEngineSite_GetSkipInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngineSite_CompleteSkip_Proxy( + ISpTTSEngineSite * This, + /* [in] */ long ulNumSkipped); + + +void __RPC_STUB ISpTTSEngineSite_CompleteSkip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpTTSEngineSite_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0347 */ +/* [local] */ + +typedef struct SPVTEXTFRAG + { + struct SPVTEXTFRAG *pNext; + SPVSTATE State; + LPCWSTR pTextStart; + ULONG ulTextLen; + ULONG ulTextSrcOffset; + } SPVTEXTFRAG; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0347_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0347_v0_0_s_ifspec; + +#ifndef __ISpTTSEngine_INTERFACE_DEFINED__ +#define __ISpTTSEngine_INTERFACE_DEFINED__ + +/* interface ISpTTSEngine */ +/* [unique][helpstring][uuid][local][object] */ + + +EXTERN_C const IID IID_ISpTTSEngine; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A74D7C8E-4CC5-4f2f-A6EB-804DEE18500E") + ISpTTSEngine : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Speak( + /* [in] */ DWORD dwSpeakFlags, + /* [in] */ REFGUID rguidFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ const SPVTEXTFRAG *pTextFragList, + /* [in] */ ISpTTSEngineSite *pOutputSite) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputFormat( + /* [in] */ const GUID *pTargetFmtId, + /* [in] */ const WAVEFORMATEX *pTargetWaveFormatEx, + /* [out] */ GUID *pOutputFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemOutputWaveFormatEx) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpTTSEngineVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpTTSEngine * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpTTSEngine * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpTTSEngine * This); + + HRESULT ( STDMETHODCALLTYPE *Speak )( + ISpTTSEngine * This, + /* [in] */ DWORD dwSpeakFlags, + /* [in] */ REFGUID rguidFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ const SPVTEXTFRAG *pTextFragList, + /* [in] */ ISpTTSEngineSite *pOutputSite); + + HRESULT ( STDMETHODCALLTYPE *GetOutputFormat )( + ISpTTSEngine * This, + /* [in] */ const GUID *pTargetFmtId, + /* [in] */ const WAVEFORMATEX *pTargetWaveFormatEx, + /* [out] */ GUID *pOutputFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemOutputWaveFormatEx); + + END_INTERFACE + } ISpTTSEngineVtbl; + + interface ISpTTSEngine + { + CONST_VTBL struct ISpTTSEngineVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpTTSEngine_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpTTSEngine_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpTTSEngine_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpTTSEngine_Speak(This,dwSpeakFlags,rguidFormatId,pWaveFormatEx,pTextFragList,pOutputSite) \ + (This)->lpVtbl -> Speak(This,dwSpeakFlags,rguidFormatId,pWaveFormatEx,pTextFragList,pOutputSite) + +#define ISpTTSEngine_GetOutputFormat(This,pTargetFmtId,pTargetWaveFormatEx,pOutputFormatId,ppCoMemOutputWaveFormatEx) \ + (This)->lpVtbl -> GetOutputFormat(This,pTargetFmtId,pTargetWaveFormatEx,pOutputFormatId,ppCoMemOutputWaveFormatEx) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpTTSEngine_Speak_Proxy( + ISpTTSEngine * This, + /* [in] */ DWORD dwSpeakFlags, + /* [in] */ REFGUID rguidFormatId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ const SPVTEXTFRAG *pTextFragList, + /* [in] */ ISpTTSEngineSite *pOutputSite); + + +void __RPC_STUB ISpTTSEngine_Speak_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpTTSEngine_GetOutputFormat_Proxy( + ISpTTSEngine * This, + /* [in] */ const GUID *pTargetFmtId, + /* [in] */ const WAVEFORMATEX *pTargetWaveFormatEx, + /* [out] */ GUID *pOutputFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemOutputWaveFormatEx); + + +void __RPC_STUB ISpTTSEngine_GetOutputFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpTTSEngine_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0348 */ +/* [local] */ + +typedef /* [restricted] */ struct SPWORDENTRY + { + SPWORDHANDLE hWord; + WORD LangID; + WCHAR *pszDisplayText; + WCHAR *pszLexicalForm; + SPPHONEID *aPhoneId; + void *pvClientContext; + } SPWORDENTRY; + +typedef /* [restricted] */ struct SPRULEENTRY + { + SPRULEHANDLE hRule; + SPSTATEHANDLE hInitialState; + DWORD Attributes; + void *pvClientRuleContext; + void *pvClientGrammarContext; + } SPRULEENTRY; + +typedef +enum SPTRANSITIONTYPE + { SPTRANSEPSILON = 0, + SPTRANSWORD = SPTRANSEPSILON + 1, + SPTRANSRULE = SPTRANSWORD + 1, + SPTRANSTEXTBUF = SPTRANSRULE + 1, + SPTRANSWILDCARD = SPTRANSTEXTBUF + 1, + SPTRANSDICTATION = SPTRANSWILDCARD + 1 + } SPTRANSITIONTYPE; + +typedef /* [restricted] */ struct SPTRANSITIONENTRY + { + SPTRANSITIONID ID; + SPSTATEHANDLE hNextState; + BYTE Type; + char RequiredConfidence; + struct + { + DWORD fHasProperty; + } ; + float Weight; + union + { + struct + { + SPSTATEHANDLE hRuleInitialState; + SPRULEHANDLE hRule; + void *pvClientRuleContext; + } ; + struct + { + SPWORDHANDLE hWord; + void *pvClientWordContext; + } ; + struct + { + void *pvGrammarCookie; + } ; + } ; + } SPTRANSITIONENTRY; + +typedef /* [restricted] */ struct SPTRANSITIONPROPERTY + { + const WCHAR *pszName; + ULONG ulId; + const WCHAR *pszValue; + VARIANT vValue; + } SPTRANSITIONPROPERTY; + +typedef /* [restricted] */ struct SPSTATEINFO + { + ULONG cAllocatedEntries; + SPTRANSITIONENTRY *pTransitions; + ULONG cEpsilons; + ULONG cRules; + ULONG cWords; + ULONG cSpecialTransitions; + } SPSTATEINFO; + +typedef /* [restricted] */ struct SPPATHENTRY + { + SPTRANSITIONID hTransition; + SPPHRASEELEMENT elem; + } SPPATHENTRY; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0348_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0348_v0_0_s_ifspec; + +#ifndef __ISpCFGInterpreterSite_INTERFACE_DEFINED__ +#define __ISpCFGInterpreterSite_INTERFACE_DEFINED__ + +/* interface ISpCFGInterpreterSite */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpCFGInterpreterSite; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6A6FFAD8-78B6-473d-B844-98152E4FB16B") + ISpCFGInterpreterSite : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AddTextReplacement( + /* [in] */ SPPHRASEREPLACEMENT *pReplace) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddProperty( + /* [in] */ const SPPHRASEPROPERTY *pProperty) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetResourceValue( + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpCFGInterpreterSiteVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpCFGInterpreterSite * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpCFGInterpreterSite * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpCFGInterpreterSite * This); + + HRESULT ( STDMETHODCALLTYPE *AddTextReplacement )( + ISpCFGInterpreterSite * This, + /* [in] */ SPPHRASEREPLACEMENT *pReplace); + + HRESULT ( STDMETHODCALLTYPE *AddProperty )( + ISpCFGInterpreterSite * This, + /* [in] */ const SPPHRASEPROPERTY *pProperty); + + HRESULT ( STDMETHODCALLTYPE *GetResourceValue )( + ISpCFGInterpreterSite * This, + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource); + + END_INTERFACE + } ISpCFGInterpreterSiteVtbl; + + interface ISpCFGInterpreterSite + { + CONST_VTBL struct ISpCFGInterpreterSiteVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpCFGInterpreterSite_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpCFGInterpreterSite_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpCFGInterpreterSite_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpCFGInterpreterSite_AddTextReplacement(This,pReplace) \ + (This)->lpVtbl -> AddTextReplacement(This,pReplace) + +#define ISpCFGInterpreterSite_AddProperty(This,pProperty) \ + (This)->lpVtbl -> AddProperty(This,pProperty) + +#define ISpCFGInterpreterSite_GetResourceValue(This,pszResourceName,ppCoMemResource) \ + (This)->lpVtbl -> GetResourceValue(This,pszResourceName,ppCoMemResource) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpCFGInterpreterSite_AddTextReplacement_Proxy( + ISpCFGInterpreterSite * This, + /* [in] */ SPPHRASEREPLACEMENT *pReplace); + + +void __RPC_STUB ISpCFGInterpreterSite_AddTextReplacement_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpCFGInterpreterSite_AddProperty_Proxy( + ISpCFGInterpreterSite * This, + /* [in] */ const SPPHRASEPROPERTY *pProperty); + + +void __RPC_STUB ISpCFGInterpreterSite_AddProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpCFGInterpreterSite_GetResourceValue_Proxy( + ISpCFGInterpreterSite * This, + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource); + + +void __RPC_STUB ISpCFGInterpreterSite_GetResourceValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpCFGInterpreterSite_INTERFACE_DEFINED__ */ + + +#ifndef __ISpCFGInterpreter_INTERFACE_DEFINED__ +#define __ISpCFGInterpreter_INTERFACE_DEFINED__ + +/* interface ISpCFGInterpreter */ +/* [restricted][local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpCFGInterpreter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F3D3F926-11FC-11d3-BB97-00C04F8EE6C0") + ISpCFGInterpreter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE InitGrammar( + /* [in] */ const WCHAR *pszGrammarName, + /* [in] */ const void **pvGrammarData) = 0; + + virtual HRESULT STDMETHODCALLTYPE Interpret( + /* [in] */ ISpPhraseBuilder *pPhrase, + /* [in] */ const ULONG ulFirstElement, + /* [in] */ const ULONG ulCountOfElements, + /* [in] */ ISpCFGInterpreterSite *pSite) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpCFGInterpreterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpCFGInterpreter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpCFGInterpreter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpCFGInterpreter * This); + + HRESULT ( STDMETHODCALLTYPE *InitGrammar )( + ISpCFGInterpreter * This, + /* [in] */ const WCHAR *pszGrammarName, + /* [in] */ const void **pvGrammarData); + + HRESULT ( STDMETHODCALLTYPE *Interpret )( + ISpCFGInterpreter * This, + /* [in] */ ISpPhraseBuilder *pPhrase, + /* [in] */ const ULONG ulFirstElement, + /* [in] */ const ULONG ulCountOfElements, + /* [in] */ ISpCFGInterpreterSite *pSite); + + END_INTERFACE + } ISpCFGInterpreterVtbl; + + interface ISpCFGInterpreter + { + CONST_VTBL struct ISpCFGInterpreterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpCFGInterpreter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpCFGInterpreter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpCFGInterpreter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpCFGInterpreter_InitGrammar(This,pszGrammarName,pvGrammarData) \ + (This)->lpVtbl -> InitGrammar(This,pszGrammarName,pvGrammarData) + +#define ISpCFGInterpreter_Interpret(This,pPhrase,ulFirstElement,ulCountOfElements,pSite) \ + (This)->lpVtbl -> Interpret(This,pPhrase,ulFirstElement,ulCountOfElements,pSite) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpCFGInterpreter_InitGrammar_Proxy( + ISpCFGInterpreter * This, + /* [in] */ const WCHAR *pszGrammarName, + /* [in] */ const void **pvGrammarData); + + +void __RPC_STUB ISpCFGInterpreter_InitGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpCFGInterpreter_Interpret_Proxy( + ISpCFGInterpreter * This, + /* [in] */ ISpPhraseBuilder *pPhrase, + /* [in] */ const ULONG ulFirstElement, + /* [in] */ const ULONG ulCountOfElements, + /* [in] */ ISpCFGInterpreterSite *pSite); + + +void __RPC_STUB ISpCFGInterpreter_Interpret_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpCFGInterpreter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0350 */ +/* [local] */ + +typedef +enum SPCFGNOTIFY + { SPCFGN_ADD = 0, + SPCFGN_REMOVE = SPCFGN_ADD + 1, + SPCFGN_INVALIDATE = SPCFGN_REMOVE + 1, + SPCFGN_ACTIVATE = SPCFGN_INVALIDATE + 1, + SPCFGN_DEACTIVATE = SPCFGN_ACTIVATE + 1 + } SPCFGNOTIFY; + +typedef +enum SPRESULTTYPE + { SPRT_CFG = 0, + SPRT_SLM = 1, + SPRT_PROPRIETARY = 2, + SPRT_FALSE_RECOGNITION = 1L << 2 + } SPRESULTTYPE; + +typedef struct tagSPPHRASEALT + { + ISpPhraseBuilder *pPhrase; + ULONG ulStartElementInParent; + ULONG cElementsInParent; + ULONG cElementsInAlternate; + void *pvAltExtra; + ULONG cbAltExtra; + } SPPHRASEALT; + +typedef struct SPRECORESULTINFO + { + ULONG cbSize; + SPRESULTTYPE eResultType; + BOOL fHypothesis; + BOOL fProprietaryAutoPause; + ULONGLONG ullStreamPosStart; + ULONGLONG ullStreamPosEnd; + SPGRAMMARHANDLE hGrammar; + ULONG ulSizeEngineData; + void *pvEngineData; + ISpPhraseBuilder *pPhrase; + SPPHRASEALT *aPhraseAlts; + ULONG ulNumAlts; + } SPRECORESULTINFO; + +typedef +enum SPWORDINFOOPT + { SPWIO_NONE = 0, + SPWIO_WANT_TEXT = 1 + } SPWORDINFOOPT; + +typedef +enum SPRULEINFOOPT + { SPRIO_NONE = 0 + } SPRULEINFOOPT; + +typedef struct SPPARSEINFO + { + ULONG cbSize; + SPRULEHANDLE hRule; + ULONGLONG ullAudioStreamPosition; + ULONG ulAudioSize; + ULONG cTransitions; + SPPATHENTRY *pPath; + GUID SREngineID; + ULONG ulSREnginePrivateDataSize; + const BYTE *pSREnginePrivateData; + BOOL fHypothesis; + } SPPARSEINFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0350_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0350_v0_0_s_ifspec; + +#ifndef __ISpSREngineSite_INTERFACE_DEFINED__ +#define __ISpSREngineSite_INTERFACE_DEFINED__ + +/* interface ISpSREngineSite */ +/* [local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpSREngineSite; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3B414AEC-720C-4883-B9EF-178CD394FB3A") + ISpSREngineSite : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Read( + /* [in] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead) = 0; + + virtual HRESULT STDMETHODCALLTYPE DataAvailable( + ULONG *pcb) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBufferNotifySize( + /* [in] */ ULONG cbSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE ParseFromTransitions( + /* [in] */ const SPPARSEINFO *pParseInfo, + /* [out] */ ISpPhraseBuilder **ppNewPhrase) = 0; + + virtual HRESULT STDMETHODCALLTYPE Recognition( + /* [in] */ const SPRECORESULTINFO *pResultInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddEvent( + /* [in] */ const SPEVENT *pEvent, + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE Synchronize( + /* [in] */ ULONGLONG ullProcessedThruPos) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWordInfo( + /* [out][in] */ SPWORDENTRY *pWordEntry, + /* [in] */ SPWORDINFOOPT Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetWordClientContext( + SPWORDHANDLE hWord, + void *pvClientContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRuleInfo( + /* [out][in] */ SPRULEENTRY *pRuleEntry, + /* [in] */ SPRULEINFOOPT Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRuleClientContext( + SPRULEHANDLE hRule, + void *pvClientContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStateInfo( + SPSTATEHANDLE hState, + SPSTATEINFO *pStateInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetResource( + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTransitionProperty( + /* [in] */ SPTRANSITIONID ID, + /* [out] */ SPTRANSITIONPROPERTY **ppCoMemProperty) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsAlternate( + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ SPRULEHANDLE hAltRule) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxAlternates( + /* [in] */ SPRULEHANDLE hRule, + /* [out] */ ULONG *pulNumAlts) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetContextMaxAlternates( + /* [in] */ SPRECOCONTEXTHANDLE hContext, + /* [out] */ ULONG *pulNumAlts) = 0; + + virtual HRESULT STDMETHODCALLTYPE UpdateRecoPos( + /* [in] */ ULONGLONG ullCurrentRecoPos) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpSREngineSiteVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpSREngineSite * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpSREngineSite * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpSREngineSite * This); + + HRESULT ( STDMETHODCALLTYPE *Read )( + ISpSREngineSite * This, + /* [in] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + HRESULT ( STDMETHODCALLTYPE *DataAvailable )( + ISpSREngineSite * This, + ULONG *pcb); + + HRESULT ( STDMETHODCALLTYPE *SetBufferNotifySize )( + ISpSREngineSite * This, + /* [in] */ ULONG cbSize); + + HRESULT ( STDMETHODCALLTYPE *ParseFromTransitions )( + ISpSREngineSite * This, + /* [in] */ const SPPARSEINFO *pParseInfo, + /* [out] */ ISpPhraseBuilder **ppNewPhrase); + + HRESULT ( STDMETHODCALLTYPE *Recognition )( + ISpSREngineSite * This, + /* [in] */ const SPRECORESULTINFO *pResultInfo); + + HRESULT ( STDMETHODCALLTYPE *AddEvent )( + ISpSREngineSite * This, + /* [in] */ const SPEVENT *pEvent, + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext); + + HRESULT ( STDMETHODCALLTYPE *Synchronize )( + ISpSREngineSite * This, + /* [in] */ ULONGLONG ullProcessedThruPos); + + HRESULT ( STDMETHODCALLTYPE *GetWordInfo )( + ISpSREngineSite * This, + /* [out][in] */ SPWORDENTRY *pWordEntry, + /* [in] */ SPWORDINFOOPT Options); + + HRESULT ( STDMETHODCALLTYPE *SetWordClientContext )( + ISpSREngineSite * This, + SPWORDHANDLE hWord, + void *pvClientContext); + + HRESULT ( STDMETHODCALLTYPE *GetRuleInfo )( + ISpSREngineSite * This, + /* [out][in] */ SPRULEENTRY *pRuleEntry, + /* [in] */ SPRULEINFOOPT Options); + + HRESULT ( STDMETHODCALLTYPE *SetRuleClientContext )( + ISpSREngineSite * This, + SPRULEHANDLE hRule, + void *pvClientContext); + + HRESULT ( STDMETHODCALLTYPE *GetStateInfo )( + ISpSREngineSite * This, + SPSTATEHANDLE hState, + SPSTATEINFO *pStateInfo); + + HRESULT ( STDMETHODCALLTYPE *GetResource )( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource); + + HRESULT ( STDMETHODCALLTYPE *GetTransitionProperty )( + ISpSREngineSite * This, + /* [in] */ SPTRANSITIONID ID, + /* [out] */ SPTRANSITIONPROPERTY **ppCoMemProperty); + + HRESULT ( STDMETHODCALLTYPE *IsAlternate )( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ SPRULEHANDLE hAltRule); + + HRESULT ( STDMETHODCALLTYPE *GetMaxAlternates )( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [out] */ ULONG *pulNumAlts); + + HRESULT ( STDMETHODCALLTYPE *GetContextMaxAlternates )( + ISpSREngineSite * This, + /* [in] */ SPRECOCONTEXTHANDLE hContext, + /* [out] */ ULONG *pulNumAlts); + + HRESULT ( STDMETHODCALLTYPE *UpdateRecoPos )( + ISpSREngineSite * This, + /* [in] */ ULONGLONG ullCurrentRecoPos); + + END_INTERFACE + } ISpSREngineSiteVtbl; + + interface ISpSREngineSite + { + CONST_VTBL struct ISpSREngineSiteVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpSREngineSite_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpSREngineSite_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpSREngineSite_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpSREngineSite_Read(This,pv,cb,pcbRead) \ + (This)->lpVtbl -> Read(This,pv,cb,pcbRead) + +#define ISpSREngineSite_DataAvailable(This,pcb) \ + (This)->lpVtbl -> DataAvailable(This,pcb) + +#define ISpSREngineSite_SetBufferNotifySize(This,cbSize) \ + (This)->lpVtbl -> SetBufferNotifySize(This,cbSize) + +#define ISpSREngineSite_ParseFromTransitions(This,pParseInfo,ppNewPhrase) \ + (This)->lpVtbl -> ParseFromTransitions(This,pParseInfo,ppNewPhrase) + +#define ISpSREngineSite_Recognition(This,pResultInfo) \ + (This)->lpVtbl -> Recognition(This,pResultInfo) + +#define ISpSREngineSite_AddEvent(This,pEvent,hSAPIRecoContext) \ + (This)->lpVtbl -> AddEvent(This,pEvent,hSAPIRecoContext) + +#define ISpSREngineSite_Synchronize(This,ullProcessedThruPos) \ + (This)->lpVtbl -> Synchronize(This,ullProcessedThruPos) + +#define ISpSREngineSite_GetWordInfo(This,pWordEntry,Options) \ + (This)->lpVtbl -> GetWordInfo(This,pWordEntry,Options) + +#define ISpSREngineSite_SetWordClientContext(This,hWord,pvClientContext) \ + (This)->lpVtbl -> SetWordClientContext(This,hWord,pvClientContext) + +#define ISpSREngineSite_GetRuleInfo(This,pRuleEntry,Options) \ + (This)->lpVtbl -> GetRuleInfo(This,pRuleEntry,Options) + +#define ISpSREngineSite_SetRuleClientContext(This,hRule,pvClientContext) \ + (This)->lpVtbl -> SetRuleClientContext(This,hRule,pvClientContext) + +#define ISpSREngineSite_GetStateInfo(This,hState,pStateInfo) \ + (This)->lpVtbl -> GetStateInfo(This,hState,pStateInfo) + +#define ISpSREngineSite_GetResource(This,hRule,pszResourceName,ppCoMemResource) \ + (This)->lpVtbl -> GetResource(This,hRule,pszResourceName,ppCoMemResource) + +#define ISpSREngineSite_GetTransitionProperty(This,ID,ppCoMemProperty) \ + (This)->lpVtbl -> GetTransitionProperty(This,ID,ppCoMemProperty) + +#define ISpSREngineSite_IsAlternate(This,hRule,hAltRule) \ + (This)->lpVtbl -> IsAlternate(This,hRule,hAltRule) + +#define ISpSREngineSite_GetMaxAlternates(This,hRule,pulNumAlts) \ + (This)->lpVtbl -> GetMaxAlternates(This,hRule,pulNumAlts) + +#define ISpSREngineSite_GetContextMaxAlternates(This,hContext,pulNumAlts) \ + (This)->lpVtbl -> GetContextMaxAlternates(This,hContext,pulNumAlts) + +#define ISpSREngineSite_UpdateRecoPos(This,ullCurrentRecoPos) \ + (This)->lpVtbl -> UpdateRecoPos(This,ullCurrentRecoPos) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_Read_Proxy( + ISpSREngineSite * This, + /* [in] */ void *pv, + /* [in] */ ULONG cb, + /* [out] */ ULONG *pcbRead); + + +void __RPC_STUB ISpSREngineSite_Read_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_DataAvailable_Proxy( + ISpSREngineSite * This, + ULONG *pcb); + + +void __RPC_STUB ISpSREngineSite_DataAvailable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_SetBufferNotifySize_Proxy( + ISpSREngineSite * This, + /* [in] */ ULONG cbSize); + + +void __RPC_STUB ISpSREngineSite_SetBufferNotifySize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_ParseFromTransitions_Proxy( + ISpSREngineSite * This, + /* [in] */ const SPPARSEINFO *pParseInfo, + /* [out] */ ISpPhraseBuilder **ppNewPhrase); + + +void __RPC_STUB ISpSREngineSite_ParseFromTransitions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_Recognition_Proxy( + ISpSREngineSite * This, + /* [in] */ const SPRECORESULTINFO *pResultInfo); + + +void __RPC_STUB ISpSREngineSite_Recognition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_AddEvent_Proxy( + ISpSREngineSite * This, + /* [in] */ const SPEVENT *pEvent, + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext); + + +void __RPC_STUB ISpSREngineSite_AddEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_Synchronize_Proxy( + ISpSREngineSite * This, + /* [in] */ ULONGLONG ullProcessedThruPos); + + +void __RPC_STUB ISpSREngineSite_Synchronize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetWordInfo_Proxy( + ISpSREngineSite * This, + /* [out][in] */ SPWORDENTRY *pWordEntry, + /* [in] */ SPWORDINFOOPT Options); + + +void __RPC_STUB ISpSREngineSite_GetWordInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_SetWordClientContext_Proxy( + ISpSREngineSite * This, + SPWORDHANDLE hWord, + void *pvClientContext); + + +void __RPC_STUB ISpSREngineSite_SetWordClientContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetRuleInfo_Proxy( + ISpSREngineSite * This, + /* [out][in] */ SPRULEENTRY *pRuleEntry, + /* [in] */ SPRULEINFOOPT Options); + + +void __RPC_STUB ISpSREngineSite_GetRuleInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_SetRuleClientContext_Proxy( + ISpSREngineSite * This, + SPRULEHANDLE hRule, + void *pvClientContext); + + +void __RPC_STUB ISpSREngineSite_SetRuleClientContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetStateInfo_Proxy( + ISpSREngineSite * This, + SPSTATEHANDLE hState, + SPSTATEINFO *pStateInfo); + + +void __RPC_STUB ISpSREngineSite_GetStateInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetResource_Proxy( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ const WCHAR *pszResourceName, + /* [out] */ WCHAR **ppCoMemResource); + + +void __RPC_STUB ISpSREngineSite_GetResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetTransitionProperty_Proxy( + ISpSREngineSite * This, + /* [in] */ SPTRANSITIONID ID, + /* [out] */ SPTRANSITIONPROPERTY **ppCoMemProperty); + + +void __RPC_STUB ISpSREngineSite_GetTransitionProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_IsAlternate_Proxy( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [in] */ SPRULEHANDLE hAltRule); + + +void __RPC_STUB ISpSREngineSite_IsAlternate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetMaxAlternates_Proxy( + ISpSREngineSite * This, + /* [in] */ SPRULEHANDLE hRule, + /* [out] */ ULONG *pulNumAlts); + + +void __RPC_STUB ISpSREngineSite_GetMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_GetContextMaxAlternates_Proxy( + ISpSREngineSite * This, + /* [in] */ SPRECOCONTEXTHANDLE hContext, + /* [out] */ ULONG *pulNumAlts); + + +void __RPC_STUB ISpSREngineSite_GetContextMaxAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngineSite_UpdateRecoPos_Proxy( + ISpSREngineSite * This, + /* [in] */ ULONGLONG ullCurrentRecoPos); + + +void __RPC_STUB ISpSREngineSite_UpdateRecoPos_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpSREngineSite_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0351 */ +/* [local] */ + +typedef +enum SPPROPSRC + { SPPROPSRC_RECO_INST = 0, + SPPROPSRC_RECO_CTX = SPPROPSRC_RECO_INST + 1, + SPPROPSRC_RECO_GRAMMAR = SPPROPSRC_RECO_CTX + 1 + } SPPROPSRC; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0351_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0351_v0_0_s_ifspec; + +#ifndef __ISpSREngine_INTERFACE_DEFINED__ +#define __ISpSREngine_INTERFACE_DEFINED__ + +/* interface ISpSREngine */ +/* [local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpSREngine; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2F472991-854B-4465-B613-FBAFB3AD8ED8") + ISpSREngine : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetSite( + /* [in] */ ISpSREngineSite *pSite) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputAudioFormat( + /* [in] */ const GUID *pguidSourceFormatId, + /* [in] */ const WAVEFORMATEX *pSourceWaveFormatEx, + /* [out] */ GUID *pguidDesiredFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemDesiredWaveFormatEx) = 0; + + virtual HRESULT STDMETHODCALLTYPE RecognizeStream( + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ HANDLE hRequestSync, + /* [in] */ HANDLE hDataAvailable, + /* [in] */ HANDLE hExit, + /* [in] */ BOOL fNewAudioStream, + /* [in] */ BOOL fRealTimeAudio, + /* [in] */ ISpObjectToken *pAudioObjectToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRecoProfile( + ISpObjectToken *pProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnCreateGrammar( + /* [in] */ void *pvEngineRecoContext, + /* [in] */ SPGRAMMARHANDLE hSAPIGrammar, + /* [out] */ void **ppvEngineGrammarContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnDeleteGrammar( + /* [in] */ void *pvEngineGrammar) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadProprietaryGrammar( + /* [in] */ void *pvEngineGrammar, + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataParam, + /* [in] */ ULONG ulDataSize, + /* [in] */ SPLOADOPTIONS Options) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnloadProprietaryGrammar( + /* [in] */ void *pvEngineGrammar) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProprietaryRuleState( + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszName, + /* [in] */ void *pReserved, + /* [in] */ SPRULESTATE NewState, + /* [out] */ ULONG *pcRulesChanged) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProprietaryRuleIdState( + /* [in] */ void *pvEngineGrammar, + /* [in] */ DWORD dwRuleId, + /* [in] */ SPRULESTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadSLM( + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszTopicName) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnloadSLM( + /* [in] */ void *pvEngineGrammar) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSLMState( + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPRULESTATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetWordSequenceData( + /* [in] */ void *pvEngineGrammar, + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTextSelection( + /* [in] */ void *pvEngineGrammar, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsPronounceable( + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnCreateRecoContext( + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext, + /* [out] */ void **ppvEngineContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnDeleteRecoContext( + /* [in] */ void *pvEngineContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE PrivateCall( + /* [in] */ void *pvEngineContext, + /* [out][in] */ PVOID pCallFrame, + /* [in] */ ULONG ulCallFrameSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAdaptationData( + /* [in] */ void *pvEngineContext, + const WCHAR *pAdaptationData, + const ULONG cch) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPropertyNum( + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyNum( + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *lValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPropertyString( + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPropertyString( + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetGrammarState( + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPGRAMMARSTATE eGrammarState) = 0; + + virtual HRESULT STDMETHODCALLTYPE WordNotify( + SPCFGNOTIFY Action, + ULONG cWords, + const SPWORDENTRY *pWords) = 0; + + virtual HRESULT STDMETHODCALLTYPE RuleNotify( + SPCFGNOTIFY Action, + ULONG cRules, + const SPRULEENTRY *pRules) = 0; + + virtual HRESULT STDMETHODCALLTYPE PrivateCallEx( + /* [in] */ void *pvEngineContext, + /* [in] */ const void *pInCallFrame, + /* [in] */ ULONG ulInCallFrameSize, + /* [out] */ void **ppvCoMemResponse, + /* [out] */ ULONG *pulResponseSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetContextState( + /* [in] */ void *pvEngineContext, + /* [in] */ SPCONTEXTSTATE eContextState) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpSREngineVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpSREngine * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpSREngine * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpSREngine * This); + + HRESULT ( STDMETHODCALLTYPE *SetSite )( + ISpSREngine * This, + /* [in] */ ISpSREngineSite *pSite); + + HRESULT ( STDMETHODCALLTYPE *GetInputAudioFormat )( + ISpSREngine * This, + /* [in] */ const GUID *pguidSourceFormatId, + /* [in] */ const WAVEFORMATEX *pSourceWaveFormatEx, + /* [out] */ GUID *pguidDesiredFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemDesiredWaveFormatEx); + + HRESULT ( STDMETHODCALLTYPE *RecognizeStream )( + ISpSREngine * This, + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ HANDLE hRequestSync, + /* [in] */ HANDLE hDataAvailable, + /* [in] */ HANDLE hExit, + /* [in] */ BOOL fNewAudioStream, + /* [in] */ BOOL fRealTimeAudio, + /* [in] */ ISpObjectToken *pAudioObjectToken); + + HRESULT ( STDMETHODCALLTYPE *SetRecoProfile )( + ISpSREngine * This, + ISpObjectToken *pProfile); + + HRESULT ( STDMETHODCALLTYPE *OnCreateGrammar )( + ISpSREngine * This, + /* [in] */ void *pvEngineRecoContext, + /* [in] */ SPGRAMMARHANDLE hSAPIGrammar, + /* [out] */ void **ppvEngineGrammarContext); + + HRESULT ( STDMETHODCALLTYPE *OnDeleteGrammar )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + HRESULT ( STDMETHODCALLTYPE *LoadProprietaryGrammar )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataParam, + /* [in] */ ULONG ulDataSize, + /* [in] */ SPLOADOPTIONS Options); + + HRESULT ( STDMETHODCALLTYPE *UnloadProprietaryGrammar )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + HRESULT ( STDMETHODCALLTYPE *SetProprietaryRuleState )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszName, + /* [in] */ void *pReserved, + /* [in] */ SPRULESTATE NewState, + /* [out] */ ULONG *pcRulesChanged); + + HRESULT ( STDMETHODCALLTYPE *SetProprietaryRuleIdState )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ DWORD dwRuleId, + /* [in] */ SPRULESTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *LoadSLM )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszTopicName); + + HRESULT ( STDMETHODCALLTYPE *UnloadSLM )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + HRESULT ( STDMETHODCALLTYPE *SetSLMState )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPRULESTATE NewState); + + HRESULT ( STDMETHODCALLTYPE *SetWordSequenceData )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *SetTextSelection )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *IsPronounceable )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable); + + HRESULT ( STDMETHODCALLTYPE *OnCreateRecoContext )( + ISpSREngine * This, + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext, + /* [out] */ void **ppvEngineContext); + + HRESULT ( STDMETHODCALLTYPE *OnDeleteRecoContext )( + ISpSREngine * This, + /* [in] */ void *pvEngineContext); + + HRESULT ( STDMETHODCALLTYPE *PrivateCall )( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [out][in] */ PVOID pCallFrame, + /* [in] */ ULONG ulCallFrameSize); + + HRESULT ( STDMETHODCALLTYPE *SetAdaptationData )( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + const WCHAR *pAdaptationData, + const ULONG cch); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyNum )( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyNum )( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *lValue); + + HRESULT ( STDMETHODCALLTYPE *SetPropertyString )( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetPropertyString )( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue); + + HRESULT ( STDMETHODCALLTYPE *SetGrammarState )( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPGRAMMARSTATE eGrammarState); + + HRESULT ( STDMETHODCALLTYPE *WordNotify )( + ISpSREngine * This, + SPCFGNOTIFY Action, + ULONG cWords, + const SPWORDENTRY *pWords); + + HRESULT ( STDMETHODCALLTYPE *RuleNotify )( + ISpSREngine * This, + SPCFGNOTIFY Action, + ULONG cRules, + const SPRULEENTRY *pRules); + + HRESULT ( STDMETHODCALLTYPE *PrivateCallEx )( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [in] */ const void *pInCallFrame, + /* [in] */ ULONG ulInCallFrameSize, + /* [out] */ void **ppvCoMemResponse, + /* [out] */ ULONG *pulResponseSize); + + HRESULT ( STDMETHODCALLTYPE *SetContextState )( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [in] */ SPCONTEXTSTATE eContextState); + + END_INTERFACE + } ISpSREngineVtbl; + + interface ISpSREngine + { + CONST_VTBL struct ISpSREngineVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpSREngine_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpSREngine_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpSREngine_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpSREngine_SetSite(This,pSite) \ + (This)->lpVtbl -> SetSite(This,pSite) + +#define ISpSREngine_GetInputAudioFormat(This,pguidSourceFormatId,pSourceWaveFormatEx,pguidDesiredFormatId,ppCoMemDesiredWaveFormatEx) \ + (This)->lpVtbl -> GetInputAudioFormat(This,pguidSourceFormatId,pSourceWaveFormatEx,pguidDesiredFormatId,ppCoMemDesiredWaveFormatEx) + +#define ISpSREngine_RecognizeStream(This,rguidFmtId,pWaveFormatEx,hRequestSync,hDataAvailable,hExit,fNewAudioStream,fRealTimeAudio,pAudioObjectToken) \ + (This)->lpVtbl -> RecognizeStream(This,rguidFmtId,pWaveFormatEx,hRequestSync,hDataAvailable,hExit,fNewAudioStream,fRealTimeAudio,pAudioObjectToken) + +#define ISpSREngine_SetRecoProfile(This,pProfile) \ + (This)->lpVtbl -> SetRecoProfile(This,pProfile) + +#define ISpSREngine_OnCreateGrammar(This,pvEngineRecoContext,hSAPIGrammar,ppvEngineGrammarContext) \ + (This)->lpVtbl -> OnCreateGrammar(This,pvEngineRecoContext,hSAPIGrammar,ppvEngineGrammarContext) + +#define ISpSREngine_OnDeleteGrammar(This,pvEngineGrammar) \ + (This)->lpVtbl -> OnDeleteGrammar(This,pvEngineGrammar) + +#define ISpSREngine_LoadProprietaryGrammar(This,pvEngineGrammar,rguidParam,pszStringParam,pvDataParam,ulDataSize,Options) \ + (This)->lpVtbl -> LoadProprietaryGrammar(This,pvEngineGrammar,rguidParam,pszStringParam,pvDataParam,ulDataSize,Options) + +#define ISpSREngine_UnloadProprietaryGrammar(This,pvEngineGrammar) \ + (This)->lpVtbl -> UnloadProprietaryGrammar(This,pvEngineGrammar) + +#define ISpSREngine_SetProprietaryRuleState(This,pvEngineGrammar,pszName,pReserved,NewState,pcRulesChanged) \ + (This)->lpVtbl -> SetProprietaryRuleState(This,pvEngineGrammar,pszName,pReserved,NewState,pcRulesChanged) + +#define ISpSREngine_SetProprietaryRuleIdState(This,pvEngineGrammar,dwRuleId,NewState) \ + (This)->lpVtbl -> SetProprietaryRuleIdState(This,pvEngineGrammar,dwRuleId,NewState) + +#define ISpSREngine_LoadSLM(This,pvEngineGrammar,pszTopicName) \ + (This)->lpVtbl -> LoadSLM(This,pvEngineGrammar,pszTopicName) + +#define ISpSREngine_UnloadSLM(This,pvEngineGrammar) \ + (This)->lpVtbl -> UnloadSLM(This,pvEngineGrammar) + +#define ISpSREngine_SetSLMState(This,pvEngineGrammar,NewState) \ + (This)->lpVtbl -> SetSLMState(This,pvEngineGrammar,NewState) + +#define ISpSREngine_SetWordSequenceData(This,pvEngineGrammar,pText,cchText,pInfo) \ + (This)->lpVtbl -> SetWordSequenceData(This,pvEngineGrammar,pText,cchText,pInfo) + +#define ISpSREngine_SetTextSelection(This,pvEngineGrammar,pInfo) \ + (This)->lpVtbl -> SetTextSelection(This,pvEngineGrammar,pInfo) + +#define ISpSREngine_IsPronounceable(This,pvEngineGrammar,pszWord,pWordPronounceable) \ + (This)->lpVtbl -> IsPronounceable(This,pvEngineGrammar,pszWord,pWordPronounceable) + +#define ISpSREngine_OnCreateRecoContext(This,hSAPIRecoContext,ppvEngineContext) \ + (This)->lpVtbl -> OnCreateRecoContext(This,hSAPIRecoContext,ppvEngineContext) + +#define ISpSREngine_OnDeleteRecoContext(This,pvEngineContext) \ + (This)->lpVtbl -> OnDeleteRecoContext(This,pvEngineContext) + +#define ISpSREngine_PrivateCall(This,pvEngineContext,pCallFrame,ulCallFrameSize) \ + (This)->lpVtbl -> PrivateCall(This,pvEngineContext,pCallFrame,ulCallFrameSize) + +#define ISpSREngine_SetAdaptationData(This,pvEngineContext,pAdaptationData,cch) \ + (This)->lpVtbl -> SetAdaptationData(This,pvEngineContext,pAdaptationData,cch) + +#define ISpSREngine_SetPropertyNum(This,eSrc,pvSrcObj,pName,lValue) \ + (This)->lpVtbl -> SetPropertyNum(This,eSrc,pvSrcObj,pName,lValue) + +#define ISpSREngine_GetPropertyNum(This,eSrc,pvSrcObj,pName,lValue) \ + (This)->lpVtbl -> GetPropertyNum(This,eSrc,pvSrcObj,pName,lValue) + +#define ISpSREngine_SetPropertyString(This,eSrc,pvSrcObj,pName,pValue) \ + (This)->lpVtbl -> SetPropertyString(This,eSrc,pvSrcObj,pName,pValue) + +#define ISpSREngine_GetPropertyString(This,eSrc,pvSrcObj,pName,ppCoMemValue) \ + (This)->lpVtbl -> GetPropertyString(This,eSrc,pvSrcObj,pName,ppCoMemValue) + +#define ISpSREngine_SetGrammarState(This,pvEngineGrammar,eGrammarState) \ + (This)->lpVtbl -> SetGrammarState(This,pvEngineGrammar,eGrammarState) + +#define ISpSREngine_WordNotify(This,Action,cWords,pWords) \ + (This)->lpVtbl -> WordNotify(This,Action,cWords,pWords) + +#define ISpSREngine_RuleNotify(This,Action,cRules,pRules) \ + (This)->lpVtbl -> RuleNotify(This,Action,cRules,pRules) + +#define ISpSREngine_PrivateCallEx(This,pvEngineContext,pInCallFrame,ulInCallFrameSize,ppvCoMemResponse,pulResponseSize) \ + (This)->lpVtbl -> PrivateCallEx(This,pvEngineContext,pInCallFrame,ulInCallFrameSize,ppvCoMemResponse,pulResponseSize) + +#define ISpSREngine_SetContextState(This,pvEngineContext,eContextState) \ + (This)->lpVtbl -> SetContextState(This,pvEngineContext,eContextState) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetSite_Proxy( + ISpSREngine * This, + /* [in] */ ISpSREngineSite *pSite); + + +void __RPC_STUB ISpSREngine_SetSite_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_GetInputAudioFormat_Proxy( + ISpSREngine * This, + /* [in] */ const GUID *pguidSourceFormatId, + /* [in] */ const WAVEFORMATEX *pSourceWaveFormatEx, + /* [out] */ GUID *pguidDesiredFormatId, + /* [out] */ WAVEFORMATEX **ppCoMemDesiredWaveFormatEx); + + +void __RPC_STUB ISpSREngine_GetInputAudioFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_RecognizeStream_Proxy( + ISpSREngine * This, + /* [in] */ REFGUID rguidFmtId, + /* [in] */ const WAVEFORMATEX *pWaveFormatEx, + /* [in] */ HANDLE hRequestSync, + /* [in] */ HANDLE hDataAvailable, + /* [in] */ HANDLE hExit, + /* [in] */ BOOL fNewAudioStream, + /* [in] */ BOOL fRealTimeAudio, + /* [in] */ ISpObjectToken *pAudioObjectToken); + + +void __RPC_STUB ISpSREngine_RecognizeStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetRecoProfile_Proxy( + ISpSREngine * This, + ISpObjectToken *pProfile); + + +void __RPC_STUB ISpSREngine_SetRecoProfile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_OnCreateGrammar_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineRecoContext, + /* [in] */ SPGRAMMARHANDLE hSAPIGrammar, + /* [out] */ void **ppvEngineGrammarContext); + + +void __RPC_STUB ISpSREngine_OnCreateGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_OnDeleteGrammar_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + +void __RPC_STUB ISpSREngine_OnDeleteGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_LoadProprietaryGrammar_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ REFGUID rguidParam, + /* [string][in] */ const WCHAR *pszStringParam, + /* [in] */ const void *pvDataParam, + /* [in] */ ULONG ulDataSize, + /* [in] */ SPLOADOPTIONS Options); + + +void __RPC_STUB ISpSREngine_LoadProprietaryGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_UnloadProprietaryGrammar_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + +void __RPC_STUB ISpSREngine_UnloadProprietaryGrammar_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetProprietaryRuleState_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszName, + /* [in] */ void *pReserved, + /* [in] */ SPRULESTATE NewState, + /* [out] */ ULONG *pcRulesChanged); + + +void __RPC_STUB ISpSREngine_SetProprietaryRuleState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetProprietaryRuleIdState_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ DWORD dwRuleId, + /* [in] */ SPRULESTATE NewState); + + +void __RPC_STUB ISpSREngine_SetProprietaryRuleIdState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_LoadSLM_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszTopicName); + + +void __RPC_STUB ISpSREngine_LoadSLM_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_UnloadSLM_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar); + + +void __RPC_STUB ISpSREngine_UnloadSLM_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetSLMState_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPRULESTATE NewState); + + +void __RPC_STUB ISpSREngine_SetSLMState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetWordSequenceData_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ const WCHAR *pText, + /* [in] */ ULONG cchText, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + +void __RPC_STUB ISpSREngine_SetWordSequenceData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetTextSelection_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ const SPTEXTSELECTIONINFO *pInfo); + + +void __RPC_STUB ISpSREngine_SetTextSelection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_IsPronounceable_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [string][in] */ const WCHAR *pszWord, + /* [out] */ SPWORDPRONOUNCEABLE *pWordPronounceable); + + +void __RPC_STUB ISpSREngine_IsPronounceable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_OnCreateRecoContext_Proxy( + ISpSREngine * This, + /* [in] */ SPRECOCONTEXTHANDLE hSAPIRecoContext, + /* [out] */ void **ppvEngineContext); + + +void __RPC_STUB ISpSREngine_OnCreateRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_OnDeleteRecoContext_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineContext); + + +void __RPC_STUB ISpSREngine_OnDeleteRecoContext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_PrivateCall_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [out][in] */ PVOID pCallFrame, + /* [in] */ ULONG ulCallFrameSize); + + +void __RPC_STUB ISpSREngine_PrivateCall_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetAdaptationData_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + const WCHAR *pAdaptationData, + const ULONG cch); + + +void __RPC_STUB ISpSREngine_SetAdaptationData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetPropertyNum_Proxy( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ LONG lValue); + + +void __RPC_STUB ISpSREngine_SetPropertyNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_GetPropertyNum_Proxy( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ LONG *lValue); + + +void __RPC_STUB ISpSREngine_GetPropertyNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetPropertyString_Proxy( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [in] */ const WCHAR *pValue); + + +void __RPC_STUB ISpSREngine_SetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_GetPropertyString_Proxy( + ISpSREngine * This, + /* [in] */ SPPROPSRC eSrc, + /* [in] */ void *pvSrcObj, + /* [in] */ const WCHAR *pName, + /* [out] */ WCHAR **ppCoMemValue); + + +void __RPC_STUB ISpSREngine_GetPropertyString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetGrammarState_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineGrammar, + /* [in] */ SPGRAMMARSTATE eGrammarState); + + +void __RPC_STUB ISpSREngine_SetGrammarState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_WordNotify_Proxy( + ISpSREngine * This, + SPCFGNOTIFY Action, + ULONG cWords, + const SPWORDENTRY *pWords); + + +void __RPC_STUB ISpSREngine_WordNotify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_RuleNotify_Proxy( + ISpSREngine * This, + SPCFGNOTIFY Action, + ULONG cRules, + const SPRULEENTRY *pRules); + + +void __RPC_STUB ISpSREngine_RuleNotify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_PrivateCallEx_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [in] */ const void *pInCallFrame, + /* [in] */ ULONG ulInCallFrameSize, + /* [out] */ void **ppvCoMemResponse, + /* [out] */ ULONG *pulResponseSize); + + +void __RPC_STUB ISpSREngine_PrivateCallEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSREngine_SetContextState_Proxy( + ISpSREngine * This, + /* [in] */ void *pvEngineContext, + /* [in] */ SPCONTEXTSTATE eContextState); + + +void __RPC_STUB ISpSREngine_SetContextState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpSREngine_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_sapiddk_0352 */ +/* [local] */ + +typedef struct tagSPPHRASEALTREQUEST + { + ULONG ulStartElement; + ULONG cElements; + ULONG ulRequestAltCount; + void *pvResultExtra; + ULONG cbResultExtra; + ISpPhrase *pPhrase; + ISpRecoContext *pRecoContext; + } SPPHRASEALTREQUEST; + + + +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0352_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_sapiddk_0352_v0_0_s_ifspec; + +#ifndef __ISpSRAlternates_INTERFACE_DEFINED__ +#define __ISpSRAlternates_INTERFACE_DEFINED__ + +/* interface ISpSRAlternates */ +/* [local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISpSRAlternates; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FECE8294-2BE1-408f-8E68-2DE377092F0E") + ISpSRAlternates : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetAlternates( + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [out] */ SPPHRASEALT **ppAlts, + /* [out] */ ULONG *pcAlts) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [in] */ SPPHRASEALT *pAlt, + /* [out] */ void **ppvResultExtra, + /* [out] */ ULONG *pcbResultExtra) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpSRAlternatesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISpSRAlternates * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISpSRAlternates * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISpSRAlternates * This); + + HRESULT ( STDMETHODCALLTYPE *GetAlternates )( + ISpSRAlternates * This, + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [out] */ SPPHRASEALT **ppAlts, + /* [out] */ ULONG *pcAlts); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + ISpSRAlternates * This, + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [in] */ SPPHRASEALT *pAlt, + /* [out] */ void **ppvResultExtra, + /* [out] */ ULONG *pcbResultExtra); + + END_INTERFACE + } ISpSRAlternatesVtbl; + + interface ISpSRAlternates + { + CONST_VTBL struct ISpSRAlternatesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpSRAlternates_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpSRAlternates_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpSRAlternates_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpSRAlternates_GetAlternates(This,pAltRequest,ppAlts,pcAlts) \ + (This)->lpVtbl -> GetAlternates(This,pAltRequest,ppAlts,pcAlts) + +#define ISpSRAlternates_Commit(This,pAltRequest,pAlt,ppvResultExtra,pcbResultExtra) \ + (This)->lpVtbl -> Commit(This,pAltRequest,pAlt,ppvResultExtra,pcbResultExtra) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpSRAlternates_GetAlternates_Proxy( + ISpSRAlternates * This, + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [out] */ SPPHRASEALT **ppAlts, + /* [out] */ ULONG *pcAlts); + + +void __RPC_STUB ISpSRAlternates_GetAlternates_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISpSRAlternates_Commit_Proxy( + ISpSRAlternates * This, + /* [in] */ SPPHRASEALTREQUEST *pAltRequest, + /* [in] */ SPPHRASEALT *pAlt, + /* [out] */ void **ppvResultExtra, + /* [out] */ ULONG *pcbResultExtra); + + +void __RPC_STUB ISpSRAlternates_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpSRAlternates_INTERFACE_DEFINED__ */ + + +#ifndef ___ISpPrivateEngineCall_INTERFACE_DEFINED__ +#define ___ISpPrivateEngineCall_INTERFACE_DEFINED__ + +/* interface _ISpPrivateEngineCall */ +/* [local][unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID__ISpPrivateEngineCall; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8E7C791E-4467-11d3-9723-00C04F72DB08") + _ISpPrivateEngineCall : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CallEngine( + /* [out][in] */ void *pCallFrame, + /* [in] */ ULONG ulCallFrameSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE CallEngineEx( + /* [in] */ const void *pInFrame, + /* [in] */ ULONG ulInFrameSize, + /* [out] */ void **ppCoMemOutFrame, + /* [out] */ ULONG *pulOutFrameSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct _ISpPrivateEngineCallVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + _ISpPrivateEngineCall * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + _ISpPrivateEngineCall * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + _ISpPrivateEngineCall * This); + + HRESULT ( STDMETHODCALLTYPE *CallEngine )( + _ISpPrivateEngineCall * This, + /* [out][in] */ void *pCallFrame, + /* [in] */ ULONG ulCallFrameSize); + + HRESULT ( STDMETHODCALLTYPE *CallEngineEx )( + _ISpPrivateEngineCall * This, + /* [in] */ const void *pInFrame, + /* [in] */ ULONG ulInFrameSize, + /* [out] */ void **ppCoMemOutFrame, + /* [out] */ ULONG *pulOutFrameSize); + + END_INTERFACE + } _ISpPrivateEngineCallVtbl; + + interface _ISpPrivateEngineCall + { + CONST_VTBL struct _ISpPrivateEngineCallVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define _ISpPrivateEngineCall_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define _ISpPrivateEngineCall_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define _ISpPrivateEngineCall_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define _ISpPrivateEngineCall_CallEngine(This,pCallFrame,ulCallFrameSize) \ + (This)->lpVtbl -> CallEngine(This,pCallFrame,ulCallFrameSize) + +#define _ISpPrivateEngineCall_CallEngineEx(This,pInFrame,ulInFrameSize,ppCoMemOutFrame,pulOutFrameSize) \ + (This)->lpVtbl -> CallEngineEx(This,pInFrame,ulInFrameSize,ppCoMemOutFrame,pulOutFrameSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE _ISpPrivateEngineCall_CallEngine_Proxy( + _ISpPrivateEngineCall * This, + /* [out][in] */ void *pCallFrame, + /* [in] */ ULONG ulCallFrameSize); + + +void __RPC_STUB _ISpPrivateEngineCall_CallEngine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE _ISpPrivateEngineCall_CallEngineEx_Proxy( + _ISpPrivateEngineCall * This, + /* [in] */ const void *pInFrame, + /* [in] */ ULONG ulInFrameSize, + /* [out] */ void **ppCoMemOutFrame, + /* [out] */ ULONG *pulOutFrameSize); + + +void __RPC_STUB _ISpPrivateEngineCall_CallEngineEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* ___ISpPrivateEngineCall_INTERFACE_DEFINED__ */ + + + +#ifndef __SpeechDDKLib_LIBRARY_DEFINED__ +#define __SpeechDDKLib_LIBRARY_DEFINED__ + +/* library SpeechDDKLib */ +/* [version][uuid][helpstring] */ + + +EXTERN_C const IID LIBID_SpeechDDKLib; + +EXTERN_C const CLSID CLSID_SpDataKey; + +#ifdef __cplusplus + +class DECLSPEC_UUID("D9F6EE60-58C9-458b-88E1-2F908FD7F87C") +SpDataKey; +#endif + +EXTERN_C const CLSID CLSID_SpObjectTokenEnum; + +#ifdef __cplusplus + +class DECLSPEC_UUID("3918D75F-0ACB-41f2-B733-92AA15BCECF6") +SpObjectTokenEnum; +#endif + +EXTERN_C const CLSID CLSID_SpPhraseBuilder; + +#ifdef __cplusplus + +class DECLSPEC_UUID("777B6BBD-2FF2-11d3-88FE-00C04F8EF9B5") +SpPhraseBuilder; +#endif + +EXTERN_C const CLSID CLSID_SpITNProcessor; + +#ifdef __cplusplus + +class DECLSPEC_UUID("12D73610-A1C9-11d3-BC90-00C04F72DF9F") +SpITNProcessor; +#endif + +EXTERN_C const CLSID CLSID_SpGrammarCompiler; + +#ifdef __cplusplus + +class DECLSPEC_UUID("B1E29D59-A675-11D2-8302-00C04F8EE6C0") +SpGrammarCompiler; +#endif + +EXTERN_C const CLSID CLSID_SpGramCompBackend; + +#ifdef __cplusplus + +class DECLSPEC_UUID("DA93E903-C843-11D2-A084-00C04F8EF9B5") +SpGramCompBackend; +#endif +#endif /* __SpeechDDKLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/speech/include/spcollec.h b/speech/include/spcollec.h new file mode 100644 index 0000000000..d260824db4 --- /dev/null +++ b/speech/include/spcollec.h @@ -0,0 +1,1432 @@ +/***************************************************************************** +* SPCollec.h * +*------------* +* This header file contains the SAPI5 collection class templates. These +* are a modified version of the MFC template classes without the dependencies. +*----------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +*****************************************************************************/ +#ifndef SPCollec_h +#define SPCollec_h + +#ifndef _INC_LIMITS +#include +#endif + +#ifndef _INC_STRING +#include +#endif + +#ifndef _INC_STDLIB +#include +#endif + +#ifndef _WIN32_WCE +#ifndef _INC_SEARCH +#include +#endif +#endif + +///////////////////////////////////////////////////////////////////////////// +#define SPASSERT_VALID( a ) // This doesn't do anything right now + +typedef void* SPLISTPOS; +typedef DWORD SPLISTHANDLE; + +#define SP_BEFORE_START_POSITION ((void*)-1L) + +inline BOOL SPIsValidAddress(const void* lp, UINT nBytes, BOOL bReadWrite) +{ + // simple version using Win-32 APIs for pointer validation. + return (lp != NULL && !IsBadReadPtr(lp, nBytes) && + (!bReadWrite || !IsBadWritePtr((LPVOID)lp, nBytes))); +} + +///////////////////////////////////////////////////////////////////////////// +// global helpers (can be overridden) +template +inline HRESULT SPConstructElements(TYPE* pElements, int nCount) +{ + HRESULT hr = S_OK; + SPDBG_ASSERT( nCount == 0 || + SPIsValidAddress( pElements, nCount * sizeof(TYPE), TRUE ) ); + + // default is bit-wise zero initialization + memset((void*)pElements, 0, nCount * sizeof(TYPE)); + return hr; +} + +template +inline void SPDestructElements(TYPE* pElements, int nCount) +{ + SPDBG_ASSERT( ( nCount == 0 || + SPIsValidAddress( pElements, nCount * sizeof(TYPE), TRUE ) ) ); + pElements; // not used + nCount; // not used + + // default does nothing +} + +template +inline HRESULT SPCopyElements(TYPE* pDest, const TYPE* pSrc, int nCount) +{ + HRESULT hr = S_OK; + SPDBG_ASSERT( ( nCount == 0 || + SPIsValidAddress( pDest, nCount * sizeof(TYPE), TRUE )) ); + SPDBG_ASSERT( ( nCount == 0 || + SPIsValidAddress( pSrc, nCount * sizeof(TYPE), FALSE )) ); + + // default is bit-wise copy + memcpy(pDest, pSrc, nCount * sizeof(TYPE)); + return hr; +} + +template +BOOL SPCompareElements(const TYPE* pElement1, const ARG_TYPE* pElement2) +{ + SPDBG_ASSERT( SPIsValidAddress( pElement1, sizeof(TYPE), FALSE ) ); + SPDBG_ASSERT( SPIsValidAddress( pElement2, sizeof(ARG_TYPE), FALSE ) ); + return *pElement1 == *pElement2; +} + +template +inline UINT SPHashKey(ARG_KEY key) +{ + // default identity hash - works for most primitive values + return ((UINT)(void*)(DWORD)key) >> 4; +} + +///////////////////////////////////////////////////////////////////////////// +// CSPPlex + +struct CSPPlex // warning variable length structure +{ + CSPPlex* pNext; + UINT nMax; + UINT nCur; + /* BYTE data[maxNum*elementSize]; */ + void* data() { return this+1; } + + static CSPPlex* PASCAL Create( CSPPlex*& pHead, UINT nMax, UINT cbElement ) + { + CSPPlex* p = (CSPPlex*) new BYTE[sizeof(CSPPlex) + nMax * cbElement]; + SPDBG_ASSERT(p); + p->nMax = nMax; + p->nCur = 0; + p->pNext = pHead; + pHead = p; // change head (adds in reverse order for simplicity) + return p; + } + + void FreeDataChain() + { + CSPPlex* p = this; + while (p != NULL) + { + BYTE* bytes = (BYTE*) p; + CSPPlex* pNext = p->pNext; + delete[] bytes; + p = pNext; + } + } +}; + + +///////////////////////////////////////////////////////////////////////////// +// CSPArray + +template +class CSPArray +{ +public: +// Construction + CSPArray(); + +// Attributes + int GetSize() const; + int GetUpperBound() const; + HRESULT SetSize(int nNewSize, int nGrowBy = -1); + +// Operations + // Clean up + void FreeExtra(); + void RemoveAll(); + + // Accessing elements + TYPE GetAt(int nIndex) const; + void SetAt(int nIndex, ARG_TYPE newElement); + TYPE& ElementAt(int nIndex); + + // Direct Access to the element data (may return NULL) + const TYPE* GetData() const; + TYPE* GetData(); + + // Potentially growing the array + HRESULT SetAtGrow(int nIndex, ARG_TYPE newElement); + int Add(ARG_TYPE newElement); + int Append(const CSPArray& src); + HRESULT Copy(const CSPArray& src); + + // overloaded operator helpers + TYPE operator[](int nIndex) const; + TYPE& operator[](int nIndex); + + // Operations that move elements around + HRESULT InsertAt(int nIndex, ARG_TYPE newElement, int nCount = 1); + void RemoveAt(int nIndex, int nCount = 1); + HRESULT InsertAt(int nStartIndex, CSPArray* pNewArray); + void Sort(int (__cdecl *compare )(const void *elem1, const void *elem2 )); + +// Implementation +protected: + TYPE* m_pData; // the actual array of data + int m_nSize; // # of elements (upperBound - 1) + int m_nMaxSize; // max allocated + int m_nGrowBy; // grow amount + +public: + ~CSPArray(); +#ifdef _DEBUG +// void Dump(CDumpContext&) const; + void AssertValid() const; +#endif +}; + +///////////////////////////////////////////////////////////////////////////// +// CSPArray inline functions + +template +inline int CSPArray::GetSize() const + { return m_nSize; } +template +inline int CSPArray::GetUpperBound() const + { return m_nSize-1; } +template +inline void CSPArray::RemoveAll() + { SetSize(0, -1); } +template +inline TYPE CSPArray::GetAt(int nIndex) const + { SPDBG_ASSERT( (nIndex >= 0 && nIndex < m_nSize) ); + return m_pData[nIndex]; } +template +inline void CSPArray::SetAt(int nIndex, ARG_TYPE newElement) + { SPDBG_ASSERT( (nIndex >= 0 && nIndex < m_nSize) ); + m_pData[nIndex] = newElement; } +template +inline TYPE& CSPArray::ElementAt(int nIndex) + { SPDBG_ASSERT( (nIndex >= 0 && nIndex < m_nSize) ); + return m_pData[nIndex]; } +template +inline const TYPE* CSPArray::GetData() const + { return (const TYPE*)m_pData; } +template +inline TYPE* CSPArray::GetData() + { return (TYPE*)m_pData; } +template +inline int CSPArray::Add(ARG_TYPE newElement) + { int nIndex = m_nSize; + SetAtGrow(nIndex, newElement); + return nIndex; } +template +inline TYPE CSPArray::operator[](int nIndex) const + { return GetAt(nIndex); } +template +inline TYPE& CSPArray::operator[](int nIndex) + { return ElementAt(nIndex); } + +///////////////////////////////////////////////////////////////////////////// +// CSPArray out-of-line functions + +template +CSPArray::CSPArray() +{ + m_pData = NULL; + m_nSize = m_nMaxSize = m_nGrowBy = 0; +} + +template +CSPArray::~CSPArray() +{ + SPASSERT_VALID( this ); + + if (m_pData != NULL) + { + SPDestructElements(m_pData, m_nSize); + delete[] (BYTE*)m_pData; + } +} + +template +HRESULT CSPArray::SetSize(int nNewSize, int nGrowBy) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( nNewSize >= 0 ); + HRESULT hr = S_OK; + + if (nGrowBy != -1) + m_nGrowBy = nGrowBy; // set new size + + if (nNewSize == 0) + { + // shrink to nothing + if (m_pData != NULL) + { + SPDestructElements(m_pData, m_nSize); + delete[] (BYTE*)m_pData; + m_pData = NULL; + } + m_nSize = m_nMaxSize = 0; + } + else if (m_pData == NULL) + { + // create one with exact size +#ifdef SIZE_T_MAX + SPDBG_ASSERT( nNewSize <= SIZE_T_MAX/sizeof(TYPE) ); // no overflow +#endif + m_pData = (TYPE*) new BYTE[nNewSize * sizeof(TYPE)]; + if( m_pData ) + { + hr = SPConstructElements(m_pData, nNewSize); + if( SUCCEEDED( hr ) ) + { + m_nSize = m_nMaxSize = nNewSize; + } + else + { + delete[] (BYTE*)m_pData; + m_pData = NULL; + } + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if (nNewSize <= m_nMaxSize) + { + // it fits + if (nNewSize > m_nSize) + { + // initialize the new elements + hr = SPConstructElements(&m_pData[m_nSize], nNewSize-m_nSize); + } + else if (m_nSize > nNewSize) + { + // destroy the old elements + SPDestructElements(&m_pData[nNewSize], m_nSize-nNewSize); + } + + if( SUCCEEDED( hr ) ) + { + m_nSize = nNewSize; + } + } + else + { + // otherwise, grow array + int nGrowBy = m_nGrowBy; + if (nGrowBy == 0) + { + // heuristically determe growth when nGrowBy == 0 + // (this avoids heap fragmentation in many situations) + nGrowBy = min(1024, max(4, m_nSize / 8)); + } + int nNewMax; + if (nNewSize < m_nMaxSize + nGrowBy) + nNewMax = m_nMaxSize + nGrowBy; // granularity + else + nNewMax = nNewSize; // no slush + + SPDBG_ASSERT( nNewMax >= m_nMaxSize ); // no wrap around +#ifdef SIZE_T_MAX + SPDBG_ASSERT( nNewMax <= SIZE_T_MAX/sizeof(TYPE) ); // no overflow +#endif + TYPE* pNewData = (TYPE*) new BYTE[nNewMax * sizeof(TYPE)]; + + if( pNewData ) + { + // copy new data from old + memcpy(pNewData, m_pData, m_nSize * sizeof(TYPE)); + + // construct remaining elements + SPDBG_ASSERT( nNewSize > m_nSize ); + hr = SPConstructElements(&pNewData[m_nSize], nNewSize-m_nSize); + + // get rid of old stuff (note: no destructors called) + delete[] (BYTE*)m_pData; + m_pData = pNewData; + m_nSize = nNewSize; + m_nMaxSize = nNewMax; + } + else + { + hr = E_OUTOFMEMORY; + } + } + return hr; +} + +template +int CSPArray::Append(const CSPArray& src) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( this != &src ); // cannot append to itself + + int nOldSize = m_nSize; + HRESULT hr = SetSize(m_nSize + src.m_nSize); + if( SUCCEEDED( hr ) ) + { + hr = SPCopyElements(m_pData + nOldSize, src.m_pData, src.m_nSize); + } + return ( SUCCEEDED( hr ) )?(nOldSize):(-1); +} + +template +HRESULT CSPArray::Copy(const CSPArray& src) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( this != &src ); // cannot copy to itself + + HRESULT hr = SetSize(src.m_nSize); + if( SUCCEEDED( hr ) ) + { + hr = SPCopyElements(m_pData, src.m_pData, src.m_nSize); + } + return hr; +} + +template +void CSPArray::FreeExtra() +{ + SPASSERT_VALID( this ); + + if (m_nSize != m_nMaxSize) + { + // shrink to desired size +#ifdef SIZE_T_MAX + SPDBG_ASSERT( m_nSize <= SIZE_T_MAX/sizeof(TYPE)); // no overflow +#endif + TYPE* pNewData = NULL; + if (m_nSize != 0) + { + pNewData = (TYPE*) new BYTE[m_nSize * sizeof(TYPE)]; + SPDBG_ASSERT(pNewData); + // copy new data from old + memcpy(pNewData, m_pData, m_nSize * sizeof(TYPE)); + } + + // get rid of old stuff (note: no destructors called) + delete[] (BYTE*)m_pData; + m_pData = pNewData; + m_nMaxSize = m_nSize; + } +} + +template +HRESULT CSPArray::SetAtGrow(int nIndex, ARG_TYPE newElement) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( nIndex >= 0 ); + HRESULT hr = S_OK; + + if (nIndex >= m_nSize) + { + hr = SetSize(nIndex+1, -1); + } + + if( SUCCEEDED( hr ) ) + { + m_pData[nIndex] = newElement; + } + return hr; +} + +template +HRESULT CSPArray::InsertAt(int nIndex, ARG_TYPE newElement, int nCount /*=1*/) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( nIndex >= 0 ); // will expand to meet need + SPDBG_ASSERT( nCount > 0 ); // zero or negative size not allowed + HRESULT hr = S_OK; + + if (nIndex >= m_nSize) + { + // adding after the end of the array + hr = SetSize(nIndex + nCount, -1); // grow so nIndex is valid + } + else + { + // inserting in the middle of the array + int nOldSize = m_nSize; + hr = SetSize(m_nSize + nCount, -1); // grow it to new size + if( SUCCEEDED( hr ) ) + { + // shift old data up to fill gap + memmove(&m_pData[nIndex+nCount], &m_pData[nIndex], + (nOldSize-nIndex) * sizeof(TYPE)); + + // re-init slots we copied from + hr = SPConstructElements(&m_pData[nIndex], nCount); + } + } + + // insert new value in the gap + if( SUCCEEDED( hr ) ) + { + SPDBG_ASSERT( nIndex + nCount <= m_nSize ); + while (nCount--) + m_pData[nIndex++] = newElement; + } + return hr; +} + +template +void CSPArray::RemoveAt(int nIndex, int nCount) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( nIndex >= 0 ); + SPDBG_ASSERT( nCount >= 0 ); + SPDBG_ASSERT( nIndex + nCount <= m_nSize ); + + // just remove a range + int nMoveCount = m_nSize - (nIndex + nCount); + SPDestructElements(&m_pData[nIndex], nCount); + if (nMoveCount) + memcpy(&m_pData[nIndex], &m_pData[nIndex + nCount], + nMoveCount * sizeof(TYPE)); + m_nSize -= nCount; +} + +template +HRESULT CSPArray::InsertAt(int nStartIndex, CSPArray* pNewArray) +{ + SPASSERT_VALID( this ); + SPASSERT_VALID( pNewArray ); + SPDBG_ASSERT( nStartIndex >= 0 ); + HRESULT hr = S_OK; + + if (pNewArray->GetSize() > 0) + { + hr = InsertAt(nStartIndex, pNewArray->GetAt(0), pNewArray->GetSize()); + for (int i = 0; SUCCEEDED( hr )&& (i < pNewArray->GetSize()); i++) + { + SetAt(nStartIndex + i, pNewArray->GetAt(i)); + } + } + return hr; +} + +template +void CSPArray::Sort(int (__cdecl *compare )(const void *elem1, const void *elem2 )) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( m_pData != NULL ); + + qsort( m_pData, m_nSize, sizeof(TYPE), compare ); +} + +#ifdef _DEBUG +template +void CSPArray::AssertValid() const +{ + if (m_pData == NULL) + { + SPDBG_ASSERT( m_nSize == 0 ); + SPDBG_ASSERT( m_nMaxSize == 0 ); + } + else + { + SPDBG_ASSERT( m_nSize >= 0 ); + SPDBG_ASSERT( m_nMaxSize >= 0 ); + SPDBG_ASSERT( m_nSize <= m_nMaxSize ); + SPDBG_ASSERT( SPIsValidAddress(m_pData, m_nMaxSize * sizeof(TYPE), TRUE ) ); + } +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSPList + +template +class CSPList +{ +protected: + struct CNode + { + CNode* pNext; + CNode* pPrev; + TYPE data; + }; +public: + +// Construction + CSPList(int nBlockSize = 10); + +// Attributes (head and tail) + // count of elements + int GetCount() const; + BOOL IsEmpty() const; + + // peek at head or tail + TYPE& GetHead(); + TYPE GetHead() const; + TYPE& GetTail(); + TYPE GetTail() const; + +// Operations + // get head or tail (and remove it) - don't call on empty list ! + TYPE RemoveHead(); + TYPE RemoveTail(); + + // add before head or after tail + SPLISTPOS AddHead(ARG_TYPE newElement); + SPLISTPOS AddTail(ARG_TYPE newElement); + + // add another list of elements before head or after tail + void AddHead(CSPList* pNewList); + void AddTail(CSPList* pNewList); + + // remove all elements + void RemoveAll(); + + // iteration + SPLISTPOS GetHeadPosition() const; + SPLISTPOS GetTailPosition() const; + TYPE& GetNext(SPLISTPOS& rPosition); // return *Position++ + TYPE GetNext(SPLISTPOS& rPosition) const; // return *Position++ + TYPE& GetPrev(SPLISTPOS& rPosition); // return *Position-- + TYPE GetPrev(SPLISTPOS& rPosition) const; // return *Position-- + + // getting/modifying an element at a given position + TYPE& GetAt(SPLISTPOS position); + TYPE GetAt(SPLISTPOS position) const; + void SetAt(SPLISTPOS pos, ARG_TYPE newElement); + void RemoveAt(SPLISTPOS position); + + // inserting before or after a given position + SPLISTPOS InsertBefore(SPLISTPOS position, ARG_TYPE newElement); + SPLISTPOS InsertAfter(SPLISTPOS position, ARG_TYPE newElement); + + // helper functions (note: O(n) speed) + SPLISTPOS Find(ARG_TYPE searchValue, SPLISTPOS startAfter = NULL) const; + // defaults to starting at the HEAD, return NULL if not found + SPLISTPOS FindIndex(int nIndex) const; + // get the 'nIndex'th element (may return NULL) + +// Implementation +protected: + CNode* m_pNodeHead; + CNode* m_pNodeTail; + int m_nCount; + CNode* m_pNodeFree; + struct CSPPlex* m_pBlocks; + int m_nBlockSize; + + CNode* NewNode(CNode*, CNode*); + void FreeNode(CNode*); + +public: + ~CSPList(); +#ifdef _DEBUG + void AssertValid() const; +#endif +}; + +///////////////////////////////////////////////////////////////////////////// +// CSPList inline functions + +template +inline int CSPList::GetCount() const + { return m_nCount; } +template +inline BOOL CSPList::IsEmpty() const + { return m_nCount == 0; } +template +inline TYPE& CSPList::GetHead() + { SPDBG_ASSERT( m_pNodeHead != NULL ); + return m_pNodeHead->data; } +template +inline TYPE CSPList::GetHead() const + { SPDBG_ASSERT( m_pNodeHead != NULL ); + return m_pNodeHead->data; } +template +inline TYPE& CSPList::GetTail() + { SPDBG_ASSERT( m_pNodeTail != NULL ); + return m_pNodeTail->data; } +template +inline TYPE CSPList::GetTail() const + { SPDBG_ASSERT( m_pNodeTail != NULL ); + return m_pNodeTail->data; } +template +inline SPLISTPOS CSPList::GetHeadPosition() const + { return (SPLISTPOS) m_pNodeHead; } +template +inline SPLISTPOS CSPList::GetTailPosition() const + { return (SPLISTPOS) m_pNodeTail; } +template +inline TYPE& CSPList::GetNext(SPLISTPOS& rPosition) // return *Position++ + { CNode* pNode = (CNode*) rPosition; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + rPosition = (SPLISTPOS) pNode->pNext; + return pNode->data; } +template +inline TYPE CSPList::GetNext(SPLISTPOS& rPosition) const // return *Position++ + { CNode* pNode = (CNode*) rPosition; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + rPosition = (SPLISTPOS) pNode->pNext; + return pNode->data; } +template +inline TYPE& CSPList::GetPrev(SPLISTPOS& rPosition) // return *Position-- + { CNode* pNode = (CNode*) rPosition; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + rPosition = (SPLISTPOS) pNode->pPrev; + return pNode->data; } +template +inline TYPE CSPList::GetPrev(SPLISTPOS& rPosition) const // return *Position-- + { CNode* pNode = (CNode*) rPosition; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + rPosition = (SPLISTPOS) pNode->pPrev; + return pNode->data; } +template +inline TYPE& CSPList::GetAt(SPLISTPOS position) + { CNode* pNode = (CNode*) position; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + return pNode->data; } +template +inline TYPE CSPList::GetAt(SPLISTPOS position) const + { CNode* pNode = (CNode*) position; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + return pNode->data; } +template +inline void CSPList::SetAt(SPLISTPOS pos, ARG_TYPE newElement) + { CNode* pNode = (CNode*) pos; + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + pNode->data = newElement; } + +///////////////////////////////////////////////////////////////////////////// +// CSPList out-of-line functions + +template +CSPList::CSPList( int nBlockSize ) +{ + SPDBG_ASSERT( nBlockSize > 0 ); + + m_nCount = 0; + m_pNodeHead = m_pNodeTail = m_pNodeFree = NULL; + m_pBlocks = NULL; + m_nBlockSize = nBlockSize; +} + +template +void CSPList::RemoveAll() +{ + SPASSERT_VALID( this ); + + // destroy elements + CNode* pNode; + for (pNode = m_pNodeHead; pNode != NULL; pNode = pNode->pNext) + SPDestructElements(&pNode->data, 1); + + m_nCount = 0; + m_pNodeHead = m_pNodeTail = m_pNodeFree = NULL; + m_pBlocks->FreeDataChain(); + m_pBlocks = NULL; +} + +template +CSPList::~CSPList() +{ + RemoveAll(); + SPDBG_ASSERT( m_nCount == 0 ); +} + +///////////////////////////////////////////////////////////////////////////// +// Node helpers +// +// Implementation note: CNode's are stored in CSPPlex blocks and +// chained together. Free blocks are maintained in a singly linked list +// using the 'pNext' member of CNode with 'm_pNodeFree' as the head. +// Used blocks are maintained in a doubly linked list using both 'pNext' +// and 'pPrev' as links and 'm_pNodeHead' and 'm_pNodeTail' +// as the head/tail. +// +// We never free a CSPPlex block unless the List is destroyed or RemoveAll() +// is used - so the total number of CSPPlex blocks may grow large depending +// on the maximum past size of the list. +// + +template +CSPList::CNode* +CSPList::NewNode(CSPList::CNode* pPrev, CSPList::CNode* pNext) +{ + if (m_pNodeFree == NULL) + { + // add another block + CSPPlex* pNewBlock = CSPPlex::Create(m_pBlocks, m_nBlockSize,sizeof(CNode)); + + // chain them into free list + CNode* pNode = (CNode*) pNewBlock->data(); + // free in reverse order to make it easier to debug + pNode += m_nBlockSize - 1; + for (int i = m_nBlockSize-1; i >= 0; i--, pNode--) + { + pNode->pNext = m_pNodeFree; + m_pNodeFree = pNode; + } + } + + CSPList::CNode* pNode = m_pNodeFree; + if( pNode ) + { + if( SUCCEEDED( SPConstructElements(&pNode->data, 1) ) ) + { + m_pNodeFree = m_pNodeFree->pNext; + pNode->pPrev = pPrev; + pNode->pNext = pNext; + m_nCount++; + SPDBG_ASSERT( m_nCount > 0 ); // make sure we don't overflow + } + } + return pNode; +} + +template +void CSPList::FreeNode(CSPList::CNode* pNode) +{ + SPDestructElements(&pNode->data, 1); + pNode->pNext = m_pNodeFree; + m_pNodeFree = pNode; + m_nCount--; + SPDBG_ASSERT( m_nCount >= 0 ); // make sure we don't underflow +} + +template +SPLISTPOS CSPList::AddHead(ARG_TYPE newElement) +{ + SPASSERT_VALID( this ); + + CNode* pNewNode = NewNode(NULL, m_pNodeHead); + if( pNewNode ) + { + pNewNode->data = newElement; + if (m_pNodeHead != NULL) + m_pNodeHead->pPrev = pNewNode; + else + m_pNodeTail = pNewNode; + m_pNodeHead = pNewNode; + } + return (SPLISTPOS) pNewNode; +} + +template +SPLISTPOS CSPList::AddTail(ARG_TYPE newElement) +{ + SPASSERT_VALID( this ); + + CNode* pNewNode = NewNode(m_pNodeTail, NULL); + if( pNewNode ) + { + pNewNode->data = newElement; + if (m_pNodeTail != NULL) + m_pNodeTail->pNext = pNewNode; + else + m_pNodeHead = pNewNode; + m_pNodeTail = pNewNode; + } + return (SPLISTPOS) pNewNode; +} + +template +void CSPList::AddHead(CSPList* pNewList) +{ + SPASSERT_VALID( this ); + SPASSERT_VALID( pNewList ); + + // add a list of same elements to head (maintain order) + SPLISTPOS pos = pNewList->GetTailPosition(); + while (pos != NULL) + AddHead(pNewList->GetPrev(pos)); +} + +template +void CSPList::AddTail(CSPList* pNewList) +{ + SPASSERT_VALID( this ); + SPASSERT_VALID( pNewList ); + + // add a list of same elements + SPLISTPOS pos = pNewList->GetHeadPosition(); + while (pos != NULL) + AddTail(pNewList->GetNext(pos)); +} + +template +TYPE CSPList::RemoveHead() +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( m_pNodeHead != NULL ); // don't call on empty list !!! + SPDBG_ASSERT( SPIsValidAddress(m_pNodeHead, sizeof(CNode), TRUE ) ); + + CNode* pOldNode = m_pNodeHead; + TYPE returnValue = pOldNode->data; + + m_pNodeHead = pOldNode->pNext; + if (m_pNodeHead != NULL) + m_pNodeHead->pPrev = NULL; + else + m_pNodeTail = NULL; + FreeNode(pOldNode); + return returnValue; +} + +template +TYPE CSPList::RemoveTail() +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( m_pNodeTail != NULL ); // don't call on empty list !!! + SPDBG_ASSERT( SPIsValidAddress(m_pNodeTail, sizeof(CNode), TRUE ) ); + + CNode* pOldNode = m_pNodeTail; + TYPE returnValue = pOldNode->data; + + m_pNodeTail = pOldNode->pPrev; + if (m_pNodeTail != NULL) + m_pNodeTail->pNext = NULL; + else + m_pNodeHead = NULL; + FreeNode(pOldNode); + return returnValue; +} + +template +SPLISTPOS CSPList::InsertBefore(SPLISTPOS position, ARG_TYPE newElement) +{ + SPASSERT_VALID( this ); + + if (position == NULL) + return AddHead(newElement); // insert before nothing -> head of the list + + // Insert it before position + CNode* pOldNode = (CNode*) position; + CNode* pNewNode = NewNode(pOldNode->pPrev, pOldNode); + if( pNewNode ) + { + pNewNode->data = newElement; + + if (pOldNode->pPrev != NULL) + { + SPDBG_ASSERT( SPIsValidAddress(pOldNode->pPrev, sizeof(CNode), TRUE ) ); + pOldNode->pPrev->pNext = pNewNode; + } + else + { + SPDBG_ASSERT( pOldNode == m_pNodeHead ); + m_pNodeHead = pNewNode; + } + pOldNode->pPrev = pNewNode; + } + return (SPLISTPOS) pNewNode; +} + +template +SPLISTPOS CSPList::InsertAfter(SPLISTPOS position, ARG_TYPE newElement) +{ + SPASSERT_VALID( this ); + + if (position == NULL) + return AddTail(newElement); // insert after nothing -> tail of the list + + // Insert it before position + CNode* pOldNode = (CNode*) position; + SPDBG_ASSERT( SPIsValidAddress(pOldNode, sizeof(CNode), TRUE )); + CNode* pNewNode = NewNode(pOldNode, pOldNode->pNext); + if( pNewNode ) + { + pNewNode->data = newElement; + + if (pOldNode->pNext != NULL) + { + SPDBG_ASSERT( SPIsValidAddress(pOldNode->pNext, sizeof(CNode), TRUE )); + pOldNode->pNext->pPrev = pNewNode; + } + else + { + SPDBG_ASSERT( pOldNode == m_pNodeTail ); + m_pNodeTail = pNewNode; + } + pOldNode->pNext = pNewNode; + } + return (SPLISTPOS) pNewNode; +} + +template +void CSPList::RemoveAt(SPLISTPOS position) +{ + SPASSERT_VALID( this ); + + CNode* pOldNode = (CNode*) position; + SPDBG_ASSERT( SPIsValidAddress(pOldNode, sizeof(CNode), TRUE ) ); + + // remove pOldNode from list + if (pOldNode == m_pNodeHead) + { + m_pNodeHead = pOldNode->pNext; + } + else + { + SPDBG_ASSERT( SPIsValidAddress(pOldNode->pPrev, sizeof(CNode), TRUE ) ); + pOldNode->pPrev->pNext = pOldNode->pNext; + } + if (pOldNode == m_pNodeTail) + { + m_pNodeTail = pOldNode->pPrev; + } + else + { + SPDBG_ASSERT( SPIsValidAddress(pOldNode->pNext, sizeof(CNode), TRUE ) ); + pOldNode->pNext->pPrev = pOldNode->pPrev; + } + FreeNode(pOldNode); +} + +template +SPLISTPOS CSPList::FindIndex(int nIndex) const +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( nIndex >= 0 ); + + if (nIndex >= m_nCount) + return NULL; // went too far + + CNode* pNode = m_pNodeHead; + while (nIndex--) + { + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE )); + pNode = pNode->pNext; + } + return (SPLISTPOS) pNode; +} + +template +SPLISTPOS CSPList::Find(ARG_TYPE searchValue, SPLISTPOS startAfter) const +{ + SPASSERT_VALID( this ); + + CNode* pNode = (CNode*) startAfter; + if (pNode == NULL) + { + pNode = m_pNodeHead; // start at head + } + else + { + SPDBG_ASSERT( SPIsValidAddress(pNode, sizeof(CNode), TRUE ) ); + pNode = pNode->pNext; // start after the one specified + } + + for (; pNode != NULL; pNode = pNode->pNext) + if (SPCompareElements(&pNode->data, &searchValue)) + return (SPLISTPOS)pNode; + return NULL; +} + +#ifdef _DEBUG +template +void CSPList::AssertValid() const +{ + if (m_nCount == 0) + { + // empty list + SPDBG_ASSERT( m_pNodeHead == NULL ); + SPDBG_ASSERT( m_pNodeTail == NULL ); + } + else + { + // non-empty list + SPDBG_ASSERT( SPIsValidAddress(m_pNodeHead, sizeof(CNode), TRUE )); + SPDBG_ASSERT( SPIsValidAddress(m_pNodeTail, sizeof(CNode), TRUE )); + } +} +#endif //_DEBUG + +///////////////////////////////////////////////////////////////////////////// +// CSPMap + +template +class CSPMap +{ +protected: + // Association + struct CAssoc + { + CAssoc* pNext; + UINT nHashValue; // needed for efficient iteration + KEY key; + VALUE value; + }; +public: +// Construction + CSPMap( int nBlockSize = 10 ); + +// Attributes + // number of elements + int GetCount() const; + BOOL IsEmpty() const; + + // Lookup + BOOL Lookup(ARG_KEY key, VALUE& rValue) const; + +// Operations + // Lookup and add if not there + VALUE& operator[](ARG_KEY key); + + // add a new (key, value) pair + void SetAt(ARG_KEY key, ARG_VALUE newValue); + + // removing existing (key, ?) pair + BOOL RemoveKey(ARG_KEY key); + void RemoveAll(); + + // iterating all (key, value) pairs + SPLISTPOS GetStartPosition() const; + void GetNextAssoc(SPLISTPOS& rNextPosition, KEY& rKey, VALUE& rValue) const; + + // advanced features for derived classes + UINT GetHashTableSize() const; + HRESULT InitHashTable(UINT hashSize, BOOL bAllocNow = TRUE); + +// Implementation +protected: + CAssoc** m_pHashTable; + UINT m_nHashTableSize; + int m_nCount; + CAssoc* m_pFreeList; + struct CSPPlex* m_pBlocks; + int m_nBlockSize; + + CAssoc* NewAssoc(); + void FreeAssoc(CAssoc*); + CAssoc* GetAssocAt(ARG_KEY, UINT&) const; + +public: + ~CSPMap(); +#ifdef _DEBUG +// void Dump(CDumpContext&) const; + void AssertValid() const; +#endif +}; + +///////////////////////////////////////////////////////////////////////////// +// CSPMap inline functions + +template +inline int CSPMap::GetCount() const + { return m_nCount; } +template +inline BOOL CSPMap::IsEmpty() const + { return m_nCount == 0; } +template +inline void CSPMap::SetAt(ARG_KEY key, ARG_VALUE newValue) + { (*this)[key] = newValue; } +template +inline SPLISTPOS CSPMap::GetStartPosition() const + { return (m_nCount == 0) ? NULL : SP_BEFORE_START_POSITION; } +template +inline UINT CSPMap::GetHashTableSize() const + { return m_nHashTableSize; } + +///////////////////////////////////////////////////////////////////////////// +// CSPMap out-of-line functions + +template +CSPMap::CSPMap( int nBlockSize ) +{ + SPDBG_ASSERT( nBlockSize > 0 ); + + m_pHashTable = NULL; + m_nHashTableSize = 17; // default size + m_nCount = 0; + m_pFreeList = NULL; + m_pBlocks = NULL; + m_nBlockSize = nBlockSize; +} + +template +HRESULT CSPMap::InitHashTable( + UINT nHashSize, BOOL bAllocNow) +// +// Used to force allocation of a hash table or to override the default +// hash table size of (which is fairly small) +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( m_nCount == 0 ); + SPDBG_ASSERT( nHashSize > 0 ); + HRESULT hr = S_OK; + + if (m_pHashTable != NULL) + { + // free hash table + delete[] m_pHashTable; + m_pHashTable = NULL; + } + + if (bAllocNow) + { + m_pHashTable = new CAssoc* [nHashSize]; + if( m_pHashTable ) + { + memset(m_pHashTable, 0, sizeof(CAssoc*) * nHashSize); + } + else + { + hr = E_OUTOFMEMORY; + } + } + + m_nHashTableSize = ( SUCCEEDED( hr ) )?(nHashSize):(0); + return hr; +} + +template +void CSPMap::RemoveAll() +{ + SPASSERT_VALID( this ); + + if (m_pHashTable != NULL) + { + // destroy elements (values and keys) + for (UINT nHash = 0; nHash < m_nHashTableSize; nHash++) + { + CAssoc* pAssoc; + for( pAssoc = m_pHashTable[nHash]; pAssoc != NULL; + pAssoc = pAssoc->pNext) + { + SPDestructElements(&pAssoc->value, 1); + SPDestructElements(&pAssoc->key, 1); + } + } + } + + // free hash table + delete[] m_pHashTable; + m_pHashTable = NULL; + + m_nCount = 0; + m_pFreeList = NULL; + m_pBlocks->FreeDataChain(); + m_pBlocks = NULL; +} + +template +CSPMap::~CSPMap() +{ + RemoveAll(); + SPDBG_ASSERT( m_nCount == 0 ); +} + +template +CSPMap::CAssoc* +CSPMap::NewAssoc() +{ + if (m_pFreeList == NULL) + { + // add another block + CSPPlex* newBlock = CSPPlex::Create(m_pBlocks, m_nBlockSize, sizeof(CSPMap::CAssoc)); + + if( newBlock ) + { + // chain them into free list + CSPMap::CAssoc* pAssoc = (CSPMap::CAssoc*) newBlock->data(); + // free in reverse order to make it easier to debug + pAssoc += m_nBlockSize - 1; + for (int i = m_nBlockSize-1; i >= 0; i--, pAssoc--) + { + pAssoc->pNext = m_pFreeList; + m_pFreeList = pAssoc; + } + } + } + + CSPMap::CAssoc* pAssoc = m_pFreeList; + if( pAssoc ) + { + if( SUCCEEDED( SPConstructElements(&pAssoc->key, 1 ) ) ) + { + if( SUCCEEDED( SPConstructElements(&pAssoc->value, 1 ) ) ) + { + m_pFreeList = m_pFreeList->pNext; + m_nCount++; + SPDBG_ASSERT( m_nCount > 0 ); // make sure we don't overflow + } + else + { + SPDestructElements( &pAssoc->key, 1 ); + } + } + else + { + pAssoc = NULL; + } + } + return pAssoc; +} + +template +void CSPMap::FreeAssoc(CSPMap::CAssoc* pAssoc) +{ + SPDestructElements(&pAssoc->value, 1); + SPDestructElements(&pAssoc->key, 1); + pAssoc->pNext = m_pFreeList; + m_pFreeList = pAssoc; + m_nCount--; + SPDBG_ASSERT( m_nCount >= 0 ); // make sure we don't underflow +} + +template +CSPMap::CAssoc* +CSPMap::GetAssocAt(ARG_KEY key, UINT& nHash) const +// find association (or return NULL) +{ + nHash = SPHashKey(key) % m_nHashTableSize; + + if (m_pHashTable == NULL) + return NULL; + + // see if it exists + CAssoc* pAssoc; + for (pAssoc = m_pHashTable[nHash]; pAssoc != NULL; pAssoc = pAssoc->pNext) + { + if (SPCompareElements(&pAssoc->key, &key)) + return pAssoc; + } + return NULL; +} + +template +BOOL CSPMap::Lookup(ARG_KEY key, VALUE& rValue) const +{ + SPASSERT_VALID( this ); + + UINT nHash; + CAssoc* pAssoc = GetAssocAt(key, nHash); + if (pAssoc == NULL) + return FALSE; // not in map + + rValue = pAssoc->value; + return TRUE; +} + +template +VALUE& CSPMap::operator[](ARG_KEY key) +{ + SPASSERT_VALID( this ); + HRESULT hr = S_OK; + static const CAssoc ErrAssoc = 0; + + UINT nHash; + CAssoc* pAssoc; + if ((pAssoc = GetAssocAt(key, nHash)) == NULL) + { + if( m_pHashTable == NULL ) + { + hr = InitHashTable(m_nHashTableSize); + } + + if( SUCCEEDED( hr ) ) + { + // it doesn't exist, add a new Association + pAssoc = NewAssoc(); + if( pAssoc ) + { + pAssoc->nHashValue = nHash; + pAssoc->key = key; + // 'pAssoc->value' is a constructed object, nothing more + + // put into hash table + pAssoc->pNext = m_pHashTable[nHash]; + m_pHashTable[nHash] = pAssoc; + } + else + { + pAssoc = &ErrAssoc; + } + } + } + return pAssoc->value; // return new reference +} + +template +BOOL CSPMap::RemoveKey(ARG_KEY key) +// remove key - return TRUE if removed +{ + SPASSERT_VALID( this ); + + if (m_pHashTable == NULL) + return FALSE; // nothing in the table + + CAssoc** ppAssocPrev; + ppAssocPrev = &m_pHashTable[SPHashKey(key) % m_nHashTableSize]; + + CAssoc* pAssoc; + for (pAssoc = *ppAssocPrev; pAssoc != NULL; pAssoc = pAssoc->pNext) + { + if (SPCompareElements(&pAssoc->key, &key)) + { + // remove it + *ppAssocPrev = pAssoc->pNext; // remove from list + FreeAssoc(pAssoc); + return TRUE; + } + ppAssocPrev = &pAssoc->pNext; + } + return FALSE; // not found +} + +template +void CSPMap::GetNextAssoc(SPLISTPOS& rNextPosition, + KEY& rKey, VALUE& rValue) const +{ + SPASSERT_VALID( this ); + SPDBG_ASSERT( m_pHashTable != NULL ); // never call on empty map + + CAssoc* pAssocRet = (CAssoc*)rNextPosition; + SPDBG_ASSERT( pAssocRet != NULL ); + + if (pAssocRet == (CAssoc*) SP_BEFORE_START_POSITION) + { + // find the first association + for (UINT nBucket = 0; nBucket < m_nHashTableSize; nBucket++) + if ((pAssocRet = m_pHashTable[nBucket]) != NULL) + break; + SPDBG_ASSERT( pAssocRet != NULL ); // must find something + } + + // find next association + SPDBG_ASSERT( SPIsValidAddress(pAssocRet, sizeof(CAssoc), TRUE )); + CAssoc* pAssocNext; + if ((pAssocNext = pAssocRet->pNext) == NULL) + { + // go to next bucket + for (UINT nBucket = pAssocRet->nHashValue + 1; + nBucket < m_nHashTableSize; nBucket++) + if ((pAssocNext = m_pHashTable[nBucket]) != NULL) + break; + } + + rNextPosition = (SPLISTPOS) pAssocNext; + + // fill in return data + rKey = pAssocRet->key; + rValue = pAssocRet->value; +} + +#ifdef _DEBUG +template +void CSPMap::AssertValid() const +{ + SPDBG_ASSERT( m_nHashTableSize > 0 ); + SPDBG_ASSERT( (m_nCount == 0 || m_pHashTable != NULL) ); + // non-empty map should have hash table +} +#endif //_DEBUG + +#endif //--- This must be the last line in the file diff --git a/speech/include/spdebug.h b/speech/include/spdebug.h new file mode 100644 index 0000000000..3a68ab7f1e --- /dev/null +++ b/speech/include/spdebug.h @@ -0,0 +1,636 @@ +/******************************************************************************* +* SPDebug.h * +*-----------* +* Description: +* This header file contains debug output services for SAPI5 +*------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +*******************************************************************************/ + +#pragma once + +#include +#include + +#ifdef ASSERT_WITH_STACK +#include "AssertWithStack.h" +#endif + +const TCHAR g_szSpDebugKey[] = _T("SPDebug"); +const TCHAR g_szSpDebugFuncTraceReportMode[] = _T("FuncTraceMode"); +const TCHAR g_szSpDebugFuncTraceReportFile[] = _T("FuncTraceFile"); +const TCHAR g_szSpDebugParamInfoReportMode[] = _T("ParamInfoMode"); +const TCHAR g_szSpDebugParamInfoReportFile[] = _T("ParamInfoFile"); +const TCHAR g_szSpDebugDumpInfoReportMode[] = _T("DumpInfoMode"); +const TCHAR g_szSpDebugDumpInfoReportFile[] = _T("DumpInfoFile"); +const TCHAR g_szSpDebugAssertReportMode[] = _T("AssertMode"); +const TCHAR g_szSpDebugAssertReportFile[] = _T("AssertFile"); +const TCHAR g_szSpDebugHRFailReportMode[] = _T("HRFailMode"); +const TCHAR g_szSpDebugHRFailReportFile[] = _T("HRFailFile"); + +const TCHAR g_szSpDebugAssertSettingsReReadEachTime[] = _T("AssertSettingsReReadEachTime"); +const TCHAR g_szSpDebugServerOnStart[] = _T("DebugServerOnStart"); +const TCHAR g_szSpDebugClientOnStart[] = _T("DebugClientOnStart"); + +const TCHAR g_szSpDebugLog[] = _T("c:\\spdebug.log"); + +#ifdef _DEBUG + +class CSpDebug +{ +public: + + CSpDebug() + { + m_mutex = NULL; + m_reportModePrev = -1; + m_hfilePrev = NULL; + Read(); + } + + ~CSpDebug() + { + if (m_mutex != NULL) + { + CloseHandle(m_mutex); + } + } + + BOOL FuncTrace(BOOL fEnter = TRUE) + { + return fEnter + ? Enter(_CRT_WARN, m_FuncTraceMode, m_szFuncTraceFile) + : Leave(); + } + + BOOL ParamInfo(BOOL fEnter = TRUE) + { + return fEnter + ? Enter(_CRT_WARN, m_ParamInfoMode, m_szParamInfoFile) + : Leave(); + } + + BOOL DumpInfo(BOOL fEnter = TRUE) + { + return fEnter + ? Enter(_CRT_WARN, m_DumpInfoMode, m_szDumpInfoFile) + : Leave(); + } + + BOOL Assert(BOOL fEnter = TRUE) + { + if (m_fAssertSettingsReReadEachTime) + Read(); + + return fEnter + ? Enter(_CRT_ASSERT, m_AssertMode, m_szAssertFile) + : Leave(); + } + + BOOL HRFail(BOOL fEnter = TRUE) + { + return fEnter + ? Enter(_CRT_WARN, m_HRFailMode, m_szHRFailFile) + : Leave(); + } + + BOOL DebugServerOnStart() + { + return m_fDebugServerOnStart; + } + + BOOL DebugClientOnStart() + { + return m_fDebugClientOnStart; + } + +private: + + void Read() + { + HKEY hkeyDebug; + RegCreateKeyEx( + HKEY_CLASSES_ROOT, + g_szSpDebugKey, + 0, + NULL, + 0, + KEY_READ | KEY_WRITE, + NULL, + &hkeyDebug, + NULL); + if (hkeyDebug == NULL) + { + RegCreateKeyEx( + HKEY_CLASSES_ROOT, + g_szSpDebugKey, + 0, + NULL, + 0, + KEY_READ, + NULL, + &hkeyDebug, + NULL); + } + + DWORD dw = sizeof(m_fAssertSettingsReReadEachTime); + if (RegQueryValueEx( + hkeyDebug, + g_szSpDebugAssertSettingsReReadEachTime, + NULL, + NULL, + LPBYTE(&m_fAssertSettingsReReadEachTime), + &dw) != ERROR_SUCCESS) + { + m_fAssertSettingsReReadEachTime = FALSE; + RegSetValueEx( + hkeyDebug, + g_szSpDebugAssertSettingsReReadEachTime, + NULL, + REG_DWORD, + LPBYTE(&m_fAssertSettingsReReadEachTime), + sizeof(m_fAssertSettingsReReadEachTime)); + } + + ReadFor( + hkeyDebug, + g_szSpDebugFuncTraceReportMode, + g_szSpDebugFuncTraceReportFile, + &m_FuncTraceMode, + m_szFuncTraceFile, + 0, + g_szSpDebugLog); + ReadFor( + hkeyDebug, + g_szSpDebugParamInfoReportMode, + g_szSpDebugParamInfoReportFile, + &m_ParamInfoMode, + m_szParamInfoFile, + 0, + g_szSpDebugLog); + ReadFor( + hkeyDebug, + g_szSpDebugDumpInfoReportMode, + g_szSpDebugDumpInfoReportFile, + &m_DumpInfoMode, + m_szDumpInfoFile, + _CRTDBG_MODE_DEBUG, + g_szSpDebugLog); + ReadFor( + hkeyDebug, + g_szSpDebugAssertReportMode, + g_szSpDebugAssertReportFile, + &m_AssertMode, + m_szAssertFile, + _CRTDBG_MODE_WNDW, + g_szSpDebugLog); + ReadFor( + hkeyDebug, + g_szSpDebugHRFailReportMode, + g_szSpDebugHRFailReportFile, + &m_HRFailMode, + m_szHRFailFile, + _CRTDBG_MODE_DEBUG, + g_szSpDebugLog); + + dw = sizeof(m_fDebugServerOnStart); + if (RegQueryValueEx( + hkeyDebug, + g_szSpDebugServerOnStart, + NULL, + NULL, + LPBYTE(&m_fDebugServerOnStart), + &dw) != ERROR_SUCCESS) + { + m_fDebugServerOnStart = FALSE; + RegSetValueEx( + hkeyDebug, + g_szSpDebugServerOnStart, + NULL, + REG_DWORD, + LPBYTE(&m_fDebugServerOnStart), + sizeof(m_fDebugServerOnStart)); + } + + dw = sizeof(m_fDebugClientOnStart); + if (RegQueryValueEx( + hkeyDebug, + g_szSpDebugClientOnStart, + NULL, + NULL, + LPBYTE(&m_fDebugClientOnStart), + &dw) != ERROR_SUCCESS) + { + m_fDebugClientOnStart = FALSE; + RegSetValueEx( + hkeyDebug, + g_szSpDebugClientOnStart, + NULL, + REG_DWORD, + LPBYTE(&m_fDebugClientOnStart), + sizeof(m_fDebugClientOnStart)); + } + + RegCloseKey(hkeyDebug); + } + + void ReadFor( + HKEY hkey, + const TCHAR * pszModeValueName, + const TCHAR * pszFileValueName, + DWORD * pdwModeValue, + TCHAR * pszFileValue, + DWORD dwDefaultModeValue, + const TCHAR * pszDefaultFileValue) + { + DWORD dw = sizeof(*pdwModeValue); + if (RegQueryValueEx( + hkey, + pszModeValueName, + NULL, + NULL, + LPBYTE(pdwModeValue), + &dw) != ERROR_SUCCESS) + { + *pdwModeValue = dwDefaultModeValue; + RegSetValueEx( + hkey, + pszModeValueName, + NULL, + REG_DWORD, + LPBYTE(pdwModeValue), + sizeof(*pdwModeValue)); + } + + dw = MAX_PATH; + if (RegQueryValueEx( + hkey, + pszFileValueName, + NULL, + NULL, + LPBYTE(pszFileValue), + &dw) != ERROR_SUCCESS) + { + _tcscpy(pszFileValue, pszDefaultFileValue); + RegSetValueEx( + hkey, + pszFileValueName, + NULL, + REG_SZ, + LPBYTE(pszFileValue), + MAX_PATH); + } + } + + BOOL Enter(int reportType, DWORD &reportMode, TCHAR * pszFile) + { + if (reportMode != 0) + { + // We'll hold the mutex, until the caller also calls Leave + if (m_mutex == NULL) + { + m_mutex = CreateMutex(NULL, FALSE, _T("SpDebug")); + } + WaitForSingleObject(m_mutex, INFINITE); + + m_reportType = reportType; + m_reportModePrev = _CrtSetReportMode(reportType, reportMode); + if (reportMode & _CRTDBG_MODE_FILE) + { + HANDLE hfile = CreateFile( + pszFile, + GENERIC_READ | GENERIC_WRITE, + FILE_SHARE_READ, + NULL, + OPEN_ALWAYS, + 0, + NULL); + SetFilePointer(hfile, 0, NULL, FILE_END); + m_hfilePrev = (_HFILE)_CrtSetReportFile(reportType, (_HFILE)hfile); + } + + return TRUE; + } + + return FALSE; + } + + BOOL Leave() + { + int reportMode = _CrtSetReportMode(m_reportType, m_reportModePrev); + if (reportMode & _CRTDBG_MODE_FILE) + { + CloseHandle((_HFILE)_CrtSetReportFile(m_reportType, (_HFILE)m_hfilePrev)); + } + + ReleaseMutex(m_mutex); + + return TRUE; + } + +private: + + HANDLE m_mutex; + + int m_reportType; + int m_reportModePrev; + _HFILE m_hfilePrev; + + BOOL m_fAssertSettingsReReadEachTime; + + DWORD m_FuncTraceMode; + TCHAR m_szFuncTraceFile[MAX_PATH + 1]; + DWORD m_ParamInfoMode; + TCHAR m_szParamInfoFile[MAX_PATH + 1]; + DWORD m_DumpInfoMode; + TCHAR m_szDumpInfoFile[MAX_PATH + 1]; + DWORD m_AssertMode; + TCHAR m_szAssertFile[MAX_PATH + 1]; + DWORD m_HRFailMode; + TCHAR m_szHRFailFile[MAX_PATH + 1]; + + BOOL m_fDebugServerOnStart; + BOOL m_fDebugClientOnStart; +}; + +inline CSpDebug *PSpDebug() +{ + static CSpDebug debug; + return &debug; +} + +class CSpFuncTrace +{ +public: + + CSpFuncTrace(PCHAR pFuncName) + { + m_pFuncName = pFuncName; + if (PSpDebug()->FuncTrace()) + { + _RPT1( _CRT_WARN, "\nEntering Function: %s\n", m_pFuncName ); + PSpDebug()->FuncTrace(FALSE); + } + } + + ~CSpFuncTrace() + { + if (PSpDebug()->FuncTrace()) + { + _RPT1( _CRT_WARN, "Leaving Function: %s\n", m_pFuncName ); + PSpDebug()->FuncTrace(FALSE); + } + } + +private: + + PCHAR m_pFuncName; +}; + +#endif // _DEBUG + +//=== User macros ============================================================== + +#ifdef _DEBUG + +#define SPDBG_FUNC(name) \ + CSpFuncTrace functrace(name) + +#if defined(ASSERT_WITH_STACK) && !defined(_WIN64) +#define SPDBG_REPORT_ON_FAIL(hr) \ + do \ + { \ + HRESULT _hr = (hr); \ + if (FAILED(_hr) && PSpDebug()->HRFail()) \ + { \ + SYSTEMTIME sysTime; \ + GetLocalTime(&sysTime); \ + CHAR pszHrWithTime[100]; \ + sprintf(pszHrWithTime, "%lX\n\n%d.%d.%d %02d:%02d:%02d", \ + _hr, \ + sysTime.wMonth,sysTime.wDay,sysTime.wYear, \ + sysTime.wHour,sysTime.wMinute,sysTime.wSecond); \ + PCHAR pszStack = \ + (PCHAR)_alloca( \ + cchMaxAssertStackLevelStringLen * \ + cfrMaxAssertStackLevels + 1); \ + GetStringFromStackLevels(0, 10, pszStack); \ + _RPT4(_CRT_WARN, \ + "%s(%d): Failed HR = %s\n\n%s\n", \ + __FILE__, \ + __LINE__, \ + pszHrWithTime, \ + pszStack); \ + PSpDebug()->HRFail(FALSE); \ + } \ + } while (0) +#else // ASSERT_WITH_STACK & !_WIN64 +#define SPDBG_REPORT_ON_FAIL(hr) \ + do \ + { \ + HRESULT _hr = (hr); \ + if (FAILED(_hr) && PSpDebug()->HRFail()) \ + { \ + _RPT3(_CRT_WARN, "%s(%d): Failed HR = %lX\n", __FILE__, __LINE__, (_hr) );\ + PSpDebug()->HRFail(FALSE); \ + } \ + } while (0) +#endif // ASSERT_WITH_STACK + +#define SPDBG_ASSERT(expr) \ + do \ + { \ + if (!(expr)) \ + { \ + if (PSpDebug()->Assert()) \ + { \ + _ASSERTE( expr ); \ + PSpDebug()->Assert(FALSE); \ + } \ + } \ + } \ + while (0) + +#define SPDBG_VERIFY(expr) \ + SPDBG_ASSERT(expr) + +#define SPDBG_PMSG0(format) \ + do \ + { \ + if (PSpDebug()->ParamInfo()) \ + { \ + _RPT0(_CRT_WARN, format); \ + PSpDebug()->ParamInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_PMSG1(format, arg1) \ + do \ + { \ + if (PSpDebug()->ParamInfo()) \ + { \ + _RPT1(_CRT_WARN, format, arg1); \ + PSpDebug()->ParamInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_PMSG2(format, arg1, arg2) \ + do \ + { \ + if (PSpDebug()->ParamInfo()) \ + { \ + _RPT2(_CRT_WARN, format, arg1, arg2); \ + PSpDebug()->ParamInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_PMSG3(format, arg1, arg2, arg3) \ + do \ + { \ + if (PSpDebug()->ParamInfo()) \ + { \ + _RPT3(_CRT_WARN, format, arg1, arg2, arg3); \ + PSpDebug()->ParamInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_PMSG4(format, arg1, arg2, arg3, arg4) \ + do \ + { \ + if (PSpDebug()->ParamInfo()) \ + { \ + _RPT4(_CRT_WARN, format, arg1, arg2, arg3, arg4); \ + PSpDebug()->ParamInfo(FALSE); \ + } \ + } while (0) + +#define SPDBG_DMSG0(format) \ + do \ + { \ + if (PSpDebug()->DumpInfo()) \ + { \ + _RPT0(_CRT_WARN, format); \ + PSpDebug()->DumpInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_DMSG1(format, arg1) \ + do \ + { \ + if (PSpDebug()->DumpInfo()) \ + { \ + _RPT1(_CRT_WARN, format, arg1); \ + PSpDebug()->DumpInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_DMSG2(format, arg1, arg2) \ + do \ + { \ + if (PSpDebug()->DumpInfo()) \ + { \ + _RPT2(_CRT_WARN, format, arg1, arg2); \ + PSpDebug()->DumpInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_DMSG3(format, arg1, arg2, arg3) \ + do \ + { \ + if (PSpDebug()->DumpInfo()) \ + { \ + _RPT3(_CRT_WARN, format, arg1, arg2, arg3); \ + PSpDebug()->DumpInfo(FALSE); \ + } \ + } while (0) +#define SPDBG_DMSG4(format, arg1, arg2, arg3, arg4) \ + do \ + { \ + if (PSpDebug()->DumpInfo()) \ + { \ + _RPT4(_CRT_WARN, format, arg1, arg2, arg3, arg4); \ + PSpDebug()->DumpInfo(FALSE); \ + } \ + } while (0) + +#define SPDBG_RETURN(hr) \ + { \ + HRESULT __hr = (hr); \ + if (FAILED(__hr)) \ + { \ + SPDBG_REPORT_ON_FAIL(__hr); \ + } \ + return __hr; \ + } + +#define SPDBG_DEBUG_SERVER_ON_START() \ + { \ + if (PSpDebug()->DebugServerOnStart()) \ + { \ + if (MessageBox( \ + GetDesktopWindow(), \ + _T("Attach Debugger to the SAPI Server process?"), \ + _T("SAPI"), \ + MB_YESNO) == IDYES) \ + { \ + USES_CONVERSION; \ + TCHAR szCommand[MAX_PATH + 1]; \ + wsprintf( \ + szCommand, \ + _T("msdev -p %d"), \ + GetCurrentProcessId()); \ + system(T2A(szCommand)); \ + } \ + } \ + } + +#define SPDBG_DEBUG_CLIENT_ON_START() \ + { \ + if (PSpDebug()->DebugClientOnStart()) \ + { \ + TCHAR szModule[MAX_PATH + 1]; \ + szModule[0] = '\0'; \ + TCHAR * pszSapiServer = \ + _T("sapisvr.exe"); \ + GetModuleFileName( \ + NULL, \ + szModule, \ + MAX_PATH); \ + if ((_tcslen(szModule) <= \ + _tcslen(pszSapiServer) || \ + _tcsicmp( \ + szModule + \ + _tcslen(szModule) - \ + _tcslen(pszSapiServer), \ + pszSapiServer) != 0) && \ + MessageBox( \ + GetDesktopWindow(), \ + _T("Attach Debugger to the SAPI Client process?"), \ + _T("SAPI"), \ + MB_YESNO) == IDYES) \ + { \ + USES_CONVERSION; \ + TCHAR szCommand[MAX_PATH + 1]; \ + wsprintf( \ + szCommand, \ + _T("msdev -p %d"), \ + GetCurrentProcessId()); \ + system(T2A(szCommand)); \ + } \ + } \ + } + +#else // _DEBUG + +#define SPDBG_FUNC(name) +#define SPDBG_REPORT_ON_FAIL(hr) +#define SPDBG_ASSERT(expr) +#define SPDBG_VERIFY(expr) (expr) +#define SPDBG_PMSG0(format) +#define SPDBG_PMSG1(format, arg1) +#define SPDBG_PMSG2(format, arg1, arg2) +#define SPDBG_PMSG3(format, arg1, arg2, arg3) +#define SPDBG_PMSG4(format, arg1, arg2, arg3, arg4) +#define SPDBG_DMSG0(format) +#define SPDBG_DMSG1(format, arg1) +#define SPDBG_DMSG2(format, arg1, arg2) +#define SPDBG_DMSG3(format, arg1, arg2, arg3) +#define SPDBG_DMSG4(format, arg1, arg2, arg3, arg4) +#define SPDBG_RETURN(hr) return (hr) +#define SPDBG_DEBUG_SERVER_ON_START() +#define SPDBG_DEBUG_CLIENT_ON_START() + +#endif // _DEBUG diff --git a/speech/include/sperror.h b/speech/include/sperror.h new file mode 100644 index 0000000000..9edbd9585f --- /dev/null +++ b/speech/include/sperror.h @@ -0,0 +1,559 @@ +/******************************************************************************* +* SPError.h * +*-----------* +* Description: +* This header file contains the custom error codes specific to SAPI5 +*------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +*******************************************************************************/ +#ifndef SPError_h +#define SPError_h + +#ifndef _WINERROR_ +#include +#endif + +#define FACILITY_SAPI FACILITY_ITF +#define SAPI_ERROR_BASE 0x5000 + +#define MAKE_SAPI_HRESULT(sev, err) MAKE_HRESULT(sev, FACILITY_SAPI, err) +#define MAKE_SAPI_ERROR(err) MAKE_SAPI_HRESULT(SEVERITY_ERROR, err + SAPI_ERROR_BASE) +#define MAKE_SAPI_SCODE(scode) MAKE_SAPI_HRESULT(SEVERITY_SUCCESS, scode + SAPI_ERROR_BASE) + +/*** SPERR_UNINITIALIZED 0x80045001 -2147201023 +* The object has not been properly initialized. +*/ +#define SPERR_UNINITIALIZED MAKE_SAPI_ERROR(0x001) + +/*** SPERR_ALREADY_INITIALIZED 0x80045002 -2147201022 +* The object has already been initialized. +*/ +#define SPERR_ALREADY_INITIALIZED MAKE_SAPI_ERROR(0x002) + +/*** SPERR_UNSUPPORTED_FORMAT 0x80045003 -2147201021 +* The caller has specified an unsupported format. +*/ +#define SPERR_UNSUPPORTED_FORMAT MAKE_SAPI_ERROR(0x003) + +/*** SPERR_INVALID_FLAGS 0x80045004 -2147201020 +* The caller has specified invalid flags for this operation. +*/ +#define SPERR_INVALID_FLAGS MAKE_SAPI_ERROR(0x004) + +/*** SP_END_OF_STREAM 0x00045005 282629 +* The operation has reached the end of stream. +*/ +#define SP_END_OF_STREAM MAKE_SAPI_SCODE(0x005) + +/*** SPERR_DEVICE_BUSY 0x80045006 -2147201018 +* The wave device is busy. +*/ +#define SPERR_DEVICE_BUSY MAKE_SAPI_ERROR(0x006) + +/*** SPERR_DEVICE_NOT_SUPPORTED 0x80045007 -2147201017 +* The wave device is not supported. +*/ +#define SPERR_DEVICE_NOT_SUPPORTED MAKE_SAPI_ERROR(0x007) + +/*** SPERR_DEVICE_NOT_ENABLED 0x80045008 -2147201016 +* The wave device is not enabled. +*/ +#define SPERR_DEVICE_NOT_ENABLED MAKE_SAPI_ERROR(0x008) + +/*** SPERR_NO_DRIVER 0x80045009 -2147201015 +* There is no wave driver installed. +*/ +#define SPERR_NO_DRIVER MAKE_SAPI_ERROR(0x009) + +/*** SPERR_FILEMUSTBEUNICODE 0x8004500a -2147201014 +* The file must be Unicode. +*/ +#define SPERR_FILE_MUST_BE_UNICODE MAKE_SAPI_ERROR(0x00a) + +/*** SP_INSUFFICIENTDATA 0x0004500b 282635 +* +*/ +#define SP_INSUFFICIENT_DATA MAKE_SAPI_SCODE(0x00b) + +/*** SPERR_INVALID_PHRASE_ID 0x8004500c -2147201012 +* The phrase ID specified does not exist or is out of range. +*/ +#define SPERR_INVALID_PHRASE_ID MAKE_SAPI_ERROR(0x00c) + +/*** SPERR_BUFFER_TOO_SMALL 0x8004500d -2147201011 +* The caller provided a buffer too small to return a result. +*/ +#define SPERR_BUFFER_TOO_SMALL MAKE_SAPI_ERROR(0x00d) + +/*** SPERR_FORMAT_NOT_SPECIFIED 0x8004500e -2147201010 +* Caller did not specify a format prior to opening a stream. +*/ +#define SPERR_FORMAT_NOT_SPECIFIED MAKE_SAPI_ERROR(0x00e) + +/*** SPERR_AUDIO_STOPPED 0x8004500f -2147201009 +* This method is deprecated. Use SP_AUDIO_STOPPED instead. +*/ +#define SPERR_AUDIO_STOPPED MAKE_SAPI_ERROR(0x00f) + +/*** SP_AUDIO_PAUSED 0x00045010 282640 +* This will be returned only on input (read) streams when the stream is paused. Reads on +* paused streams will not block, and this return code indicates that all of the data has been +* removed from the stream. +*/ +#define SP_AUDIO_PAUSED MAKE_SAPI_SCODE(0x010) + +/*** SPERR_RULE_NOT_FOUND 0x80045011 -2147201007 +* Invalid rule name passed to ActivateGrammar. +*/ +#define SPERR_RULE_NOT_FOUND MAKE_SAPI_ERROR(0x011) + +/*** SPERR_TTS_ENGINE_EXCEPTION 0x80045012 -2147201006 +* An exception was raised during a call to the current TTS driver. +*/ +#define SPERR_TTS_ENGINE_EXCEPTION MAKE_SAPI_ERROR(0x012) + +/*** SPERR_TTS_NLP_EXCEPTION 0x80045013 -2147201005 +* An exception was raised during a call to an application sentence filter. +*/ +#define SPERR_TTS_NLP_EXCEPTION MAKE_SAPI_ERROR(0x013) + +/*** SPERR_ENGINE_BUSY 0x80045014 -2147201004 +* In speech recognition, the current method can not be performed while +* a grammar rule is active. +*/ +#define SPERR_ENGINE_BUSY MAKE_SAPI_ERROR(0x014) + +/*** SP_AUDIO_CONVERSION_ENABLED 0x00045015 282645 +* The operation was successful, but only with automatic stream format conversion. +*/ +#define SP_AUDIO_CONVERSION_ENABLED MAKE_SAPI_SCODE(0x015) + +/*** SP_NO_HYPOTHESIS_AVAILABLE 0x00045016 282646 +* There is currently no hypothesis recognition available. +*/ +#define SP_NO_HYPOTHESIS_AVAILABLE MAKE_SAPI_SCODE(0x016) + +/*** SPERR_CANT_CREATE 0x80045017 -2147201001 +* Can not create a new object instance for the specified object category. +*/ +#define SPERR_CANT_CREATE MAKE_SAPI_ERROR(0x017) + +/*** SP_ALREADY_IN_LEX 0x00045018 282648 +* The word, pronunciation, or POS pair being added is already in lexicon. +*/ +#define SP_ALREADY_IN_LEX MAKE_SAPI_SCODE(0x018) + +/*** SPERR_NOT_IN_LEX 0x80045019 -2147200999 +* The word does not exist in the lexicon. +*/ +#define SPERR_NOT_IN_LEX MAKE_SAPI_ERROR(0x019) + +/*** SP_LEX_NOTHING_TO_SYNC 0x0004501a 282650 +* The client is currently synced with the lexicon. +*/ +#define SP_LEX_NOTHING_TO_SYNC MAKE_SAPI_SCODE(0x01a) + +/*** SPERR_LEX_VERY_OUT_OF_SYNC 0x8004501b -2147200997 +* The client is excessively out of sync with the lexicon. Mismatches may not be incrementally sync'd. +*/ +#define SPERR_LEX_VERY_OUT_OF_SYNC MAKE_SAPI_ERROR(0x01b) + +/*** SPERR_UNDEFINED_FORWARD_RULE_REF 0x8004501c -2147200996 +* A rule reference in a grammar was made to a named rule that was never defined. +*/ +#define SPERR_UNDEFINED_FORWARD_RULE_REF MAKE_SAPI_ERROR(0x01c) + +/*** SPERR_EMPTY_RULE 0x8004501d -2147200995 +* A non-dynamic grammar rule that has no body. +*/ +#define SPERR_EMPTY_RULE MAKE_SAPI_ERROR(0x01d) + +/*** SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR 0x8004501e -2147200994 +* The grammar compiler failed due to an internal state error. +*/ +#define SPERR_GRAMMAR_COMPILER_INTERNAL_ERROR MAKE_SAPI_ERROR(0x01e) + + +/*** SPERR_RULE_NOT_DYNAMIC 0x8004501f -2147200993 +* An attempt was made to modify a non-dynamic rule. +*/ +#define SPERR_RULE_NOT_DYNAMIC MAKE_SAPI_ERROR(0x01f) + +/*** SPERR_DUPLICATE_RULE_NAME 0x80045020 -2147200992 +* A rule name was duplicated. +*/ +#define SPERR_DUPLICATE_RULE_NAME MAKE_SAPI_ERROR(0x020) + +/*** SPERR_DUPLICATE_RESOURCE_NAME 0x80045021 -2147200991 +* A resource name was duplicated for a given rule. +*/ +#define SPERR_DUPLICATE_RESOURCE_NAME MAKE_SAPI_ERROR(0x021) + + +/*** SPERR_TOO_MANY_GRAMMARS 0x80045022 -2147200990 +* Too many grammars have been loaded. +*/ +#define SPERR_TOO_MANY_GRAMMARS MAKE_SAPI_ERROR(0x022) + +/*** SPERR_CIRCULAR_REFERENCE 0x80045023 -2147200989 +* Circular reference in import rules of grammars. +*/ +#define SPERR_CIRCULAR_REFERENCE MAKE_SAPI_ERROR(0x023) + +/*** SPERR_INVALID_IMPORT 0x80045024 -2147200988 +* A rule reference to an imported grammar that could not be resolved. +*/ +#define SPERR_INVALID_IMPORT MAKE_SAPI_ERROR(0x024) + +/*** SPERR_INVALID_WAV_FILE 0x80045025 -2147200987 +* The format of the WAV file is not supported. +*/ +#define SPERR_INVALID_WAV_FILE MAKE_SAPI_ERROR(0x025) + +/*** SP_REQUEST_PENDING 0x00045026 282662 +* This success code indicates that an SR method called with the SPRIF_ASYNC flag is +* being processed. When it has finished processing, an SPFEI_ASYNC_COMPLETED event will be generated. +*/ +#define SP_REQUEST_PENDING MAKE_SAPI_SCODE(0x026) + +/*** SPERR_ALL_WORDS_OPTIONAL 0x80045027 -2147200985 +* A grammar rule was defined with a null path through the rule. That is, it is possible +* to satisfy the rule conditions with no words. +*/ +#define SPERR_ALL_WORDS_OPTIONAL MAKE_SAPI_ERROR(0x027) + +/*** SPERR_INSTANCE_CHANGE_INVALID 0x80045028 -2147200984 +* It is not possible to change the current engine or input. This occurs in the +* following cases: +* +* 1) SelectEngine called while a recognition context exists, or +* 2) SetInput called in the shared instance case. +*/ +#define SPERR_INSTANCE_CHANGE_INVALID MAKE_SAPI_ERROR(0x028) + +/*** SPERR_RULE_NAME_ID_CONFLICT 0x80045029 -2147200983 +* A rule exists with matching IDs (names) but different names (IDs). +*/ +#define SPERR_RULE_NAME_ID_CONFLICT MAKE_SAPI_ERROR(0x029) + +/*** SPERR_NO_RULES 0x8004502a -2147200982 +* A grammar contains no top-level, dynamic, or exported rules. There is no possible +* way to activate or otherwise use any rule in this grammar. +*/ +#define SPERR_NO_RULES MAKE_SAPI_ERROR(0x02a) + +/*** SPERR_CIRCULAR_RULE_REF 0x8004502b -2147200981 +* Rule 'A' refers to a second rule 'B' which, in turn, refers to rule 'A'. +*/ +#define SPERR_CIRCULAR_RULE_REF MAKE_SAPI_ERROR(0x02b) + +/*** SP_NO_PARSE_FOUND 0x0004502c 282668 +* Parse path cannot be parsed given the currently active rules. +*/ +#define SP_NO_PARSE_FOUND MAKE_SAPI_SCODE(0x02c) + +/*** SPERR_NO_PARSE_FOUND 0x8004502d -2147200979 +* Parse path cannot be parsed given the currently active rules. +*/ +#define SPERR_INVALID_HANDLE MAKE_SAPI_ERROR(0x02d) + +/*** SPERR_REMOTE_CALL_TIMED_OUT 0x8004502e -2147200978 +* A marshaled remote call failed to respond. +*/ +#define SPERR_REMOTE_CALL_TIMED_OUT MAKE_SAPI_ERROR(0x02e) + +/*** SPERR_AUDIO_BUFFER_OVERFLOW 0x8004502f -2147200977 +* This will only be returned on input (read) streams when the stream is paused because +* the SR driver has not retrieved data recently. +*/ +#define SPERR_AUDIO_BUFFER_OVERFLOW MAKE_SAPI_ERROR(0x02f) + + +/*** SPERR_NO_AUDIO_DATA 0x80045030 -2147200976 +* The result does not contain any audio, nor does the portion of the element chain of the result +* contain any audio. +*/ +#define SPERR_NO_AUDIO_DATA MAKE_SAPI_ERROR(0x030) + +/*** SPERR_DEAD_ALTERNATE 0x80045031 -2147200975 +* This alternate is no longer a valid alternate to the result it was obtained from. +* Returned from ISpPhraseAlt methods. +*/ +#define SPERR_DEAD_ALTERNATE MAKE_SAPI_ERROR(0x031) + +/*** SPERR_HIGH_LOW_CONFIDENCE 0x80045032 -2147200974 +* The result does not contain any audio, nor does the portion of the element chain of the result +* contain any audio. Returned from ISpResult::GetAudio and ISpResult::SpeakAudio. +*/ +#define SPERR_HIGH_LOW_CONFIDENCE MAKE_SAPI_ERROR(0x032) + +/*** SPERR_INVALID_FORMAT_STRING 0x80045033 -2147200973 +* The XML format string for this RULEREF is invalid, e.g. not a GUID or REFCLSID. +*/ +#define SPERR_INVALID_FORMAT_STRING MAKE_SAPI_ERROR(0x033) + +/*** SP_UNSUPPORTED_ON_STREAM_INPUT 0x00045034 282676 +* The operation is not supported for stream input. +*/ +#define SP_UNSUPPORTED_ON_STREAM_INPUT MAKE_SAPI_SCODE(0x034) + +/*** SPERR_APPLEX_READ_ONLY 0x80045035 -2147200971 +* The operation is invalid for all but newly created application lexicons. +*/ +#define SPERR_APPLEX_READ_ONLY MAKE_SAPI_ERROR(0x035) + +/*** SPERR_NO_TERMINATING_RULE_PATH 0x80045036 -2147200970 +* +*/ + +#define SPERR_NO_TERMINATING_RULE_PATH MAKE_SAPI_ERROR(0x036) + +/*** SP_WORD_EXISTS_WITHOUT_PRONUNCIATION 0x00045037 282679 +* The word exists but without pronunciation. +*/ +#define SP_WORD_EXISTS_WITHOUT_PRONUNCIATION MAKE_SAPI_SCODE(0x037) + +/*** SPERR_STREAM_CLOSED 0x80045038 -2147200968 +* An operation was attempted on a stream object that has been closed. +*/ +#define SPERR_STREAM_CLOSED MAKE_SAPI_ERROR(0x038) + +// --- The following error codes are taken directly from WIN32 --- + +/*** SPERR_NO_MORE_ITEMS 0x80045039 -2147200967 +* When enumerating items, the requested index is greater than the count of items. +*/ +#define SPERR_NO_MORE_ITEMS MAKE_SAPI_ERROR(0x039) + +/*** SPERR_NOT_FOUND 0x8004503a -2147200966 +* The requested data item (data key, value, etc.) was not found. +*/ +#define SPERR_NOT_FOUND MAKE_SAPI_ERROR(0x03a) + +/*** SPERR_INVALID_AUDIO_STATE 0x8004503b -2147200965 +* Audio state passed to SetState() is invalid. +*/ +#define SPERR_INVALID_AUDIO_STATE MAKE_SAPI_ERROR(0x03b) + +/*** SPERR_GENERIC_MMSYS_ERROR 0x8004503c -2147200964 +* A generic MMSYS error not caught by _MMRESULT_TO_HRESULT. +*/ +#define SPERR_GENERIC_MMSYS_ERROR MAKE_SAPI_ERROR(0x03c) + +/*** SPERR_MARSHALER_EXCEPTION 0x8004503d -2147200963 +* An exception was raised during a call to the marshaling code. +*/ +#define SPERR_MARSHALER_EXCEPTION MAKE_SAPI_ERROR(0x03d) + +/*** SPERR_NOT_DYNAMIC_GRAMMAR 0x8004503e -2147200962 +* Attempt was made to manipulate a non-dynamic grammar. +*/ +#define SPERR_NOT_DYNAMIC_GRAMMAR MAKE_SAPI_ERROR(0x03e) + +/*** SPERR_AMBIGUOUS_PROPERTY 0x8004503f -2147200961 +* Cannot add ambiguous property. +*/ +#define SPERR_AMBIGUOUS_PROPERTY MAKE_SAPI_ERROR(0x03f) + +/*** SPERR_INVALID_REGISTRY_KEY 0x80045040 -2147200960 +* The key specified is invalid. +*/ +#define SPERR_INVALID_REGISTRY_KEY MAKE_SAPI_ERROR(0x040) + +/*** SPERR_INVALID_TOKEN_ID 0x80045041 -2147200959 +* The token specified is invalid. +*/ +#define SPERR_INVALID_TOKEN_ID MAKE_SAPI_ERROR(0x041) + +/*** SPERR_XML_BAD_SYNTAX 0x80045042 -2147200958 +* The xml parser failed due to bad syntax. +*/ +#define SPERR_XML_BAD_SYNTAX MAKE_SAPI_ERROR(0x042) + +/*** SPERR_XML_RESOURCE_NOT_FOUND 0x80045043 -2147200957 +* The xml parser failed to load a required resource (e.g., voice, phoneconverter, etc.). +*/ +#define SPERR_XML_RESOURCE_NOT_FOUND MAKE_SAPI_ERROR(0x043) + +/*** SPERR_TOKEN_IN_USE 0x80045044 -2147200956 +* Attempted to remove registry data from a token that is already in use elsewhere. +*/ +#define SPERR_TOKEN_IN_USE MAKE_SAPI_ERROR(0x044) + +/*** SPERR_TOKEN_DELETED 0x80045045 -2147200955 +* Attempted to perform an action on an object token that has had associated registry key deleted. +*/ +#define SPERR_TOKEN_DELETED MAKE_SAPI_ERROR(0x045) + +/*** SPERR_MULTI_LINGUAL_NOT_SUPPORTED 0x80045046 -2147200954 +* The selected voice was registered as multi-lingual. SAPI does not support multi-lingual registration. +*/ +#define SPERR_MULTI_LINGUAL_NOT_SUPPORTED MAKE_SAPI_ERROR(0x046) + +/*** SPERR_EXPORT_DYNAMIC_RULE 0x80045047 -2147200953 +* Exported rules cannot refer directly or indirectly to a dynamic rule. +*/ +#define SPERR_EXPORT_DYNAMIC_RULE MAKE_SAPI_ERROR(0x047) + +/*** SPERR_STGF_ERROR 0x80045048 -2147200952 +* Error parsing the SAPI Text Grammar Format (XML grammar). +*/ +#define SPERR_STGF_ERROR MAKE_SAPI_ERROR(0x048) + +/*** SPERR_WORDFORMAT_ERROR 0x80045049 -2147200951 +* Incorrect word format, probably due to incorrect pronunciation string. +*/ +#define SPERR_WORDFORMAT_ERROR MAKE_SAPI_ERROR(0x049) + +/*** SPERR_STREAM_NOT_ACTIVE 0x8004504a -2147200950 +* Methods associated with active audio stream cannot be called unless stream is active. +*/ +#define SPERR_STREAM_NOT_ACTIVE MAKE_SAPI_ERROR(0x04a) + +/*** SPERR_ENGINE_RESPONSE_INVALID 0x8004504b -2147200949 +* Arguments or data supplied by the engine are in an invalid format or are inconsistent. +*/ +#define SPERR_ENGINE_RESPONSE_INVALID MAKE_SAPI_ERROR(0x04b) + +/*** SPERR_SR_ENGINE_EXCEPTION 0x8004504c -2147200948 +* An exception was raised during a call to the current SR engine. +*/ +#define SPERR_SR_ENGINE_EXCEPTION MAKE_SAPI_ERROR(0x04c) + +/*** SPERR_STREAM_POS_INVALID 0x8004504d -2147200947 +* Stream position information supplied from engine is inconsistent. +*/ +#define SPERR_STREAM_POS_INVALID MAKE_SAPI_ERROR(0x04d) + +/*** SP_RECOGNIZER_INACTIVE 0x0004504e 282702 +* Operation could not be completed because the recognizer is inactive. It is inactive either +* because the recognition state is currently inactive or because no rules are active . +*/ +#define SP_RECOGNIZER_INACTIVE MAKE_SAPI_SCODE(0x04e) + +/*** SPERR_REMOTE_CALL_ON_WRONG_THREAD 0x8004504f -2147200945 +* When making a remote call to the server, the call was made on the wrong thread. +*/ +#define SPERR_REMOTE_CALL_ON_WRONG_THREAD MAKE_SAPI_ERROR(0x04f) + +/*** SPERR_REMOTE_PROCESS_TERMINATED 0x80045050 -2147200944 +* The remote process terminated unexpectedly. +*/ +#define SPERR_REMOTE_PROCESS_TERMINATED MAKE_SAPI_ERROR(0x050) + +/*** SPERR_REMOTE_PROCESS_ALREADY_RUNNING 0x80045051 -2147200943 +* The remote process is already running; it cannot be started a second time. +*/ +#define SPERR_REMOTE_PROCESS_ALREADY_RUNNING MAKE_SAPI_ERROR(0x051) + +/*** SPERR_LANGID_MISMATCH 0x80045052 -2147200942 +* An attempt to load a CFG grammar with a LANGID different than other loaded grammars. +*/ +#define SPERR_LANGID_MISMATCH MAKE_SAPI_ERROR(0x052) + +/*** SP_PARTIAL_PARSE_FOUND 0x00045053 282707 +* A grammar-ending parse has been found that does not use all available words. +*/ +#define SP_PARTIAL_PARSE_FOUND MAKE_SAPI_SCODE(0x053) + +/*** SPERR_NOT_TOPLEVEL_RULE 0x80045054 -2147200940 +* An attempt to deactivate or activate a non-toplevel rule. +*/ +#define SPERR_NOT_TOPLEVEL_RULE MAKE_SAPI_ERROR(0x054) + +/*** SP_NO_RULE_ACTIVE 0x00045055 282709 +* An attempt to parse when no rule was active. +*/ +#define SP_NO_RULE_ACTIVE MAKE_SAPI_SCODE(0x055) + +/*** SPERR_LEX_REQUIRES_COOKIE 0x80045056 -2147200938 +* An attempt to ask a container lexicon for all words at once. +*/ +#define SPERR_LEX_REQUIRES_COOKIE MAKE_SAPI_ERROR(0x056) + +/*** SP_STREAM_UNINITIALIZED 0x00045057 282711 +* An attempt to activate a rule/dictation/etc without calling SetInput +* first in the inproc case. +*/ +#define SP_STREAM_UNINITIALIZED MAKE_SAPI_SCODE(0x057) + + +// Error x058 is not used in SAPI 5.0 + + +/*** SPERR_UNSUPPORTED_LANG 0x80045059 -2147200935 +* The requested language is not supported. +*/ +#define SPERR_UNSUPPORTED_LANG MAKE_SAPI_ERROR(0x059) + +/*** SPERR_VOICE_PAUSED 0x8004505a -2147200934 +* The operation cannot be performed because the voice is currently paused. +*/ +#define SPERR_VOICE_PAUSED MAKE_SAPI_ERROR(0x05a) + +/*** SPERR_AUDIO_BUFFER_UNDERFLOW 0x8004505b -2147200933 +* This will only be returned on input (read) streams when the real time audio device +* stops returning data for a long period of time. +*/ +#define SPERR_AUDIO_BUFFER_UNDERFLOW MAKE_SAPI_ERROR(0x05b) + +/*** SPERR_AUDIO_STOPPED_UNEXPECTEDLY 0x8004505c -2147200932 +* An audio device stopped returning data from the Read() method even though it was in +* the run state. This error is only returned in the END_SR_STREAM event. +*/ +#define SPERR_AUDIO_STOPPED_UNEXPECTEDLY MAKE_SAPI_ERROR(0x05c) + +/*** SPERR_NO_WORD_PRONUNCIATION 0x8004505d -2147200931 +* The SR engine is unable to add this word to a grammar. The application may need to supply +* an explicit pronunciation for this word. +*/ +#define SPERR_NO_WORD_PRONUNCIATION MAKE_SAPI_ERROR(0x05d) + +/*** SPERR_ALTERNATES_WOULD_BE_INCONSISTENT 0x8004505e -2147200930 +* An attempt to call ScaleAudio on a recognition result having previously +* called GetAlternates. Allowing the call to succeed would result in +* the previously created alternates located in incorrect audio stream positions. +*/ +#define SPERR_ALTERNATES_WOULD_BE_INCONSISTENT MAKE_SAPI_ERROR(0x05e) + +/*** SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER 0x8004505f -2147200929 +* The method called is not supported for the shared recognizer. +* For example, ISpRecognizer::GetInputStream(). +*/ +#define SPERR_NOT_SUPPORTED_FOR_SHARED_RECOGNIZER MAKE_SAPI_ERROR(0x05f) + +/*** SPERR_TIMEOUT 0x80045060 -2147200928 +* A task could not complete because the SR engine had timed out. +*/ +#define SPERR_TIMEOUT MAKE_SAPI_ERROR(0x060) + + +/*** SPERR_REENTER_SYNCHRONIZE 0x80045061 -2147200927 +* A SR engine called synchronize while inside of a synchronize call. +*/ +#define SPERR_REENTER_SYNCHRONIZE MAKE_SAPI_ERROR(0x061) + +/*** SPERR_STATE_WITH_NO_ARCS 0x80045062 -2147200926 +* The grammar contains a node no arcs. +*/ +#define SPERR_STATE_WITH_NO_ARCS MAKE_SAPI_ERROR(0x062) + +/*** SPERR_NOT_ACTIVE_SESSION 0x80045063 -2147200925 +* Neither audio output and input is supported for non-active console sessions. +*/ +#define SPERR_NOT_ACTIVE_SESSION MAKE_SAPI_ERROR(0x063) + +/*** SPERR_ALREADY_DELETED 0x80045064 -2147200924 +* The object is a stale reference and is invalid to use. +* For example having a ISpeechGrammarRule object reference and then calling +* ISpeechRecoGrammar::Reset() will cause the rule object to be invalidated. +* Calling any methods after this will result in this error. +*/ +#define SPERR_ALREADY_DELETED MAKE_SAPI_ERROR(0x064) + +/*** SP_AUDIO_STOPPED 0x00045065 282725 +* This can be returned from Read or Write calls audio streams when the stream is stopped. +*/ +#define SP_AUDIO_STOPPED MAKE_SAPI_SCODE(0x065) + +#endif //--- This must be the last line in the file diff --git a/speech/include/speventq.h b/speech/include/speventq.h new file mode 100644 index 0000000000..bfe31e6634 --- /dev/null +++ b/speech/include/speventq.h @@ -0,0 +1,605 @@ +/******************************************************************************* +* SPEventQ.h * +*------------* +* Description: +* This is the header file for the SAPI5 event queue implementation. +*------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +*******************************************************************************/ +#ifndef SPEventQ_h +#define SPEventQ_h + +#ifndef SPHelper_h +#include +#endif + +#ifndef SPCollec_h +#include +#endif + +//=== Inline helpers for copying and deleting events ============================ + + +//=== Class definition ========================================================== + +class CSpEventNode : public CSpEvent +{ +public: + CSpEventNode * m_pNext; + static LONG Compare(const CSpEventNode * p1, const CSpEventNode *p2) + { + // Assumes offsets DO or DO NOT reset when stream number changes + if (p1->ulStreamNum < p2->ulStreamNum) + { + return -1; + } + else if (p1->ulStreamNum > p2->ulStreamNum) + { + return 1; + } + else if (p1->ullAudioStreamOffset < p2->ullAudioStreamOffset) + { + return -1; + } + else if (p1->ullAudioStreamOffset > p2->ullAudioStreamOffset) + { + return 1; + } + return 0; + } +}; + + +typedef CSpBasicQueue CSpEventList; + +#define DECLARE_SPNOTIFYSOURCE_METHODS(T) \ +STDMETHODIMP SetNotifySink(ISpNotifySink * pNotifySink) \ +{ return T._SetNotifySink(pNotifySink); } \ +STDMETHODIMP SetNotifyWindowMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) \ +{ return T._SetNotifyWindowMessage(hWnd, Msg, wParam, lParam); } \ +STDMETHODIMP SetNotifyCallbackFunction(SPNOTIFYCALLBACK * pfnCallback, WPARAM wParam, LPARAM lParam) \ +{ return T._SetNotifyCallbackFunction(pfnCallback, wParam, lParam); } \ +STDMETHODIMP SetNotifyCallbackInterface(ISpNotifyCallback * pSpCallback, WPARAM wParam, LPARAM lParam) \ +{ return T._SetNotifyCallbackInterface(pSpCallback, wParam, lParam); } \ +STDMETHODIMP SetNotifyWin32Event() \ +{ return T._SetNotifyWin32Event(); } \ +STDMETHODIMP WaitForNotifyEvent(DWORD dwMilliseconds) \ +{ return T._WaitForNotifyEvent(dwMilliseconds); } \ +STDMETHODIMP_(HANDLE) GetNotifyEventHandle() \ +{ return T._GetNotifyEventHandle(); } + +#define DECLARE_SPEVENTSOURCE_METHODS(T) \ +DECLARE_SPNOTIFYSOURCE_METHODS(T) \ +STDMETHODIMP SetInterest(ULONGLONG ullEventInterest, ULONGLONG ullQueuedInterest) \ +{ return T._SetInterest(ullEventInterest, ullQueuedInterest); } \ +STDMETHODIMP GetEvents(ULONG ulCount, SPEVENT* pEventArray, ULONG * pulFetched) \ +{ return T._GetEvents(ulCount, pEventArray, pulFetched); } \ +STDMETHODIMP GetInfo(SPEVENTSOURCEINFO *pInfo) \ +{ return T._GetInfo(pInfo); } + + + +class CSpEventSource +{ + public: + CSpEventSource(CComObjectRootEx * pParent) : + m_pParent(pParent) + { + m_ullEventInterest = 0; m_ullQueuedInterest = 0; + m_ulStreamNum = 0; + } + HRESULT _SetNotifySink(ISpNotifySink * pNotifySink); + HRESULT _SetNotifyWindowMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam); + HRESULT _SetNotifyCallbackFunction(SPNOTIFYCALLBACK * pfnCallback, WPARAM wParam, LPARAM lParam); + HRESULT _SetNotifyCallbackInterface(ISpNotifyCallback * pSpCallback, WPARAM wParam, LPARAM lParam); + HRESULT _SetNotifyWin32Event(); + HRESULT _WaitForNotifyEvent(DWORD dwMilliseconds); + HANDLE _GetNotifyEventHandle(); + + HRESULT _SetInterest(ULONGLONG ullEventInterest , ULONGLONG ullQueuedInterest); + HRESULT _GetEvents( ULONG ulCount, SPEVENT* pEventArray, ULONG * pulFetched ); + HRESULT _GetInfo(SPEVENTSOURCEINFO *pInfo ); + + /*--- Non interface methods ---*/ + HRESULT _CompleteEvents( ULONGLONG ullPos = 0xFFFFFFFFFFFFFFFF ); + inline void _MoveAllToFreeList(CSpEventList * pList); + inline void _RemoveAllEvents(); + inline HRESULT _AddEvent(const SPEVENT & Event); + inline HRESULT _AddEvents(const SPEVENT* pEventArray, ULONG ulCount); + inline HRESULT _DeserializeAndAddEvent(const BYTE * pBuffer, ULONG * pcbUsed); + inline HRESULT _GetStreamNumber(const ULONGLONG ullAudioOffset, ULONG *pulStreamNum); + //=== Data members ============================== + public: + ULONGLONG m_ullEventInterest; + ULONGLONG m_ullQueuedInterest; + ULONG m_ulStreamNum; + CSpEventList m_PendingList; + CSpEventList m_CompletedList; + CSpEventList m_FreeList; + CComPtr m_cpNotifySink; + CComPtr m_cpEventTranslator; // If non-NULL then Win32 events being used + CComObjectRootEx * m_pParent; + CComAutoCriticalSection m_NotifyObjChangeCrit; // Critical section used to make sure that + // the notify object (m_cpNotifySink) not changed + // while waiting on it. + +}; + + +// +//=== Inlines ========================================================= +// + +// +// WARNING: If this logic changes, you will need to change the logic in SetNotifyWin32Event also. +// +inline HRESULT CSpEventSource::_SetNotifySink(ISpNotifySink * pNotifySink) +{ + if (SP_IS_BAD_OPTIONAL_INTERFACE_PTR(pNotifySink)) + { + return E_INVALIDARG; + } + else + { + m_pParent->Lock(); + m_NotifyObjChangeCrit.Lock(); + m_cpEventTranslator.Release(); + m_cpNotifySink = pNotifySink; + if (m_cpNotifySink && m_CompletedList.GetHead()) + { + m_cpNotifySink->Notify(); + } + m_NotifyObjChangeCrit.Unlock(); + m_pParent->Unlock(); + return S_OK; + } +} + +/**************************************************************************** +* CSpEventSource::_SetNotifyWindowMessage * +*-----------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HRESULT CSpEventSource::_SetNotifyWindowMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) +{ + SPDBG_FUNC("CSpEventSource::_SetNotifyWindowMessage"); + HRESULT hr = S_OK; + CComPtr cpTranslator; + hr = cpTranslator.CoCreateInstance(CLSID_SpNotifyTranslator); + if (SUCCEEDED(hr)) + { + hr = cpTranslator->InitWindowMessage(hWnd, Msg, wParam, lParam); + } + if (SUCCEEDED(hr)) + { + hr = _SetNotifySink(cpTranslator); + } + return hr; +} +/**************************************************************************** +* CSpEventSource::_SetNotifyCallbackFunction * +*--------------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HRESULT CSpEventSource::_SetNotifyCallbackFunction(SPNOTIFYCALLBACK * pfnCallback, WPARAM wParam, LPARAM lParam) +{ + SPDBG_FUNC("CSpEventSource::_SetNotifyCallbackFunction"); + HRESULT hr = S_OK; + CComPtr cpTranslator; + hr = cpTranslator.CoCreateInstance(CLSID_SpNotifyTranslator); + if (SUCCEEDED(hr)) + { + hr = cpTranslator->InitCallback(pfnCallback, wParam, lParam); + } + if (SUCCEEDED(hr)) + { + hr = _SetNotifySink(cpTranslator); + } + return hr; +} +/**************************************************************************** +* CSpEventSource::_SetNotifyCallbackInterface * +*---------------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HRESULT CSpEventSource::_SetNotifyCallbackInterface(ISpNotifyCallback * pSpCallback, WPARAM wParam, LPARAM lParam) +{ + SPDBG_FUNC("CSpEventSource::_SetNotifyCallbackInterface"); + HRESULT hr = S_OK; + CComPtr cpTranslator; + hr = cpTranslator.CoCreateInstance(CLSID_SpNotifyTranslator); + if (SUCCEEDED(hr)) + { + hr = cpTranslator->InitSpNotifyCallback(pSpCallback, wParam, lParam); + } + if (SUCCEEDED(hr)) + { + hr = _SetNotifySink(cpTranslator); + } + return hr; +} +/**************************************************************************** +* CSpEventSource::_SetNotifyWin32Event * +*--------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HRESULT CSpEventSource::_SetNotifyWin32Event(void) +{ + SPDBG_FUNC("CSpEventSource::_SetNotifyWin32Event"); + HRESULT hr = S_OK; + CComPtr cpTranslator; + hr = cpTranslator.CoCreateInstance(CLSID_SpNotifyTranslator); + if (SUCCEEDED(hr)) + { + hr = cpTranslator->InitWin32Event(NULL, TRUE); + } + if (SUCCEEDED(hr)) + { + // + // In this case we do NOT call _SetNotify sink since we want to set the cpEventTranslator + // + m_pParent->Lock(); + m_NotifyObjChangeCrit.Lock(); + m_cpEventTranslator = cpTranslator; + m_cpNotifySink = cpTranslator; + if (m_cpNotifySink && m_CompletedList.GetHead()) + { + m_cpNotifySink->Notify(); + } + m_NotifyObjChangeCrit.Unlock(); + m_pParent->Unlock(); + } + return hr; +} +/**************************************************************************** +* CSpEventSource::_WaitForNotifyEvent * +*-------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HRESULT CSpEventSource::_WaitForNotifyEvent(DWORD dwMilliseconds) +{ + SPDBG_FUNC("CSpEventSource::_WaitForNotifyEvent"); + HRESULT hr = S_OK; + m_NotifyObjChangeCrit.Lock(); + if (m_cpEventTranslator) + { + hr = m_cpEventTranslator->Wait(dwMilliseconds); + } + else + { + if (m_cpNotifySink) + { + hr = SPERR_ALREADY_INITIALIZED; + } + else + { + hr = _SetNotifyWin32Event(); + if (SUCCEEDED(hr)) + { + hr = m_cpEventTranslator->Wait(dwMilliseconds); + } + } + } + m_NotifyObjChangeCrit.Unlock(); + return hr; +} +/**************************************************************************** +* CSpEventSource::_GetNotifyEventHandle * +*---------------------------------------* +* Description: +* +* Returns: +* +********************************************************************* RAL ***/ + +inline HANDLE CSpEventSource::_GetNotifyEventHandle() +{ + HANDLE h = NULL; + SPDBG_FUNC("CSpEventSource::_GetNotifyEventHandle"); + m_NotifyObjChangeCrit.Lock(); + if (!m_cpNotifySink) + { + _SetNotifyWin32Event(); + } + if (m_cpEventTranslator) + { + h = m_cpEventTranslator->GetEventHandle(); + } + m_NotifyObjChangeCrit.Unlock(); + return h; +} + + +inline HRESULT CSpEventSource::_SetInterest( ULONGLONG ullEventInterest, ULONGLONG ullQueuedInterest ) +{ + HRESULT hr = S_OK; + m_pParent->Lock(); + + if(ullEventInterest && SPFEI_FLAGCHECK != (ullEventInterest & SPFEI_FLAGCHECK)) + { + hr = E_INVALIDARG; + } + else if(ullQueuedInterest && SPFEI_FLAGCHECK != (ullQueuedInterest & SPFEI_FLAGCHECK)) + { + hr = E_INVALIDARG; + } + else if ((ullQueuedInterest | ullEventInterest) != ullEventInterest) + { + hr = E_INVALIDARG; + } + else + { + m_ullEventInterest = ullEventInterest; + m_ullQueuedInterest = ullQueuedInterest; + } + m_pParent->Unlock(); + return hr; +} + + +// +// Same as AddEvents except: No param validation, and caller must take the critical section +// prior to calling. +// +inline HRESULT CSpEventSource::_AddEvents( const SPEVENT* pEventArray, ULONG ulCount ) +{ + HRESULT hr = S_OK; + for( ULONG i = 0; i < ulCount && SUCCEEDED(hr = _AddEvent(pEventArray[i])); ++i ) {} + return hr; +} + +inline HRESULT CSpEventSource::_AddEvent(const SPEVENT & Event) +{ + SPDBG_ASSERT(Event.eEventId < 64); + SPDBG_ASSERT(Event.elParamType == SPET_LPARAM_IS_UNDEFINED || + Event.elParamType == SPET_LPARAM_IS_TOKEN || + Event.elParamType == SPET_LPARAM_IS_OBJECT || + Event.elParamType == SPET_LPARAM_IS_POINTER || + Event.elParamType == SPET_LPARAM_IS_STRING); +#ifdef _DEBUG + if (Event.eEventId == SPEI_VOICE_CHANGE) + { + SPDBG_ASSERT(Event.elParamType == SPET_LPARAM_IS_TOKEN); + } + else if (Event.eEventId == SPEI_RECOGNITION || Event.eEventId == SPEI_FALSE_RECOGNITION || Event.eEventId == SPEI_HYPOTHESIS) + { + SPDBG_ASSERT(Event.elParamType == SPET_LPARAM_IS_OBJECT); + } + else if (Event.eEventId ==SPEI_REQUEST_UI || Event.eEventId == SPEI_TTS_BOOKMARK) + { + SPDBG_ASSERT(Event.elParamType == SPET_LPARAM_IS_STRING); + } +#endif + + if ( (1i64 << Event.eEventId) & m_ullEventInterest ) + { + CSpEventNode *pNode = m_FreeList.RemoveHead(); + if (pNode == NULL) + { + pNode = new CSpEventNode(); + if (pNode == NULL) + { + return E_OUTOFMEMORY; + } + } + pNode->CopyFrom(&Event); + m_PendingList.InsertSorted(pNode); + } + return S_OK; +} + +inline HRESULT CSpEventSource:: + _DeserializeAndAddEvent(const BYTE *pBuffer, ULONG * pcbUsed) +{ + HRESULT hr = S_OK; + const SPEVENT * pSrcEvent = (const SPEVENT *)pBuffer; + SPDBG_ASSERT(pSrcEvent->eEventId < 64); + if ( (1i64 << pSrcEvent->eEventId) & m_ullEventInterest ) + { + CSpEventNode *pNode = m_FreeList.RemoveHead(); + if (pNode == NULL) + { + pNode = new CSpEventNode(); + if (pNode == NULL) + { + hr = E_OUTOFMEMORY; + } + } + if (SUCCEEDED(hr)) + { + hr = pNode->Deserialize(((const SPSERIALIZEDEVENT64 *)(pBuffer)), pcbUsed); + if (SUCCEEDED(hr)) + { + m_PendingList.InsertSorted(pNode); + } + else + { + m_FreeList.InsertHead(pNode); + } + } + } + else + { +// WCE compiler does not work propertly with template +#ifndef _WIN32_WCE + *pcbUsed = SpEventSerializeSize(pSrcEvent); +#else + *pcbUsed = SpEventSerializeSize(pSrcEvent, sizeof(SPSERIALIZEDEVENT64)); +#endif + } + return hr; +} + +inline HRESULT CSpEventSource::_GetEvents( ULONG ulCount, SPEVENT* pEventArray, ULONG *pulFetched ) +{ + HRESULT hr = S_OK; + m_pParent->Lock(); + if( SPIsBadWritePtr( pEventArray, sizeof( SPEVENT ) * ulCount ) || + SP_IS_BAD_OPTIONAL_WRITE_PTR(pulFetched) ) + { + hr = E_INVALIDARG; + } + else + { + ULONG ulCopied = 0; + ULONG ulRemaining = ulCount; + CSpEventNode * pCur = m_CompletedList.m_pHead; + CSpEventNode * pLastCopied = NULL; + while (ulRemaining && pCur) + { + pCur->Detach(pEventArray + ulCopied); + pLastCopied = pCur; + ulCopied++; + pCur = pCur->m_pNext; + ulRemaining--; + } + if (ulCopied) + { + if (m_FreeList.m_pHead == NULL) + { + m_FreeList.m_pTail = pLastCopied; + } + pLastCopied->m_pNext = m_FreeList.m_pHead; + m_FreeList.m_pHead = m_CompletedList.m_pHead; + m_CompletedList.m_pHead = pCur; + m_CompletedList.m_cElements -= ulCopied; + m_FreeList.m_cElements += ulCopied; + } + if (ulCopied < ulCount) + { + hr = S_FALSE; + } + if (pulFetched) + { + *pulFetched = ulCopied; + } + } + m_pParent->Unlock(); + return hr; +} + + +inline HRESULT CSpEventSource::_GetInfo( SPEVENTSOURCEINFO * pInfo ) +{ + HRESULT hr = S_OK; + m_pParent->Lock(); + if( SP_IS_BAD_WRITE_PTR( pInfo ) ) + { + hr = E_POINTER; + } + else + { + pInfo->ulCount = m_CompletedList.GetCount(); + pInfo->ullEventInterest = m_ullEventInterest; + pInfo->ullQueuedInterest= m_ullQueuedInterest; + } + m_pParent->Unlock(); + return hr; +} + + + +// +// The caller must call this function with the critical section owned +// +inline HRESULT CSpEventSource::_CompleteEvents( ULONGLONG ullPos ) +{ + HRESULT hr = S_OK; + + if (m_PendingList.m_pHead && m_PendingList.m_pHead->ullAudioStreamOffset <= ullPos) + { + BOOL bNotify = FALSE; + while (m_PendingList.m_pHead && + m_PendingList.m_pHead->ullAudioStreamOffset <= ullPos) + { + CSpEventNode *pNode = m_PendingList.RemoveHead(); + if(pNode->ulStreamNum != m_ulStreamNum) + { + m_ulStreamNum = pNode->ulStreamNum; + } + if ( (1i64 << pNode->eEventId) & m_ullEventInterest ) + { + bNotify = TRUE; + // + // NOTE: If we're forwarding events to an event sink then we'll only + // pay attention to the Interest flags. If we're going to notify, then + // we'll only queue completed events that the user has explicitly asked + // us to store as completed events. + // + if ( (1i64 << pNode->eEventId) & m_ullQueuedInterest ) + { + m_CompletedList.InsertSorted(pNode); + } + else + { + pNode->Clear(); + m_FreeList.InsertHead(pNode); + } + } + else + { + pNode->Clear(); + m_FreeList.InsertHead(pNode); + } + } + if (bNotify && m_cpNotifySink) + { + hr = m_cpNotifySink->Notify(); + } + } + return hr; +}; + + +inline void CSpEventSource::_MoveAllToFreeList(CSpEventList * pList) +{ + CSpEventNode * pNode; + while ((pNode = pList->RemoveHead()) != NULL) + { + pNode->Clear(); + m_FreeList.InsertHead(pNode); + } +} +inline void CSpEventSource::_RemoveAllEvents( ) +{ + m_pParent->Lock(); + + _MoveAllToFreeList(&m_CompletedList); + _MoveAllToFreeList(&m_PendingList); + m_pParent->Unlock(); +} + +inline HRESULT CSpEventSource::_GetStreamNumber(const ULONGLONG ullAudioOffset, ULONG *pulStreamNum) +{ + CSpEventNode *pNode = m_PendingList.m_pHead; + *pulStreamNum = m_ulStreamNum; + for(;pNode && pNode->ullAudioStreamOffset <= ullAudioOffset; pNode = pNode->m_pNext) + { + *pulStreamNum = pNode->ulStreamNum; + } + return S_OK; +} + + + +#endif //--- This must be the last line in this file diff --git a/speech/include/sphelper.h b/speech/include/sphelper.h new file mode 100644 index 0000000000..13a824c551 --- /dev/null +++ b/speech/include/sphelper.h @@ -0,0 +1,2753 @@ +/******************************************************************************* +* SPHelper.h * +*------------* +* Description: +* This is the header file for core helper functions implementation. +*------------------------------------------------------------------------------- +* Copyright (c) Microsoft Corporation. All rights reserved. +*******************************************************************************/ +#ifndef SPHelper_h +#define SPHelper_h + +#ifndef _INC_MALLOC +#include +#endif + +#ifndef _INC_CRTDBG +#include +#endif + +#ifndef __sapi_h__ +#include +#endif + +#ifndef __sapiddk_h__ +#include +#endif + +#ifndef SPError_h +#include +#endif + +#ifndef SPDebug_h +#include +#endif + +#ifndef _INC_LIMITS +#include +#endif + +#ifndef _INC_MMSYSTEM +#include +#endif + +#ifndef __comcat_h__ +#include +#endif + +#ifndef _INC_MMREG +#include +#endif + +#ifndef __ATLBASE_H__ +#include +#endif + +//=== Constants ============================================================== +#define sp_countof(x) ((sizeof(x) / sizeof(*(x)))) + +/*** CSpDynamicString helper class +* +*/ +class CSpDynamicString +{ +public: + + WCHAR * m_psz; + CSpDynamicString() + { + m_psz = NULL; + } + CSpDynamicString(ULONG cchReserve) + { + m_psz = (WCHAR *)::CoTaskMemAlloc(cchReserve * sizeof(WCHAR)); + } + WCHAR * operator=(const CSpDynamicString& src) + { + if (m_psz != src.m_psz) + { + ::CoTaskMemFree(m_psz); + m_psz = src.Copy(); + } + return m_psz; + } + WCHAR * operator=(const WCHAR * pSrc) + { + Clear(); + if (pSrc) + { + ULONG cbNeeded = (wcslen(pSrc) + 1) * sizeof(WCHAR); + m_psz = (WCHAR *)::CoTaskMemAlloc(cbNeeded); + SPDBG_ASSERT(m_psz); + if (m_psz) + { + memcpy(m_psz, pSrc, cbNeeded); + } + } + return m_psz; + } + + WCHAR * operator=(const char * pSrc) + { + Clear(); + if (pSrc) + { + ULONG cbNeeded = (lstrlenA(pSrc) + 1) * sizeof(WCHAR); + m_psz = (WCHAR *)::CoTaskMemAlloc(cbNeeded); + SPDBG_ASSERT(m_psz); + if (m_psz) + { + ::MultiByteToWideChar(CP_ACP, 0, pSrc, -1, m_psz, cbNeeded/sizeof(WCHAR)); + } + } + return m_psz; + } + + WCHAR * operator=(REFGUID rguid) + { + Clear(); + ::StringFromCLSID(rguid, &m_psz); + return m_psz; + } + + + /*explicit*/ CSpDynamicString(const WCHAR * pSrc) + { + m_psz = NULL; + operator=(pSrc); + } + /*explicit*/ CSpDynamicString(const char * pSrc) + { + m_psz = NULL; + operator=(pSrc); + } + /*explicit*/ CSpDynamicString(const CSpDynamicString& src) + { + m_psz = src.Copy(); + } + /*explicit*/ CSpDynamicString(REFGUID rguid) + { + ::StringFromCLSID(rguid, &m_psz); + } + + + ~CSpDynamicString() + { + ::CoTaskMemFree(m_psz); + } + unsigned int Length() const + { + return (m_psz == NULL)? 0 : wcslen(m_psz); + } + + operator WCHAR * () const + { + return m_psz; + } + //The assert on operator& usually indicates a bug. If this is really + //what is needed, however, take the address of the m_psz member explicitly. + WCHAR ** operator&() + { + SPDBG_ASSERT(m_psz == NULL); + return &m_psz; + } + + WCHAR * Append(const WCHAR * pszSrc) + { + if (pszSrc) + { + ULONG lenSrc = wcslen(pszSrc); + if (lenSrc) + { + ULONG lenMe = Length(); + WCHAR *pszNew = (WCHAR *)::CoTaskMemAlloc((lenMe + lenSrc + 1) * sizeof(WCHAR)); + if (pszNew) + { + if (m_psz) // Could append to an empty string so check... + { + if (lenMe) + { + memcpy(pszNew, m_psz, lenMe * sizeof(WCHAR)); + } + ::CoTaskMemFree(m_psz); + } + memcpy(pszNew + lenMe, pszSrc, (lenSrc + 1) * sizeof(WCHAR)); + m_psz = pszNew; + } + else + { + SPDBG_ASSERT(FALSE); + } + } + } + return m_psz; + } + + WCHAR * Append(const WCHAR * pszSrc, const ULONG lenSrc) + { + if (pszSrc && lenSrc) + { + ULONG lenMe = Length(); + WCHAR *pszNew = (WCHAR *)::CoTaskMemAlloc((lenMe + lenSrc + 1) * sizeof(WCHAR)); + if (pszNew) + { + if (m_psz) // Could append to an empty string so check... + { + if (lenMe) + { + memcpy(pszNew, m_psz, lenMe * sizeof(WCHAR)); + } + ::CoTaskMemFree(m_psz); + } + memcpy(pszNew + lenMe, pszSrc, lenSrc * sizeof(WCHAR)); + *(pszNew + lenMe + lenSrc) = L'\0'; + m_psz = pszNew; + } + else + { + SPDBG_ASSERT(FALSE); + } + } + return m_psz; + } + + WCHAR * Append2(const WCHAR * pszSrc1, const WCHAR * pszSrc2) + { + ULONG lenSrc1 = pszSrc1 ? wcslen(pszSrc1) : 0; + ULONG lenSrc2 = pszSrc2 ? wcslen(pszSrc2) : 0; + + if (lenSrc1 || lenSrc2) + { + ULONG lenMe = Length(); + WCHAR *pszNew = (WCHAR *)::CoTaskMemAlloc((lenMe + lenSrc1 + lenSrc2 + 1) * sizeof(WCHAR)); + if (pszNew) + { + if (m_psz) // Could append to an empty string so check... + { + if (lenMe) + { + memcpy(pszNew, m_psz, lenMe * sizeof(WCHAR)); + } + ::CoTaskMemFree(m_psz); + } + // In both of these cases, we copy the trailing NULL so that we're sure it gets + // there (if lenSrc2 is 0 then we better copy it from pszSrc1). + if (lenSrc1) + { + memcpy(pszNew + lenMe, pszSrc1, (lenSrc1 + 1) * sizeof(WCHAR)); + } + if (lenSrc2) + { + memcpy(pszNew + lenMe + lenSrc1, pszSrc2, (lenSrc2 + 1) * sizeof(WCHAR)); + } + m_psz = pszNew; + } + else + { + SPDBG_ASSERT(FALSE); + } + } + return m_psz; + } + WCHAR * Copy() const + { + if (m_psz) + { + CSpDynamicString szNew(m_psz); + return szNew.Detach(); + } + return NULL; + } + CHAR * CopyToChar() const + { + if (m_psz) + { + CHAR* psz; + ULONG cbNeeded = ::WideCharToMultiByte(CP_ACP, 0, m_psz, -1, NULL, NULL, NULL, NULL); + psz = (CHAR *)::CoTaskMemAlloc(cbNeeded); + SPDBG_ASSERT(psz); + if (psz) + { + ::WideCharToMultiByte(CP_ACP, 0, m_psz, -1, psz, cbNeeded/sizeof(CHAR), NULL, NULL); + } + return psz; + } + return NULL; + } + void Attach(WCHAR * pszSrc) + { + SPDBG_ASSERT(m_psz == NULL); + m_psz = pszSrc; + } + WCHAR * Detach() + { + WCHAR * s = m_psz; + m_psz = NULL; + return s; + } + void Clear() + { + ::CoTaskMemFree(m_psz); + m_psz = NULL; + } + bool operator!() const + { + return (m_psz == NULL); + } + HRESULT CopyToBSTR(BSTR * pbstr) + { + if (m_psz) + { + *pbstr = ::SysAllocString(m_psz); + if (*pbstr == NULL) + { + return E_OUTOFMEMORY; + } + } + else + { + *pbstr = NULL; + } + return S_OK; + } + void TrimToSize(ULONG ulNumChars) + { + if (m_psz && ulNumChars < Length()) + { + m_psz[ulNumChars] = 0; + } + } + WCHAR * Compact() + { + if (m_psz) + { + ULONG cch = wcslen(m_psz); + m_psz = (WCHAR *)::CoTaskMemRealloc(m_psz, (cch + 1) * sizeof(WCHAR)); + } + return m_psz; + } + WCHAR * ClearAndGrowTo(ULONG cch) + { + if (m_psz) + { + Clear(); + } + m_psz = (WCHAR *)::CoTaskMemAlloc(cch * sizeof(WCHAR)); + return m_psz; + } + WCHAR * LTrim() + { + if (m_psz) + { + WCHAR * pszRead = m_psz; + while (iswspace(*pszRead)) + { + pszRead++; + } + if (pszRead != m_psz) + { + WCHAR * pszWrite = m_psz; + while (*pszRead) + { + *pszWrite++ = *pszRead++; + } + *pszWrite = '\0'; + } + } + return m_psz; + } + WCHAR * RTrim() + { + if (m_psz) + { + WCHAR * pszTail = m_psz + wcslen(m_psz); + WCHAR * pszZeroTerm = pszTail; + while (pszZeroTerm > m_psz && iswspace(pszZeroTerm[-1])) + { + pszZeroTerm--; + } + if (pszZeroTerm != pszTail) + { + *pszZeroTerm = '\0'; + } + } + return m_psz; + } + WCHAR * TrimBoth() + { + RTrim(); + return LTrim(); + } +}; + + + +// +// Simple inline function converts a ulong to a hex string. +// +inline void SpHexFromUlong(WCHAR * psz, ULONG ul) +{ + const static WCHAR szHexChars[] = L"0123456789ABCDEF"; + if (ul == 0) + { + psz[0] = L'0'; + psz[1] = 0; + } + else + { + ULONG ulChars = 1; + psz[0] = 0; + while (ul) + { + memmove(psz + 1, psz, ulChars * sizeof(WCHAR)); + psz[0] = szHexChars[ul % 16]; + ul /= 16; + ulChars++; + } + } +} + + +//=== Token helpers + +inline HRESULT SpGetTokenFromId( + const WCHAR * pszTokenId, + ISpObjectToken ** ppToken, + BOOL fCreateIfNotExist = FALSE) +{ + SPDBG_FUNC("SpGetTokenFromId"); + HRESULT hr; + + CComPtr cpToken; + hr = cpToken.CoCreateInstance(CLSID_SpObjectToken); + + if (SUCCEEDED(hr)) + { + hr = cpToken->SetId(NULL, pszTokenId, fCreateIfNotExist); + } + + if (SUCCEEDED(hr)) + { + *ppToken = cpToken.Detach(); + } + + if (hr != SPERR_NOT_FOUND) + { + SPDBG_REPORT_ON_FAIL(hr); + } + + return hr; +} + +inline HRESULT SpGetCategoryFromId( + const WCHAR * pszCategoryId, + ISpObjectTokenCategory ** ppCategory, + BOOL fCreateIfNotExist = FALSE) +{ + SPDBG_FUNC("SpGetCategoryFromId"); + HRESULT hr; + + CComPtr cpTokenCategory; + hr = cpTokenCategory.CoCreateInstance(CLSID_SpObjectTokenCategory); + + if (SUCCEEDED(hr)) + { + hr = cpTokenCategory->SetId(pszCategoryId, fCreateIfNotExist); + } + + if (SUCCEEDED(hr)) + { + *ppCategory = cpTokenCategory.Detach(); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpGetDefaultTokenIdFromCategoryId( + const WCHAR * pszCategoryId, + WCHAR ** ppszTokenId) +{ + SPDBG_FUNC("SpGetDefaultTokenFromCategoryId"); + HRESULT hr; + + CComPtr cpCategory; + hr = SpGetCategoryFromId(pszCategoryId, &cpCategory); + + if (SUCCEEDED(hr)) + { + hr = cpCategory->GetDefaultTokenId(ppszTokenId); + } + + return hr; +} + +inline HRESULT SpSetDefaultTokenIdForCategoryId( + const WCHAR * pszCategoryId, + const WCHAR * pszTokenId) +{ + SPDBG_FUNC("SpSetDefaultTokenIdForCategoryId"); + HRESULT hr; + + CComPtr cpCategory; + hr = SpGetCategoryFromId(pszCategoryId, &cpCategory); + + if (SUCCEEDED(hr)) + { + hr = cpCategory->SetDefaultTokenId(pszTokenId); + } + + return hr; +} + +inline HRESULT SpGetDefaultTokenFromCategoryId( + const WCHAR * pszCategoryId, + ISpObjectToken ** ppToken, + BOOL fCreateCategoryIfNotExist = TRUE) +{ + SPDBG_FUNC("SpGetDefaultTokenFromCategoryId"); + HRESULT hr; + + CComPtr cpCategory; + hr = SpGetCategoryFromId(pszCategoryId, &cpCategory, fCreateCategoryIfNotExist); + + if (SUCCEEDED(hr)) + { + WCHAR * pszTokenId; + hr = cpCategory->GetDefaultTokenId(&pszTokenId); + if (SUCCEEDED(hr)) + { + hr = SpGetTokenFromId(pszTokenId, ppToken); + ::CoTaskMemFree(pszTokenId); + } + } + + return hr; +} + +inline HRESULT SpSetDefaultTokenForCategoryId( + const WCHAR * pszCategoryId, + ISpObjectToken * pToken) +{ + SPDBG_FUNC("SpSetDefaultTokenForCategoryId"); + HRESULT hr; + + WCHAR * pszTokenId; + hr = pToken->GetId(&pszTokenId); + + if (SUCCEEDED(hr)) + { + hr = SpSetDefaultTokenIdForCategoryId(pszCategoryId, pszTokenId); + ::CoTaskMemFree(pszTokenId); + } + + return hr; +} + +inline HRESULT SpSetCommonTokenData( + ISpObjectToken * pToken, + const CLSID * pclsid, + const WCHAR * pszLangIndependentName, + LANGID langid, + const WCHAR * pszLangDependentName, + ISpDataKey ** ppDataKeyAttribs) +{ + SPDBG_FUNC("SpSetCommonTokenData"); + HRESULT hr = S_OK; + + // Set the new token's CLSID (if specified) + if (SUCCEEDED(hr) && pclsid) + { + CSpDynamicString dstrClsid; + hr = StringFromCLSID(*pclsid, &dstrClsid); + + if (SUCCEEDED(hr)) + { + hr = pToken->SetStringValue(SPTOKENVALUE_CLSID, dstrClsid); + } + } + + // Set the token's lang independent name + if (SUCCEEDED(hr) && pszLangIndependentName) + { + hr = pToken->SetStringValue(NULL, pszLangIndependentName); + } + + // Set the token's lang dependent name + if (SUCCEEDED(hr) && pszLangDependentName) + { + USES_CONVERSION; + + TCHAR szLangId[10]; + wsprintf(szLangId, _T("%x"), langid); + + hr = pToken->SetStringValue(T2W(szLangId), pszLangDependentName); + } + + // Open the attributes key if requested + if (SUCCEEDED(hr) && ppDataKeyAttribs) + { + hr = pToken->CreateKey(L"Attributes", ppDataKeyAttribs); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpCreateNewToken( + const WCHAR * pszTokenId, + ISpObjectToken ** ppToken) +{ + SPDBG_FUNC("SpCreateNewToken"); + HRESULT hr; + + // Forcefully create the token + hr = SpGetTokenFromId(pszTokenId, ppToken, TRUE); + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpCreateNewToken( + const WCHAR * pszCategoryId, + const WCHAR * pszTokenKeyName, + ISpObjectToken ** ppToken) +{ + SPDBG_FUNC("SpCreateNewToken"); + HRESULT hr; + + // Forcefully create the category + CComPtr cpCategory; + hr = SpGetCategoryFromId(pszCategoryId, &cpCategory, TRUE); + + // Come up with a token key name if one wasn't specified + CSpDynamicString dstrTokenKeyName; + if (SUCCEEDED(hr)) + { + if (pszTokenKeyName == NULL) + { + GUID guidTokenKeyName; + hr = CoCreateGuid(&guidTokenKeyName); + + if (SUCCEEDED(hr)) + { + hr = StringFromCLSID(guidTokenKeyName, &dstrTokenKeyName); + } + + if (SUCCEEDED(hr)) + { + pszTokenKeyName = dstrTokenKeyName; + } + } + } + + // Build the token id + CSpDynamicString dstrTokenId; + if (SUCCEEDED(hr)) + { + dstrTokenId = pszCategoryId; + dstrTokenId.Append2(L"\\Tokens\\", pszTokenKeyName); + } + + // Forcefully create the token + if (SUCCEEDED(hr)) + { + hr = SpGetTokenFromId(dstrTokenId, ppToken, TRUE); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpCreateNewTokenEx( + const WCHAR * pszCategoryId, + const WCHAR * pszTokenKeyName, + const CLSID * pclsid, + const WCHAR * pszLangIndependentName, + LANGID langid, + const WCHAR * pszLangDependentName, + ISpObjectToken ** ppToken, + ISpDataKey ** ppDataKeyAttribs) +{ + SPDBG_FUNC("SpCreateNewTokenEx"); + HRESULT hr; + + // Create the new token + hr = SpCreateNewToken(pszCategoryId, pszTokenKeyName, ppToken); + + // Now set the extra data + if (SUCCEEDED(hr)) + { + hr = SpSetCommonTokenData( + *ppToken, + pclsid, + pszLangIndependentName, + langid, + pszLangDependentName, + ppDataKeyAttribs); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpCreateNewTokenEx( + const WCHAR * pszTokenId, + const CLSID * pclsid, + const WCHAR * pszLangIndependentName, + LANGID langid, + const WCHAR * pszLangDependentName, + ISpObjectToken ** ppToken, + ISpDataKey ** ppDataKeyAttribs) +{ + SPDBG_FUNC("SpCreateNewTokenEx"); + HRESULT hr; + + // Create the new token + hr = SpCreateNewToken(pszTokenId, ppToken); + + // Now set the extra data + if (SUCCEEDED(hr)) + { + hr = SpSetCommonTokenData( + *ppToken, + pclsid, + pszLangIndependentName, + langid, + pszLangDependentName, + ppDataKeyAttribs); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpEnumTokens( + const WCHAR * pszCategoryId, + const WCHAR * pszReqAttribs, + const WCHAR * pszOptAttribs, + IEnumSpObjectTokens ** ppEnum) +{ + SPDBG_FUNC("SpEnumTokens"); + HRESULT hr = S_OK; + + CComPtr cpCategory; + hr = SpGetCategoryFromId(pszCategoryId, &cpCategory); + + if (SUCCEEDED(hr)) + { + hr = cpCategory->EnumTokens( + pszReqAttribs, + pszOptAttribs, + ppEnum); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +inline HRESULT SpFindBestToken( + const WCHAR * pszCategoryId, + const WCHAR * pszReqAttribs, + const WCHAR * pszOptAttribs, + ISpObjectToken **ppObjectToken) +{ + SPDBG_FUNC("SpFindBestToken"); + HRESULT hr = S_OK; + + const WCHAR *pszVendorPreferred = L"VendorPreferred"; + const ulLenVendorPreferred = wcslen(pszVendorPreferred); + + // append VendorPreferred to the end of pszOptAttribs to force this preference + ULONG ulLen = pszOptAttribs ? wcslen(pszOptAttribs) + ulLenVendorPreferred + 1 : ulLenVendorPreferred; + WCHAR *pszOptAttribsVendorPref = (WCHAR*)_alloca((ulLen+1)*sizeof(WCHAR)); + if (pszOptAttribsVendorPref) + { + if (pszOptAttribs) + { + wcscpy(pszOptAttribsVendorPref, pszOptAttribs); + wcscat(pszOptAttribsVendorPref, L";"); + wcscat(pszOptAttribsVendorPref, pszVendorPreferred); + } + else + { + wcscpy(pszOptAttribsVendorPref, pszVendorPreferred); + } + } + else + { + hr = E_OUTOFMEMORY; + } + + CComPtr cpEnum; + if (SUCCEEDED(hr)) + { + hr = SpEnumTokens(pszCategoryId, pszReqAttribs, pszOptAttribsVendorPref, &cpEnum); + } + + if (SUCCEEDED(hr)) + { + hr = cpEnum->Next(1, ppObjectToken, NULL); + if (hr == S_FALSE) + { + *ppObjectToken = NULL; + hr = SPERR_NOT_FOUND; + } + } + + if (hr != SPERR_NOT_FOUND) + { + SPDBG_REPORT_ON_FAIL(hr); + } + + return hr; +} + +template +HRESULT SpCreateObjectFromToken(ISpObjectToken * pToken, T ** ppObject, + IUnknown * pUnkOuter = NULL, DWORD dwClsCtxt = CLSCTX_ALL) +{ + SPDBG_FUNC("SpCreateObjectFromToken"); + HRESULT hr; + + hr = pToken->CreateInstance(pUnkOuter, dwClsCtxt, __uuidof(T), (void **)ppObject); + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +template +HRESULT SpCreateObjectFromTokenId(const WCHAR * pszTokenId, T ** ppObject, + IUnknown * pUnkOuter = NULL, DWORD dwClsCtxt = CLSCTX_ALL) +{ + SPDBG_FUNC("SpCreateObjectFromTokenId"); + + ISpObjectToken * pToken; + HRESULT hr = SpGetTokenFromId(pszTokenId, &pToken); + if (SUCCEEDED(hr)) + { + hr = SpCreateObjectFromToken(pToken, ppObject, pUnkOuter, dwClsCtxt); + pToken->Release(); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +template +HRESULT SpCreateDefaultObjectFromCategoryId(const WCHAR * pszCategoryId, T ** ppObject, + IUnknown * pUnkOuter = NULL, DWORD dwClsCtxt = CLSCTX_ALL) +{ + SPDBG_FUNC("SpCreateObjectFromTokenId"); + + ISpObjectToken * pToken; + HRESULT hr = SpGetDefaultTokenFromCategoryId(pszCategoryId, &pToken); + if (SUCCEEDED(hr)) + { + hr = SpCreateObjectFromToken(pToken, ppObject, pUnkOuter, dwClsCtxt); + pToken->Release(); + } + + SPDBG_REPORT_ON_FAIL(hr); + return hr; +} + +template +HRESULT SpCreateBestObject( + const WCHAR * pszCategoryId, + const WCHAR * pszReqAttribs, + const WCHAR * pszOptAttribs, + T ** ppObject, + IUnknown * pUnkOuter = NULL, + DWORD dwClsCtxt = CLSCTX_ALL) +{ + SPDBG_FUNC("SpCreateBestObject"); + HRESULT hr; + + CComPtr cpToken; + hr = SpFindBestToken(pszCategoryId, pszReqAttribs, pszOptAttribs, &cpToken); + + if (SUCCEEDED(hr)) + { + hr = SpCreateObjectFromToken(cpToken, ppObject, pUnkOuter, dwClsCtxt); + } + + if (hr != SPERR_NOT_FOUND) + { + SPDBG_REPORT_ON_FAIL(hr); + } + + return hr; +} + +inline HRESULT SpCreatePhoneConverter( + LANGID LangID, + const WCHAR * pszReqAttribs, + const WCHAR * pszOptAttribs, + ISpPhoneConverter ** ppPhoneConverter) +{ + SPDBG_FUNC("SpCreatePhoneConverter"); + HRESULT hr; + + if (LangID == 0) + { + hr = E_INVALIDARG; + } + else + { + CSpDynamicString dstrReqAttribs; + if (pszReqAttribs) + { + dstrReqAttribs = pszReqAttribs; + dstrReqAttribs.Append(L";"); + } + + WCHAR szLang[MAX_PATH]; + + SpHexFromUlong(szLang, LangID); + + WCHAR szLangCondition[MAX_PATH]; + wcscpy(szLangCondition, L"Language="); + wcscat(szLangCondition, szLang); + + dstrReqAttribs.Append(szLangCondition); + + hr = SpCreateBestObject(SPCAT_PHONECONVERTERS, dstrReqAttribs, pszOptAttribs, ppPhoneConverter); + } + + if (hr != SPERR_NOT_FOUND) + { + SPDBG_REPORT_ON_FAIL(hr); + } + + return hr; +} + +/**************************************************************************** +* SpHrFromWin32 * +*---------------* +* Description: +* This inline function works around a basic problem with the macro +* HRESULT_FROM_WIN32. The macro forces the expresion in ( ) to be evaluated +* two times. By using this inline function, the expression will only be +* evaluated once. +* +* Returns: +* HRESULT of converted Win32 error code +* +*****************************************************************************/ + +inline HRESULT SpHrFromWin32(DWORD dwErr) +{ + return HRESULT_FROM_WIN32(dwErr); +} + + +/**************************************************************************** +* SpHrFromLastWin32Error * +*------------------------* +* Description: +* This simple inline function is used to return a converted HRESULT +* from the Win32 function ::GetLastError. Note that using HRESULT_FROM_WIN32 +* will evaluate the error code twice so we don't want to use: +* +* HRESULT_FROM_WIN32(::GetLastError()) +* +* since that will call GetLastError twice. +* On Win98 and WinMe ::GetLastError() returns 0 for some functions (see MSDN). +* We therefore check for that and return E_FAIL. This function should only be +* called in an error case since it will always return an error code! +* +* Returns: +* HRESULT for ::GetLastError() +* +*****************************************************************************/ + +inline HRESULT SpHrFromLastWin32Error() +{ + DWORD dw = ::GetLastError(); + return (dw == 0) ? E_FAIL : SpHrFromWin32(dw); +} + + +/**************************************************************************** +* SpGetUserDefaultUILanguage * +*----------------------------* +* Description: +* Returns the default user interface language, using a method +* appropriate to the platform (Windows 9x, Windows NT, or Windows 2000) +* +* Returns: +* Default UI language +* +*****************************************************************************/ + +inline LANGID SpGetUserDefaultUILanguage(void) +{ + HRESULT hr = S_OK; + LANGID wUILang = 0; + + OSVERSIONINFO Osv ; + Osv.dwOSVersionInfoSize = sizeof(Osv) ; + if(!GetVersionEx(&Osv)) + { + hr = SpHrFromLastWin32Error(); + } + // Get the UI language by one of three methods, depending on the system + else if(Osv.dwPlatformId != VER_PLATFORM_WIN32_NT) + { + // Case 1: Running on Windows 9x. Get the system UI language from registry: + CHAR szData[32]; + DWORD dwSize = sizeof(szData) ; + HKEY hKey; + + long lRet = RegOpenKeyEx( + HKEY_USERS, + _T(".Default\\Control Panel\\desktop\\ResourceLocale"), + 0, + KEY_READ, + &hKey); + +#ifdef _WIN32_WCE_BUG_10655 + if (lRet == ERROR_INVALID_PARAMETER) + { + lRet = ERROR_FILE_NOT_FOUND; + } +#endif // _WIN32_WCE_BUG_10655 + + hr = SpHrFromWin32(lRet); + + if (SUCCEEDED(hr)) + { + lRet = RegQueryValueEx( + hKey, + _T(""), + NULL, + NULL, + (BYTE *)szData, + &dwSize); + +#ifdef _WIN32_WCE_BUG_10655 + if(lRet == ERROR_INVALID_PARAMETER) + { + lRet = ERROR_FILE_NOT_FOUND; + } +#endif //_WIN32_WCE_BUG_10655 + + hr = SpHrFromWin32(lRet); + ::RegCloseKey(hKey) ; + } + if (SUCCEEDED(hr)) + { + // Convert string to number + wUILang = (LANGID) strtol(szData, NULL, 16) ; + } + } + else if (Osv.dwMajorVersion >= 5.0) + { + // Case 2: Running on Windows 2000 or later. Use GetUserDefaultUILanguage to find + // the user's prefered UI language + + + HMODULE hMKernel32 = ::LoadLibraryW(L"kernel32.dll") ; + if (hMKernel32 == NULL) + { + hr = SpHrFromLastWin32Error(); + } + else + { + + LANGID (WINAPI *pfnGetUserDefaultUILanguage) () = + (LANGID (WINAPI *)(void)) +#ifdef _WIN32_WCE + GetProcAddress(hMKernel32, L"GetUserDefaultUILanguage") ; +#else + GetProcAddress(hMKernel32, "GetUserDefaultUILanguage") ; +#endif + + if(NULL != pfnGetUserDefaultUILanguage) + { + wUILang = pfnGetUserDefaultUILanguage() ; + } + else + { // GetProcAddress failed + hr = SpHrFromLastWin32Error(); + } + ::FreeLibrary(hMKernel32); + } + } + else { + // Case 3: Running on Windows NT 4.0 or earlier. Get UI language + // from locale of .default user in registry: + // HKEY_USERS\.DEFAULT\Control Panel\International\Locale + + WCHAR szData[32] ; + DWORD dwSize = sizeof(szData) ; + HKEY hKey ; + + LONG lRet = RegOpenKeyEx(HKEY_USERS, + _T(".DEFAULT\\Control Panel\\International"), + 0, + KEY_READ, + &hKey); +#ifdef _WIN32_WCE_BUG_10655 + if(lRet == ERROR_INVALID_PARAMETER) + { + lRet = ERROR_FILE_NOT_FOUND; + } +#endif //_WIN32_WCE_BUG_10655 + + hr = SpHrFromWin32(lRet); + + if (SUCCEEDED(hr)) + { + lRet = RegQueryValueEx( + hKey, + _T("Locale"), + NULL, + NULL, + (BYTE *)szData, + &dwSize); + +#ifdef _WIN32_WCE_BUG_10655 + if(lRet == ERROR_INVALID_PARAMETER) + { + lRet = ERROR_FILE_NOT_FOUND; + } +#endif //_WIN32_WCE_BUG_10655 + + hr = SpHrFromWin32(lRet); + ::RegCloseKey(hKey); + } + + if (SUCCEEDED(hr)) + { + // Convert string to number + wUILang = (LANGID) wcstol(szData, NULL, 16) ; + + if(0x0401 == wUILang || // Arabic + 0x040d == wUILang || // Hebrew + 0x041e == wUILang // Thai + ) + { + // Special case these to the English UI. + // These versions of Windows NT 4.0 were enabled only, i.e., the + // UI was English. However, the registry setting + // HKEY_USERS\.DEFAULT\Control Panel\International\Locale was set + // to the respective locale for application compatibility. + wUILang = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US) ; + } + } + } + + return (wUILang ? wUILang : ::GetUserDefaultLangID()); // In failure case, try our best! +} + + +inline HRESULT SpGetDescription(ISpObjectToken * pObjToken, WCHAR ** ppszDescription, LANGID Language = SpGetUserDefaultUILanguage()) +{ + WCHAR szLangId[10]; + SpHexFromUlong(szLangId, Language); + HRESULT hr = pObjToken->GetStringValue(szLangId, ppszDescription); + if (hr == SPERR_NOT_FOUND) + { + hr = pObjToken->GetStringValue(NULL, ppszDescription); + } + return hr; +} + + +inline HRESULT SpSetDescription(ISpObjectToken * pObjToken, const WCHAR * pszDescription, LANGID Language = SpGetUserDefaultUILanguage(), BOOL fSetLangIndependentId = TRUE) +{ + WCHAR szLangId[10]; + SpHexFromUlong(szLangId, Language); + HRESULT hr = pObjToken->SetStringValue(szLangId, pszDescription); + if (SUCCEEDED(hr) && fSetLangIndependentId) + { + hr = pObjToken->SetStringValue(NULL, pszDescription); + } + return hr; +} + +/**************************************************************************** +* SpConvertStreamFormatEnum * +*---------------------------* +* Description: +* This method converts the specified stream format into a wave format +* structure. +* +*****************************************************************************/ +inline HRESULT SpConvertStreamFormatEnum(SPSTREAMFORMAT eFormat, GUID * pFormatId, WAVEFORMATEX ** ppCoMemWaveFormatEx) +{ + HRESULT hr = S_OK; + + if(pFormatId==NULL || ::IsBadWritePtr(pFormatId, sizeof(*pFormatId)) + || ppCoMemWaveFormatEx==NULL || ::IsBadWritePtr(ppCoMemWaveFormatEx, sizeof(*ppCoMemWaveFormatEx))) + { + return E_INVALIDARG; + } + + const GUID * pFmtGuid = &GUID_NULL; // Assume failure case + if( eFormat >= SPSF_8kHz8BitMono && eFormat <= SPSF_48kHz16BitStereo ) + { + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc(sizeof(WAVEFORMATEX)); + *ppCoMemWaveFormatEx = pwfex; + if (pwfex) + { + DWORD dwIndex = eFormat - SPSF_8kHz8BitMono; + BOOL bIsStereo = dwIndex & 0x1; + BOOL bIs16 = dwIndex & 0x2; + DWORD dwKHZ = (dwIndex & 0x3c) >> 2; + static const DWORD adwKHZ[] = { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }; + pwfex->wFormatTag = WAVE_FORMAT_PCM; + pwfex->nChannels = pwfex->nBlockAlign = (WORD)(bIsStereo ? 2 : 1); + pwfex->nSamplesPerSec = adwKHZ[dwKHZ]; + pwfex->wBitsPerSample = 8; + if (bIs16) + { + pwfex->wBitsPerSample *= 2; + pwfex->nBlockAlign *= 2; + } + pwfex->nAvgBytesPerSec = pwfex->nSamplesPerSec * pwfex->nBlockAlign; + pwfex->cbSize = 0; + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if( eFormat == SPSF_TrueSpeech_8kHz1BitMono ) + { + int NumBytes = sizeof( WAVEFORMATEX ) + 32; + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc( NumBytes ); + *ppCoMemWaveFormatEx = pwfex; + if( pwfex ) + { + memset( pwfex, 0, NumBytes ); + pwfex->wFormatTag = WAVE_FORMAT_DSPGROUP_TRUESPEECH; + pwfex->nChannels = 1; + pwfex->nSamplesPerSec = 8000; + pwfex->nAvgBytesPerSec = 1067; + pwfex->nBlockAlign = 32; + pwfex->wBitsPerSample = 1; + pwfex->cbSize = 32; + BYTE* pExtra = ((BYTE*)pwfex) + sizeof( WAVEFORMATEX ); + pExtra[0] = 1; + pExtra[2] = 0xF0; + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if( (eFormat >= SPSF_CCITT_ALaw_8kHzMono ) && + (eFormat <= SPSF_CCITT_ALaw_44kHzStereo ) ) + { + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc( sizeof(WAVEFORMATEX) ); + *ppCoMemWaveFormatEx = pwfex; + if( pwfex ) + { + memset( pwfex, 0, sizeof(WAVEFORMATEX) ); + DWORD dwIndex = eFormat - SPSF_CCITT_ALaw_8kHzMono; + DWORD dwKHZ = dwIndex / 2; + static const DWORD adwKHZ[] = { 8000, 11025, 22050, 44100 }; + BOOL bIsStereo = dwIndex & 0x1; + pwfex->wFormatTag = WAVE_FORMAT_ALAW; + pwfex->nChannels = pwfex->nBlockAlign = (WORD)(bIsStereo ? 2 : 1); + pwfex->nSamplesPerSec = adwKHZ[dwKHZ]; + pwfex->wBitsPerSample = 8; + pwfex->nAvgBytesPerSec = pwfex->nSamplesPerSec * pwfex->nBlockAlign; + pwfex->cbSize = 0; + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if( (eFormat >= SPSF_CCITT_uLaw_8kHzMono ) && + (eFormat <= SPSF_CCITT_uLaw_44kHzStereo ) ) + { + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc( sizeof(WAVEFORMATEX) ); + *ppCoMemWaveFormatEx = pwfex; + if( pwfex ) + { + memset( pwfex, 0, sizeof(WAVEFORMATEX) ); + DWORD dwIndex = eFormat - SPSF_CCITT_uLaw_8kHzMono; + DWORD dwKHZ = dwIndex / 2; + static const DWORD adwKHZ[] = { 8000, 11025, 22050, 44100 }; + BOOL bIsStereo = dwIndex & 0x1; + pwfex->wFormatTag = WAVE_FORMAT_MULAW; + pwfex->nChannels = pwfex->nBlockAlign = (WORD)(bIsStereo ? 2 : 1); + pwfex->nSamplesPerSec = adwKHZ[dwKHZ]; + pwfex->wBitsPerSample = 8; + pwfex->nAvgBytesPerSec = pwfex->nSamplesPerSec * pwfex->nBlockAlign; + pwfex->cbSize = 0; + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if( (eFormat >= SPSF_ADPCM_8kHzMono ) && + (eFormat <= SPSF_ADPCM_44kHzStereo ) ) + { + int NumBytes = sizeof( WAVEFORMATEX ) + 32; + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc( NumBytes ); + *ppCoMemWaveFormatEx = pwfex; + if( pwfex ) + { + //--- Some of these values seem odd. We used what the codec told us. + static const DWORD adwKHZ[] = { 8000, 11025, 22050, 44100 }; + static const DWORD BytesPerSec[] = { 4096, 8192, 5644, 11289, 11155, 22311, 22179, 44359 }; + static const DWORD BlockAlign[] = { 256, 256, 512, 1024 }; + static const BYTE Extra811[32] = + { + 0xF4, 0x01, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x40, 0x00, 0xF0, 0x00, 0x00, 0x00, + 0xCC, 0x01, 0x30, 0xFF, 0x88, 0x01, 0x18, 0xFF + }; + + static const BYTE Extra22[32] = + { + 0xF4, 0x03, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x40, 0x00, 0xF0, 0x00, 0x00, 0x00, + 0xCC, 0x01, 0x30, 0xFF, 0x88, 0x01, 0x18, 0xFF + }; + + static const BYTE Extra44[32] = + { + 0xF4, 0x07, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x02, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x00, + 0xC0, 0x00, 0x40, 0x00, 0xF0, 0x00, 0x00, 0x00, + 0xCC, 0x01, 0x30, 0xFF, 0x88, 0x01, 0x18, 0xFF + }; + + static const BYTE* Extra[4] = { Extra811, Extra811, Extra22, Extra44 }; + memset( pwfex, 0, NumBytes ); + DWORD dwIndex = eFormat - SPSF_ADPCM_8kHzMono; + DWORD dwKHZ = dwIndex / 2; + BOOL bIsStereo = dwIndex & 0x1; + pwfex->wFormatTag = WAVE_FORMAT_ADPCM; + pwfex->nChannels = (WORD)(bIsStereo ? 2 : 1); + pwfex->nSamplesPerSec = adwKHZ[dwKHZ]; + pwfex->nAvgBytesPerSec = BytesPerSec[dwIndex]; + pwfex->nBlockAlign = (WORD)(BlockAlign[dwKHZ] * pwfex->nChannels); + pwfex->wBitsPerSample = 4; + pwfex->cbSize = 32; + BYTE* pExtra = ((BYTE*)pwfex) + sizeof( WAVEFORMATEX ); + memcpy( pExtra, Extra[dwKHZ], 32 ); + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else if( (eFormat >= SPSF_GSM610_8kHzMono ) && + (eFormat <= SPSF_GSM610_44kHzMono ) ) + { + int NumBytes = sizeof( WAVEFORMATEX ) + 2; + WAVEFORMATEX * pwfex = (WAVEFORMATEX *)::CoTaskMemAlloc( NumBytes ); + *ppCoMemWaveFormatEx = pwfex; + if( pwfex ) + { + //--- Some of these values seem odd. We used what the codec told us. + static const DWORD adwKHZ[] = { 8000, 11025, 22050, 44100 }; + static const DWORD BytesPerSec[] = { 1625, 2239, 4478, 8957 }; + memset( pwfex, 0, NumBytes ); + DWORD dwIndex = eFormat - SPSF_GSM610_8kHzMono; + pwfex->wFormatTag = WAVE_FORMAT_GSM610; + pwfex->nChannels = 1; + pwfex->nSamplesPerSec = adwKHZ[dwIndex]; + pwfex->nAvgBytesPerSec = BytesPerSec[dwIndex]; + pwfex->nBlockAlign = 65; + pwfex->wBitsPerSample = 0; + pwfex->cbSize = 2; + BYTE* pExtra = ((BYTE*)pwfex) + sizeof( WAVEFORMATEX ); + pExtra[0] = 0x40; + pExtra[1] = 0x01; + pFmtGuid = &SPDFID_WaveFormatEx; + } + else + { + hr = E_OUTOFMEMORY; + } + } + else + { + *ppCoMemWaveFormatEx = NULL; + switch (eFormat) + { + case SPSF_NoAssignedFormat: + break; + case SPSF_Text: + pFmtGuid = &SPDFID_Text; + break; + default: + hr = E_INVALIDARG; + break; + } + } + *pFormatId = *pFmtGuid; + return hr; +} + +class CSpStreamFormat +{ +public: + GUID m_guidFormatId; + WAVEFORMATEX * m_pCoMemWaveFormatEx; + + + static CoMemCopyWFEX(const WAVEFORMATEX * pSrc, WAVEFORMATEX ** ppCoMemWFEX) + { + ULONG cb = sizeof(WAVEFORMATEX) + pSrc->cbSize; + *ppCoMemWFEX = (WAVEFORMATEX *)::CoTaskMemAlloc(cb); + if (*ppCoMemWFEX) + { + memcpy(*ppCoMemWFEX, pSrc, cb); + return S_OK; + } + else + { + return E_OUTOFMEMORY; + } + } + + + CSpStreamFormat() + { + m_guidFormatId = GUID_NULL; + m_pCoMemWaveFormatEx = NULL; + } + + CSpStreamFormat(SPSTREAMFORMAT eFormat, HRESULT * phr) + { + *phr = SpConvertStreamFormatEnum(eFormat, &m_guidFormatId, &m_pCoMemWaveFormatEx); + } + + CSpStreamFormat(const WAVEFORMATEX * pWaveFormatEx, HRESULT * phr) + { + SPDBG_ASSERT(pWaveFormatEx); + *phr = CoMemCopyWFEX(pWaveFormatEx, &m_pCoMemWaveFormatEx); + m_guidFormatId = SUCCEEDED(*phr) ? SPDFID_WaveFormatEx : GUID_NULL; + } + + ~CSpStreamFormat() + { + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + } + + void Clear() + { + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + m_pCoMemWaveFormatEx = NULL; + memset(&m_guidFormatId, 0, sizeof(m_guidFormatId)); + } + + const GUID & FormatId() const + { + return m_guidFormatId; + } + + const WAVEFORMATEX * WaveFormatExPtr() const + { + return m_pCoMemWaveFormatEx; + } + + + HRESULT AssignFormat(SPSTREAMFORMAT eFormat) + { + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + return SpConvertStreamFormatEnum(eFormat, &m_guidFormatId, &m_pCoMemWaveFormatEx); + } + + HRESULT AssignFormat(ISpStreamFormat * pStream) + { + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + m_pCoMemWaveFormatEx = NULL; + return pStream->GetFormat(&m_guidFormatId, &m_pCoMemWaveFormatEx); + } + + HRESULT AssignFormat(const WAVEFORMATEX * pWaveFormatEx) + { + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + HRESULT hr = CoMemCopyWFEX(pWaveFormatEx, &m_pCoMemWaveFormatEx); + m_guidFormatId = SUCCEEDED(hr) ? SPDFID_WaveFormatEx : GUID_NULL; + return hr; + } + + HRESULT AssignFormat(REFGUID rguidFormatId, const WAVEFORMATEX * pWaveFormatEx) + { + HRESULT hr = S_OK; + + m_guidFormatId = rguidFormatId; + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + m_pCoMemWaveFormatEx = NULL; + + if (rguidFormatId == SPDFID_WaveFormatEx) + { + if (::IsBadReadPtr(pWaveFormatEx, sizeof(*pWaveFormatEx))) + { + hr = E_INVALIDARG; + } + else + { + hr = CoMemCopyWFEX(pWaveFormatEx, &m_pCoMemWaveFormatEx); + } + + if (FAILED(hr)) + { + m_guidFormatId = GUID_NULL; + } + } + + return hr; + } + + + BOOL IsEqual(REFGUID rguidFormatId, const WAVEFORMATEX * pwfex) const + { + if (rguidFormatId == m_guidFormatId) + { + if (m_pCoMemWaveFormatEx) + { + if (pwfex && + pwfex->cbSize == m_pCoMemWaveFormatEx->cbSize && + memcmp(m_pCoMemWaveFormatEx, pwfex, sizeof(WAVEFORMATEX) + pwfex->cbSize) == 0) + { + return TRUE; + } + } + else + { + return (pwfex == NULL); + } + } + return FALSE; + } + + + + HRESULT ParamValidateAssignFormat(REFGUID rguidFormatId, const WAVEFORMATEX * pWaveFormatEx, BOOL fRequireWaveFormat = FALSE) + { + if ((pWaveFormatEx && (::IsBadReadPtr(pWaveFormatEx, sizeof(*pWaveFormatEx)) || rguidFormatId != SPDFID_WaveFormatEx)) || + (fRequireWaveFormat && pWaveFormatEx == NULL)) + { + return E_INVALIDARG; + } + return AssignFormat(rguidFormatId, pWaveFormatEx); + } + + SPSTREAMFORMAT ComputeFormatEnum() + { + if (m_guidFormatId == GUID_NULL) + { + return SPSF_NoAssignedFormat; + } + if (m_guidFormatId == SPDFID_Text) + { + return SPSF_Text; + } + if (m_guidFormatId != SPDFID_WaveFormatEx) + { + return SPSF_NonStandardFormat; + } + // + // It is a WAVEFORMATEX. Now determine which type it is and convert. + // + DWORD dwIndex = 0; + switch (m_pCoMemWaveFormatEx->wFormatTag) + { + case WAVE_FORMAT_PCM: + { + switch (m_pCoMemWaveFormatEx->nChannels) + { + case 1: + break; + case 2: + dwIndex |= 1; + break; + default: + return SPSF_ExtendedAudioFormat; + } + + switch (m_pCoMemWaveFormatEx->wBitsPerSample) + { + case 8: + break; + case 16: + dwIndex |= 2; + break; + default: + return SPSF_ExtendedAudioFormat; + } + + switch (m_pCoMemWaveFormatEx->nSamplesPerSec) + { + case 48000: + dwIndex += 4; // Fall through + case 44100: + dwIndex += 4; // Fall through + case 32000: + dwIndex += 4; // Fall through + case 24000: + dwIndex += 4; // Fall through + case 22050: + dwIndex += 4; // Fall through + case 16000: + dwIndex += 4; // Fall through + case 12000: + dwIndex += 4; // Fall through + case 11025: + dwIndex += 4; // Fall through + case 8000: + break; + default: + return SPSF_ExtendedAudioFormat; + } + + return static_cast(SPSF_8kHz8BitMono + dwIndex); + } + + case WAVE_FORMAT_DSPGROUP_TRUESPEECH: + { + return SPSF_TrueSpeech_8kHz1BitMono; + } + + case WAVE_FORMAT_ALAW: // fall through + case WAVE_FORMAT_MULAW: + case WAVE_FORMAT_ADPCM: + { + switch (m_pCoMemWaveFormatEx->nChannels) + { + case 1: + break; + case 2: + dwIndex |= 1; + break; + default: + return SPSF_ExtendedAudioFormat; + } + + if(m_pCoMemWaveFormatEx->wFormatTag == WAVE_FORMAT_ADPCM) + { + if(m_pCoMemWaveFormatEx->wBitsPerSample != 4) + { + return SPSF_ExtendedAudioFormat; + } + } + else if(m_pCoMemWaveFormatEx->wBitsPerSample != 8) + { + return SPSF_ExtendedAudioFormat; + } + + switch (m_pCoMemWaveFormatEx->nSamplesPerSec) + { + case 44100: + dwIndex += 2; // Fall through + case 22050: + dwIndex += 2; // Fall through + case 11025: + dwIndex += 2; // Fall through + case 8000: + break; + default: + return SPSF_ExtendedAudioFormat; + } + + switch( m_pCoMemWaveFormatEx->wFormatTag ) + { + case WAVE_FORMAT_ALAW: + return static_cast(SPSF_CCITT_ALaw_8kHzMono + dwIndex); + case WAVE_FORMAT_MULAW: + return static_cast(SPSF_CCITT_uLaw_8kHzMono + dwIndex); + case WAVE_FORMAT_ADPCM: + return static_cast(SPSF_ADPCM_8kHzMono + dwIndex); + } + } + + case WAVE_FORMAT_GSM610: + { + if( m_pCoMemWaveFormatEx->nChannels != 1 ) + { + return SPSF_ExtendedAudioFormat; + } + + switch (m_pCoMemWaveFormatEx->nSamplesPerSec) + { + case 44100: + dwIndex = 3; + break; + case 22050: + dwIndex = 2; + break; + case 11025: + dwIndex = 1; + break; + case 8000: + dwIndex = 0; + break; + default: + return SPSF_ExtendedAudioFormat; + } + + return static_cast(SPSF_GSM610_8kHzMono + dwIndex); + } + + default: + return SPSF_ExtendedAudioFormat; + break; + } + } + + void DetachTo(CSpStreamFormat & Other) + { + ::CoTaskMemFree(Other.m_pCoMemWaveFormatEx); + Other.m_guidFormatId = m_guidFormatId; + Other.m_pCoMemWaveFormatEx = m_pCoMemWaveFormatEx; + m_pCoMemWaveFormatEx = NULL; + memset(&m_guidFormatId, 0, sizeof(m_guidFormatId)); + } + + void DetachTo(GUID * pFormatId, WAVEFORMATEX ** ppCoMemWaveFormatEx) + { + *pFormatId = m_guidFormatId; + *ppCoMemWaveFormatEx = m_pCoMemWaveFormatEx; + m_pCoMemWaveFormatEx = NULL; + memset(&m_guidFormatId, 0, sizeof(m_guidFormatId)); + } + + HRESULT CopyTo(GUID * pFormatId, WAVEFORMATEX ** ppCoMemWFEX) const + { + HRESULT hr = S_OK; + *pFormatId = m_guidFormatId; + if (m_pCoMemWaveFormatEx) + { + hr = CoMemCopyWFEX(m_pCoMemWaveFormatEx, ppCoMemWFEX); + if (FAILED(hr)) + { + memset(pFormatId, 0, sizeof(*pFormatId)); + } + } + else + { + *ppCoMemWFEX = NULL; + } + return hr; + } + + HRESULT CopyTo(CSpStreamFormat & Other) const + { + ::CoTaskMemFree(Other.m_pCoMemWaveFormatEx); + return CopyTo(&Other.m_guidFormatId, &Other.m_pCoMemWaveFormatEx); + } + + HRESULT AssignFormat(const CSpStreamFormat & Src) + { + return Src.CopyTo(*this); + } + + + HRESULT ParamValidateCopyTo(GUID * pFormatId, WAVEFORMATEX ** ppCoMemWFEX) const + { + if (::IsBadWritePtr(pFormatId, sizeof(*pFormatId)) || + ::IsBadWritePtr(ppCoMemWFEX, sizeof(*ppCoMemWFEX))) + { + return E_POINTER; + } + return CopyTo(pFormatId, ppCoMemWFEX); + } + + BOOL operator==(const CSpStreamFormat & Other) const + { + return IsEqual(Other.m_guidFormatId, Other.m_pCoMemWaveFormatEx); + } + BOOL operator!=(const CSpStreamFormat & Other) const + { + return !IsEqual(Other.m_guidFormatId, Other.m_pCoMemWaveFormatEx); + } + + ULONG SerializeSize() const + { + ULONG cb = sizeof(ULONG) + sizeof(m_guidFormatId); + if (m_pCoMemWaveFormatEx) + { + cb += sizeof(WAVEFORMATEX) + m_pCoMemWaveFormatEx->cbSize + 3; // Add 3 to round up + cb -= cb % 4; // Round to DWORD + } + return cb; + } + + ULONG Serialize(BYTE * pBuffer) const + { + ULONG cb = SerializeSize(); + *((UNALIGNED ULONG *)pBuffer) = cb; + pBuffer += sizeof(ULONG); + *((UNALIGNED GUID *)pBuffer) = m_guidFormatId; + if (m_pCoMemWaveFormatEx) + { + pBuffer += sizeof(m_guidFormatId); + memcpy(pBuffer, m_pCoMemWaveFormatEx, sizeof(WAVEFORMATEX) + m_pCoMemWaveFormatEx->cbSize); + } + return cb; + } + + HRESULT Deserialize(const BYTE * pBuffer, ULONG * pcbUsed) + { + HRESULT hr = S_OK; + ::CoTaskMemFree(m_pCoMemWaveFormatEx); + m_pCoMemWaveFormatEx = NULL; + *pcbUsed = *((UNALIGNED ULONG *)pBuffer); + pBuffer += sizeof(ULONG); + // Misaligment exception is generated for SHx platform. + // Marking pointer as UNALIGNED does not help. +#ifndef _WIN32_WCE + m_guidFormatId = *((UNALIGNED GUID *)pBuffer); +#else + memcpy(&m_guidFormatId, pBuffer, sizeof(GUID)); +#endif + if (*pcbUsed > sizeof(GUID) + sizeof(ULONG)) + { + pBuffer += sizeof(m_guidFormatId); + hr = CoMemCopyWFEX((const WAVEFORMATEX *)pBuffer, &m_pCoMemWaveFormatEx); + if (FAILED(hr)) + { + m_guidFormatId = GUID_NULL; + } + } + return hr; + } + +}; + + + +// Return the default codepage given a LCID. +// Note some of the newer locales do not have associated Windows codepages. For these, we return UTF-8. + +inline UINT SpCodePageFromLcid(LCID lcid) +{ + char achCodePage[6]; + + return (0 != GetLocaleInfoA(lcid, LOCALE_IDEFAULTANSICODEPAGE, achCodePage, sizeof(achCodePage))) ? atoi(achCodePage) : 65001; +} + + +inline HRESULT SPBindToFile( LPCWSTR pFileName, SPFILEMODE eMode, ISpStream ** ppStream, + const GUID * pFormatId = NULL, const WAVEFORMATEX * pWaveFormatEx = NULL, + ULONGLONG ullEventInterest = SPFEI_ALL_EVENTS) +{ + HRESULT hr = ::CoCreateInstance(CLSID_SpStream, NULL, CLSCTX_ALL, __uuidof(*ppStream), (void **)ppStream); + if (SUCCEEDED(hr)) + { + hr = (*ppStream)->BindToFile(pFileName, eMode, pFormatId, pWaveFormatEx, ullEventInterest); + if (FAILED(hr)) + { + (*ppStream)->Release(); + *ppStream = NULL; + } + } + return hr; +} /* SPBindToFile */ + +#ifndef _UNICODE +inline HRESULT SPBindToFile( const TCHAR * pFileName, SPFILEMODE eMode, ISpStream** ppStream, + const GUID * pFormatId = NULL, const WAVEFORMATEX * pWaveFormatEx = NULL, + ULONGLONG ullEventInterest = SPFEI_ALL_EVENTS) +{ + WCHAR szWcharFileName[MAX_PATH]; + ::MultiByteToWideChar(CP_ACP, 0, pFileName, -1, szWcharFileName, sp_countof(szWcharFileName)); + return SPBindToFile(szWcharFileName, eMode, ppStream, pFormatId, pWaveFormatEx, ullEventInterest); +} +#endif + +/**************************************************************************** +* SpClearEvent * +*--------------* +* Description: +* Helper function that can be used by clients that do not use the CSpEvent +* class. +* +* Returns: +* +*****************************************************************************/ + +inline void SpClearEvent(SPEVENT * pe) +{ + if( pe->elParamType != SPEI_UNDEFINED) + { + if( pe->elParamType == SPET_LPARAM_IS_POINTER || + pe->elParamType == SPET_LPARAM_IS_STRING) + { + ::CoTaskMemFree((void *)pe->lParam); + } + else if (pe->elParamType == SPET_LPARAM_IS_TOKEN || + pe->elParamType == SPET_LPARAM_IS_OBJECT) + { + ((IUnknown*)pe->lParam)->Release(); + } + } + memset(pe, 0, sizeof(*pe)); +} + +/**************************************************************************** +* SpInitEvent * +*-------------* +* Description: +* +* Returns: +* +*****************************************************************************/ + +inline void SpInitEvent(SPEVENT * pe) +{ + memset(pe, 0, sizeof(*pe)); +} + +/**************************************************************************** +* SpEventSerializeSize * +*----------------------* +* Description: +* Computes the required size of a buffer to serialize an event. The caller +* must specify which type of serialized event is desired -- either SPSERIALIZEDEVENT +* or SPSERIALIZEDEVENT64. +* +* Returns: +* Size in bytes required to seriailze the event. +* +****************************************************************************/ + +// WCE compiler does not work propertly with template +#ifndef _WIN32_WCE +template +inline ULONG SpEventSerializeSize(const SPEVENT * pEvent) + +{ + ULONG ulSize = sizeof(T); + +#else + +inline ULONG SpEventSerializeSize(const SPEVENT * pEvent, ULONG ulSize) +{ +#endif //_WIN32_WCE + + if( ( pEvent->elParamType == SPET_LPARAM_IS_POINTER ) && pEvent->lParam ) + { + ulSize += ULONG(pEvent->wParam); + } + else if ((pEvent->elParamType == SPET_LPARAM_IS_STRING) && pEvent->lParam != NULL) + { + ulSize += (wcslen((WCHAR*)pEvent->lParam) + 1) * sizeof( WCHAR ); + } + else if( pEvent->elParamType == SPET_LPARAM_IS_TOKEN ) + { + CSpDynamicString dstrObjectId; + if( ((ISpObjectToken*)(pEvent->lParam))->GetId( &dstrObjectId ) == S_OK ) + { + ulSize += (dstrObjectId.Length() + 1) * sizeof( WCHAR ); + } + } + // Round up to nearest DWORD + ulSize += 3; + ulSize -= ulSize % 4; + return ulSize; +} + +/**************************************************************************** +* SpSerializedEventSize * +*-----------------------* +* Description: +* Returns the size, in bytes, used by a serialized event. The caller can +* pass a pointer to either a SPSERIAILZEDEVENT or SPSERIALIZEDEVENT64 structure. +* +* Returns: +* Number of bytes used by serizlied event +* +********************************************************************* RAL ***/ + +// WCE compiler does not work propertly with template +#ifndef _WIN32_WCE +template +inline ULONG SpSerializedEventSize(const T * pSerEvent) +{ + ULONG ulSize = sizeof(T); + + if( ( pSerEvent->elParamType == SPET_LPARAM_IS_POINTER ) && pSerEvent->SerializedlParam ) + { + ulSize += ULONG(pSerEvent->SerializedwParam); + } + else if ((pSerEvent->elParamType == SPET_LPARAM_IS_STRING || pSerEvent->elParamType == SPET_LPARAM_IS_TOKEN) && + pSerEvent->SerializedlParam != NULL) + { + ulSize += (wcslen((WCHAR*)(pSerEvent + 1)) + 1) * sizeof( WCHAR ); + } + // Round up to nearest DWORD + ulSize += 3; + ulSize -= ulSize % 4; + return ulSize; +} + +#else //_WIN32_WCE + +inline ULONG SpSerializedEventSize(const SPSERIALIZEDEVENT * pSerEvent, ULONG ulSize) +{ + if( ( pSerEvent->elParamType == SPET_LPARAM_IS_POINTER ) && pSerEvent->SerializedlParam ) + { + ulSize += ULONG(pSerEvent->SerializedwParam); + } + else if ((pSerEvent->elParamType == SPET_LPARAM_IS_STRING || pSerEvent->elParamType == SPET_LPARAM_IS_TOKEN) && + pSerEvent->SerializedlParam != NULL) + { + ulSize += (wcslen((WCHAR*)(pSerEvent + 1)) + 1) * sizeof( WCHAR ); + } + // Round up to nearest DWORD + ulSize += 3; + ulSize -= ulSize % 4; + return ulSize; +} + +inline ULONG SpSerializedEventSize(const SPSERIALIZEDEVENT64 * pSerEvent, ULONG ulSize) +{ + if( ( pSerEvent->elParamType == SPET_LPARAM_IS_POINTER ) && pSerEvent->SerializedlParam ) + { + ulSize += ULONG(pSerEvent->SerializedwParam); + } + else if ((pSerEvent->elParamType == SPET_LPARAM_IS_STRING || pSerEvent->elParamType == SPET_LPARAM_IS_TOKEN) && + pSerEvent->SerializedlParam != NULL) + { + ulSize += (wcslen((WCHAR*)(pSerEvent + 1)) + 1) * sizeof( WCHAR ); + } + // Round up to nearest DWORD + ulSize += 3; + ulSize -= ulSize % 4; + return ulSize; +} + +#endif //_WIN32_WCE + +/*** CSpEvent helper class +* +*/ +class CSpEvent : public SPEVENT +{ +public: + CSpEvent() + { + SpInitEvent(this); + } + ~CSpEvent() + { + SpClearEvent(this); + } + // If you need to take the address of a CSpEvent that is not const, use the AddrOf() method + // which will do debug checking of parameters. If you encounter this problem when calling + // GetEvents from an event source, you may want to use the GetFrom() method of this class. + const SPEVENT * operator&() + { + return this; + } + CSpEvent * AddrOf() + { + // Note: This method does not ASSERT since we assume the caller knows what they are doing. + return this; + } + void Clear() + { + SpClearEvent(this); + } + HRESULT CopyTo(SPEVENT * pDestEvent) const + { + memcpy(pDestEvent, this, sizeof(*pDestEvent)); + if ((elParamType == SPET_LPARAM_IS_POINTER) && lParam) + { + SPDBG_ASSERT(wParam && (wParam < 0x100000)); // this is too big! + pDestEvent->lParam = (LPARAM)::CoTaskMemAlloc(wParam); + if (pDestEvent->lParam) + { + memcpy((void *)pDestEvent->lParam, (void *)lParam, wParam); + } + else + { + pDestEvent->eEventId = SPEI_UNDEFINED; + return E_OUTOFMEMORY; + } + } + else if (elParamType == SPET_LPARAM_IS_STRING && lParam != NULL) + { + pDestEvent->lParam = (LPARAM)::CoTaskMemAlloc((wcslen((WCHAR*)lParam) + 1) * sizeof(WCHAR)); + if (pDestEvent->lParam) + { + wcscpy((WCHAR*)pDestEvent->lParam, (WCHAR*)lParam); + } + else + { + pDestEvent->eEventId = SPEI_UNDEFINED; + return E_OUTOFMEMORY; + } + } + else if (elParamType == SPET_LPARAM_IS_TOKEN || + elParamType == SPET_LPARAM_IS_OBJECT) + { + ((IUnknown*)lParam)->AddRef(); + } + return S_OK; + } + + HRESULT GetFrom(ISpEventSource * pEventSrc) + { + SpClearEvent(this); + return pEventSrc->GetEvents(1, this, NULL); + } + HRESULT CopyFrom(const SPEVENT * pSrcEvent) + { + SpClearEvent(this); + return static_cast(pSrcEvent)->CopyTo(this); + } + void Detach(SPEVENT * pDestEvent = NULL) + { + if (pDestEvent) + { + memcpy(pDestEvent, this, sizeof(*pDestEvent)); + } + memset(this, 0, sizeof(*this)); + } + + template + ULONG SerializeSize() const + { + return SpEventSerializeSize(this); + } + + // Call this method with either SPSERIALIZEDEVENT or SPSERIALIZEDEVENT64 + template + void Serialize(T * pSerEvent) const + { + SPDBG_ASSERT(elParamType != SPET_LPARAM_IS_OBJECT); + pSerEvent->eEventId = this->eEventId; + pSerEvent->elParamType = this->elParamType; + pSerEvent->ulStreamNum = this->ulStreamNum; + pSerEvent->ullAudioStreamOffset = this->ullAudioStreamOffset; + pSerEvent->SerializedwParam = static_cast(this->wParam); + pSerEvent->SerializedlParam = static_cast(this->lParam); + if (lParam) + { + switch(elParamType) + { + case SPET_LPARAM_IS_POINTER: + memcpy(pSerEvent + 1, (void *)lParam, wParam); + pSerEvent->SerializedlParam = sizeof(T); + break; + + case SPET_LPARAM_IS_STRING: + wcscpy((WCHAR *)(pSerEvent + 1), (WCHAR*)lParam); + pSerEvent->SerializedlParam = sizeof(T); + break; + + case SPET_LPARAM_IS_TOKEN: + { + CSpDynamicString dstrObjectId; + if( SUCCEEDED( ((ISpObjectToken*)lParam)->GetId( &dstrObjectId ) ) ) + { + pSerEvent->SerializedwParam = (dstrObjectId.Length() + 1) * sizeof( WCHAR );; + memcpy( pSerEvent + 1, (void *)dstrObjectId.m_psz, static_cast(pSerEvent->SerializedwParam) ); + } + pSerEvent->SerializedlParam = sizeof(T); + } + break; + + default: + break; + } + } + } + + template + HRESULT Serialize(T ** ppCoMemSerEvent, ULONG * pcbSerEvent) const + { +// WCE compiler does not work propertly with template +#ifndef _WIN32_WCE + *pcbSerEvent = SpEventSerializeSize(this); +#else + *pcbSerEvent = SpEventSerializeSize(this, sizeof(** ppCoMemSerEvent)); +#endif + *ppCoMemSerEvent = (T *)::CoTaskMemAlloc(*pcbSerEvent); + if (*ppCoMemSerEvent) + { + Serialize(*ppCoMemSerEvent); + return S_OK; + } + else + { + *pcbSerEvent = 0; + return E_OUTOFMEMORY; + } + } + + + // Call this method with either SPSERIALIZEDEVENT or SPSERIALIZEDEVENT64 + template + HRESULT Deserialize(const T * pSerEvent, ULONG * pcbUsed = NULL) + { + Clear(); + HRESULT hr = S_OK; + const UNALIGNED T * pTemp = pSerEvent; + this->eEventId = pTemp->eEventId; + this->elParamType = pTemp->elParamType; + this->ulStreamNum = pTemp->ulStreamNum; + this->ullAudioStreamOffset = pTemp->ullAudioStreamOffset; + this->wParam = static_cast(pTemp->SerializedwParam); + this->lParam = static_cast(pTemp->SerializedlParam); + if (pTemp->SerializedlParam) + { + ULONG cbAlloc = 0; + switch (pTemp->elParamType) + { + case SPET_LPARAM_IS_POINTER: + cbAlloc = static_cast(wParam); + break; + + case SPET_LPARAM_IS_STRING: + cbAlloc = sizeof(WCHAR) * (1 + wcslen((const WCHAR *)(pTemp + 1))); + break; + + case SPET_LPARAM_IS_TOKEN: + { + ULONG ulDataOffset = ULONG(lParam); + hr = SpGetTokenFromId( (const WCHAR*)(pTemp + 1), + (ISpObjectToken **)&lParam ); + wParam = 0; + } + break; + } + if (cbAlloc) + { + void * pvBuff = ::CoTaskMemAlloc(cbAlloc); + this->lParam = (LPARAM)pvBuff; + if (pvBuff) + { + memcpy(pvBuff, pTemp + 1, cbAlloc); + } + else + { + hr = E_OUTOFMEMORY; + } + } + } + + if( SUCCEEDED( hr ) && pcbUsed ) + { +// WCE compiler does not work propertly with template +#ifndef _WIN32_WCE + *pcbUsed = SpEventSerializeSize(this); +#else + *pcbUsed = SpEventSerializeSize(this, sizeof(*pTemp)); +#endif + } + return hr; + } + + // + // Helpers for access to events. Performs run-time checks in debug and casts + // data to the appropriate types + // + SPPHONEID Phoneme() const + { + SPDBG_ASSERT(eEventId == SPEI_PHONEME); + return (SPPHONEID)LOWORD(lParam); + } + SPVISEMES Viseme() const + { + SPDBG_ASSERT(eEventId == SPEI_VISEME); + return (SPVISEMES)LOWORD(lParam); + } + ULONG InputWordPos() const + { + SPDBG_ASSERT(eEventId == SPEI_WORD_BOUNDARY); + return ULONG(lParam); + } + ULONG InputWordLen() const + { + SPDBG_ASSERT(eEventId == SPEI_WORD_BOUNDARY); + return ULONG(wParam); + } + ULONG InputSentPos() const + { + SPDBG_ASSERT(eEventId == SPEI_SENTENCE_BOUNDARY); + return ULONG(lParam); + } + ULONG InputSentLen() const + { + SPDBG_ASSERT(eEventId == SPEI_SENTENCE_BOUNDARY); + return ULONG(wParam); + } + ISpObjectToken * ObjectToken() const + { + SPDBG_ASSERT(elParamType == SPET_LPARAM_IS_TOKEN); + return (ISpObjectToken *)lParam; + } + ISpObjectToken * VoiceToken() const // More explicit check than ObjectToken() + { + SPDBG_ASSERT(eEventId == SPEI_VOICE_CHANGE); + return ObjectToken(); + } + BOOL PersistVoiceChange() const + { + SPDBG_ASSERT(eEventId == SPEI_VOICE_CHANGE); + return (BOOL)wParam; + } + IUnknown * Object() const + { + SPDBG_ASSERT(elParamType == SPET_LPARAM_IS_OBJECT); + return (IUnknown*)lParam; + } + ISpRecoResult * RecoResult() const + { + SPDBG_ASSERT(eEventId == SPEI_RECOGNITION || eEventId == SPEI_FALSE_RECOGNITION || eEventId == SPEI_HYPOTHESIS); + return (ISpRecoResult *)Object(); + } + BOOL IsPaused() + { + SPDBG_ASSERT(eEventId == SPEI_RECOGNITION || eEventId == SPEI_SR_BOOKMARK); + return (BOOL)(wParam & SPREF_AutoPause); + } + BOOL IsEmulated() + { + SPDBG_ASSERT(eEventId == SPEI_RECOGNITION); + return (BOOL)(wParam & SPREF_Emulated); + } + const WCHAR * String() const + { + SPDBG_ASSERT(elParamType == SPET_LPARAM_IS_STRING); + return (const WCHAR*)lParam; + } + const WCHAR * BookmarkName() const + { + SPDBG_ASSERT(eEventId == SPEI_TTS_BOOKMARK); + return String(); + } + const WCHAR * RequestTypeOfUI() const + { + SPDBG_ASSERT(eEventId == SPEI_REQUEST_UI); + return String(); + } + SPRECOSTATE RecoState() const + { + SPDBG_ASSERT(eEventId == SPEI_RECO_STATE_CHANGE); + return static_cast(wParam); + } + const WCHAR * PropertyName() const + { + SPDBG_ASSERT((eEventId == SPEI_PROPERTY_NUM_CHANGE && elParamType == SPET_LPARAM_IS_STRING) || + (eEventId == SPEI_PROPERTY_STRING_CHANGE && elParamType == SPET_LPARAM_IS_POINTER)); + // Note: Don't use String() method here since in the case of string attributes, the elParamType + // field specifies LPARAM_IS_POINTER, but the attribute name IS the first string in this buffer + return (const WCHAR*)lParam; + } + const LONG PropertyNumValue() const + { + SPDBG_ASSERT(eEventId == SPEI_PROPERTY_NUM_CHANGE); + return static_cast(wParam); + } + const WCHAR * PropertyStringValue() const + { + // Search for the first NULL and return pointer to the char past it. + SPDBG_ASSERT(eEventId == SPEI_PROPERTY_STRING_CHANGE); + for (const WCHAR * psz = (const WCHAR *)lParam; *psz; psz++) {} + return psz + 1; + } + SPINTERFERENCE Interference() const + { + SPDBG_ASSERT(eEventId == SPEI_INTERFERENCE); + return static_cast(lParam); + } + HRESULT EndStreamResult() const + { + SPDBG_ASSERT(eEventId == SPEI_END_SR_STREAM); + return static_cast(lParam); + } + BOOL InputStreamReleased() const + { + SPDBG_ASSERT(eEventId == SPEI_END_SR_STREAM); + return (wParam & SPESF_STREAM_RELEASED) ? TRUE : FALSE; + } +}; + +class CSpPhrasePtr +{ +public: + SPPHRASE * m_pPhrase; + CSpPhrasePtr() : m_pPhrase(NULL) {} + CSpPhrasePtr(ISpPhrase * pPhraseObj, HRESULT * phr) + { + *phr = pPhraseObj->GetPhrase(&m_pPhrase); + } + ~CSpPhrasePtr() + { + ::CoTaskMemFree(m_pPhrase); + } + //The assert on operator& usually indicates a bug. If this is really + //what is needed, however, take the address of the m_pPhrase member explicitly. + SPPHRASE ** operator&() + { + SPDBG_ASSERT(m_pPhrase == NULL); + return &m_pPhrase; + } + operator SPPHRASE *() const + { + return m_pPhrase; + } + SPPHRASE & operator*() const + { + SPDBG_ASSERT(m_pPhrase); + return *m_pPhrase; + } + SPPHRASE * operator->() const + { + return m_pPhrase; + } + bool operator!() const + { + return (m_pPhrase == NULL); + } + void Clear() + { + if (m_pPhrase) + { + ::CoTaskMemFree(m_pPhrase); + m_pPhrase = NULL; + } + } + HRESULT GetFrom(ISpPhrase * pPhraseObj) + { + Clear(); + return pPhraseObj->GetPhrase(&m_pPhrase); + } +}; + + +template +class CSpCoTaskMemPtr +{ +public: + T * m_pT; + CSpCoTaskMemPtr() : m_pT(NULL) {} + CSpCoTaskMemPtr(void * pv) : m_pT((T *)pv) {} + CSpCoTaskMemPtr(ULONG cElements, HRESULT * phr) + { + m_pT = (T *)::CoTaskMemAlloc(cElements * sizeof(T)); + *phr = m_pT ? S_OK : E_OUTOFMEMORY; + } + ~CSpCoTaskMemPtr() + { + ::CoTaskMemFree(m_pT); + } + void Clear() + { + if (m_pT) + { + ::CoTaskMemFree(m_pT); + m_pT = NULL; + } + } + HRESULT Alloc(ULONG cArrayElements = 1) + { + m_pT = (T *)::CoTaskMemRealloc(m_pT, sizeof(T) * cArrayElements); + SPDBG_ASSERT(m_pT); + return (m_pT ? S_OK : E_OUTOFMEMORY); + } + void Attach(void * pv) + { + Clear(); + m_pT = (T *)pv; + } + T * Detatch() + { + T * pT = m_pT; + m_pT = NULL; + return pT; + } + //The assert on operator& usually indicates a bug. If this is really + //what is needed, however, take the address of the m_pT member explicitly. + T ** operator&() + { + SPDBG_ASSERT(m_pT == NULL); + return &m_pT; + } + T * operator->() + { + SPDBG_ASSERT(m_pT != NULL); + return m_pT; + } + operator T *() + { + return m_pT; + } + bool operator!() const + { + return (m_pT == NULL); + } +}; + +/**** Helper function used to create a new phrase object from an array of + test words. Each word in the string is converted to a phrase element. + This is useful to create a phrase to pass to the EmulateRecognition method. + The method can convert standard words as well as words with the + "/display_text/lexical_form/pronounciation;" word format. + You can also specify the DisplayAttributes for each element if desired. + If prgDispAttribs is NULL then the DisplayAttribs for each element default to + SPAF_ONE_TRAILING_SPACE. ****/ +inline HRESULT CreatePhraseFromWordArray(const WCHAR ** ppWords, ULONG cWords, + SPDISPLYATTRIBUTES * prgDispAttribs, + ISpPhraseBuilder **ppResultPhrase, + LANGID LangId = 0, + CComPtr cpPhoneConv = NULL) +{ + SPDBG_FUNC("CreatePhraseFromWordArray"); + HRESULT hr = S_OK; + + if ( cWords == 0 || ppWords == NULL || ::IsBadReadPtr(ppWords, sizeof(*ppWords) * cWords ) ) + { + return E_INVALIDARG; + } + + if ( prgDispAttribs != NULL && ::IsBadReadPtr(prgDispAttribs, sizeof(*prgDispAttribs) * cWords ) ) + { + return E_INVALIDARG; + } + + ULONG cTotalChars = 0; + ULONG i; + WCHAR** pStringPtrArray = (WCHAR**)::CoTaskMemAlloc( cWords * sizeof(WCHAR *)); + if ( !pStringPtrArray ) + { + return E_OUTOFMEMORY; + } + for (i = 0; i < cWords; i++) + { + cTotalChars += wcslen(ppWords[i])+1; + } + + CSpDynamicString dsText(cTotalChars); + if(dsText.m_psz == NULL) + { + ::CoTaskMemFree(pStringPtrArray); + return E_OUTOFMEMORY; + } + CSpDynamicString dsPhoneId(cTotalChars); + if(dsPhoneId.m_psz == NULL) + { + ::CoTaskMemFree(pStringPtrArray); + return E_OUTOFMEMORY; + } + SPPHONEID* pphoneId = dsPhoneId; + + SPPHRASE Phrase; + memset(&Phrase, 0, sizeof(Phrase)); + Phrase.cbSize = sizeof(Phrase); + + if(LangId == 0) + { + LangId = SpGetUserDefaultUILanguage(); + } + + if(cpPhoneConv == NULL) + { + hr = SpCreatePhoneConverter(LangId, NULL, NULL, &cpPhoneConv); + if(FAILED(hr)) + { + ::CoTaskMemFree(pStringPtrArray); + return hr; + } + } + + SPPHRASEELEMENT *pPhraseElement = new SPPHRASEELEMENT[cWords]; + if(pPhraseElement == NULL) + { + ::CoTaskMemFree(pStringPtrArray); + return E_OUTOFMEMORY; + } + memset(pPhraseElement, 0, sizeof(SPPHRASEELEMENT) * cWords); // !!! + + WCHAR * pText = dsText; + for (i = 0; SUCCEEDED(hr) && i < cWords; i++) + { + WCHAR *p = pText; + pStringPtrArray[i] = pText; + wcscpy( pText, ppWords[i] ); + pText += wcslen( p ) + 1; + + if (*p == L'/') + { + //This is a compound word + WCHAR* pszFirstPart = ++p; + WCHAR* pszSecondPart = NULL; + WCHAR* pszThirdPart = NULL; + + while (*p && *p != L'/') + { + p++; + } + if (*p == L'/') + { + //It means we stop at the second '/' + *p = L'\0'; + pszSecondPart = ++p; + while (*p && *p != L'/') + { + p++; + } + if (*p == L'/') + { + //It means we stop at the third '/' + *p = L'\0'; + pszThirdPart = ++p; + } + } + + pPhraseElement[i].pszDisplayText = pszFirstPart; + pPhraseElement[i].pszLexicalForm = pszSecondPart ? pszSecondPart : pszFirstPart; + + if ( pszThirdPart) + { + hr = cpPhoneConv->PhoneToId(pszThirdPart, pphoneId); + if (SUCCEEDED(hr)) + { + pPhraseElement[i].pszPronunciation = pphoneId; + pphoneId += wcslen(pphoneId) + 1; + } + } + } + else + { + //It is the simple format, only have one form, use it for everything. + pPhraseElement[i].pszDisplayText = NULL; + pPhraseElement[i].pszLexicalForm = p; + pPhraseElement[i].pszPronunciation = NULL; + } + + pPhraseElement[i].bDisplayAttributes = (BYTE)(prgDispAttribs ? prgDispAttribs[i] : SPAF_ONE_TRAILING_SPACE); + pPhraseElement[i].RequiredConfidence = SP_NORMAL_CONFIDENCE; + pPhraseElement[i].ActualConfidence = SP_NORMAL_CONFIDENCE; + } + + Phrase.Rule.ulCountOfElements = cWords; + Phrase.pElements = pPhraseElement; + Phrase.LangID = LangId; + + CComPtr cpPhrase; + if (SUCCEEDED(hr)) + { + hr = cpPhrase.CoCreateInstance(CLSID_SpPhraseBuilder); + } + + if (SUCCEEDED(hr)) + { + hr = cpPhrase->InitFromPhrase(&Phrase); + } + if (SUCCEEDED(hr)) + { + *ppResultPhrase = cpPhrase.Detach(); + } + + delete pPhraseElement; + ::CoTaskMemFree(pStringPtrArray); + + return hr; +} + +/**** Helper function used to create a new phrase object from a + test string. Each word in the string is converted to a phrase element. + This is useful to create a phrase to pass to the EmulateRecognition method. + The method can convert standard words as well as words with the + "/display_text/lexical_form/pronounciation;" word format ****/ +inline HRESULT CreatePhraseFromText(const WCHAR *pszOriginalText, + ISpPhraseBuilder **ppResultPhrase, + LANGID LangId = 0, + CComPtr cpPhoneConv = NULL) +{ + SPDBG_FUNC("CreatePhraseFromText"); + HRESULT hr = S_OK; + + //We first trim the input text + CSpDynamicString dsText(pszOriginalText); + if(dsText.m_psz == NULL) + { + return E_OUTOFMEMORY; + } + dsText.TrimBoth(); + + ULONG cWords = 0; + BOOL fInCompoundword = FALSE; + + // Set first array pointer (if *p). + WCHAR *p = dsText; + while (*p) + { + if( iswspace(*p) && !fInCompoundword) + { + cWords++; + *p++ = L'\0'; + while (*p && iswspace(*p)) + { + *p++ = L'\0'; + } + // Add new array pointer. Use vector. + } + else if (*p == L'/' && !fInCompoundword) + { + fInCompoundword = TRUE; + } + else if (*p == L';' && fInCompoundword) + { + fInCompoundword = FALSE; + *p++ = L'\0'; + // Add new array element. + } + else + { + p++; + } + } + + cWords++; + + WCHAR** pStringPtrArray = (WCHAR**)::CoTaskMemAlloc( cWords * sizeof(WCHAR *)); + if ( !pStringPtrArray ) + { + hr = E_OUTOFMEMORY; + } + + if ( SUCCEEDED( hr ) ) + { + p = dsText; + for (ULONG i=0; i +#endif + +#ifndef SPError_h +#include +#endif + +#ifndef SPDebug_h +#include +#endif + +#ifndef SPHelper_h +#include +#endif + +#ifndef __ATLBASE_H__ +#include +#endif + +#ifndef __ATLCONV_H__ +#include +#endif + +/**************************************************************************** +* +* +* +********************************************************************* RAL ***/ + +// +// Don't call this function directly. Use SpInitTokenComboBox or SpInitTokenListBox. +// +inline HRESULT SpInitTokenList(UINT MsgAddString, UINT MsgSetItemData, UINT MsgSetCurSel, + HWND hwnd, const WCHAR * pszCatName, + const WCHAR * pszRequiredAttrib, const WCHAR * pszOptionalAttrib) +{ + HRESULT hr; + ISpObjectToken * pToken; // NOTE: Not a CComPtr! Be Careful. + CComPtr cpEnum; + hr = SpEnumTokens(pszCatName, pszRequiredAttrib, pszOptionalAttrib, &cpEnum); + if (hr == S_OK) + { + bool fSetDefault = false; + while (cpEnum->Next(1, &pToken, NULL) == S_OK) + { + CSpDynamicString dstrDesc; + hr = SpGetDescription(pToken, &dstrDesc); + if (SUCCEEDED(hr)) + { + USES_CONVERSION; + LRESULT i = ::SendMessage(hwnd, MsgAddString, 0, (LPARAM)W2T(dstrDesc)); + if (i == CB_ERR || i == CB_ERRSPACE) // Note: CB_ and LB_ errors are identical values... + { + hr = E_OUTOFMEMORY; + } + else + { + ::SendMessage(hwnd, MsgSetItemData, i, (LPARAM)pToken); + if (!fSetDefault) + { + ::SendMessage(hwnd, MsgSetCurSel, i, 0); + fSetDefault = true; + } + } + } + if (FAILED(hr)) + { + pToken->Release(); + } + } + } + else + { + hr = SPERR_NO_MORE_ITEMS; + } + return hr; +} + +inline HRESULT SpInitTokenComboBox(HWND hwnd, const WCHAR * pszCatName, + const WCHAR * pszRequiredAttrib = NULL, const WCHAR * pszOptionalAttrib = NULL) +{ + return SpInitTokenList(CB_ADDSTRING, CB_SETITEMDATA, CB_SETCURSEL, hwnd, pszCatName, pszRequiredAttrib, pszOptionalAttrib); +} + +inline HRESULT SpInitTokenListBox(HWND hwnd, const WCHAR * pszCatName, + const WCHAR * pszRequiredAttrib = NULL, const WCHAR * pszOptionalAttrib = NULL) +{ + return SpInitTokenList(LB_ADDSTRING, LB_SETITEMDATA, LB_SETCURSEL, hwnd, pszCatName, pszRequiredAttrib, pszOptionalAttrib); +} + +// +// Don't call this function directly. Use SpDestoyTokenComboBox or SpDestroyTokenListBox. +// +inline void SpDestroyTokenList(UINT MsgGetCount, UINT MsgGetItemData, HWND hwnd) +{ + LRESULT c = ::SendMessage(hwnd, MsgGetCount, 0, 0); + for (LRESULT i = 0; i < c; i++) + { + IUnknown * pUnkObj = (IUnknown *)::SendMessage(hwnd, MsgGetItemData, i, 0); + if (pUnkObj) + { + pUnkObj->Release(); + } + } +} + +inline void SpDestroyTokenComboBox(HWND hwnd) +{ + SpDestroyTokenList(CB_GETCOUNT, CB_GETITEMDATA, hwnd); +} + +inline void SpDestroyTokenListBox(HWND hwnd) +{ + SpDestroyTokenList(LB_GETCOUNT, LB_GETITEMDATA, hwnd); +} + + +inline ISpObjectToken * SpGetComboBoxToken(HWND hwnd, WPARAM Index) +{ + return (ISpObjectToken *)::SendMessage(hwnd, CB_GETITEMDATA, Index, 0); +} + +inline ISpObjectToken * SpGetListBoxToken(HWND hwnd, WPARAM Index) +{ + return (ISpObjectToken *)::SendMessage(hwnd, LB_GETITEMDATA, Index, 0); +} + +inline ISpObjectToken * SpGetCurSelComboBoxToken(HWND hwnd) +{ + LRESULT i = ::SendMessage(hwnd, CB_GETCURSEL, 0, 0); + return (i == CB_ERR) ? NULL : SpGetComboBoxToken(hwnd, i); +} + +inline ISpObjectToken * SpGetCurSelListBoxToken(HWND hwnd) +{ + LRESULT i = ::SendMessage(hwnd, LB_GETCURSEL, 0, 0); + return (i == LB_ERR) ? NULL : SpGetListBoxToken(hwnd, i); +} + +// +// Don't call this directly. Use SpUpdateCurSelComboBoxToken or SpUpdateCurSelListBoxToken +// +inline HRESULT SpUpdateCurSelToken(UINT MsgDelString, UINT MsgInsertString, UINT MsgGetItemData, UINT MsgSetItemData, UINT MsgGetCurSel, UINT MsgSetCurSel, + HWND hwnd) +{ + HRESULT hr = S_OK; + LRESULT i = ::SendMessage(hwnd, MsgGetCurSel, 0, 0); + if (i != CB_ERR) + { + ISpObjectToken * pToken = (ISpObjectToken *)::SendMessage(hwnd, MsgGetItemData, i, 0); + CSpDynamicString dstrDesc; + hr = SpGetDescription(pToken, &dstrDesc); + if (SUCCEEDED(hr)) + { + USES_CONVERSION; + ::SendMessage(hwnd, MsgDelString, i, 0); + ::SendMessage(hwnd, MsgInsertString, i, (LPARAM)W2T(dstrDesc)); + ::SendMessage(hwnd, MsgSetItemData, i, (LPARAM)pToken); + ::SendMessage(hwnd, MsgSetCurSel, i, 0); + } + } + return hr; +} + +inline HRESULT SpUpdateCurSelComboBoxToken(HWND hwnd) +{ + return SpUpdateCurSelToken(CB_DELETESTRING, CB_INSERTSTRING, CB_GETITEMDATA, CB_SETITEMDATA, CB_GETCURSEL, CB_SETCURSEL, hwnd); +} + +inline HRESULT SpUpdateCurSelListBoxToken(HWND hwnd) +{ + return SpUpdateCurSelToken(LB_DELETESTRING, LB_INSERTSTRING, LB_GETITEMDATA, LB_SETITEMDATA, LB_GETCURSEL, LB_SETCURSEL, hwnd); +} + +inline HRESULT SpAddTokenToList(UINT MsgAddString, UINT MsgSetItemData, UINT MsgSetCurSel, HWND hwnd, ISpObjectToken * pToken) +{ + CSpDynamicString dstrDesc; + HRESULT hr = SpGetDescription(pToken, &dstrDesc); + if (SUCCEEDED(hr)) + { + USES_CONVERSION; + LRESULT i = ::SendMessage(hwnd, MsgAddString, 0, (LPARAM)W2T(dstrDesc)); + if (i == CB_ERR || i == CB_ERRSPACE) // Note: CB_ and LB_ errors are identical values... + { + hr = E_OUTOFMEMORY; + } + else + { + ::SendMessage(hwnd, MsgSetItemData, i, (LPARAM)pToken); + ::SendMessage(hwnd, MsgSetCurSel, i, 0); + pToken->AddRef(); + } + } + return hr; +} + +inline HRESULT SpAddTokenToComboBox(HWND hwnd, ISpObjectToken * pToken) +{ + return SpAddTokenToList(CB_ADDSTRING, CB_SETITEMDATA, CB_SETCURSEL, hwnd, pToken); +} + +inline HRESULT SpAddTokenToListBox(HWND hwnd, ISpObjectToken * pToken) +{ + return SpAddTokenToList(LB_ADDSTRING, LB_SETITEMDATA, LB_SETCURSEL, hwnd, pToken); +} + + +inline HRESULT SpDeleteCurSelToken(UINT MsgGetCurSel, UINT MsgSetCurSel, UINT MsgGetItemData, UINT MsgDeleteString, HWND hwnd) +{ + HRESULT hr = S_OK; + LRESULT i = ::SendMessage(hwnd, MsgGetCurSel, 0, 0); + if (i == CB_ERR) + { + hr = S_FALSE; + } + else + { + ISpObjectToken * pToken = (ISpObjectToken *)::SendMessage(hwnd, MsgGetItemData, i, 0); + if (pToken) + { + pToken->Release(); + } + ::SendMessage(hwnd, MsgDeleteString, i, 0); + ::SendMessage(hwnd, MsgSetCurSel, i, 0); + } + return hr; +} + +inline HRESULT SpDeleteCurSelComboBoxToken(HWND hwnd) +{ + return SpDeleteCurSelToken(CB_GETCURSEL, CB_SETCURSEL, CB_GETITEMDATA, CB_DELETESTRING, hwnd); +} + +inline HRESULT SpDeleteCurSelListBoxToken(HWND hwnd) +{ + return SpDeleteCurSelToken(LB_GETCURSEL, CB_SETCURSEL, LB_GETITEMDATA, LB_DELETESTRING, hwnd); +} + +#endif /* #ifndef SPUIHelp_h -- This must be the last line in the file */ diff --git a/speech/lib/i386/sapi.lib b/speech/lib/i386/sapi.lib new file mode 100644 index 0000000000..55869a5b17 Binary files /dev/null and b/speech/lib/i386/sapi.lib differ