WM 5 SDK Symbol - c#

We have a large number of Window Mobile Devices (Symbol MC35 & MC70). I want to write a small app that gets the device serial number and simcard serial number (not phone number). I have tryed using the Symbol SDK and I can get the Device Serial Number for the MC70s as they have a Electronic Serial Number Module. But not sure how to get the Sim Details.
If i am unable to get the Device Serial Number From the MC35s can I get the IMEI number?
The porpose behind this is so I can keep a upto date record of what sim is in what handheld as any time. I am going to write the data to a registy file where SOTI Mobile Control will link it to that handheld.

You're after the lineGetGeneralInfo TAPI call. You want to look at the subscriber number, which is located using the dwSubscriberNumberSize and dwSubscriberNumberOffset members of the LINEGENERALINFO structure the call returns.

See here for SIM management functions. I can't find anything for retrieving a SIM ID, if such a thing exists. I suppose that you can identify the SIM by the phone number. Is it possible two different SIMs to have the same phone number? To get the phone number there is the GetPhoneNumber sample in the Windows Mobile SDK.
As for identifying the phone, the correct way is to read the Device ID. Again there is the GetDeviceID sample in the SDK (Both are in Common\CPP\Win32). Copying from the sample's read me:
GetDeviceUniqueID protects the privacy
of a device. Multiple applications
need to use a device's unique
identifier to communicate with
servers. To protect a device's
privacy, multiple servers should not
be able to correlate data from the
same device. GetDeviceUniqueID does
not use any additional information
other than the data that is provided
by the application, so any
application that passes in the same
application data buffer will obtain
the same hash. This API can be called
be any application regardless of the
trust level of the application.
If you want to retrieve the IMEI, see for example here.

Related

Retrieve used barcode reader from several devices plugged

I'm working on an access control windows application, I'm using .Net and a simple Barcode readers.
In my app, I'd like to use 2 barcode readers installed on the same computer in differents USB ports
First to log entrance.
Second to log exit.
How can I retrieve which Barcode reader was been used to log ? (the one plugged on USB port 1 or 2)
>> here is an explanatory diagram
#Abd13t,
If you are using the scanner in keyboard wedge mode and both scanners are going to be reading the same barcode, one way to do this would be to add different prefixes that your scanner appends to the data event.
If you using an OPOS or POS for .NET implementation your data events should be associated with a specific device.
In order to help you further, we would need more details.
Terry Warwick, Microsoft

Is there any way to fetch Mobile Number of windows phone 10 using c#

I have created my application in UWP. I need to search current sim and sim Mobile number.
Please help me for find the mobile number using windows phone 10 in c#
Yes, it is possible. You can use SmsDevice2.AccountPhoneNumber to get the phone number. From this article,Pay attention of
This functionality is only available to mobile operator apps and
Windows Store apps given privileged access by mobile network
operators, mobile broadband adapter IHV, or OEM.
Hence it requires the cellularMessaging capability, a special-use capability, to be declared in the package manifest, so this kind of app can’t be published in Windows Store for normal developer
A relative sample of SMS you can reference SMS send and receive sample.
You can't get the phone number from the device, whatever its type was, for a simple reason, that the mobile phone number is not stored on the SIM Card.
SIM Card holds contacts, SMSs, and network information along with an ID to link this SIM card to the User phone number.
so, don't try u will not get it from the SIM, but if it was stored manually in the device anyway else, you can get it then.

Restrict access to audio device under Windows XP-8 to specific application/user

