bufferMemoryAddress

bufferMemoryAddress(): MemoryAddress;

The bufferMemoryAddress method of the String primitive type returns a memory address containing the value of the pointer to the internal buffer that contains the string. This value may be required when a JADE String type value is being mapped to a structured record type for a call to an external function.

Call the bufferMemoryAddress method to determine the address of the buffer when an external function requires a data structure to contain a pointer to a second structure.

The use of the bufferMemoryAddress method for the String primitive type is similar to that for the Binary primitive type.

For an example of using the bufferMemoryAddress method of the Binary primitive type to initialize the Windows SECURITY_DESCRIPTOR and SECURITY_ATTRIBUTES structures, see bufferMemoryAddress, under "Binary Type".

The code fragment in the following example shows the use of the bufferMemoryAddress method when copying clipboard data directly into a JADE string.

call copyString(str.bufferMemoryAddress, locked);
call globalUnlock(locked);

Do not use this method to pass the address of a string to an external function that will be executed by a presentation client. If an external function is called from an application server method and executed by a different process (the presentation client), the memory address is not valid and will almost certainly result in a jade.exe (thin client) fault in the called function.