28 September 2018, 22:28 | #1 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
substitute for WBStartup
Hi,
I was trying to replace internal WBStartup command with following code (only first part/problematic shown below) Code:
DEFTYPE.WBStartup *wbmsg *pr.Process = FindTask_(0) If( *pr\pr_CLI = 0 ) WaitPort_( *pr\pr_MsgPort ) *wbmsg = GetMsg_( *pr\pr_MsgPort ) EndIf ... What am I doing wrong? Thanks |
29 September 2018, 09:01 | #2 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
The code looks correct, but is probably in the wrong place of your program.
I'm not a Basic coder, so just guessing here. But if this "internal WBStartup command" is an entry point in your program which is called by Blitz in case the program was called from Workbench, then Blitz has already detected that the program was called from Workbench and it has already received the startup message. There must be some other way to get the message. Especially if Blitz offers an entry point for Workbench start, then it will probably also supply the startup message somehow. The construct with WaitPort(pr_MsgPort) only works at the very beginning of the program, when AmigaDOS jumps into the very first instruction of the load module. I am not sure if Basic will allow you to replace this part of the code at all. |
29 September 2018, 09:24 | #3 |
Registered User
Join Date: Dec 2017
Location: Poland
Age: 47
Posts: 282
|
It crossed my mind that Blitz would not allow it at all.
That part is placed at the very top of the code. Anyway, I was just trying to make a binary file smaller. I noticed that replacing Blitz's commands with system's ones greatly reduces the final size of executable... looks like this one is a NO GO. Thanks for explanation. |
01 October 2018, 22:40 | #4 |
Registered User
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
|
Yeah, it's not possible in Blitz 2. AmiBlitz3 allows custom startup handlers IIRC, but also creates larger executables so for that specific purpose it's probably not an option.
|
02 October 2018, 12:58 | #5 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot get WBStartup struct when starting from Workbench (with VBCC) | tygre | Coders. C/C++ | 10 | 08 December 2015 23:30 |
ChipQuik and substitute | kipper2k | Hardware mods | 18 | 27 September 2013 10:55 |
Kickstart substitute | gilgamesh | request.UAE Wishlist | 19 | 17 January 2009 15:37 |
Problem in wbstartup creates software failure | demax | support.Other | 5 | 15 March 2008 12:53 |
WBStartup in OS3.9... | th4t1guy | support.Apps | 6 | 26 August 2003 23:40 |
|
|