The structures are not packed to a multiple of the packing size whenever the structure does not contain any elements (or elements of arrays)that are equal to or greater than the packing size. For example, structs of just chars or arrays of chars are never padded.
Powerbuilder favores when dlla are compiled with 1-byte alignment.
- Select the desired target from MSVC
- Right mouse click and select Settings
- Select the C/C++ tabpage
- Select Code Generation from the Category dropdown list
- Select desired byte alignment from the Struct Member Alignment dropdown list.
Glossary:
Stack is a region of reserved memory, organized as a stack, in which programs temporarily store status data such as procedure and function call return addresses, passed parameters, and local variables. stack frame - or frame allocation. An area of memory set up whenever a function is called that temporarily holds the arguments to the function as well as any variables that are defined local to the function. There are two key characteristics of frame allocations. First, when a local variable is defined, enough space is allocated on the stack frame to hold the entire variable, even if it is a large array or data structure. Second, frame variables are automatically deleted when they go out of scope References: Technical Document 44474: External Function Calls; Technical Document 44538: Passing a 32-bit PowerBuilder structure to a 32-bit C DLL Created in Power++;






