From: crispen AT hiwaay DOT net (Bob Crispen) Subject: Re: Calling cygwin.dll functions from Visual Basic 20 Dec 1996 16:21:18 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32BB1AAD.75AE.cygnus.gnu-win32@hiwaay.net> References: <199612181642 DOT IAA09359 AT toccata DOT fugue DOT com> Reply-To: crispen AT hiwaay DOT net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.0 (Win95; I) Original-To: Ted Lemon Original-CC: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Ted Lemon sez: >Make sure that the string into which you are copying has enough space. >Also, I found that I needed to declare an alias with the munged WINAPI >name (in your case, this would be strcpy AT 8). Also, you probably >*don't* want to use the return value of strcpy, at least not as a >string. Sorry, mate, but giving it an alias (I presume you meant in the VB Declare statement) of strcpy AT 8 didn't do anything but change the error message to "function not found." 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. And we had it return both an int and a string (which we didn't use further). Same result. So, any other ideas? I've picked up the Gnu sources to the stuff and they look pretty self-contained, so I may take a whack at stripping the weirdness out of them and just compiling them with a Visual C++ compiler. Sigh. -- Rev. Bob "Bob" Crispen crispen AT hiwaay DOT net "A polar bear is just another way of expressing a rectangular bear." - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".