For a number ring O, Borel and Serre proved that SLn(O) is a virtual duality group whose dualizing module is the Steinberg module. They also proved that GLn(O) is a virtual duality group. In contrast to SLn(O), we prove that the dualizing module of GLn(O) is sometimes the Steinberg module, but sometimes instead is a variant that takes into account a sort of orientation. Using this, we obtain vanishing and nonvanishing theorems for the cohomology of GLn(O) in its virtual cohomological dimension.