13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GetCodelnfoParametersReturn valueCommentsIpProcIpSeglnfoNone.FARPROC Is the address of the function in the segment forwhich information is to be retrieved. Instead of asegment:offset address, this value can also be in the form ofa module handle and segment number. TheGetModuleHandle function returns the handle of a namedmodule.LPVOID Points to an array of four 32-bit values that will beIfilled with information about the code segment. See the •following "Comments" section for a description of the values'· .in this array.The IpSeglnfo parameter points to an array of four 32-bit values thatcontains such information as the location and size of the segment and itsattributes. The following list describes each of these values:IOffsetoDescriptionSpecifies the logical-sector offset (in bytes) to the contents of thesegment data, relative to the beginning of the file. Zero means no filedata is available.2 Specifies the length of the segment in the file (in bytes). Zero means64K.4 Contains flags which specify attributes of the segment. The followinglist describes these flags:Bit Meaning0-2 Specifies the segment type. If bit 0 is set to 1, the segmentis a data segment. Otherwise, the segment is a codesegment.3 Specifies whether segment data is iterated. When this bitset to 1, the segment data is iterated.4 Specifies whether the segment is moveable or fixed. Whenthis bit is set to 1, the segment is moveable. Otherwise, it isfixed.5 Is not returned.6 Is not returned.7 Specifies whether the segment is a read-only data segmentor an execute-only code segment. If this bit is set to 1 andthe segment is a code segment, the segment is an executeonlysegment. If this bit is set to zero and the segment is adata segment, it is a read-only segment.8 Specifies whether the segment has associated relocationinformation. If this bit is set to 1, the segment hasrelocation information. Otherwise, the segment does nothave relocation information.9 Specifies whether the segment has debugging information.If this bit is set to 1, the segment has debuggingChapter 4, Functions directory 299

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!