Socket ScanAPI Reference
ISktScanObject scanObj=
ISktScanProperty property=
property.setID(ISktScanProperty.propId.
property.setType(ISktScanProperty.types.
property.getString().setValue(newFriendlyName);
// set the friendly name here
// the final result should be fetched
// in the Set Complete handler
result=device.SetProperty(scanObj);
return
result;
}
C#:
private long
SetNewFriendlyName(
ISktScanDevice
device,
String
newFriendlyName
)
{
long
result = SktScanErrors.ESKT_NOERROR;
ISktScanObject
scanObj =
SktClassFactory.createScanObject();
scanObj.Property.ID =
scanObj.Property.Type =
ISktScanProperty.types.kSktScanPropTypeString;
scanObj.Property.String.Value = newFriendlyName;
result = device.SetProperty(scanObj);
return
result;
}
Objective C:
-(SKTRESULT) setFriendlyName:(id<ISktScanDevice>)device FriendlyName: (NSString*)friendlyName{
SKTRESULT
Result=ESKT_NOERROR;
id<ISktScanObject>scanObj=nil;
scanObj=[SktClassFactory
createScanObject];
[[scanObj Property]setID:kSktScanPropIdFriendlyNameDevice];
[[scanObj Property]setType:kSktScanPropTypeString];
[[scanObj Property]setString:friendlyName];
// set the friendly name here
// the final result should be fetched
// in the set Complete handler
Result=[device setProperty:scanObj];
return
Result;
}
© 2013 Socket Mobile, Inc.
SktClassFactory.createScanObject();
scanObj.getProperty();
kSktScanPropIdFriendlyNameDevice);
kSktScanPropTypeString);
ISktScanProperty.propId.kSktScanPropIdFriendlyNameDevice;
94/152
Need help?
Do you have a question about the ScanAPI and is the answer not in the manual?