I create new dll with simple functions in Delphi and then try to call functions and procedures in QTP from it. Sometimes, there are no errors occures and there are no results after it executed, and sometimes, error occures. The reason of it i don't know. When i try to add strcall to dll, QTP closed after test runs.

Is there some any specific knowledge should be for developing dll's? Why dll doesn't work properly written in Delphi? Or I should it developed in C?