Here is the dll code that crashes.......................................
LONG ProcessInputString(LPSTR strInput)
{
     char* strfield2pass = "";
       _tcscpy(strfield2pass, strInput);
       char* strTemp = RightTrim(strfield2pass);
       int stringlength = _tcslen(strTemp);
       if (stringlength == 7)
       {
        long Num = atoi (strInput);

        if (((Num % N) == 0) && (Num != 0))
          return VSUCCESS;
        else
          return VFAILED;
       }
       else
           return VFAILED;
}

LPSTR RightTrim(LPSTR str1)
{
     char* str2;
     char* pChar;
     str2 = strdup(str1);
//----------------------------
     int i = _tcslen(str2);

     pChar = str2 + _tcslen( str2 ) - 1;

     while (pChar >= str2 && *pChar == ' ')
         *pChar-- = 0;
//----------------------------
     return str2;

}

>
> I can't see that in the code - sorry if I've missed it, but please can
you post the code that is crashing?
>
> Have you tried stepping through the code with the debugger?
I have tried to step through the code. It didn't work. I don't know it
there is a trick to stepping through DLL
>
> BTW I'm not a C++ programmer :-(
>

TFE
http://totallyfreeenergy.zxq.net <http://totallyfreeenergy.zxq.net>




[Non-text portions of this message have been removed]

Reply via email to