realbasic-nug
[Top] [All Lists]

Re: Returning a string from a c dll to real basic

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Returning a string from a c dll to real basic
From: Stefan Pantke <seaside dot ki at mac dot com>
Date: Wed, 31 Aug 2005 10:07:30 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <00a801c5ae02$377fb0d0$0100000a at KEITHXP>

Am 31.08.2005 um 10:01 schrieb Keith Hutchison:

The following fails, and I am not sure why (yet)

Is this a correct way to send back a string from c ?
export char* _stdcall getCurrentRecordingDevice()
{
 char    deviceName[MIXER_SHORT_NAME_CHARS] = "null";
 /*
   processing to get name works.
 */
 return deviceName ;

Don't you return a function local variable, which get's
released just after return from the function?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>