I need to extract complete path for a file givne the file name.
I am using the function GetFullPathName() but it only appends
the current directory of the project with the file name..

Is there any modification or some other function which can help?
I am using visual studio 2005 and visual c++...

Try _fullpath from stdlib.h (see MSDN help on this function). It has its own restrictions.

If you have a file name only and know nothing about this file location you can't get its full path w/o your own search process. For example, you have 10 files named oneof10.txt in partition D: (in different directories, of course). The answer is not a path string: it's an array (or list) of paths...