| |||||||
| Smartphones This is the Microsoft General Public Smartphones Newsgroup. |
![]() |
| | LinkBack | Thread Tools |
| |||
| 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 |
![]() |
| Bookmarks |
| Thread Tools | |
| |
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 |