Maithili,
It very much sounds like the error is in the DLL that you built. I assume that you have tested it outside of LabVIEW?
Do you know exactly where the error is happening? You should set a breakpoint on the Call Library Function node and if the error happens before then, then the error is in LabVIEW. If the error happens during the Call Library Function, then the error is in the DLL itself. From there, you can print information from your DLL as you go to see where the crash is happening or use the information in the "Using External Code in LabVIEW" manual that is on your PC in the manuals directory under your LabVIEW directory.
With no files (and no hardware to test if I had), I cannot offer any more advice. If you can do a little more digging or post a
more detailed explaination of your issue, then the community can take another look.
Randy Hoskin
Applications Engineer
National Instruments
http://ww.ni.com/ask