Thread: Macro Error for Driver Development

  1. #1
    Registered User
    Join Date
    Mar 2011
    Location
    USA
    Posts
    17

    Question Macro Error for Driver Development

    Hey Everyone,

    I've been doing some system stuff and I went to compile my driver today using the WDK Checked Build Environment. I keep getting a bunch of errors but I think they're all being caused by one:

    Code:
    // ctrlcode.h
    #define FILE_DEVICE_RK 0x00008001
    #define IOCTL_TEST_CMD\
    CTL_CODE(FILE_DEVICE_RK,0x801,METHOD_BUFFERED,FILE_READ_DATA|FILE_WRITE_DATA)
    Error C2010: '0' : unexpected in macro formal parameter list
    Error C2010: '|' : unexpected in macro formal parameter list
    Error C2010: 'F' : unexpected in macro formal parameter list

    I think, like I said, the other errors I'm getting other than the ones above are because it's not compiling the above include file correctly.

    It's giving me a problem over the 0x801 hex value and the Or ( | ) between the File Read/Writes.

    Any help would be greatly appreciated! I haven't worked in C for years and now I'm getting back to it and am clearly a bit rusty.

    Thanks!

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,268
    I think you need a space after IOCTL_TEST_CMD and before the backslash.
    bit∙hub [bit-huhb] n. A source and destination for information.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Location
    USA
    Posts
    17
    Thanks that was the issue. Like I said - rusty.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  3. Quantum Random Bit Generator
    By shawnt in forum C++ Programming
    Replies: 62
    Last Post: 06-18-2008, 10:17 AM
  4. Planned Development Community Idea (important)
    By cozman in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 06-12-2002, 12:13 PM

Tags for this Thread