Subject: Re: Calling cygwin.dll functions from Visual Basic
From: [email-masked] (Bob Crispen)

20 Dec 1996 16:21:18 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
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 <[email-masked]>
Original-CC: [email-masked]
Original-Sender: [email-masked]

Ted Lemon <[email-masked]> 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
[email-masked]
"A polar bear is just another way of expressing a rectangular bear."
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".