This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: AW: DLL function with string result?
- To: "Larry Hall (RFK Partners, Inc)" <lhall at rfk dot com>
- Subject: Re: AW: DLL function with string result?
- From: Christian Lescher <christian at lescher dot de>
- Date: Fri, 20 Apr 2001 20:12:27 +0200
- 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
- References: <4.3.1.2.20010420103953.022a2700@pop.ma.ultranet.com> <4.3.1.2.20010420122559.0224b5f0@pop.ma.ultranet.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