mspocketpc.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem getting IMEI no in WM5.0

 
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Smartphone
Author Message
jbsp72



Joined: 05 Feb 2008
Posts: 3

PostPosted: Tue Feb 05, 2008 6:32 am    Post subject: Problem getting IMEI no in WM5.0 Reply with quote

HI All,

I had written a dll in c++ for retreiving the IMEI no if the
mobile and was using the dll in a C# app to get the IMEI no. I ran
into a bug in my program . When i tried to debug i found the follwing
error i will paste the code here.

in C++ DLL


DWORD GetTSPLineDeviceID(const TCHAR*
const psTSPLineName)
{
DWORD dwReturn = -1;
for(DWORD dwCurrentDevID = 0 ; dwCurrentDevID < dwNumDevs ;
dwCurrentDevID++)
{
LINEEXTENSIONID LineExtensionID;
if( lineNegotiateAPIVersion(hLineApp, dwCurrentDevID,
TAPI_API_LOW_VERSION,
TAPI_CURRENT_VERSION,
&dwAPIVersion,
&LineExtensionID) == 0 )
{
flag=201;
LINEDEVCAPS LineDevCaps;
LineDevCaps.dwTotalSize = sizeof(LineDevCaps);
if( ::lineGetDevCaps(hLineApp, dwCurrentDevID,
dwAPIVersion, 0, &LineDevCaps) == 0 )
{
flag=202;
BYTE* pLineDevCapsBytes = new
BYTE[LineDevCaps.dwNeededSize];
if(0 != pLineDevCapsBytes)
{
flag=203;
LINEDEVCAPS* pLineDevCaps =
(LINEDEVCAPS*)pLineDevCapsBytes;
pLineDevCaps->dwTotalSize = LineDevCaps.dwNeededSize;
if( ::lineGetDevCaps(hLineApp, dwCurrentDevID,
dwAPIVersion, 0,
pLineDevCaps) == 0 )
{
flag=204;
if(_tcscmp((TCHAR*)
((BYTE*)pLineDevCaps+pLineDevCaps->
dwLineNameOffset), psTSPLineName) == 0 )
{
flag=205;
dwReturn = dwCurrentDevID;
}
}
delete[] pLineDevCapsBytes;
}
}
}
}
return dwReturn;
}


I had passed CELLTSP_LINENAME_STRING as the argument to this function.
The flag value was set to 204 indicating that the _tcscmp() failed.

If anybody knows what the problem is please reply.......

Thanks in advance

Archived from group: microsoft>public>smartphone
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
IMEI and Qtek8020 rom Hi all, there's someone that give me a greek imei to download qtek 8020 rom from I've tried to use mine, but don't work! or there's someone that say where i can download latest qtek8020 rom? Regards, Paolo

Spy phone call with IMEI ?? Dear all, I listen that autority like police cal listen our phone call or they can use our mobile phone like microphone to listen all our private conversations ??? It's true ?

MMS Problem!! Is there anyway rather than using 3rd party API's for sending or receiving MMS in Windows Mobile or PocketPC). I have beeb searching for this in MSDN & Google, but couldnot find anything. If anybody has any idea about it, please reply I wil

WM6 problem using IE Hi everybody, Sometimes when I access simple sites, like my Internet Explorer stops the page load and I know that I have a full signal. My mobile is a Moto-Q. Does anybody knows what's happening? Thanks!

Mpx 200 problem My MPX 200 randomly fails to recieve incoming calls and goes straight through to the voice mail. The only way to get it going again is to power down the phone. This has happened while using windows 2002. I have now upgraded and i still get the same proble
Post new topic   Reply to topic    mspocketpc.org Forum Index -> Smartphone All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group