>L505 wrote:
>First thing to check is it declared CDECL or STDCALL in the C library?
>I think the default C declaration mode is CDECL if it is not defined
explicitely.
I knew it was gonna be the obvious. I changed:
function testreturn(thename:pchar;rcity:pchar;rstate:pchar):integer;
stdcal
Le Lundi 30 Octobre 2006 01:13, Chris a écrit :
> I get an "Access violation" when I call a function from a C library.
>
> Not sure if I can explain well enough, so I will just post the code:
>
> The C library:
> #include
> #include
>
> int testreturn(const char *thename, char *rcity, char *rstat
> int testreturn(const char *thename, char *rcity, char *rstate)
> {
>
> memcpy (rcity,"Boston",7);
> memcpy (rstate,"Massachusetts",14);
>
> return strlen(thename);
> }
First thing to check is it declared CDECL or STDCALL in the C library?
I think the default C declaration mode is C
> int testreturn(const char *thename, char *rcity, char *rstate)
> {
>
> memcpy (rcity,"Boston",7);
> memcpy (rstate,"Massachusetts",14);
>
> return strlen(thename);
> }
First thing to check is it declared CDECL or STDCALL in the C library?
> I click OK and its fine. It returns ev