Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
This function performs character set conversion between a given source code page and a destination code page identifier.
Syntax
HRESULT ConvertINetString( LPDWORD lpdwMode, DWORD dwSrcEncoding, DWORD dwDstEncoding, LPCSTR lpSrcStr, LPINT lpnSrcSize, LPBYTE lpDstStr, LPINT lpnDstSize ); |
Parameters
- lpdwMode
-
Pointer to a DWORDthat is used internally to store conversion context. A caller should provide storage that is initialized with zero at the first call to thefunction. A caller must not modify the value without calling the MLANG service functions.
- dwSrcEncoding
-
DWORDthat contains the code page identifier value for the source string.
- dwDstEncoding
-
DWORDthat contains the code page identifier value for the destination string.
- lpSrcStr
-
Pointer to the string that is being converted.
- lpnSrcSize
-
Pointer to the buffer that stores the length of the source string in bytes. If this value is NULL, or if the length specified is -1, the function assumes that the source string is null-terminated. When conversion is successful, the function returns to this buffer the number of bytes processed.
- lpDstStr
-
Pointer to the string buffer where the conversion result is stored.
- lpnDstSize
-
Pointer to the buffer that stores the length of the destination string in bytes. When the conversion is successful, the function returns the number of bytes copied to the lpDstStrbuffer.
Return Value
The following table shows the return values for this function.
Value | Description |
---|---|
S_OK |
Performed the conversion successfully. |
S_FALSE |
The specified conversion is not supported on the system. |
E_FAIL |
An error has occurred. |
Remarks
An application typically calls this function to convert a character stream in an Internet character set to a Windows code page, or to convert a Windows code page to a character stream in an Internet character set. This function provides a conversion similar to that provided by calling the IMultiLanguage::ConvertStringmethod.
Requirements
Header | mlang.h, mlang.idl |
Library | mlang.dll |
Windows Embedded CE | Windows CE .NET 4.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |