Looking for help wrapping a DLL into a B4P library...

Tex8503

Active Member
Licensed User
Longtime User
I had asked this once before - but I'm coming back around to revisit it again... I'm trying to wrap honeywell's mobile computer barcode scanning API for use with Basic4PPC - but I'm not having any luck...

I can get erel's example library to compile - but can't really figure out how to use in B4P and that doesn't really show me how I'd go about wrapping a DLL.

If someone has some code examples of wrapping other DLLs so I can give this a shot or wants to take a stab at this that be great - I'd even be open to the idea of paying someone to do this if it was reasonable.

Can anyone help?

If you wanna take a stab - I've put up the latest SDK for the device on our server, http://www.tcgapps.com/hwellwinmo6.zip
 

Tex8503

Active Member
Licensed User
Longtime User
The API documentation appears to be in Visual Studio when you install the package.

When I open visual studio's help, I see an item listed as 'Honeywell SDK for Windows Mobile 6.0'. This has a list of all the APIs and the functions and such.
 

Tex8503

Active Member
Licensed User
Longtime User
My apologies - I misunderstood. I can open the help file and I can save PDFs of the pages - but it won't let me batch convert the entire help file to PDF. Is there a particular section you're looking for?

I just converted the section on the C++ decoding piece.

You can get it here: www.tcgapps.com/Dolp-decoder.pdf

If I can find a way to convert the whole thing - or if you have any ideas on how I can do that - let me know.
 

agraham

Expert
Licensed User
Longtime User
See if you can find the decoder.h and decoder.dll file in the SDK, zip them up and post them so I can take a look. FYI there is no point in my installing the SDK as it is of no use with .NET. All that is needed is the dll file and the information about the functions it exposes are used.
 

Tex8503

Active Member
Licensed User
Longtime User
So I've been looking through the SDK - and I can only imagine two things. One: The documentation is out of date or the SDK is missing files from a previous version. I can't find either decoder.h and decoder.dll.

There are:
HandHeldProducts.Embedded.Decoding.DecodeAssembly.dll
HandHeldProducts.Embedded.Decoding.DecodeAssembly.xml
and
HandHeldProducts.Embedded.Decoding.DecodeComponent.dll
HandHeldProducts.Embedded.Decoding.DecodeComponent.xml

As well as many samples of code... so I'm leaning toward that documentation being out of date... Is there still any way you can help me?
 

Tex8503

Active Member
Licensed User
Longtime User
Yes - but it would be nice to have flexibility to scan something and then programatically decide what to do with that data. We're just trying to capture the data and then manipulate it.

Example: I have a form with 4 fields. Only one of those fields should be able to accept scanned data. I want to scan something while my focus is on any part of the screen and send the scanned data to the correct field. Or even things like detecting the symbology of the barcode.

Right now, I don't think either of those things can be done. I'm trying to find clever ways of working around this right now (since we do programming for Intermec and Motorola devices and asking for plugins for all three does seem excessive) - one of the things I'm doing is detecting when the the carriage return happens at the end of the scan and using that as a trigger for actions- such as a form auto submission.

More of what I'm looking for is not even someone to do this for me - but rather to learn how to do it myself. I'm new to .NET but I have experience programming and while there are tutorials on the forums about building libraries - there don't appear to be any about wrapping other DLL APIs.

I'm appealing to my technical contacts to get more information about those files you asked for.

EDIT: One of the other reasons we want to learn how to do this is there are other APIs for features of these devices and I'd like to learn how to wrap those DLLs as well so we can add functionality as needed.
 
Last edited:

agraham

Expert
Licensed User
Longtime User
Ask your contacts about using .NET and C# with the SDK and what assemblies are actually required if this is possible. If they mutter about P/Invoke being required then that's a good sign!

Also ask what .h and .dll normal, not COM or ActiveX, libraries are required for use with C or C++.
 

Tex8503

