Wouter,
We are not as stupid as some people. Nick and I have both been doing VFP for quite a few years now.
Are you capable of reading the suggestions we are making and replying to the questions we asked?
I'm about 99.9% confident that the line of code you are trying to execute is causing an additional error because of a stupid mistake and thus causing VFP to want to display a dialog, which it can not do because you are in an inproc dll.
>Are you guys stupid or what?
>
>I said: 'The error above was catched with an error handler' so I'me already cathing errors to a text file!!!
>
>And I tested my application of course first without COM!! So why do I catch this error:
>
>>Error:2031
>>Error message: User-interface operation not allowed at this time.
>>Line of code with error: 600
>>Line number of error: 9
>>Program with error: DOS.SELECTIONEXISTS
>>
>>In this line:
>>
>>USE (THIS.SelDir + '\S_Seldef') IN 0 AGAIN ALIAS SelectionExists_Tmp
>
>and not an error like 'File not found'