Home Help Download Support My license License agreement Pricing System requirements Notices

Purpose Audience How does it work? Example Getting Started Installation License Warning


WinHoldEm has the ability to interface with a user provided dynamically linked library named WHUSER.DLL This feature allows an end-user to write their own special purpose holdem ai using standard C/C++ compiled code. WinHoldEm will automatically load WHUSER.DLL at startup if the file exists in your WinHoldEm install folder and it has been compiled correctly using the required API. (see below).


It should be obvious to you that you need the skill to author original C/C++ code and that you need to be able to compile your code in .DLL format. It pretty much goes without saying that a C/C++ compiler is required. But you already knew that. If none of this was obvious to you then you are not a member of the intended audience.

How does it work?

Once each second the WinHoldEm scraper will send the current game state to the exported library function process_message. It is up to you to process the holdem state information in the manner of your choosing. WinHoldEm still evaluates each of the formula functions in the usual manner, however, the formula processor will now recognize symbols that begin with the string dll$ as symbols that require processing by WHUSER.DLL and therefore when one of these symbols (for example dll$test4) is encountered, process_message is called with a query signal and the symbol name whereupon it is presumed that your code knows what that symbol means and what do do with it and the appropriate result to return. You can invent any symbol you want as long as it begins with dll$.

The API for process_message is contained in the file whuser.h below.

A Simple Example

We offer the following suggestion as an easy way to get started. By simple convention let us say that your code, in WHUSER.DLL knows how to handle the following:
Each of these symbols in this example is intended to correspond to the 4 major formulas inside the formula editor. You can easily transfer control from the WinHoldEm call formula to your code simply by referencing these symbols in the WinHoldEm formulas. For example you could by convention decide to simply replace your entire call formula with the symbol dll$call and in so doing the WinHoldEm call formula would then be the result of whatever your code decided to return after processing the symbol. It is entirely up to you on exactly how you want to use your logic inside WHUSER.DLL. Conceptually you can just think of dll$call. as just one of the functions that your code provides to the WinHoldEm formulas - a function with no arguments. With this way of thinking, each of the once per second game state messages are the actual set of parameters.

Getting Started

You can download the following example files to help you get started. The example source file understands the symbols dll$test0 - dll$test9 each of which return the number at the end of the name itself. You can easily verify this by entering one of the symbol names in the formula test tab and pressing calculate. Understand that you still must use the WinHoldEm formulas themselves to get anything done. And you do this by planting your own user-defined symbols inside the formulas themselves - symbols that your logic in WHUSER.DLL knows how to resolve.

Filename Purpose
whuser.cpp example C++ source file to help you get started.
whuser.h example C++ header file. (contains required api)
whuser.dll example whuser.dll compiled from source above
whuser.dsp example developer studio project file.

Installing WHUSER.DLL

Simply place WHUSER.DLL in your WinHoldEm install folder. WinHoldEm will automatically load it at startup.

License Requirements

You must have a valid WinHoldEm Pro Edition license or higher to use WHUSER.DLL


While you can install any WHUSER.DLL from any programmer you choose, it does not mean it is a wise thing to do, especially if you do not know the person or company that built the .DLL. WinHoldEm sends the current game state to the .DLL and this certainly includes knowledge of your holdem hand if you are currently playing. Without seeing the source code to the .DLL, you do not have an easy way to verify the intentions of the entity who built it and made it available to you (especially if it is free). It is one thing to install a .DLL that your trusted programmer friend built. It is another thing entirely to install a .DLL from a questionable source on the internet. So just be careful. If you do decide to install a .DLL that seems legitimate, then at least take the time to check it for viruses. Just remember that it is executable code which means it could potentially do things far worse than sending your card info across the net.

home  top