News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Structure improperly initialized

Started by Magnum, March 19, 2013, 06:26:41 AM

Previous topic - Next topic

Magnum

I think this is TASM code.

\win32api.inc(142) : error A2179: structure improperly initialized



FILE_BOTH_DIRECTORY_INFORMATION STRUCT
       NextEntryOffset      dd     ?
       Unknown              dd     ?
       CreationTime         dq     ?
       LastAccessTime       dq     ?
       LastWriteTime        dq     ?
       ChangeTime           dq     ?
       EndOfFile            dq     ?
       AllocationSize       dq     ?
       FileAttributes       dd     ?
       FileNameLength       dd     ?
       EaInfomrationLength  dd     ?
       AltenateNameLength   db     ?
       AlternateName        dw     12     dup (?)
       dummychar            db     ?             ;alignemnt
       FileName             dw     ?             ;here starts unicode file name
FILE_BOTH_DIRECTORY_INFORMATION ENDS

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

ragdog

QuoteI think this is TASM code.

Why? ::) is a normal Masm structur

dedndave

that is the structure definition
you will have to show us how you have it declared in the data area

dedndave

i bet your problem is right here

QuoteFileName

    Specifies the first character of the file name string. This is followed in memory by the remainder of the string.

you are probably trying to stuff a complete filename in there
(10 lbs of crap in a 5 lb sack)

also...
FILE_BOTH_DIRECTORY_INFORMATION STRUCT
FILE_BOTH_DIR_INFORMATION is a structure
FileBothDirectoryInformation is an information class
slight naming issue, there

Magnum

I found this if it might help

http://technet.microsoft.com/en-us/subscriptions/cc232095%28v=prot.13%29.aspx


2.4.8 FileBothDirectoryInformation

This information class is used in directory enumeration to return detailed information about the contents of a directory.

This information class returns a list that contains a FILE_BOTH_DIR_INFORMATION data element for each file or directory within the target directory. This list MUST reflect the presence of a subdirectory named "." (synonymous with the target directory itself) within the target directory and one named ".." (synonymous with the parent directory of the target directory). For more details, see section 2.1.5.1.
Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

what would help is if we could see your declaration

fbdi FILE_BOTH_DIR_INFORMATION <>

or similar

Magnum

I won't to avoid any "Imperial Entanglements".

Howard Hughes

Rocky Road is my favorite ice cream.

Take care,
                   Andy

Ubuntu-mate-18.04-desktop-amd64

http://www.goodnewsnetwork.org

dedndave

i want some of what Andy has been smoking   8)