Hello,
I have a C++ DLL function declared as:
int functionname(char * str);
This function should be able to receive NULL as the argument.
Here is the prorotype declared in setup.rul:
prototype int MyDLL.functionname(STRING);
However, when I try to pass NULL (which is 0) to it when calling the function, the script won't compile since it's expecting a string instead of a number. Can someone tell me how to do it? I'd reallly appreciate it.
-jiekang007
This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.

How to pass NULL to a DLL function?
Started by
jiekang007
, Mar 18 2003 20:28
2 replies to this topic
Posted 10 April 2003 - 20:44
Maybe try passing a pointer rather than a string:
POINTER p;
p=NULL;
Then pass it to your function that takes a const char *
foo(p);
POINTER p;
p=NULL;
Then pass it to your function that takes a const char *
foo(p);
Posted 14 April 2003 - 19:08
Totally forgot to add this, you'll also need to redefine your function in setup.rul
MYDLL.functionname(BYREF STRING);
or
MYDLL.functionname(POINTER);
MYDLL.functionname(BYREF STRING);
or
MYDLL.functionname(POINTER);