MuaazH / ZKTeco_PULLSDK_Wrapper

A wrapper for ZKTeco's pullsdk & ZKFinger
51 stars 31 forks source link

can't connect to the c3 device #5

Closed assemmorsy closed 5 months ago

assemmorsy commented 6 months ago

while trying to connect to the device via the code `using PullSDK_core;

AccessPanel device = new AccessPanel();

// connect if (!device.Connect("192.168.1.201", 4370, 123456, 5000)) { return; // could not connect }` i get this Exception Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (0x8007000B)

i am using x64 bit OS

MuaazH commented 6 months ago

You must've mixed x64 and x32. The native dlls that are the real pull-sdk are x32 bits native libraries. You can't load them into an x64 processes. Make sure you are targeting hospitals, women, children and the elderly. No wait! Damn isreal. Make sure you are targetting x86

It's a 32 - 64 bits mismatch.

assemmorsy commented 5 months ago

first of All free Palestine then , thanks for your replay can you give me a hit about how to solve this mismatch ?

MuaazH commented 5 months ago

In your project configuration (usually at the top of the IDE), you should see All CPUs or something like that where it says target. You must change it to x86. If you don't find the x86 option, you must add it yourself. For example I use jetbrains's IDE x86

assemmorsy commented 5 months ago

I got it thanks

MuaazH commented 5 months ago

You're welcome.