I am trying to use BluetoothGATTSetCharacteristicValue to set a value for a given characteristic in a service. I read in the method documentation that it needs a handle to the service which I don't know how to obtain it.
I tried to use the "ServiceHandle" member of the BTH_LE_GATT_CHARACTERISTIC structure but it doesn't work.
I found the solution and I would like to share it here.
The only way to open a handle on the service is to use the UUID of the service instead of the UUID of the device while enumerating the devices using the method SetupDiGetClassDevs.
Please check the following thread for more details.
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/65c9cf4e-e225-4fc3-8c2c-66cd2401d3ed/how-to-establish-a-connection-from-windows-8-pc-to-a-bluetooth-low-energy-device?forum=wdk
Related
We call the microsoft exchange to set the extended property which in our case is an unique guid
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed., Invalid named property
Its been working great until now when some of our users are facing the above issue ....
val uId = getUniqueId();
val emailExtendedPropDef = new ExtendedPropertyDefinition(uId,"uniqueId", MapiPropertyType.String)
try {
email.setExtendedProperty(emailExtendedPropDef, uId.toString)
email.sendAndSaveCopy()
} catch {
case e: Exception =>
error(s"Exception in setting extended property for user $from", e)
throw e
}
trying to find the root cause of the issue, we are also thinking it might be related to throttling on Microsoft exchange for extended properties (Not sure how to prove if it's indeed throttling) any help to point us in the right direction will be of great help
Our use case is to able to retrieve the email when customer want's to reply back we want to retrieve that particular email to be included in users reply....currently we are using the uid to achieve that ....
we have been using the code as per the documentation here
https://learn.microsoft.com/en-us/previous-versions/office/developer/exchange-server-2010/dd633654(v%3Dexchg.80)
and also the documentation here
https://github.com/OfficeDev/ews-java-api/wiki/Getting-Started-Guide#extended-properties
Update : As per the comments we do understand that we have to treat extendedProperty as a column definition and update the same column ...but we couldn't figure out how to achieve this as...Any code samples to point us in the right direction will be of great help
Latest Update : We have deleted some of the extendedPropertyDefinition's but still facing the same invalid property could some one please point us in the right direction
Is it safe to say that getUniqueId returns a different guid on each call? If so, then that is the problem. Think of the Guid for an extended prop as a namespace. The exchange store limits the number of custom extended props to something like 32k per mailbox. So you are likely hitting that limit. But aside from that, the main reason for creating an extended property is so that you can refer to it later. But if you are basically discarding the namespace each time, you are leaving orphaned props on items. Without understanding your particular scenario, I can only say that the Guid should be thought of truly as a namespace. Choose one for your app/company/scenario and hard code it. They create all the named props you want within that namespace. For instance, "MyProp/String" in Guid namespace 1 is a different property than "MyProp/String" in Guid namespace 2.
I was wondering if anyone know how to get preferred channel layout from CoreAudio. I try to use kAudioDevicePropertyPreferredChannelLayout to get the channel label. However, it always shows kAudioChannelLabel_Unknown value. Is there something driver issue? or it's necessary to set some properties before asking kAudioDevicePropertyPreferredChannelLayout.
my code is here:
https://gist.github.com/ChunMinChang/ea74c8228745449873716e1d98ba956e/e61fedea3e08bcff64ef3db05931a1c757768d70
Answer by myself.
Instead of kAudioDevicePropertyPreferredChannelLayout, Using kAudioUnitProperty_AudioChannelLayout allow me to get the correct channel configuration.
Maybe it would be better if we use kAudioDevicePropertyPreferredChannelLayout to get the layout first. If it returns Unknown, then we use kAudioUnitProperty_AudioChannelLayout to get it.
Code: https://gist.github.com/ChunMinChang/ea74c8228745449873716e1d98ba956e/96b5d39e3fa7d5d6e160c53917b213f9af3ba2c9#file-preferredchannellayout-cpp
I need to make a Reverse Geocoding for my SD app with Genexus X Ev3 U7, to show a location through aa given address in the map within the app. I've struggled for some time figuring out how to make it work with no luck.
I've already read all the documentation, followed the steps to get the API key from google (with Geocoding and Geolocation APIs enabled) and tried different ways with the methods shown in it and i haven't made it work.
Should I consider something else? Does anyone have done this before?
thanks before hand
Yes, there are two methods in Geolocation external object: GetAddress() and GetLocation().
If you are using it on the client-side, then both Android and iOS implementations use the platform's native implementation.
If the code runs on the server-side (C# or Java), then the implementation uses Google's geocoding services. The problem here is that there is no way to provide an API Key, so the number of allowed requests by day may be too low (depending on your usage).
Well, the main problem was that i was capturing the values of the Address Domain Collection variable all wrong.
All i had to do was to declare an &Address variable that read an &Addresses collection variable and to give it to a &Adrs VarChar variable:
For &Address in &Addresses
&Adrs = &Address
Load
EndFor
where &Addresses = GeoLocationAPI.GetAddress(&GeoLocation)
I don't know how i didn't come up with this before.
Thanks everyone :)
I am trying to get started using viewpoint against EWS within Ruby, and it's not making a lot of sense at the moment. I am wondering where I can get some good example code, or some pointers? I am using 1.0.0-beta.
For example: I know the name of the calendar folder I want to use, so I could search for it, but how to access methods in that folder once I find it? What are the appropriate parameters, etc...
Any advice?
If you haven't read it yet I would recommend the README file in the repository. It has a couple of examples that should put you on the right path. Also, the generated API documentation should give you enough to work with.
http://rubydoc.info/github/WinRb/Viewpoint/frames
At a very basic level you can get all of your calendar events with the following code:
calendar = client.get_folder :calendar
events = calendar.items
I hope that gives you a little more to get started with.
Follow-up:
Again, I would point you to the API docs for concrete methods like #items. There are however dynamically added methods depending on the type that you can fetch with obj.ews_methods. In the case of CalendarItem one of those methods is #name so you can call obj.name to get the folder name. The dynamic methods are all backed by a formatted Hash based on the returned SOAP packet. You can see it in its raw format by issuing obj.ews_item
Cheers,
Dan
I found the DiskVolumeInfo property -- I'd like to use it to get some disk information in a clustered setup.
http://msdn.microsoft.com/en-us/library/windows/desktop/bb309235(v=vs.85).aspx
The problem is I have no idea what technology is required to get this data. This doesn't resemble the standard C/C++/C#/VB format of function/method reference.
Question: How do I get the DiskVolumeInfo data?
Ideally I could write the binary output directly to a file, say data.bin.
Any ideas would be helpful, thanks.
The process for getting object properties is described here.
Looks like you need to call the ClusterResourceControl function with a handle to the physical disk resource and the CLUSCTL_RESOURCE_GET_PRIVATE_PROPERTIES control code. You can then use ResUtilFindBinaryProperty to extract the DiskVolumeInfo property from the property list returned.
For anyone still interested:
As given here CLUSCTL_RESOURCE_STORAGE_GET_DISK_INFO_EX is a better way to do this.