This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: AW: DLL function with string result?

----- Original Message -----
From: "Christian Lescher" <>
To: "Larry Hall (RFK Partners, Inc)" <>
Cc: "Lescher Christian" <>; "'Andrew
Markebo'" <>; "Troy Noble"
<>; <>
Sent: Saturday, April 21, 2001 4:12 AM
Subject: Re: AW: DLL function with string result?

> I found that in windowsx.h of cygwin/gcc there are the following
functions defined:
> #define GlobalAllocPtr(flags,cb)
> #define GlobalFreePtr(lp)
> May these functions also be used for copying a string? How must they
be used? (Maybe this works also for string > 64 KB?!)
> Is this also a way for interworking of Borland and Visual?

I'd like to point out that /dec/clipboard in cygwin uses standard
malloc, which IIRC strdup does as well. /dev/clipboard handles
multi-megabyte copy and pastes.

There are _no_ issues that I know of with strings > 64Kb in cygwin.

64Kb is the largest size of a single segment in x86 processors running
in real mode. Some of the early win9x series microsoft class libraries &
utilities had a 64Kb limit on various things  because (As I understand
it) they were not fully ported to protected mode when win95 came out. If
you are seeing 64Kb issues I suggest you do the following.

In your compiler environment (ie if your prog is in Visual, your library
in Cygwin then I mean in visual), write a test case. If that works then
it's either a interop issue or a problem with the library compiler.


> Christian
> | char*
> | mallocAndStrCpy (const char* srcStr) {
> |    if (srcStr == NULL)
> |       return NULL;
> |    return strdup(srcStr);
> | }
> --
> Want to unsubscribe from this list?
> Check out:

Want to unsubscribe from this list?
Check out:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]