01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

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.

Comments<br />

DX=0 AX=0 , ES:DI contains pointer to current main page name<br />

The string referenced by [ES:DI] is null terminated and is in the <strong>RTOS</strong>'s data space.<br />

Related Topics<br />

Top of list<br />

Index page<br />

CGI_SETMAIN API Function<br />

Interrupt 0xAB service 0x07: CGI_GETFORMITEM, Split a formular into name and value<br />

Parameters<br />

AH<br />

BX:SI<br />

ES:DI<br />

Parse the argument buffer to obtain name and value.<br />

0x07 (= CGI_GETFORMITEM)<br />

Pointer to argument buffer to be parsed.<br />

Pointer to a FormItem type structure<br />

Return Value<br />

Comments<br />

DX=0 AX=0, User buffers referenced by pointers in FormItem structure at [ES:DI] are filled in with name<br />

and value<br />

On initial call, the argument buffer pointer provided by the caller in BX:SI is a copy of the<br />

fArgumentBufferPtr member of the rbCgi structure passed by the Web server to the CGI callback<br />

function. On subsequent calls here to pick up additional formular, the pointer returned from the<br />

CGI_FINDNEXTITEM API call can be used here.<br />

The caller must set the two members of the FormItem structure prior to calling here. Both pointers<br />

reference buffers allocated by the user, which will receive strings produced by this API call.<br />

For preventing internal buffer overruns, the user should provide 64 bytes of buffer addressed by<br />

FormItem.NamePtr and 256 bytes pointed by FormItem.ValuePtr. The max. size for a full<br />

pathname (pagename+complete argumentbuffer)<br />

e.g. "example?Name1=Value1&Name2=Value2"<br />

is 256 bytes. Because of this behaviour, the storage addressed by FormItem.ValuePtr must have the<br />

max. size of a full pathname (256 bytes).<br />

See example submit.c.<br />

Related Topics<br />

Page 362 / 400

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

Saved successfully!

Ooh no, something went wrong!