Skip to main content
Module

x/win32/mod.ts>cstr2ptrW

Wraps some of the most common Win32 API calls using FFI to make them accessible to Deno.
Latest
function cstr2ptrW
Re-export
import { cstr2ptrW } from "https://deno.land/x/win32@0.1.1/mod.ts";

Windows represents Unicode characters using UTF-16 encoding, in which each character is encoded as a 16-bit value. UTF-16 characters are called wide characters, to distinguish them from 8-bit ANSI characters.

Windows providing two parallel sets of APIs, one for ANSI strings and the other for Unicode strings. For example, there are two functions to displays a modal dialog box:

  • MessageBoxA - takes an ANSI string.
  • MessageBoxW - takes a Unicode string.

Javascript already uses UTF-16 internally - use charCodeAt() to get the values.

Parameters

cstr: string