Config file has the debug output enabled but no debug output displays.
kms.debug = true
FILE* fErr = freopen ("kmcerr.log", "w", stderr);
FILE* fOut = freopen ("kmc.log", "w", stdout);
if (fOut)
setbuf (fOut, NULL); // Disable write buffering
else {
status = -4;
break;
}
if (fErr)
setbuf (fErr, NULL); // Disable write buffering
else {
status = -5;
break;
}
Visual Basic 6 code for opening a console to display stdout:
Private mIsConsoleAlloc As Boolean
Private mhConsoleOut As Long
Private Declare Function GetStdHandle Lib "kernel32" _
(ByVal nStdHandle As Long) As Long
Private Declare Function WriteConsole Lib "kernel32" _
Alias "WriteConsoleA" _
(ByVal hConsoleOutput As Long, _
ByVal lpBuffer As Any, _
ByVal nNumberOfCharsToWrite As Long, _
lpNumberOfCharsWritten As Long, _
pReserved As Any) As Long
Private Declare Function AllocConsole Lib "kernel32" () As Long Private Declare Function FreeConsole Lib "kernel32" () As Boolean Private Declare Function GetConsoleWindow Lib "kernel32" () As Long
Private Sub setupConsole()
Dim consoleHnd As Long
' Check for existing console
consoleHnd = GetConsoleWindow()
If consoleHnd = 0 Then
' Have to allocate a console
If AllocConsole() = 0 Then
Exit Sub
End If
mIsConsoleAlloc = True
consoleHnd = GetConsoleWindow()
End If
Const STD_INPUT_HANDLE As Long = -10
Const STD_OUTPUT_HANDLE As Long = -11
Const STD_ERROR_HANDLE As Long = -12
If consoleHnd <> 0 Then
mhConsoleOut = GetStdHandle(STD_OUTPUT_HANDLE)
ShowWindow consoleHnd, SW_NORMAL
End If
End Sub
' Cleanup
'
' Deallocates an alloc'd console
'
Sub Cleanup()
If mIsConsoleAlloc Then
Dim consoleHnd As Long
consoleHnd = GetConsoleWindow()
ShowWindow consoleHnd, SW_NORMAL
mIsConsoleAlloc = False
End If
' It is safe to always free this application from the current console.
FreeConsole
End Sub
' WriteLine
'
' Write the given line of text to the console '
' Argument:
' txt - line of text to write to console
'
Sub WriteLine(txt As String)
If mhConsoleOut = 0 Then
Exit Sub
End If
WriteConsole mhConsoleOut, txt & vbCrLf, Len(txt) + 2, vbNull, vbNull End Sub
Related Articles
Radiant Logic RadiantOne Cloud Federation Service - Authentication API Configuration - SecurID Access Implementation Guide 6Number of Views RSA Identity Governance & Lifecycle 7.5 Patch 7 Release Notes 8Number of Views RSA Governance & Lifecycle 7.5.2 Patch 1 Release Notes 21Number of Views Silvertail: How to determine which shard contains an IP 24Number of Views RSA Identity Governance & Lifecycle 7.5 Patch 5 Release Notes 13Number of Views
Trending Articles
Quick Setup Guide - Passwordless Authentication in Windows MFA Agent for Active Directory How to manipulate imported RSA SecurID Software Token(s) on an iPhone or iPad device RSA SecurID software token .sdtid file fails to import into RSA SecurID Software Token 5.0 for Windows RSA Authentication Manager 8.9 Release Notes (January 2026) RSA MFA Agent 2.5 for Microsoft Windows Installation and Administration Guide