Thread: SHADOW files

  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    3

    SHADOW files

    Dears, good afternoon,

    Do I have a code for reading of files SHADOW of the windows, however when compiling mistake it is returning, can you help me?

    define SHD_SIGNATURE_67 $00004967 //Win2000/XP
    typedef struct _SHADOW_FILE_HEADER_67 {
    DWORD dwSignature; //SHD_SIGNATURE_67
    WORD wStatus;
    WORD wUnknown1;
    DWORD dwJobID;
    DWORD dwPriority;
    DWORD dwUnknown2;
    SYSTEMTIME stSubmitTime;
    DWORD dwUntilTime;
    DWORD dwSizeSPL; //Size of SPL File
    DWORD dwSizeSecurityInfo; //Size of SecurityInfo
    DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
    DWORD dwUnknown3;
    DWORD dwUnknown4;
    DWORD dwUnknown5;
    DWORD offComputername; //Offset of WideChar+0
    DWORD dwSPLSize2;
    } SHADOW_FILE_HEADER_67, *PSHADOW_FILE_HEADER_67;

    Mistakes:

    1 C:\Dev-Cpp\Examples\WinMenu\teste.cpp `define' does not name a type
    31 C:\Dev-Cpp\Examples\WinMenu\teste.cpp expected constructor, destructor, or type conversion before ',' token
    31 C:\Dev-Cpp\Examples\WinMenu\teste.cpp expected constructor, destructor, or type conversion before ';' token

    Thanks

  2. #2
    Registered User
    Join Date
    Mar 2007
    Posts
    416
    Quote Originally Posted by constancio View Post
    define SHD_SIGNATURE_67 $00004967 //Win2000/XP
    should be
    Code:
    #define SHD_SIGNATURE_67 $00004967 //Win2000/XP
    This is an easy problem that could easily be fixed by googling it.

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    3
    Code:
    Dear Scwizzo, thank you for his return, I corrected the code. But do you possess an idea of how to read the files that are generated inside of the spool of the windows with this code? C:\WINDOWS\system32\spool\PRINTERS
    
    #include <windows.h>
    #define SHD_SIGNATURE_67 $00004967 //Win2000/XP
    typedef struct _SHADOW_FILE_HEADER_67 {
    DWORD dwSignature; //SHD_SIGNATURE_67
    WORD wStatus;
    WORD wUnknown1;
    DWORD dwJobID;
    DWORD dwPriority;
    DWORD dwUnknown2;
    SYSTEMTIME stSubmitTime;
    DWORD dwUntilTime;
    DWORD dwSizeSPL; //Size of SPL File
    DWORD dwSizeSecurityInfo; //Size of SecurityInfo
    DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
    DWORD dwUnknown3;
    DWORD dwUnknown4;
    DWORD dwUnknown5;
    DWORD offComputername; //Offset of WideChar+0
    DWORD dwSPLSize2;
    } SHADOW_FILE_HEADER_67, *PSHADOW_FILE_HEADER_67;

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Please, please PLEASE do not put your reply inside the code tags! The result is obvious - now we have to scroll to read your reply. It is annoying and infuriating.
    ONLY code inside the code tags!
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Constancio,

    That code is only defining the structure needed to interpret the contents of a .shd file. Assuming that is the correct format, you have only defined how to interpret the file contents. That code is doing nothing. Just specifying how the file is structured.

    As a comparison, that code only gives instructions on how to create a toy car mold. You will still need to code how to fill that mold with the contents of a .shd file. And you will also need to create the code to interpret the contents of that structure you shown us.

    Since you obviously have no clue what you are doing, neither you have any idea how to program in C++ (which is fine, really), there is no way anyone can help you since they would have to write that code for you. It's not something that can be shown that easily, the same you cannot expect any useful reply on how to build a car by just asking.

    You need to learn first how to program in C++... and then all things will fit into place.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Registered User
    Join Date
    Aug 2009
    Posts
    3
    I thank all.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Header files and multiple definitions
    By sjweinberg in forum C++ Programming
    Replies: 16
    Last Post: 07-17-2009, 05:59 PM
  2. Ressources files
    By mikahell in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2006, 06:50 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM