Subject Re: [firebird-support] UDF Problem
Author Robert Tulloch
Hi:


Dimitry Sibiryakov wrote:

>On 7 Jan 2004 at 0:05, Robert Tulloch wrote:
>
>
>
>>I have written other udfs and never had a connection lost error before.
>>
>>
>
> You must be a lucky dog, then...
>
>

Have you seen this "connection lost" before when executing call to
udf/dll function?



>
>
>>External Function which when tested by direct call to function in dll,
>>returns a proper case string.
>>
>>DECLARE EXTERNAL FUNCTION PROPERCASESTRING
>>VARCHAR(80) CHARACTER SET NONE
>>RETURNS VARCHAR(80) CHARACTER SET NONE
>>ENTRY_POINT 'fn_ProperCaseString' MODULE_NAME 'strudf';
>>
>>----------------------------------------------------------------------
>>
>>and dll code .cpp
>>
>>String __stdcall fn_ProperCaseString(String CheckString)
>>
>>
>
> Shouldn't the function have __cdecl type? Are you sure that String
>is compatible with VARCHAR? Looking at the rest of the code I
>strongly suspect that you don't understand what VARCHAR is internally
>(it is not a character array). May be you should use CSTRING instead
>VARCHAR in function's declaration?
>

Probably should Since I was not allocating it, no freeing it. Probbly
wrong here also.


> Memory management is suspicious too. When memory, allocated for
>ProperCase will be freed?
>
> SY, Dimitry Sibiryakov.
>
>
>
>
>
>
>Yahoo! Groups Links
>
>To visit your group on the web, go to:
> http://groups.yahoo.com/group/firebird-support/
>
>To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
>



[Non-text portions of this message have been removed]