From: crispen@hiwaay.net (Bob Crispen)
Subject: Re: Calling cygwin.dll functions from Visual Basic
20 Dec 1996 16:21:18 -0800
Sender: daemon@cygnus.com
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <32BB1AAD.75AE.cygnus.gnu-win32@hiwaay.net>
References: <199612181642.IAA09359@toccata.fugue.com>
Reply-To: crispen@hiwaay.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 <mellon@fugue.com>
Original-CC: gnu-win32@cygnus.com
Original-Sender: owner-gnu-win32@cygnus.com

Ted Lemon <mellon@fugue.com> 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@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@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 <string[s].h> 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@hiwaay.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@cygnus.com" with one line of text: "help".
