We present continuum and spectral Line observations toward three ultracompact (UC)H II regions (G34.26 + 0.15, G11.94 - 0.62, and G33.92 + 0.11) and one candidate precursor to a UC H II region (IRAS 18511+0146). The free-free emission, estimated from the spectral index of the centimeter data, is subtracted from the lambda = 2.7 mm data to place limits on the dust emission. We do not conclusively detect thermal dust emission from compact cores in these regions. Mass limits on warm dust cores (T-dust similar to 100 K) in or near the UC H rr regions are 137, 163, and 236 M. beam(-1) for G34.26+0.15, G11.94-0.62, and G33.92+0.11, respectively. Limits on cool dust cores (T-dust similar to 30 K) anywhere within the primary beam are 355, 350, 1315, and 194 M. beam(-1) for G34.26 + 0.15, G11.94-0.62, G33.92 + 0.11, and IRAS 18511+0146, respectively. Emission in the (CO)-O-18 J = 1-->0 (CO)-C-13 J = 1-->0 lines was detected from G34.26+0.15, G33.92+0.11, and IRAS 18511+0146. In G33.92+0.11 and IRAS 18511+0146, the emission is associated with extended, moderate density (n similar to 10(4)-10(5) cm(-3)), cool (T similar to 20 K) cores; in G34.26+0.15, the (CO)-O-18 traces a dense (n similar to 10(7) cm(-3)), warm (T similar to 50 K), compact core. Column densities estimated for (CO)-O-18 regions range from 2 x 10(23) to 2 x 10(24) cm(-2), and their total masses are 200-5000 M.. The CH3CN J=6-->5 line was detected strongly in emission toward G34.26+0.15 and weakly toward G33.92 + 0.11. The CH,CN emission arises primarily from compact regions, characteristic of hot core emission. For G34.26+0.15, fits to the K-component lines derive a gas temperature in the range 80-175 K and CH,CN column densities from 3 x 10(15) to 1.5 x 10(16) cm-2. For G34.26+0.15 there are systematic spatial offsets between the distributions of the (CO)-O-18, CH3CN, NH3, and free-free emission. We propose that the hot molecular gas in G34.26 $ 0.15 is the outer layer of a cool massive core that is being externally heated by interaction with the cometary UC H II region C. The amount of heated gas could be modest, 2-20 M., if the molecular abundances are as high as found in some chemical models. In this scenario, the CH3CN emission traces layers closer to the UC H n, which have been heated for some time; the NH3 emission arises from a deeper layer, which has been more recently heated; and the (CO)-O-18 emission traces the bulk of the core, which is only mildly heated. We argue that the velocity gradients in the molecular and ionized gases are due to the kinematics of the H II-molecular interaction and the geometry of the environment rather than gravitationally bound rotational motion. IRAS 18511+0146 is unlikely to be an immediate precursor to UC H n regions. The weak free-free emission seen at lambda = 3.6 cm is consistent with an optically thin H n region surrounding a B0 star. The large extent of the molecular gas, the modest density, and the lack of compact millimeter dust continuum emission suggest that additional massive-star formation is not occurring in this region at the present time.