Introduction
This part of the documentation is aimed at developers wishing to add there own functions/commands to BarCommander. The only language I am familiar with, is C. I don't know C++, I don't know Visual Basic, I don't know Delphi. For those using c++ you should have no problem using the code in this doc, or the example DLL I guess, but I don't know for sure :)

NOTE: IMHO you are going to understand far better by looking at the example code available on the site. Trust me, it sounds really confusing here, but its very simple in practice.

How-to...

What I'm going to do is explain the code in the example DLL which can be downloaded off the website. It's nothing complicated, its just the framework.

Here's how the DLL is loaded:

  1. On loading of BarCommander, it calls BarCommandInit in your DLL. At this point you should obtain a function pointer to RegisterCommand, and call it with your command, and the corresponding function. You are given the HWND of the bar, and the HINSTANCE as parameters.

    We then get the address from the main program of the function we call to register commands, we store this as a function pointer. Then we call it, and register the command hello. The hellobox is the function called inside you dll, when someone enters hello into the bar.
  2. Now this hellobox function... It must be declared as int hellobox(char* name), to conform to the pFunction prototype declared in dll.h. When someone types hello (the command registered), this function is called, and ALL data is passed to the function. Everything they typed in is passed to you. If the user types "hello test", then your function will be called, and you will receive"hello box" as the parameter.
  3. On closing of BarCommander, BarCommandExit is called inside your DLL. At this point you obtain a pointer to the UnregisterCommand function, and call it, and unregister your command!

And that's it! Now if you do make a DLL, then please send it to me, and if I consider it useful, I will incorporate it into the core program. If I don't think that's appropriate, I will just post it on the website for others to peruse.