I have set of ZK attendance device that using static IP address. I'm enrolling users to this machines using zkmkeeper.dll in C#. now i want to delete old users from these machines using system. I can't find the function to delete users, but there is function to disable. I want to delete that users permanently from devices.
I had a similar issue when deleting userInfo or enrolled data but i found a workaround
objCZKEM.DeleteEnrollData(machineId, userId, machineId, 12)
according to the documentation :
12 indicates deleting the user (including the fingerprints, card number and password).
#Yuuuucef, thank you for reference. According to documentation
5.2.4.3 DeleteEnrollData
VARIANT_BOOL DeleteEnrollData(LONG dwMachineNumber, LONG dwEnrollNumber,
LONG dwEMachineNumber, LONG dwBackupNumber)
The values of dwMachineNumber and dwEMachineNumber must be the same
After trying many ways I have finally found a way. clear all user data using axCZKEM1.ClearData(Convert.ToInt32(number), flag) and re enroll the data using Database.
The way I found works for me.
Use the SSR_deleteEnrollData function with only 3 parameters (while notice asks for 4 parameters)
SSR_deleteEnrolData(dwMachineNumber , dwEnrollNumber , dwBackupNumber)
Maybe depends of device version.
Related
I have one app that I wrote already reading from and writing to the iCloud. I am essentially using the same code in my new app to do the same thing, but for some reason it will not work, giving me the following error, "Couldn't get container configuration from the server". Let me clarify, with this new app it does puts an entry in iCloud under manage storage, but instead of being under the name of my app, it is under adhoc.
Here is the line in my info.Plist,
Here is the line from my Entitlements,plist
lastly, here is my identifier defined on the apple developer site,
I have verified and reverified that everything is pointing to the correct thing so I am baffled. Any help would be much appreciated.
EDIT I guess what it is doing is writing file to my phone, but when it goes to save data to it, it fails with this message, Here is my call to save the data.
CKRecordID recordID = new CKRecordID(strDate);
await Task.Delay(200);
// Save it to iCloud
await pvc.SaveToiCloud(newRecord);
Here is my code to save the record,
public async Task SaveToiCloud(CKRecord newRecord)
{
ThisApp.PrivateDatabase.SaveRecord(newRecord, (record, err) =>
{
Edit:
I was thinking that possibly the number of nodes I had was too many, so I took out the "dist" one you see below, but that did not help. I thought maybe that was why I was seeing module name of adhoc under icloud on my phone, but I guess I was wrong.
Old:
New:
Edit
I have been doing more digging and found that this line of code is actually the one throwing the error.
File.WriteAllText(Path.Combine(filePath.Path, name + date), "Test");
The name and date contain correct values and the path looks fine to me... I guess... Don't know actually how it should look. Here is how the file path is getting set right above this call,
NSUrl filePath = NSFileManager.DefaultManager.GetUrlForUbiquityContainer(null).Append("Documents", true);
If anyone could offer any advice, I would be most appreciative.
So, I finally figured out the issue and it works like a champ now. The issue was the case in my bundle id in my info.plist. In CloudKit the DB name was all lower case, but my bundle Id in my info.plist, had AdHoc as my last node instead of adhoc as was in the CloudKit. You might say, what does the bundle Id have to do with the iCloud name, and actually I am not really sure, but I noticed that it was taking the case of that last node from my Bundle Id, not the case specified in the iCloud definition as I have shown above. Hope this helps someone who is struggling with a similar issue Have a great day!
I have problems exporting CAx-Data from the Siemens TIA Portal V16. I am using the following openness code:
CaxProvider provider = tiaPortalProject.GetService<CaxProvider>();
FileInfo pathAMLfile = new FileInfo(#"C:\");
FileInfo pathLOGfile = new FileInfo(#"C:\");
provider.Export(tiaPortalProject, pathAMLfile, pathLOGfile);
The following error message occurs:
The CAx operation cannot be started. Check if the ‘Siemens TIA Openness’ group exists on the system.'
I followed all the steps given in the documentation to create a new Openness User, and restarted the pc serveral times (using a virtual machine in this case).
Documentation:
https://support.industry.siemens.com/cs/mdm/109773802?c=101778035467&lc=en-DE
I am logged in as a member of the Siemens TIA Openness Group. The dialog is in german but you should get it from the picture. I had to blur the acutal user name.
But it still does not work. All other openness operations work well. Can someone help? Thank you!
I am not a c# guy. Needless to say that I don't have experience on this topic.
I bought a software and I installed it on my computer. Now I thought of using some of it's functions on my software(that I make to plan in c#). So I messaged the person who sold me the software and he send me a two page pdf file explaining what to do.
It states:
This software features a COM interface.
And it goes saying it's API contains a function "stackAPI".
and the parameters used are apiname type string, apipass type string.
Return values type long. 0 for sucess and 1 for error.
That's all it states, I tired searching google, it could not help me at all. So how do I start?
when I write the following code on c# it gives me error.
string[] apiname;
string[] apipass;
stackAPI(apiname, apipass);
I know if I was using dll I would import it as
[DllImport("example.dll"]
But no dll is provided.
Do I need to add the path to the folder where the software is installed to call the API ?
To get started:
using example.dll;
Then in your main class:
example.CustomService api = new example.CustomService();
var response = api.Dostuff();
Console.WriteLine(response);
If anyone wants to know how I did it. After a week of searching I was able to find the solution today. I wanted to call the function stackAPI(apiname, apipass);.
stackAPI(apiname, apipass) was the member of stack.callapi
So I wrote:
dynamic lifestohack = Activator.CreateInstance(Type.GetTypeFromProgID("stack.callapi"));
than just you can call the function like this.
int rv;
string[] apiname;
string[] apipass;
rv=lifestoahck.stackAPI(apiname, apipass);
Hope it may help someone.
I am working with windows ce for an application that needs to be authenticated before use. I don't want the end user to have to enter a username and password which is static everytime the device is turned on. Is there any way to do something like that? I was able to acheive it in a windows form application but i haven't seen anything on Stack or in the MSDN that will help me do that. My code for the forms app is below but it wont work in the Compact Framework.
//string doc = webBrowser1.DocumentText;
//HtmlElement userValue = doc.GetElementById("username");
//userValue.SetAttribute("value", "devacc");
//HtmlElement passValue = doc.GetElementById("password");
//passValue.SetAttribute("value", "zzq15354");
//HtmlElement subButton = doc.GetElementById("submit");
//subButton.InvokeMember("click");
I believe your going to need to verify user/device another way. I would probably save the devices MEID(Dec) # (which is unique) to your user data then allow access if signed in ON that specific hardware.. Here is a thread on how to find that number Find Serial Number
I need help with integrating facebook into my desktop application. It's developed with C# - target framework is .NET framework 4.0.
I'm using http://facebooktoolkit.codeplex.com/
The problem is that I can't get the users albums although my app has permission for it, and for all to be more confusing I can get statuses, comments, friends, etc.
I have this in designer:
this.fbMyApp = new Facebook.Winforms.Components.FacebookService(this.components);
this.fbMyApp.ApplicationKey = "myappkey_goes_here";
this.fbMyApp.SessionKey = null;
this.fbMyApp.uid = ((long)(0));
And I've used this code(I've set all permissions for testing purposes):
fbMyApp.ConnectToFacebook(new List<Facebook.Schema.Enums.ExtendedPermissions>() {
Facebook.Schema.Enums.ExtendedPermissions.create_event,
Facebook.Schema.Enums.ExtendedPermissions.create_note,
Facebook.Schema.Enums.ExtendedPermissions.email,
Facebook.Schema.Enums.ExtendedPermissions.offline_access,
Facebook.Schema.Enums.ExtendedPermissions.photo_upload,
Facebook.Schema.Enums.ExtendedPermissions.publish_stream,
Facebook.Schema.Enums.ExtendedPermissions.read_mailbox,
Facebook.Schema.Enums.ExtendedPermissions.read_stream,
Facebook.Schema.Enums.ExtendedPermissions.rsvp_event,
Facebook.Schema.Enums.ExtendedPermissions.share_item,
Facebook.Schema.Enums.ExtendedPermissions.sms,
Facebook.Schema.Enums.ExtendedPermissions.status_update,
Facebook.Schema.Enums.ExtendedPermissions.video_upload
});
Now if I do this(after user has logged in):
MessageBox.Show("TOTAL statuses: " + fbMyApp.Status.Get().Count.ToString());
I will get the number of user statuses, and could read them. However if I do this:
MessageBox.Show("TOTAL albums: " + fbMyApp.Photos.GetAlbums().Count.ToString());
I get zero, although user has about 10 albums. I need this, cause this way I can access the album IDs and could be able to upload a photo to specific album. Any idea why this isn't working or does anybody have any better suggestion for some facebook toolkit for C#?
You need to request "user_photos" permissions from Facebook. I haven't used this toolkit as I prefer to make simple graph rest calls dynamically instead of having a huge library. I imagine you could download the source and recompile it, adding the missing permission. You could also switch to this library which is alot more up to date with current Facebook functionality.