Microsoft KB Archive/188888

= BUG: "String is too long to fit" Error Passing Variables to COM =

Article ID: 188888

Article Last Modified on 12/11/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a

-



This article was previously published under Q188888



SYMPTOMS
The error message "String is too long to fit." is received when a character variable is passed by reference to a Visual FoxPro COM server, either a DLL or EXE.



CAUSE
This error is received if the character variable exceeds 255 characters.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
  Place the following code into a new program file and save it as Test.prg: DEFINE CLASS test AS custom OLEPUBLIC Name = "test" PROCEDURE vartest Parameters xx           xx=xx+"ddd" RETURN "Hello" ENDPROC ENDDEFINE  Create a new project and add the program from step 1 above to the project. Name the project Test.pjx. From the Project Manager, build either an Executable or an OLE DLL. Name it Test.exe or Test.dll.  Place the following code into a new program file and run it: CLEAR x=CREATEOBJECT("test.test") IF TYPE("x")!="O" RETURN ENDIF z=REPLICATE("z",256) ? x.vartest(@z) ? z     RETURN 

Additional query words: kbDSupport kbDSE kbVFp500abug kbVFp500bug

Keywords: kbbug kbfix KB188888

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.