H
huey_jiang
Hi All,
I have learned a number of demos of DLL creating, but all demos showed
only how to export integer in DLL. What I need is to wrap my new HASH
into a DLL that needs to export a string to APP. Simply speaking, my
hash in C looks like:
char *myHash(char *hashResult)
{
........
return hashResult;
}
and in C++ looks like:
class funHash
{
public:
char *hashResult;
void doHash(char *mesg);
}
void funHash::doHash(char *mesg)
{
.........
strcpy(hashResult,...);
}
Whatever, I need my Application to receive the hashResult. Then, while
I made my funhash.dll, I tried to export the string of hashResult with:
char *myDLL::GetHashVal()
{
......
return hashResult;
}
My VC++ 6.0 did not take this kind of return. I knew people succeeded
at exporting integer by simply doing *return*. Anybody can help me out
at this string exporting? Thanks a lot!
Huey
I have learned a number of demos of DLL creating, but all demos showed
only how to export integer in DLL. What I need is to wrap my new HASH
into a DLL that needs to export a string to APP. Simply speaking, my
hash in C looks like:
char *myHash(char *hashResult)
{
........
return hashResult;
}
and in C++ looks like:
class funHash
{
public:
char *hashResult;
void doHash(char *mesg);
}
void funHash::doHash(char *mesg)
{
.........
strcpy(hashResult,...);
}
Whatever, I need my Application to receive the hashResult. Then, while
I made my funhash.dll, I tried to export the string of hashResult with:
char *myDLL::GetHashVal()
{
......
return hashResult;
}
My VC++ 6.0 did not take this kind of return. I knew people succeeded
at exporting integer by simply doing *return*. Anybody can help me out
at this string exporting? Thanks a lot!
Huey