- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following code has been working when compiled withCVF 6.6, and it runs fine when compiled for release with the latest IVF 9.1 revision. But when it's compiled for debug, it throws the following error:
"forrtl severe (408): fort: (7): Attempt to use pointer NULL_SECURITY_ATTRIBUTES when it is not associated with a target."
Here's the code, a call to the Windows API function CreateFile:
NULLIFY(NULL_SECURITY_ATTRIBUTES) hFileHandle = CreateFile(TRIM(strFileSpec)//CHAR(0),
& intRWB,0,
& NULL_SECURITY_ATTRIBUTES,
& intCreate,0,NULL)
Commenting out the NULLIFY statement doesn't make any difference. The subroutine contains a USE IFWIN statement. I get a similar error with NULL_OVERLAPPED in a WriteFile call. It also works fine when compiled for release.
If this really is an error, can someone please explain what's causing it and how to fix it? If it's not, I'd like to know how to suppressthe error reportso I can use the debugger to spot real errors.
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My guess is that you have turned on additional run-time checks, includng /check:pointer. NULL_SECURITY_ATTRIBUTES is a pointer to type T_SECURITY_ATTRIBUTES so it sees that you are fetching the value of a null pointer and giving the error.
You no longer need to use the NULL_xxx values in most cases, including this one. Just use NULL instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the run-time checks to All. Changing NULL_SECURITY_ATTRIBUTES and NULL_OVERLAY to plain NULL eliminated the error messages. Thanks!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page