RSS Feed for This PostCurrent Article

Encode and Decode QRCode on Windows Mobile

Download Code

In my previous post, Open Source .NET QRCode Library, I mentioned that the library can be used in Windows Mobile. Here I am going to show you the way it works.

The above screenshot shows the sample program that uses the library. Here I am not going to elaborate on what QRCode is. For those who are interested, you can always find out more by googling.

Encoding can be

  • Byte
  • AlphaNumeric
  • Numeric

Version can be from 1 to 40. Default is 4.

For size, it is default to 4. Do not choose a too small size, or else you may have problem decoding.

Correction level can be L, M, Q or H, which is based on the Reed-Solomon error correction.

Popularity: 5% [?]

Trackback URL

RSS Feed for This Post12 Comment(s)

  1. alex | Dec 20, 2007 | Reply

    we have tested this library, but it cannot decode the QR code captured in a mobile phone…

  2. Saurabh Sondhi | Sep 30, 2008 | Reply

    I am using QR Code library for mobile phone

    When I open the solution file I am not able to load both the mobile projects and gets the following error

    Error retrieving information from user database. Platform not found.

    The project could not be opened becuase it refer to a device platform that doea bot exists in your datastore

    I got rid of this error by changing the platform Id to

    3C41C503-53EF-4c2a-8DD4-A8217CAD115E in both the .csproj files of mobile projects

    Now the solution loads successfully

    When I try the Encode with default settings,I get the error “IndexOutOfRangeException”

    on line number 777 rsTemp[rsBlockNumber][j] = codewords[i2]; in class QRCodeEncoder.cs

    Can any one help me how to get rid of this error, I whole work is struck because of this

    Hoping for the quick reply

    Saurabh Sondhi

  3. sun | Nov 12, 2008 | Reply

    I have change the version and size ,but I can’t fix the problem ,can you help me with it ,Thank you !It is the same Problem “IndexOutOfRangeException”

  4. Marco | Mar 19, 2009 | Reply

    I tried to use on Visual Studio 2008,
    but thies error occour :

    Error 15 ‘ThoughtWorks.QRCode.Properties.Resources’ does not contain a definition for ‘GetResource’


    MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));

    Can you help me ?

  5. gdhaifeng | Mar 25, 2009 | Reply

    just change for this:
    //MemoryStream memoryStream = new MemoryStream(Resources.GetResource(fileName));
    MemoryStream memoryStream = new MemoryStream((byte[])Resources.ResourceManager.GetObject(fileName));


  6. Saurabh Sondhi | Mar 25, 2009 | Reply

    I got the solution of the problem, posted by me above

    Please make sure folder “qrcode_data” and its contents(files)
    present in the folder where the application executable and mobileqrcode.dll and other thought work dll file are present…

    This folder mainly contains .dat file.

    Saurabh Sondhi

  7. Prateek | Jul 6, 2009 | Reply

    Can I use your library to create an application like i-nigma( QR code reader for windows phones.


  8. Andrew | Jan 24, 2011 | Reply


    I was wondering if you have any plans to migrate this to be compatible on Windows Phone 7? I only have VS 2010 and it would not let me upgrade the solution file.

    Thanks in advanced if you can point me in the right direction. =]


  9. exhausted | Feb 14, 2011 | Reply

    waaaaaAAAA!!!why is it that there’s no sample for c++????all of the google results for qrcode encoder are for java and .net?..
    where could i possible find free VC++ qrcode encoder library/dll?
    help me please…

  10. Reeze | Oct 24, 2011 | Reply for c++

  11. Betsy | Dec 25, 2011 | Reply

    I keep getting an error out of range,how do I change the version?

  12. admin | Dec 25, 2011 | Reply


    Please read here for details

    Basically you set QRCodeVersion to 0 to let it derive the version.


2 Trackback(s)

  1. From IKENN’S BLOG » Archive » .NET QRCode Library | Aug 2, 2008
  2. From QR Code Generator | ThreeGuyz | May 22, 2011

RSS Feed for This PostPost a Comment