@Jose
[EDIT]
#include <scan/scan_protos.h>
#include <scan/hooks.h>
This suggests the ObtainCurrentBuffer is in fact function in some scan.library or so. It can also be some static library (in which case you should use LIB somescanthing.lib).
If not, the symbol must be linked in from some object file (or the code pasted directly into the program).
Once you figure out where ObtainCurrentBuffer comes from, fixing the problem should be easier...
[/EDIT]