I have written an c# 4.0 application that analyses the microphone input and records DTMF tones that represent credit card numbers entered by our clients. This all works well, but since we are working under PCI Compliance (see www.pcisecuritystandards.org), we don't want to allow the logged in user (call centre staff) to listen or even record the microphone input so that they then can parse the credit card numbers on their own with a 3rd party app or their phones. So the question I have is:
How can I restrict the microphone input to a specific application so
that it can't be heard or recorded somewhere else?
If there is no solution to this, the 2nd question arises:
How can I restrict the microphone input to a specific user so that it
can't be heard or recorded somewhere else (I could run the software
as a Windows service under specific user credentials)?
Kind regards,
JB
The main way to restrict access to device is setting of Security Descriptor on the device. So granting of the permission for specific user group is the way in which you should go.
The exact implementation for Windows XP could be different from later versions of Windows. Windows 8 have new possibilities too. Audio Mixer APIs can be used in Windows XP. Starting with Vista Windows Multimedia Device (MMDevice) API can be used. MMDevice API's implementation of the property store. You can use IPropertyStore::SetValue and IPropertyStore::Commit to change properties. Unified Device Property Model are introduced starting with Windows Vista. There are different Windows API which uses internally SetupAPI to access to devices and to set it's properties (see here). I think that you should set PKEY_Device_SecuritySDS property to secure device. One can use old APIs like SetupDiSetDeviceRegistryProperty and SetupDiSetClassRegistryProperty to set the properties on Windows XP (see here).
If I start on my computer devmgmt.msc and examine default property of microphone device then I can see Security Descriptor
What you need is to change it so that only specific user groups (or users) access it.
There are PKEY_Device_SecuritySDS and PKEY_Device_Security properties which can be change by SetupDiSetDeviceProperty and SPDRP_SECURITY_SDS or SPDRP_SECURITY (see here). Usage of SDS parameters (PKEY_Device_SecuritySDS or SPDRP_SECURITY_SDS) could be easier because there use readable Security Descriptor Definition Language (SDDL).
After you change security descriptor on the device you need use SetupDiSetClassInstallParams and SetupDiCallClassInstaller with DIF_PROPERTYCHANGE and DICS_PROPCHANGE to reset the device. You can find the code example in the source code of devcon utility on WinDDK. Alternatively you can use CM_Disable_DevNode and CM_Enable_DevNode to restart it with new properties.
You should be able to do it with the Core Audio API. For each playback device and capture device in the system, you can control whether the device can be used in exclusive mode.
One drawback - there is no support for Core Audio API under Windows XP.
I think the solution to your problem is to write a KS Filter
Create a Kernel Streaming filter that is able to decode the DTMF on demand of your application and send the decoded data to your application. When the filter is in DTMF decoding mode, it just outputs silence to the rest of the filter stack.
If an USB audio device is used, you could also write a GFX Filter instead, which can be configured on a per-user-base. But this only seems to work for 32-bit operating systems. WinDDK has a sample called gfxswap.xp.
You can use ASIO audio drivers in your application.
ASIO is a technology developed by Steinberg to provide low latency audio input and output, and as a side effect, requiring a device using an ASIO driver completely restricts the device use to the process that required it, in addition to multiple other advantages that may be irrelevant to your needs.
It is available for every soundcard thanks to the ASIO4ALL project, so compatibility won't be an issue as long as you provide it with your application
For more informations, check out the wikipedia article about ASIO here, or pick up the SDK here ( you will need to register a Steinberg Developer account to proceed )
Will it be helpful if you can control (MUTE) the VOLUME of the sound device and set it back to it's former state once you are done? You can look at this link for ideas. Good luck.

How to use computer's Bluetooth to send Wallpapers to any cellphone, in C#?

I'd like to know if it is possible how to do it, because my client asked me if the program I'm developing could also send wallpapers to nearby cellphones(my program will be in a place with many people passing by, so it would be good to have the bluetooth feature).
Thanks!
it can send pictures as files, users then may set them as wallpapers.
Unless the phone and the computer support bluetooth and are connected, you cannot. You can send the files to mobiles over bluetooth. 32feet provides a nice library to perform bluetooh related operations. Try that.
Hope it helps.
To do this you would need to
Make sure each user's device is paired to your bluetooth "sever"
Create the ability to auto connect and send the file.
On your phone's application, receive the image file and set the phone background - this will be different for each type of phone's OS. I would assume you are aiming towards Window Mobile Devices, since you are using c#.
The first step i see as being the difficult step as each phone much "register" the bluetooth of the server to be paired with it.

Windows mobile, how to get ID and Serial?

how I can get the Serial number and the ID number from Windows mobile ?
I need it in C#
thank's
There's no way to get a device's actual serial number programmatically. There's no standard API for it, and I've seen very few that even had proprietary calls for it.
To get the device's unique ID, you're probably going to want to P/Invoke GetDeviceUniqueID which is in the Get Device ID Sample in the SDK and was ported to C# by the WinMo team.

Categories

Resources