delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/20/14:13:48

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <3AE07C0B.928C7680@lescher.de>
Date: Fri, 20 Apr 2001 20:12:27 +0200
From: Christian Lescher <christian AT lescher DOT de>
X-Mailer: Mozilla 4.7 [de] (Win95; I)
X-Accept-Language: de
MIME-Version: 1.0
To: "Larry Hall (RFK Partners, Inc)" <lhall AT rfk DOT com>
CC: Lescher Christian <christian DOT lescher AT icn DOT siemens DOT de>,
"'Andrew Markebo'" <flognat AT flognat DOT myip DOT org>,
Troy Noble <troy DOT noble AT channelpoint DOT com>, cygwin AT cygwin DOT com
Subject: Re: AW: DLL function with string result?
References: <4 DOT 3 DOT 1 DOT 2 DOT 20010420103953 DOT 022a2700 AT pop DOT ma DOT ultranet DOT com> <4 DOT 3 DOT 1 DOT 2 DOT 20010420122559 DOT 0224b5f0 AT pop DOT ma DOT ultranet DOT com>

I found that in windowsx.h of cygwin/gcc there are the following functions defined:

#define GlobalAllocPtr(flags,cb) (GlobalLock(GlobalAlloc((flags),(cb))))
#define GlobalFreePtr(lp) (GlobalUnlockPtr(lp),(BOOL)GlobalFree(GlobalPtrHandle(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?

Christian

| char*
| mallocAndStrCpy (const char* srcStr) {
|    if (srcStr == NULL)
|       return NULL;
|    return strdup(srcStr);
| }




--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019