Click to See Complete Forum and Search --> : How to use fprintf and sprintf in ATL dll project


agarunk
July 6th, 2006, 06:29 AM
Hi all,
I'm developing ATL dll which will be used in C#. But I have done many things so far now I have to use either file operation (say fprintf) or string operations ("sprintf").

I have tried to do it as in the usuall fashion(like in normal exe) but when I'm calling the methods containing "fprintf or sprintf" in C# project it'll start throwing following error.
........................................
Debug Assertion Failed!
"location\system32\inetsrv\w3wp.exe"
File:sprintf.c
Line:55

Expression: (str != NU.LL)
............................................

when I hit retry i'll get the following messege

The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
...................................................

As per me its not the right way to use fprintf/sprintf in ATL dlls I guess.

You can test it by creating simple ATL dll project and placing file operation including fprintf/sprintf, and calling the method in C#.

plzzzzz guide me to come over it.




Thanks,
Arun

Krishnaa
July 6th, 2006, 06:42 AM
Can you post your project here ?