Go Back   Technology Questions > Hardware Questions > Electronics > Smartphones

Smartphones This is the Microsoft General Public Smartphones Newsgroup.

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 02-05-2008, 01:40 AM
jbsp72@gmail.com
Tablet PC Guest
 
Posts: n/a
Problem getting IMEI no in WM5.0

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 02-05-2008, 01:40 AM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-select problem in Windows Explorer BIG PROBLEM!!!!!! Jim Hansen Windows Vista 3 12-16-2007 06:10 PM
HTML Rendering Problem - Table Layout with COLSPAN - problem in IE 7 (Vista and XP) Mike Sloan Internet Explorer 0 11-25-2007 05:35 PM
How to get IMEI using native code in windows mobile 5.0 Robin Cheung Pocket PC General 1 07-13-2007 07:50 AM
Mobile Emulator question .. can I specify fake IMEI number? Ian H Pocket PC General 0 05-05-2007 02:42 PM
Problem with "Services and Controller app has encountered a problem and needs to close Craig Roberts Windows XP 7 03-22-2007 01:31 PM


All times are GMT -8. The time now is 06:22 PM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0