Function failure

From Appmethod Topics
Jump to: navigation, search

Go Up to CodeGuard Errors Index

CodeGuard monitors the return value of many of the standard Appmethod C++ or Wind32 API functions. A return value of -1 indicates that an error occurred when the function was called and will be logged by CodeGuard. See the following code sample using chdir() with an invalid directory name:

#include <tchar.h>
#pragma hdrstop
void myf()
{
	chdir("z:\zxbvn"); //error
}

int _tmain(int argc, _TCHAR* argv[])
{
	myf();
	return 0;
}