From: mellon@fugue.com (Ted Lemon)
Subject: Re: Calling cygwin.dll functions from Visual Basic
20 Dec 1996 19:09:04 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199612210053.QAA19069.cygnus.gnu-win32@toccata.fugue.com>
Original-To: crispen@hiwaay.net
Original-cc: gnu-win32@cygnus.com
In-reply-to: Your message of "Fri, 20 Dec 1996 17:01:01 CST."
             <32BB1AAD.75AE@hiwaay.net> 
Original-Sender: owner-gnu-win32@cygnus.com


> And unless I badly misread the manual, you're supposed to
> pass both BASIC strings (each 4 bytes long, btw) as ByVal
> which points to the lovely null-terminated string part of
> those data structures.

The point is that you need to make sure the target string is already 4
bytes long (or whatever) before you call strcpy, or you'll be in
trouble.   You might write the code as:

	len = strlen (sourceStr)
	destStr = String (len + 1, 0)
	strcpy (destStr, sourceStr)

This ensures that the destination string has enough space in it.

If this is not your problem, then I don't really know what to suggest.

			       _MelloN_
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
