Click here to Skip to main content
13,455,913 members (48,281 online)
Rate this:
Please Sign up or sign in to vote.
Hi ,
I want to use the zbar for barcode reading in IOS primarily. This may be cross platformed to windows too. I downloaded the libzbar.dll and tried to Pinvoke the methods which I listed via dumpbin /export.

I am getting a Pinvoke stack imbalance exception (?).
The questions are

1) How to avoid the stack imbalance? ie how to find the parameters for methods in the dll?

2) Is it ok to use *.dll file when I build for IOS or Can I do that at all?

Other than that any info on using a libzbar.a for cross platform development is appreciated.

Posted 13-Nov-12 20:48pm
Updated 27-Mar-16 17:05pm
Richard MacCutchan 14-Nov-12 3:30am
Go back to where you got the library and check the documentation.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

In your PInvoke DllImport attribute, please change the CallingConvention to Cdecl or StdCall, this will solve your problem.

Hope it helps.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04-2016 | 2.8.180322.1 | Last Updated 27 Mar 2016
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100