You try to run your application on a new Windows CE device for the first time and BAM you get hit with the following debug output:
ERROR: function @ Ordinal 342 missing
!!! Please Check your SYSGEN variable !!!
So you are wondering what that means. Ordinal? SYSGEN variable? Sounds ominous doesn’t it?
The first line says that the function at ordinal 342 is missing. What that means is that a function that your application or DLL plans to call is missing from the OS. If you are new to Windows CE, it is important to understand that Windows CE is a componentized OS, which is just a fancy way to say that some features of the OS can be left out at the OEM’s discretion. In this case, the feature that supports the function at ordinal 342 has been left out of the OS that you are running on.
Since I haven’t really answered the question “what does function at ordinal 342 mean?” I better do that. Functions in a DLL can either be identified by their function name, or by a numeric value or ordinal. In the case of many of the DLLs supplied by Microsoft, the functions are identified by their ordinal. The good news for the OEM is that the ordinals can be used to identify the function, but the bad news for application developers is that they can’t. I will look at solutions to that later.
The second line says to check your SYSGEN variables. I will keep this one simple, if you don’t already know what that means, or at least have an idea what a SYSGEN variable is, then you are not the OEM or OS developer and there isn’t much you can do yourself. See solutions below. If you do have an idea what a SYSGEN variable is, then of course you already have an idea what to do. If you are still reading, what this means is that the OEM can add the function and build a new OS if they want to support the missing function.
The Problem
The basic problem is that the application was built for a different SDK than the SDK for the device that the application is running on. The SDK is used to tell application developers and the development tools about the OS running on a particular device. Ask your OEM for the SDK for your device.
Of course the other problem is that your device doesn’t support a function in your application.
Solutions
Ø Application Developers
o   Use the correct SDK for your Windows CE system. This will allow you to catch problems like this at compile time. At compile time the linker would have told you that the function was not available, and it would have told you the name of the function.
o   Ask your OEM to add the function. Below you will find information that you can give to your OEM to help them help you.
o   Remove the code that calls the missing function. This can be a harsh reality of working with embedded systems. Hopefully your OEM will add the function.
Ø OEM
o   Have the application developer send you the application or DLL and use dumpbin to find out which DLL is missing the ordinal. See my post about dumpbin at Windows CE: LoadLibrary Fails with Error Code 193
o   Find the .def file associated with the imported DLL. In this case, we would find that ordinal 342 is in coredll.dll.
o   Look for the ordinal in the .def file. In this case, we would find that 342 is RasDial() and that RasDial() is wrapped with ; @CESYSGEN IF CE_MODULES_PPP.
o   Search in Public\CEBase for PPP to find out which SYSGEN variable to add to add RasDial().
Copyright © 2009 – Bruce Eitman
All Rights Reserved