|
-
May 21st, 2013, 01:41 AM
#4
Re: How to remove null from fixed length string
 Originally Posted by jdy0803
Actually str1 is acquired from some C DLL function which requires 10 fixed length string.
I just made sample code to explaine my issue.
So I can't declare str1 As String
I believe what you just need is a string buffer. In that case, a dynamic string would be good enough. Typically, such a string is filled first with a sufficient number of characters (such as spaces or nulls) before it is passed to the external function. Can you show the C function's signature and your VB6 declaration?
On Local Error Resume Next: If Not Empty Is Nothing Then Do While Null: ReDim i(True To False) As Currency: Loop: Else Debug.Assert CCur(CLng(CInt(CBool(False Imp True Xor False Eqv True)))): Stop: On Local Error GoTo 0
Declare Sub CrashVB Lib "msvbvm60" (Optional DontPassMe As Any)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|