You know, when you are talking about such devices you should consider the impedance as an entity seen by alternating signal. So if you want to measure such impedance you should use an alternating signal to excite the device. For example suppose you want to measure input impedance of an amplifier. First you provide DC bias then drive it with a small signal and then measure the input current produced by this signal. Finally you divide the input voltage amplitude by input current and the result would be the input impedance.
epilot,
Adding to comments by Mansour_M: Measure the phase shift between the voltage and the current. Let Za = the value as obtained by Mansour_Ms method. Let Theta = the phase shift. Then Z = Za Cos(theta) + jZa Sin(Theta).
Regards,
Kral