mssql extended stored proc in delphi

anyone got an idea how to develop extended proc in mssql (7.0 or 2000) in
delphi?

my idea is to create a C dll that calls a delphi dll since the the interface
(svr.h) in only provided in C. But no success so far. The server returns ;

ODBC: Msg 0, Level 16, State 1
Cannot load the DLL e:\project\xp_myhello.dll, or one of the DLLs it
references. Reason: 126(The specified module could not be found.).

(1 row(s) affected)
here, xp_myhello.dll is written in C, very similar to the sample code of
xp_hello.c available in /devtools/sample directory. The difference is it
calls a function in a delphi dll. I created a C code that calls a function
in this C dll (which in turns call a function in the delphi dll) and it
works. Only when I call it from the server it doesn't work.
Help?