Conversion Functions


The Wxutil.h header file in the DirectShow base classes provides functions for converting between integers and wide strings.
Function Description
atoi Converts a string to an integer.
IntToWstr Converts an integer to a wide string.
WstrToInt Converts a wide string to an integer.


atoi

Converts a given string to an integer.

int WINAPI atoi(
  const TCHAR *sz
  );

Parameters
sz
Source character string.
Return Values

Returns the string's integer value.

Remarks

This version of atoi supports only decimal digits, and does not allow leading white space or signs. It supports both Unicode and ANSI strings. Other versions can vary.


IntToWstr

Converts a given integer value to a wide string representation.

void IntToWstr(
  int i,
  LPWSTR wstrDest
  );

Parameters
i
Integer value to be converted.
wstrDest
LPWSTR that will contain the resulting wide string.
Return Values

No return value.


WstrToInt

Converts a given wide string value to an integer.

int WstrToInt(
  LPCWSTR wstrSrc
  );

Parameters
wstrSrc
Source wide-character string.
Return Values

Returns the string's integer value.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.