xsharp.eu • ASSERT
Page 1 of 1

ASSERT

Posted: Sat Dec 28, 2019 2:23 pm
by rjpajaron
Hello,

I am porting FabTwain to X# and stumble on the following code:

ASSERT ( SELF:dwCurState >= SOURCE_OPEN )

ASSERT ( SELF:ptrDSM_Entry != NULL_PTR )

It is UDC statement. Found it on STD.UDC

ASSERT <exp> => #ifdef _assert;; ;
if !(<exp>) ;; ;
MessageBox(0, String2psz(<$exp$>), ;
String2psz("Failed in " + RTrim(__ENTITY)+ ", " +NTRIM(__LINE)), 48);; ;
endif;; #endif

Is there equivalent on X# on this?

Thanks...

Rene

ASSERT

Posted: Sat Dec 28, 2019 2:39 pm
by rjpajaron
rjpajaron wrote:Hello,

I am porting FabTwain to X# and stumble on the following code:

ASSERT ( SELF:dwCurState >= SOURCE_OPEN )

ASSERT ( SELF:ptrDSM_Entry != NULL_PTR )

Or Anyone alreaady ported FabTwain to X#. I do not know what part of system this one is use but I am sure it where we connect to cameras to take photos <g>.

--

Rene


It is UDC statement. Found it on STD.UDC

ASSERT <exp> => #ifdef _assert;; ;
if !(<exp>) ;; ;
MessageBox(0, String2psz(<$exp$>), ;
String2psz("Failed in " + RTrim(__ENTITY)+ ", " +NTRIM(__LINE)), 48);; ;
endif;; #endif

Is there equivalent on X# on this?

Thanks...

Rene

ASSERT

Posted: Sat Dec 28, 2019 3:00 pm
by Fabrice
Hi Rene,
you are too fast for me ;)
we had plan to port some/most of my Tools for VO to X#, and put all these in aGithub public repository, but I had planned to start that work in 2020 ;)

I remember I had started the job for Vulcan.NET
I will check asap

Cheers,
Fab
PS : But, btw the way the __ENTITY and __LINE doesn't exist so you may removed that and keep the error message with standard strings and a MessageBox.Show() call

ASSERT

Posted: Sat Dec 28, 2019 3:22 pm
by rjpajaron
Fabrice wrote:Hi Rene,
you are too fast for me ;)
we had plan to port some/most of my Tools for VO to X#, and put all these in aGithub public repository, but I had planned to start that work in 2020 ;)

I remember I had started the job for Vulcan.NET
I will check asap


Cheers,
Fab
PS : But, btw the way the __ENTITY and __LINE doesn't exist so you may removed that and keep the error message with standard strings and a MessageBox.Show() call
Hi Fabrice,

It compiles good, well after putting // on it.
It is more like of an experiment what I am doing today.

Now I know what is missing: FabTwain for X# and somehow DEFINES that we can found at "RP3 Runtime DLL.AEF". I do not have sources for RPRro. I have no way of what I am doing, referecing from RP3 X# works good until I finished all the way.

I have to stop because, my bBrowser.NET for Vulcan.NET is so old. I have to upgrade to bBrowser for X#. Glad that we have this already.

Well, along the way, I will discover a lot missing components here and there.

Regards,

Rene