3 Issues when replacing Vulcan DLL's with X# DLL's
Posted: Thu Apr 01, 2021 3:52 pm
I've got 3 issues when replacing Vulcan DLL's with X# DLL's in an existing X# project. Not sure how to solve these:
1 In November 2013 Chris sent me the following code and explanation. The reason was that I could not call WCF code on a website from X# (it crashed) while it did work using C#, and this solved it (somehow)
CLASS DummyClass
END CLASS
and in your code, make sure this is called as the _FIRST_ line of any vulcan code executed:
Vulcan.Runtime.State.AppModule := TypeOf(DummyClass):Module
It may well be possible that it works fine in X# but I prefer to change as little as possible so I changed it to:
XSharp.Core.AppModule := TYPEOF(DummyClass):Module (according to the help, AppModule is part of X#.Core)
However, I get this error:
Error XS0234 The type or namespace name 'AppModule' does not exist in the namespace 'XSharp.Core' (are you missing an assembly reference?)
What should I change?
2 This one is less important, because I don't seem to even use it, but I had a changed DBCreate function in my code. This ends with code called when VODBCreate would return false:
If !lRetCode
lRetCode := DoError(#DBCREATE)
Endif
This gives a conversion error (DoError returns an object and lRetCode is a logic). So the error is clear and correct, but what is DoError supposed to be doing in DBCreate? Just out of curiosity!
3 In the Vulcan DLL X# program I use:
Ace.AdsConnect101, ACE.AdsOpenTable101, ACE.AdsExecuteSQLDirectW. None of these are present in XSharp.ADS.
I see there Ace.AdsConnect60, ACE.AdsOpenTable90, ACE.AdsExecuteSQLDirect but these differ a lot in parameters so I have to figure out what all those parameters need to be (AdsOpenTable101 is 3 and AdsOpenTable101 is 10 parameters) and it increases the chance that something is going to work differently (or not).
So mainly my questions are:
1 Can't I use the original Vulcan recognized methods somehow?
2 Why has these functions changed so much?
Dick
1 In November 2013 Chris sent me the following code and explanation. The reason was that I could not call WCF code on a website from X# (it crashed) while it did work using C#, and this solved it (somehow)
CLASS DummyClass
END CLASS
and in your code, make sure this is called as the _FIRST_ line of any vulcan code executed:
Vulcan.Runtime.State.AppModule := TypeOf(DummyClass):Module
It may well be possible that it works fine in X# but I prefer to change as little as possible so I changed it to:
XSharp.Core.AppModule := TYPEOF(DummyClass):Module (according to the help, AppModule is part of X#.Core)
However, I get this error:
Error XS0234 The type or namespace name 'AppModule' does not exist in the namespace 'XSharp.Core' (are you missing an assembly reference?)
What should I change?
2 This one is less important, because I don't seem to even use it, but I had a changed DBCreate function in my code. This ends with code called when VODBCreate would return false:
If !lRetCode
lRetCode := DoError(#DBCREATE)
Endif
This gives a conversion error (DoError returns an object and lRetCode is a logic). So the error is clear and correct, but what is DoError supposed to be doing in DBCreate? Just out of curiosity!
3 In the Vulcan DLL X# program I use:
Ace.AdsConnect101, ACE.AdsOpenTable101, ACE.AdsExecuteSQLDirectW. None of these are present in XSharp.ADS.
I see there Ace.AdsConnect60, ACE.AdsOpenTable90, ACE.AdsExecuteSQLDirect but these differ a lot in parameters so I have to figure out what all those parameters need to be (AdsOpenTable101 is 3 and AdsOpenTable101 is 10 parameters) and it increases the chance that something is going to work differently (or not).
So mainly my questions are:
1 Can't I use the original Vulcan recognized methods somehow?
2 Why has these functions changed so much?
Dick