I have a follow-up question concerning my use of 'char' as the return type for my fcn1Wrapper() call:
my main code is similar to this, assuming that the function declaration was performed in the global workspace as discussed in previous posts above:
Code:
main(){
char fcn1_out;
dll = LoadLibrary("myLibrary.dll");
if (dll != NULL)
fcn1Wrapper = (fcn1WrapperPointer)GetProcAddress(dll, "fcn1Wrapper");
else
fcn1Wrapper = NULL;
fcn1_out = fcn1Wrapper(6, 6, "Setup_File.txt");
printf("fcn1_out = %c.\n", fcn1_out);
}
If I were working with a bool output type, I would expect my fcn1Wrapper() call to return 1 for success and 0 for failure. Here, when I print out the char return value it is '.' (i.e. a period). I've looked through documentation for converting characters to bools, but I haven't found anything that seems useful. i.e. I'm not even sure whether there *is* a correspondence between the '.' character that my function call is returning, and a 0/1-type boolean value that I can use to determine success/failure of my function call. Does this returned '.' value have any actual *meaning*? If e.g. I remove from my working directory the input file that my fcn1Wrapper() takes as an argument, I still get '.' as my return value...
Is my code above correct, and if so, is there any way for me to determine the success of my function call using the char return type? Thanks.