13.07.2015 Views

REFERENCE GUIDE

REFERENCE GUIDE

REFERENCE GUIDE

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GetEnvironmentThis function retrieves the current environment that is associated with thedevice attached to the system port specified by the IpPortName parameter,and copies it into the buffer specified by the IpEnviron parameter. Theenvironment, maintained by GOI, contains binary data used by GOIwhenever a device context is created for the device on the given port.The function fails if there is no environment for the given port.An application can call this function with the IpEnviron parameter set toNULL to determine the size of the buffer required to hold theenvironment. It can then allocate the buffer and call GetEnvironment asecond time to retrieve the environment.Parameters IpPortName LPSTR Points to the null-terminated character string thatspecifies the name of the desired port.Return valueCommentsIpEnvironnMaxCountLPSTR Points to the buffer that will receive theenvironment.WORD Specifies the maximum number of bytes to copy tothe buffer.The return value specifies the number of bytes copied to IpEnviron. IfIpEnviron is NULL, the return value is the size in bytes of the bufferrequired to hold the environment. It is zero if the environment cannot befound.The first field in the buffer pointed to by IpEnviron must be the same asthat passed in the IpDeviceName parameter of the CreateDC function. IfIpPortName specifies a null port (as defined in the WIN.INI file), the devicename pointed to by IpEnviron is used to locate the desired environment.GetFocusSyntax HWNO GetFocus( )function GetFocus: HWnd;ParametersReturn valueThis function retrieves the handle of the window that currently owns theinput focus.None.The return value identifies the window that currently owns the focus ifthe function is successful. Otherwise, it is NULL.314 Software development kit

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

Saved successfully!

Ooh no, something went wrong!