Cgi Delphi DLL Reference Documentation
Cgi
Deprecated To be removed in a future version, and should no longer be used.
Current Version: 10.1.3
Provides the ability to receive HTTP requests and all associated parameters, HTTP header fields, etc. A common use is for receiving HTTP uploads. Provides the ability to receive uploads that stream directly to disk, eliminating memory requirements for large files. Also provides the ability to receive uploaded files directly in memory.
Create/Dispose
var myObject: HCkCgi; begin myObject := CkCgi_Create(); // ... CkCgi_Dispose(myObject); end;
Creates an instance of the HCkCgi object and returns a handle (i.e. a Pointer). The handle is passed in the 1st argument for the functions listed on this page.
Objects created by calling CkCgi_Create must be freed by calling this method. A memory leak occurs if a handle is not disposed by calling this function.
Properties
AsyncBytesRead
To be documented soon...
topAsyncInProgress
To be documented soon...
topAsyncPostSize
To be documented soon...
topAsyncSuccess
To be documented soon...
topDebugLogFilePath
procedure CkCgi_putDebugLogFilePath(objHandle: HCkCgi; newPropVal: PWideChar); stdcall;
function CkCgi__debugLogFilePath(objHandle: HCkCgi): PWideChar; stdcall;
If set to a file path, this property logs the LastErrorText of each Chilkat method or property call to the specified file. This logging helps identify the context and history of Chilkat calls leading up to any crash or hang, aiding in debugging.
Enabling the VerboseLogging property provides more detailed information. This property is mainly used for debugging rare instances where a Chilkat method call causes a hang or crash, which should generally not happen.
Possible causes of hangs include:
- A timeout property set to 0, indicating an infinite timeout.
- A hang occurring within an event callback in the application code.
- An internal bug in the Chilkat code causing the hang.
See the notes about PWideChar memory ownership and validity.
HeartbeatMs
procedure CkCgi_putHeartbeatMs(objHandle: HCkCgi; newPropVal: Integer); stdcall;
To be documented soon...
topIdleTimeoutMs
procedure CkCgi_putIdleTimeoutMs(objHandle: HCkCgi; newPropVal: Integer); stdcall;
To be documented soon...
topLastErrorHtml
function CkCgi__lastErrorHtml(objHandle: HCkCgi): PWideChar; stdcall;
Provides HTML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
topLastErrorText
function CkCgi__lastErrorText(objHandle: HCkCgi): PWideChar; stdcall;
Provides plain text information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
LastErrorXml
function CkCgi__lastErrorXml(objHandle: HCkCgi): PWideChar; stdcall;
Provides XML-formatted information about the last called method or property. If a method call fails or behaves unexpectedly, check this property for details. Note that information is available regardless of the method call's success.
See the notes about PWideChar memory ownership and validity.
topLastMethodSuccess
procedure CkCgi_putLastMethodSuccess(objHandle: HCkCgi; newPropVal: wordbool); stdcall;
Indicates the success or failure of the most recent method call: True means success, False means failure. This property remains unchanged by property setters or getters. This method is present to address challenges in checking for null or Nothing returns in certain programming languages.
topNumParams
To be documented soon...
topNumUploadFiles
To be documented soon...
topReadChunkSize
procedure CkCgi_putReadChunkSize(objHandle: HCkCgi; newPropVal: Integer); stdcall;
To be documented soon...
topSizeLimitKB
procedure CkCgi_putSizeLimitKB(objHandle: HCkCgi; newPropVal: Integer); stdcall;
To be documented soon...
topStreamToUploadDir
procedure CkCgi_putStreamToUploadDir(objHandle: HCkCgi; newPropVal: wordbool); stdcall;
To be documented soon...
topUploadDir
procedure CkCgi_putUploadDir(objHandle: HCkCgi; newPropVal: PWideChar); stdcall;
function CkCgi__uploadDir(objHandle: HCkCgi): PWideChar; stdcall;
VerboseLogging
procedure CkCgi_putVerboseLogging(objHandle: HCkCgi; newPropVal: wordbool); stdcall;
If set to True, then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is False. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.
topVersion
function CkCgi__version(objHandle: HCkCgi): PWideChar; stdcall;
Version of the component/library, such as "10.1.0"
See the notes about PWideChar memory ownership and validity.
Methods
AbortAsync
To be documented soon...
Note: Async method event callbacks happen in the background thread. Accessing and updating UI elements existing in the main thread may require special considerations.
topAsyncReadRequest
To be documented soon...
topGetEnv
varName: PWideChar;
outStr: HCkString): wordbool; stdcall;
function CkCgi__getEnv(objHandle: HCkCgi;
varName: PWideChar): PWideChar; stdcall;
To be documented soon...
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetParam
paramName: PWideChar;
outStr: HCkString): wordbool; stdcall;
function CkCgi__getParam(objHandle: HCkCgi;
paramName: PWideChar): PWideChar; stdcall;
To be documented soon...
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetParamName
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkCgi__getParamName(objHandle: HCkCgi;
index: Integer): PWideChar; stdcall;
To be documented soon...
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetParamValue
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkCgi__getParamValue(objHandle: HCkCgi;
index: Integer): PWideChar; stdcall;
To be documented soon...
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetRawPostData
GetUploadData
index: Integer;
outData: HCkByteData): wordbool; stdcall;
GetUploadFilename
index: Integer;
outStr: HCkString): wordbool; stdcall;
function CkCgi__getUploadFilename(objHandle: HCkCgi;
index: Integer): PWideChar; stdcall;
To be documented soon...
Returns True for success, False for failure.
See the notes about PWideChar memory ownership and validity.
topGetUploadSize
index: Integer): Integer; stdcall;
To be documented soon...
topIsGet
To be documented soon...
topIsHead
To be documented soon...
topIsPost
To be documented soon...
topIsUpload
To be documented soon...
topReadRequest
To be documented soon...
topSaveNthToUploadDir
index: Integer): wordbool; stdcall;
To be documented soon...
topSleepMs
millisec: Integer) stdcall;
To be documented soon...
topTestConsumeAspUpload
path: PWideChar): wordbool; stdcall;
To be documented soon...
top