You can get IMEI by calling
MBasicGsmPhoneId::GetGsmPhoneId() -> iSerialNumber
Where
iSerialNumber has format
<TAC FAC SN> NUL
TAC = Type Approval Code (6 digits)
FAC = Final Assembly Code (2 digits)
SN = Serial Number (6 digits)
Since you posted in Symbian C++ section I guess you are looking for a solution in Symbian C++, if so, we have an article on Obtaining the device IMEI Synchronously
Also there is absolutely no point on popping up 9 years old threads. AFAIK the API mentioned here was not available on public SDKs, as well as it was removed already in 2nd edition.