CBWndPreview Class - Unresolved External _WslDebug$SetLogFile

Hello -

I’m trying to use this CBWndPreview Class in a multi DLL app and getting some errors. Is there any special consideration or changes needed to use this?

Error: Unresolved External _WslDebug$SetLogFile in CBWndPreview.obj

Thanks,
-Rex

GitHub - CarlTBarnes/WindowPreview: Window Preview and Reflection Class

Whats the errors?

Havent used it myself, but the errors may give clues as to what you need to do.

Error: Unresolved External _WslDebug$SetLogFile in CBWndPreview.obj

Edit that line and remove the underscore.

You are probably running 10.12799 ? A better fix would be to change the OMIT and COMPILE wrapping that SetLogFile from C110 to C100

I just messed that up today. If you download again it will have above fix, current code below

OMIT('**END**', _C100_)  !C9.1 for sure, some C10
C5LogSetName     PROCEDURE(CONST *CSTRING),NAME('_WslDebug$SetLogFile'),DLL(dll_mode)
    !end of COMPILE('**END**', _C110_)
!10.12799 has below, BUT before that 10.12567 was above with _Underscore. So if you use older 10 you'll have to modify this. Proper fix would be to LoadLibrary
    COMPILE('**END**', _C100_)  !C11 for sure, some C10
C5LogSetName     PROCEDURE(CONST *CSTRING),NAME('WslDebug$SetLogFile'),DLL(dll_mode)
    !end of COMPILE('**END**', _C110_)

That is used by Event Logging. You it On in the Tricks menu. It records events to a text file. You can turn it Off on tricks or it stops when you close the window and open the log in notepad.

Like if you wondered what events occur with a SPIN control …