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