How to define return string in DLL?

huey_jiang_at_yahoo.com
Date: 03/30/05


Date: 30 Mar 2005 02:46:53 -0800

Hi All,

I need to make DLL for my new hash function in C. In myhashdll.c file,
I have a function as:

char *make_hash(char *in, char *out)
{
    ......
    ......
    return (out);
}

So, this function is supposed to return a hashed string in the *out
argument. What I don't know is how to define its header file. Say, in
myhashdll.h file, I need to define 2 values that tell my main() whether
this make_hash() call works good or not. If do defines as:

#define HASH_OK 0
#define HASH_ERR 44

I think these 2 defines should not work right, because my return will
be a hashed sring, instead of 2 numbers. Can anybody help me to figure
out how to do these 2 defines? I mean, to make the defines that can
return my hashed string.

Sorry for the complexity of the question. Thanks in advance!

Huey