LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiler problem with formatio.h and windows.h

I would like to use both library "windows.h" and "formatio.h".
I must use windows.h to use a really needed function called "CreateFileA" with special Flag and "WriteFile" from "windows.h".
But I would like also to use some functions from the 'formatio.h' as ScanFile, OpenFile, ReadFile, CompareString which are not part of the windows.h package.
Of course I have a complitation issue.
Does anybody have suggestion?
I am using CVI7.1 and your help will be very appreciated.
0 Kudos
Message 1 of 2
(3,542 Views)
You didn't specify what your compiler problem was.   I built a quick demo app and found no problems.  What is the order of include files in your application?  windows.h must be the first include file.

This is the sample application.  It compiles with no warnings or errors.
#include "windows.h"
#include <userint.h>
#include <formatio.h>
#include <cvirte.h>

int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                       LPSTR lpszCmdLine, int nCmdShow)
{
    if (InitCVIRTE (hInstance, 0, 0) == 0)
        return -1;    /* out of memory */
   
    MessagePopup ("Test", "No compiler error.");
   
    return 0;
}

----
I am the founder of CnCSoftwareSolutions. When not cleaning up baby drool, I write about test data or work on Vision, a tool for understanding your test data. Visit me at www.cncsoftwaresolutions.com
0 Kudos
Message 2 of 2
(3,537 Views)