int lpWindowName = 0;
int hHeap = Extension.GetProcessHeap();
if (className != null)
{
TCHAR buffer = new TCHAR(0, className, true);
int byteCount = buffer.length() * TCHAR.sizeof;
lpClassName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
Extension.MoveMemory(lpClassName, buffer, byteCount);
}
if (windowName != null)
{
TCHAR buffer = new TCHAR(0, windowName, true);
int byteCount = buffer.length() * TCHAR.sizeof;
lpWindowName = Extension.HeapAlloc(hHeap, Extension.HEAP_ZERO_MEMORY, byteCount);
Extension.MoveMemory(lpWindowName, buffer, byteCount);
}
try