Active Member
Licensed User
Longtime User
First, the good news... I found decoder.h and decoder.lib
I've packaged these up and made them available on our server : http://www.tcg-llc.net/decoder.zip

Now the bad news, decoder.dll is only on the device. It isn't located in the SDK - but apparently the .lib calls it. I've tried to copy the file off the device to no avail. I've requested a copy from my technical contacts but am waiting to hear back.

I wasn't quite sure about your question - so I'll ask. I didn't know if this would help - but it seems the decode sample projects are only one form each - so I've uploaded the code to pastebin:

DecodeAssembly: [C#] DecodeAssembly - Pastebin.com
DecodeComponent: [C#] DecodeComponent - Pastebin.com

Let me know if any of this helps.
 

agraham

Expert
Licensed User
Longtime User
Looks like
HandHeldProducts.Embedded.Decoding.DecodeAssembly. dll
and
HandHeldProducts.Embedded.Decoding.DecodeComponent .dll

are C# assemblies but I'm not sure what

HandHeldProducts.Embedded.Decoding.DecodeAssembly. xml
and
HandHeldProducts.Embedded.Decoding.DecodeComponent .xml
are.

Can you post all four? Any documentation for them you can find?
 

agraham

Expert
Licensed User
Longtime User
One of the other reasons we want to learn how to do this is there are other APIs for features of these devices and I'd like to learn how to wrap those DLLs as well so we can add functionality as needed.
You will need Visual Studio 2005 Standard or Visual Studio 2008 Professional to compile libraries for devices or maybe SharpDevelop. Have you already got one of those?
 

agraham

Expert
Licensed User
Longtime User
Both those C# assemblies appear to be able to drive the Scanner, an Imager (whatever that is) and play success or failure sounds using the native code Decoder.dll library. The larger DecodeComponent appears to have additional Windows.Forms functionality but I guess that is not needed for your use.

So look for any documentation for the following classes in DecodeAssembly

in HandHeldProducts.Embedded.Decoding
DecodeAssembly
DecodeException
SymbologyConfigurator

in HandHeldProducts.Embedded.Hardware
Device
Imager
Sound

I can see how to do the basic decoding from the examples but there is other stuff, like configuration, that you might need to do and it is difficult to see what that is for two reasons. Firstly the assemblies are obfuscated so I can't see the code, and secondly they are a wrapper over Decoder.dll where the real code lies.
 

Tex8503

Active Member
Licensed User
Longtime User
It would figure I'd want to jump into something that was the most difficult thing on god's green earth :sign0013:

The imager should be the same thing as the scanner (if you want to get technical an imager is a type of barcode scanner that takes pictures using a specialized camera as opposed to a laser scanner)

I found the documentation that describes those classes, but I'm wondering if it might not be easier if I sent you the whole help file.

I'm guessing you have Visual Studio - so you can open .HXS help files, correct?
 

Tex8503

Active Member
Licensed User
Longtime User
here you go:
www.tcg-llc.net/helpdolphin.zip

If it matters, the path ended up being
C:\Program Files (x86)\Honeywell\SDK for Windows Mobile 6.0\Help Integration
just in case it acts like a microsoft product and is fickle...

Thanks again for all of your help.
 

agraham

Expert
Licensed User
Longtime User
Actually .NET Reflector can read the xml file and that gave a little bit of help.

You said you wanted to learn to do this for yourself so this should set you off in the right direction. Attached is a complete VS2005 project for a Basic4ppc library that might even stand a chance of working. No documentation but it's so simple that it should be obvious from the source code. There is support for a single Decode event that is the only thing that may not be immediately obvious.

You will need Dolphin.dll and HandHeldProducts.Embedded.Decoding.DecodeAssembly.dll in your Basic4ppc project folder but only Dolphin.dll needs to be added as a component to your project. It won't merge compile at the moment because of the need for a reference to the DecodeAssembly dll but this is possible and can be fixed later if it works.
 

Attachments

  • Dolphin1.0.zip
    42.7 KB · Views: 342
Top