CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2010
    Posts
    13

    Unhappy IOCTLs in a windows Service

    Ok, so I've built a driver that works completely. I have a win32 CLR CPP control application that is able to communicate with the driver and now trying to get the communication between my CPP windows service and the driver. Naturally I included the path to the common IOCTL.h file that defines my IOCTLs. Immediately I get bombarded with unknowns for METHOD_BUFFERED, etc. So I looked around and saw suggestions to use #include <winioctl.h> which defines all of that fun stuff. Unfortunately now I'm being bombarded with unknown data types such as DWORD, BOOLEAN, etc that are normally common place, with which I had no issues for the control application (didn't even have to add the winioctl.h.

    So what is the great secret for doing this in a windows C++ service template?

    here are my includes:
    #include <stdio.h>
    #include <stdlib.h>
    #include <winioctl.h>
    #include "..\..\SYS\ioctlcmd.h"
    #include "windows.h"

    and usings:
    using namespace System;
    using namespace System::Collections;
    using namespace System::ServiceProcess;
    using namespace System::ComponentModel;
    using namespace Microsoft::Win32;

    Help?!

  2. #2
    Join Date
    Jul 2002
    Posts
    2,543

    Re: IOCTLs in a windows Service

    Try this:

    #include <stdio.h>
    #include <stdlib.h>
    #include <windows.h>
    #include <winioctl.h>
    #include "..\..\SYS\ioctlcmd.h"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured