A new method for direct evaluation of both crystalline structure, bulk modulus B_0, and bulk-modulus pressure derivative B_0 of solid materials with complex crystal structures is presented. The explicit and exact results presented here permit a multidimensional polynomial fit of the total energy as a function of all relevant structure parameters to simultaneously determine the equilibrium configuration and the elastic properties. The method allows for inclusion of general (internal) structure parameters, e.g., bond lengths and angles within the unit cell, on an equal footing with the unit-cell lattice parameters. The method is illustrated by the calculation of B_0 and B_0 for a few selected materials with multiple structure parameters for which data is obtained by using first-principles density functional theory.