Skip to content

Bring back the implementation for PtyClear when using conpty.dll #711

Closed
@Tyriar

Description

@Tyriar

node-pty/src/win/conpty.cc

Lines 478 to 507 in cb94da7

static Napi::Value PtyClear(const Napi::CallbackInfo& info) {
Napi::Env env(info.Env());
Napi::HandleScope scope(env);
if (info.Length() != 1 ||
!info[0].IsNumber()) {
throw Napi::Error::New(env, "Usage: pty.clear(id)");
}
// int id = info[0].As<Napi::Number>().Int32Value();
// const pty_baton* handle = get_pty_baton(id);
// if (handle != nullptr) {
// HANDLE hLibrary = LoadLibraryExW(L"kernel32.dll", 0, 0);
// bool fLoadedDll = hLibrary != nullptr;
// if (fLoadedDll)
// {
// PFNCLEARPSEUDOCONSOLE const pfnClearPseudoConsole = (PFNCLEARPSEUDOCONSOLE)GetProcAddress(
// (HMODULE)hLibrary,
// useConptyDll ? "ConptyClearPseudoConsole" : "ClearPseudoConsole");
// if (pfnClearPseudoConsole)
// {
// pfnClearPseudoConsole(handle->hpc);
// }
// }
// }
return env.Undefined();
}

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionality

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions