I love PB/DLL but the ability to debug programs with PB/CC
PRINT/STDOUT command(s) is a huge assett.
Currently I develop my functions with PB/CC and then port them
over to PB/DLL.
I'm wanting to know if this is possible.
Can I send a message to a console window and have it display the
text?
I invision having a blank PB/CC program open that just sits
and waits for messages, and when a message appears it will
print it to the screen.
Any ideas? Similar to #DEBUG PRINT but this is so much
easier to work with. The debugger takes so long to run.
This is what I have so far:
DEBUG.BAS PB/CC 2.0
---SNIP------
---SNIP------
SAMPLES.BAS PB/DLL 6.0
---SNIP------
---SNIP------
My code doesn't work the way I'm wanting. I would rather
send messages, some type of IPC would be good I think. Any
ideas?
------------------
-Greg
[This message has been edited by Gregery D Engle (edited April 19, 2001).]
PRINT/STDOUT command(s) is a huge assett.
Currently I develop my functions with PB/CC and then port them
over to PB/DLL.
I'm wanting to know if this is possible.
Can I send a message to a console window and have it display the
text?
I invision having a blank PB/CC program open that just sits
and waits for messages, and when a message appears it will
print it to the screen.
Any ideas? Similar to #DEBUG PRINT but this is so much
easier to work with. The debugger takes so long to run.
This is what I have so far:
DEBUG.BAS PB/CC 2.0
---SNIP------
Code:
#COMPILE EXE #INCLUDE "win32api.inc" %INVALID_HANDLE_VALUE = -1 %WAIT_FAILED = &HFFFF FUNCTION PBMAIN() AS LONG DIM lcPathSpec AS ASCIIZ * 255 DIM zShortCookiePath AS ASCIIZ * %MAX_PATH lcPathSpec = "D:\debug" lbWatchSubtree& = %TRUE lihNotify& = FINDFIRSTCHANGENOTIFICATION(lcPathSpec, lbWatchSubtree&, %FILE_NOTIFY_CHANGE_FILE_NAME) IF lihNotify& <= %INVALID_HANDLE_VALUE THEN EXIT FUNCTION END IF liWaitReturn& = WAITFORSINGLEOBJECT(lihNotify&, %INFINITE) IF liWaitReturn& >= %WAIT_FAILED THEN OPEN "D:\debug\debug.txt" FOR INPUT SHARED AS #1 INPUT #1, sBuffer$ CLOSE #1: KILL "d:\debug\debug.txt" PRINT sBuffer$ DO liWaitReturn& = FINDNEXTCHANGENOTIFICATION(lihNotify&) liWaitReturn& = WAITFORSINGLEOBJECT(lihNotify&, %INFINITE) IF liWaitReturn& >= %WAIT_FAILED THEN OPEN "D:\debug\debug.txt" FOR INPUT SHARED AS #1 INPUT #1, sBuffer$ CLOSE #1: KILL "d:\debug\debug.txt" PRINT sBuffer$ END IF LOOP END IF END FUNCTION
SAMPLES.BAS PB/DLL 6.0
---SNIP------
Code:
SUB Debug(sText$) #IF %DEF(%pb_cc32) PRINT "DEBUG: " & sText$ & " - " & TIME$ #ENDIF #IF %DEF(%pb_dll32) OPEN "D:\debug\debug.txt" FOR OUTPUT AS #1 PRINT #1, "DEBUG: " & sText$: CLOSE #1 'MSGBOX "DEBUG: " & sText$ & " - " & TIME$ #ENDIF END SUB
My code doesn't work the way I'm wanting. I would rather
send messages, some type of IPC would be good I think. Any
ideas?
------------------
-Greg
[This message has been edited by Gregery D Engle (edited April 19, 2001).]
Comment