Link to home
Start Free TrialLog in
Avatar of Nick_72
Nick_72

asked on

Problems including winioctl.h....

Hi,

my problem is this:
I use the function DeviceIoControl() with some parameters, and I have included winioctl.h, but the compiler can't find those parameters declared in that file. Here's the code:

#include "stdafx.h"
#include "windows.h"
#include "iostream.h"
#include "winioctl.h"

int main(int argc, char* argv[])
{
      HANDLE hFind;
      DWORD outputBufferSize;
      FILE_OBJECTID_BUFFER outputBuffer;

      ---
                some code here...(getting the handle etc.)
                ---

      DeviceIoControl(hFind,
                   FSCTL_GET_OBJECT_ID,
                   NULL,
                   0,
                   outputBuffer,
                   sizeof(outputBuffer),
                   outputBufferSize,
                   NULL);


      return 0;
}

and I get these error-messages:

error C2065: 'FILE_OBJECTID_BUFFER' : undeclared identifier
error C2146: syntax error : missing ';' before identifier 'outputBuffer'
error C2065: 'outputBuffer' : undeclared identifier
error C2065: 'FSCTL_GET_OBJECT_ID' : undeclared identifier

What can be the problem?? I have included winioctl.h, and I have the SDK include library as the top path in options/directories...(it finds windows.h without any problems)
Any help would be appreciated.

/Nick
ASKER CERTIFIED SOLUTION
Avatar of AlexFM
AlexFM

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Nick_72
Nick_72

ASKER

Oh....thanks alot.