AEROR is reporting
"Error 11 - Function argument value, type, or count is invalid."
Which is what I was expecting it to be.
Not sure why COMRETURNERROR didn't report it correctly
>Did you check what AERROR() returns?
>
>>I can't seem to get COMRETURNERROR to work.
>>
>>First, my class's ERROR code:
>>
>>
>>PROTECTED PROCEDURE Error(iError, sMethod, iLine)
>>
>> LOCAL sSource, sMessage
>>
>> WITH This
>>
>> ** Form the error strings
>> sSource = TRANSFORM(iError) + CHR(13)+;
>> sMethod+;
>> TRANSFORM(iLine)
>>
>> sMessage = "Error"
>>
>> ** Populate the COM exception structure
>> =COMRETURNERROR(sSource, sMessage)
>>
>> ENDWITH
>>
>>ENDPROC
>>
>>
>>Next, in the INIT I placed:
>>
>>
>>PROCEDURE Init
>>
>> LOCAL sString
>>
>> sString = "Kevin"
>>
>> ** This will trigger the Error method
>> ? DTOC(sString)
>>
>>ENDPROC
>>
>>
>>And when I compile the DLL and instantiate the class, I get
>>"OLE error code 0x80004005: Unspecified error."
>>
>>Shouldn't it be displaying my error string?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people