|
-
Jan 3rd, 2003, 04:25 PM
#1
Thread Starter
Addicted Member
Null-terminating LPTSTR?
I need a 32 length null-terminating LPTSTR equivalent in C#, does it exist?
Not at all related to sheep...
-
Jan 3rd, 2003, 08:45 PM
#2
PowerPoster
Can you pass a 32 element char array?
-
Jan 3rd, 2003, 11:14 PM
#3
Frenzied Member
Dont gain the world and lose your soul
-
Jan 4th, 2003, 06:38 AM
#4
Thread Starter
Addicted Member
Well the context is, I need to pass something to this parameter:
LPTSTR lpszReturnString
I know that in VB 6, this did the trick perfectly:
VB Code:
Dim sReturn As String * 30
I just passed sReturn to the function and it filled it and sent it back my way. It worked. Now of course that notation for initializing a string has become obsolete. So I need a replacement, preferably in C# because of it's evident coolness.
Not at all related to sheep...
-
Jan 4th, 2003, 08:04 AM
#5
Frenzied Member
Code:
StringBuilder sReturn = new StringBuilder();
You can use the stringbuilder or the string type. .NET will take are of the rest
Dont gain the world and lose your soul
-
Jan 4th, 2003, 05:26 PM
#6
Thread Starter
Addicted Member
Well, err, it didn't. Can you give me an example of how you would create the required object?
Not at all related to sheep...
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
|