- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Sir or Madame,
I am trying to learn Compaq Visual Fortran from a book I
bought recently. There is an example with the line below:
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, Null, OPEN_EXISTING, 0, NULL)
At this line an error occurs during the compilation of the code. Specifically, the following error appears in the Output window:
Error: The type of the actual argument differs from the type of the dummy argument. [0]
Could you please give some advice to correct this problem?
Thanks in advance.
e-mail address: dkatsap@tee.gr
I am trying to learn Compaq Visual Fortran from a book I
bought recently. There is an example with the line below:
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, Null, OPEN_EXISTING, 0, NULL)
At this line an error occurs during the compilation of the code. Specifically, the following error appears in the Output window:
Error: The type of the actual argument differs from the type of the dummy argument. [0]
Could you please give some advice to correct this problem?
Thanks in advance.
e-mail address: dkatsap@tee.gr
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Declarations of Win32 API functions changed through CVF versions. I think those used in Norman Lawrence's book correspond to 6.6. As I recall, proper use for CreateFile was:
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL_SECURITY_ATTRIBUTES, OPEN_EXISTING, 0, NULL)
CVF 6.6 brought ALLOW_NULL attribute, which would allow user to use NULL or 0 instead of NULL_SOMETHING.
In any case, I'd recommend that when using Win32 APIs always do a "Find in Files" for symbol you want to use in C:...Microsoft Visual StudioDF98Include and take a look at INTERFACE block.
Also, consider upgrading to 6.6.
Jugoslav
hFile = CreateFile(szFileName, GENERIC_READ, FILE_SHARE_READ, NULL_SECURITY_ATTRIBUTES, OPEN_EXISTING, 0, NULL)
CVF 6.6 brought ALLOW_NULL attribute, which would allow user to use NULL or 0 instead of NULL_SOMETHING.
In any case, I'd recommend that when using Win32 APIs always do a "Find in Files" for symbol you want to use in C:...Microsoft Visual StudioDF98Include and take a look at INTERFACE block.
Also, consider upgrading to 6.6.
Jugoslav
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page