Hi Chris
FRead(hFile, REF cBuffer, bufSize) this produce also a error . the ref Argument is not alowed.
i was writing FRead(hFile, cBuffer, bufSize) and its compile.
Now comes no error's but the compiler hangs up with a error mesage.
Do you know whats that is ?
Horst
Some warnings and error
Some warnings and error
Hi Horst,
This looks like an old compiler bug, are you using an older X# build?
I think you are using the public version, please install the latest one, which you can find here:
https://www.xsharp.eu/itm-downloads?fol ... 252FSetups
In case you still get that error, can you please zip and send me again the solution to have a look?
Chris
This looks like an old compiler bug, are you using an older X# build?
I think you are using the public version, please install the latest one, which you can find here:
https://www.xsharp.eu/itm-downloads?fol ... 252FSetups
In case you still get that error, can you please zip and send me again the solution to have a look?
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Some warnings and error
I checked the date of the file inside the zip, its the same, but i download the X# again and install it. the error comes again i have to shoot down VS with the taskmanager.
inside the zip are the 3 dll and the exe, when i compile the dll's it all ok, when i try to make the exe then its crashed.
Horst
inside the zip are the 3 dll and the exe, when i compile the dll's it all ok, when i try to make the exe then its crashed.
Horst
- Attachments
-
- XporterOutput.zip
- (253.7 KiB) Downloaded 47 times
Some warnings and error
Hi Horst,
Thanks for the sample! (no big problem, but next time please also include the .sln file, which is in the folder one level up from the folders you included). I see 3 separate issues:
- I think I was not very clear in my previous message, but what I meant with the FRead() function is to also use FRead() instead of FRead3() (note the missing "3"), because the FRead() function takes a STRING param, while FRead3() works with pointers. The way you have your code now, it will fail at runtime, because it is passing to the FRead3() function a pointer to a unicode string, while the function expects a PSZ pointer. So please change your code like that and it will work fine:
IF FRead(hFile, REF l_tbl, l_l) <> l_l
you can omit the "REF" if you want, or replace it with "@", but I think the REF keyword makes it more clear. But it is in any case important in this code to use FRead() instead of Frread3(). You will need to make that change in about 10 places in MDPDF.prg, wherever Fread3() is used with a string argument.
- The Assertion Failed error is due to this:
LOCAL oFormular AS BasicHtmlForm
LOCAL odbArtikel AS _CryptServer
SELF:Artikel_Browser (@odbArtikel, @oFormular, ...
METHOD Artikel_Browser (odbArtikel REF OBJECT , oFormular REF OBJECT, .....
In newer x# builds, this reports a proper error instead of this assertion dialog and the error is that the Artikel_Browser() method accepts params of type OBJECT, while the code passes a BasicHtmlForm and a _CryptServer. You must use the exact types for REF params, so you need to change the method like:
METHOD Artikel_Browser (odbArtikel REF _CryptServer , oFormular REF BasicHtmlForm, ...
you will need to do the same also to the other methods that use REF params, like Artikel_Write_Formular_Bottom(), WriteMWST(), WriteKategorie() etc. Then all the code of all libraries should compile fine.
- About terminating VS, I don't think you needed to do that, you could instead press the "Ignore" button in the assertion failed dialog, although because it appears a few times you'd need to press it every time. But anyway that's an old issue, as I said in newer X# versions you will not be seeing this dialog, you will be getting a proper error message instead.
Chris
Thanks for the sample! (no big problem, but next time please also include the .sln file, which is in the folder one level up from the folders you included). I see 3 separate issues:
- I think I was not very clear in my previous message, but what I meant with the FRead() function is to also use FRead() instead of FRead3() (note the missing "3"), because the FRead() function takes a STRING param, while FRead3() works with pointers. The way you have your code now, it will fail at runtime, because it is passing to the FRead3() function a pointer to a unicode string, while the function expects a PSZ pointer. So please change your code like that and it will work fine:
IF FRead(hFile, REF l_tbl, l_l) <> l_l
you can omit the "REF" if you want, or replace it with "@", but I think the REF keyword makes it more clear. But it is in any case important in this code to use FRead() instead of Frread3(). You will need to make that change in about 10 places in MDPDF.prg, wherever Fread3() is used with a string argument.
- The Assertion Failed error is due to this:
LOCAL oFormular AS BasicHtmlForm
LOCAL odbArtikel AS _CryptServer
SELF:Artikel_Browser (@odbArtikel, @oFormular, ...
METHOD Artikel_Browser (odbArtikel REF OBJECT , oFormular REF OBJECT, .....
In newer x# builds, this reports a proper error instead of this assertion dialog and the error is that the Artikel_Browser() method accepts params of type OBJECT, while the code passes a BasicHtmlForm and a _CryptServer. You must use the exact types for REF params, so you need to change the method like:
METHOD Artikel_Browser (odbArtikel REF _CryptServer , oFormular REF BasicHtmlForm, ...
you will need to do the same also to the other methods that use REF params, like Artikel_Write_Formular_Bottom(), WriteMWST(), WriteKategorie() etc. Then all the code of all libraries should compile fine.
- About terminating VS, I don't think you needed to do that, you could instead press the "Ignore" button in the assertion failed dialog, although because it appears a few times you'd need to press it every time. But anyway that's an old issue, as I said in newer X# versions you will not be seeing this dialog, you will be getting a proper error message instead.
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Some warnings and error
Hallo Chris
Thanks for your help.
Now the app was compiled and i put the DLL's and EXE File into my cgi directory. when the EXE is called then the EXE cant find the dll's.
I was reading about .net dll, there is written to put them into the EXE directory or the GAC directory. I like the EXE directory. But its not working, some hint for that ? is there a switch ?
Horst
Thanks for your help.
Now the app was compiled and i put the DLL's and EXE File into my cgi directory. when the EXE is called then the EXE cant find the dll's.
I was reading about .net dll, there is written to put them into the EXE directory or the GAC directory. I like the EXE directory. But its not working, some hint for that ? is there a switch ?
Horst
Some warnings and error
Hi Horst,
you need to put them all there, also the Vulcan DLLs.
Wolfgang
you need to put them all there, also the Vulcan DLLs.
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Some warnings and error
Hi Wolfgang
VS compie all dll and exe
------ Erstellen gestartet: Projekt: _ISAPI SDK HK, Konfiguration: Release Any CPU ------
_ISAPI SDK HK -> C:XporterOutputRelease_ISAPI SDK HK.dll
------ Erstellen gestartet: Projekt: _Swissbase-Basic, Konfiguration: Release Any CPU ------
_Swissbase-Basic -> C:XporterOutputRelease_Swissbase-Basic.dll
------ Erstellen gestartet: Projekt: _Swissbase Html-Cgi, Konfiguration: Release Any CPU ------
_Swissbase Html-Cgi -> C:XporterOutputRelease_Swissbase Html-Cgi.dll
------ Erstellen gestartet: Projekt: Hand SBS Artikel, Konfiguration: Release Any CPU ------
XSharp Compilation time: 00:00:00.7177458
Hand SBS Artikel -> C:XporterOutputReleaseHand_SBS_Artikel.exe
0 Warning(s), 0 Error(s)
========== Build: 4 erfolgreich oder aktuell, 0 fehlerhaft, 0 übersprungen ==========
then i copy this files to my cgi root the 2 dll vulcanRT and RTFunccs also
and the error text is
Unbehandelte Ausnahme: System.IO.FileNotFoundException: Die Datei oder Assembly "_Swissbase-Basic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
bei Hand_SBS_Artikel.Exe.Functions.Start()
Gruss Horst
VS compie all dll and exe
------ Erstellen gestartet: Projekt: _ISAPI SDK HK, Konfiguration: Release Any CPU ------
_ISAPI SDK HK -> C:XporterOutputRelease_ISAPI SDK HK.dll
------ Erstellen gestartet: Projekt: _Swissbase-Basic, Konfiguration: Release Any CPU ------
_Swissbase-Basic -> C:XporterOutputRelease_Swissbase-Basic.dll
------ Erstellen gestartet: Projekt: _Swissbase Html-Cgi, Konfiguration: Release Any CPU ------
_Swissbase Html-Cgi -> C:XporterOutputRelease_Swissbase Html-Cgi.dll
------ Erstellen gestartet: Projekt: Hand SBS Artikel, Konfiguration: Release Any CPU ------
XSharp Compilation time: 00:00:00.7177458
Hand SBS Artikel -> C:XporterOutputReleaseHand_SBS_Artikel.exe
0 Warning(s), 0 Error(s)
========== Build: 4 erfolgreich oder aktuell, 0 fehlerhaft, 0 übersprungen ==========
then i copy this files to my cgi root the 2 dll vulcanRT and RTFunccs also
and the error text is
Unbehandelte Ausnahme: System.IO.FileNotFoundException: Die Datei oder Assembly "_Swissbase-Basic, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
bei Hand_SBS_Artikel.Exe.Functions.Start()
Gruss Horst
Some warnings and error
Hi Horst,
Before running your app from a different folder, you need to make sure that it runs correctly from withing the IDE (VS). Please try to run it with the green "Start" button in the toolbar, or with Debug/Start Debugging.
I think in your case you will get an error, which is because there's a direct reference to a previous version of a dll in a project. Please go to the "_Swissbase Html-Cgi" library, expand the "References" node an delete the "ISAPI SDK HK" entry. To add it again, select "Add Reference..." and pick it again from the "Projects" page in the dialog that pops up.
Now run rebuild the solution and run again from winthin the exe. Possibly there will be some other runtime error, if there is then it's far easier to resolve it from within the IDE, where the debugger can give you the exact error, line, callstack etc. Only after you make sure the app works properly this way, you can copy thee app files in a separate folder and run it from there.
If course if you need any help in resolving runtime errors, please don't hesitate to ask here!
Chris
Before running your app from a different folder, you need to make sure that it runs correctly from withing the IDE (VS). Please try to run it with the green "Start" button in the toolbar, or with Debug/Start Debugging.
I think in your case you will get an error, which is because there's a direct reference to a previous version of a dll in a project. Please go to the "_Swissbase Html-Cgi" library, expand the "References" node an delete the "ISAPI SDK HK" entry. To add it again, select "Add Reference..." and pick it again from the "Projects" page in the dialog that pops up.
Now run rebuild the solution and run again from winthin the exe. Possibly there will be some other runtime error, if there is then it's far easier to resolve it from within the IDE, where the debugger can give you the exact error, line, callstack etc. Only after you make sure the app works properly this way, you can copy thee app files in a separate folder and run it from there.
If course if you need any help in resolving runtime errors, please don't hesitate to ask here!
Chris
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Some warnings and error
Hi Chris
Its not so easy to debug a CGI EXE because the input comes from the OS. And in the last 5 years i did not use a debugger. Only writting a logfile and the errorblock of VO.
I found out, that this error comes also on a smaller app. every time i have an error , like cant open DBF, this comes. i try to fix it.
Horst
Its not so easy to debug a CGI EXE because the input comes from the OS. And in the last 5 years i did not use a debugger. Only writting a logfile and the errorblock of VO.
I found out, that this error comes also on a smaller app. every time i have an error , like cant open DBF, this comes. i try to fix it.
Horst