.NET wrapper

You can call Bank Wizard directly from .NET using the supplied classes. These classes closely follow the style of the Java classes.

The methods and static values provided by the .NET wrappers have the same names as the main API functions and values except:

This is because they are already globally unique due to the classes being in the EigerSystems.BankWizard namespace.

This is because they are already globally unique due to being within the namespace/class.

API methods which access integer or string data use the return value of the function. For example, you call BWIGetValue and BWIGetString as:

int value = h.getValue(item);

string s = h.getString(item);

The .NET classes are shipped in the assembly bwidotnet10.dll. You must make this and the standard Bank Wizard DLLs available to your application during both development and runtime. Experian recommend that you include the location of these in the PATH. You should not place them in the Windows system tree.

There is a C# example available, bwicsexam.cs, in both source code and compiled form.

BankWizardInt

This provides access to the functions and values which do not need a handle. The only exception is the init() method. This resides in the BankWizardInt class because it is Bank wizard which is being initialised and not the handle. All BankWizardInt methods are static, therefore you use the class name to call them:

BWIHandle h = new BWIHandle();

BankWizardInt.init(h);

/* Process initialisation conditions and then free the handle */

h.free();

BWIHandle

This accesses all functions and values which need a handle. The class constructor calls the API function BWICreateHandle. The handle is provided with a destructor, which calls BWIFree to release the resources stored in the core. However, because there is a limited supply of handles, your application should free them rather than rely upon the garbage collector.

BWIHandle h = new BWIHandle();

/* do task */

h.free();

BWIcc

Where cc is the ISO country code.

This supplies the condition and field values for a country. All values are static. For example, the class for the UK is BWIUK and is used as follows:

BWIHandle h = new BWIHandle();

h.setValue(BWIHandle.V_COUNTRY_CHECK,,BWIHandle.C_UK);

h.setString(BWIUK.SORT_CODE,010004);

h.setString(BWIUK.ACCOUNT_NO,12345678);

h.check();

...

h.free();

BWIBadHandleException

If a handle is invalid this exception is thrown by all methods which need a valid handle. A handle can become invalid because:

To detect this, call validHandle() after new

Most applications should not need to call this function.

A handle can also become invalid if the same .NET object is referenced by two variables and free is called on one of them.

BWIHandle h = new BWIHandle();

BWIHandle h2 = h;

...

h2.free();

h.check();

/* Exception thrown here */

When implementing Bank Wizard, avoid referencing a handle by two variables. If you need to do this, allow the garbage collector to clean up. In most cases, you should make a copy of the handle so you can use it independently.

BWIHandle h = new BWIHandle();

BWIHandle h2 = new BWIHandle();

...

/* h2 is an exact but independent copy of h */

h2.copyHandle(h);

...

h.free();

h2.check();

/* No exception */