FieldSoftware
Home

PrinterCE SDK
   General Info
   Download
   Purchase & Pricing

Developer Info
   eVC MFC
   eVC C/C++
   eVB

Special Features
   AsciiCE
   PrintDC
   BarcodeCE

Documentation
   PrinterCE SDK
   AsciiCE
   PrintDC
   BarcodeCE

Special Topics
  Supported Printers
  Bluetooth Printing
  Network Printing

  DLL Load Error

.Net CF C# or VB.Net:
  PrinterCE.NetCF SDK

-----------------------------

Software Developers
  PrinterCE SDK
 
PrinterCE.NetCF SDK
  PocketHTMLprint SDK

Printing Utilities
  PrintPocketCE
  PIEprint
  PocketPixPrint
  PocketShot
 
PocketClipPrint

 Arcade Games
  SockOut
  MazeCraze

Contact Info

PrinterCE and "DLL Load Error"

An application that is working well with PrinterCE SDK or PrinterCE.NetCF SDK may occasionally fail when trying to create an instance of one of the PrinterCE components:

  1. eVB apps: CreateObject fails

  2. eVC apps: CoCreateInstance fails

  3. C# and VB.Net apps: Calling the PrinterCE constructor fails with an "Invalid or incorrect version of PrCE_NetCF.dll" error.

While rare, this situation seems to be most often seen in apps that use SQLCE. A check of available memory will show that there is plenty of memory on the device. A soft-reset of the device will usually resolve the situation, at least temporarily.

This situation is known as a "DLL Load Error" and is due to the memory architecture design of Windows CE. For in-depth details on this, please review the following Microsoft documents:

Understanding Windows CE DLL Load Failures

Windows CE .NET Advanced Memory Management (See especially "DLL Load Problem" section).

Resolving DLL Load Error: The PrinterCE fix for a DLL load failure is usually quite simple - make PrinterCE a global class and create the PrinterCE instance as soon as your app starts - especially before using SQLCE. Then use this instance every time you use PrinterCE to print.

Note for .NetCF developers - be sure to NOT call PrinterCE's ShutDown() function after a print job, which would delete the global instance. You need to add KillDoc() to your "catch" block to free up PrinterCE resources between print jobs in case of an exception.