Skip to main content

 none
how to initialize a pointer in kernel RRS feed

  • Question

  • hello

    i want to send some data via the readfile or deviceIOcontrol functions, the data is an object of this struct

    typedef struct MyStruct
    {
    int i;
    char c;
    } MyStruct, *PMyStruct;

    i know this is easy in C++ user mode , for example:

    MyStruct * ms =(MyStruct*) malloc(sizeof(MyStruct));
    ms->c = 'e';
    ms->i = 65;

    i want the same effect in C (i kernel). also, can i use the RtlCopyMemory function to assign the data to the outputbuffer?


    Friday, October 5, 2018 7:24 AM

Answers