xsharp.eu • Resources
Page 1 of 1

Resources

Posted: Fri Sep 01, 2017 1:33 pm
by Horst
Hi

First of all , i am a beginner in using .Net or Visual Studio amd i come from VO2.7

I try to port my App to X#. One Dll i need is the 'Internet Server API' from VO with my changes. so i used xporter, and then i started VS2015 and compiled it.

this Error comes (and 11 other like that) :
C:XporterOutputISAPI SDK HKISAPIDefine.prg(163,31): error XS0246: The type or namespace name 'GetServerVariable' could not be found (are you missing a using directive or an assembly reference?)

this line: MEMBER pGetServerVariable AS GetServerVariable PTR

mmm now i am sitting here i dont know what to do :-)
i think i have to add a reference and i think its starts with system.something because the VO API is also using the 'win32 API Lib' from windows before. So where can i find this Function GetServerVariable in the .Net world ?

Horst

Resources

Posted: Fri Sep 01, 2017 6:35 pm
by robert
Horst,
GetServerVariable() is a function inside isapidef.prg.
This function is empty and only serves as prototype.
Inside the constructor of HttPExtensionContect a pointer is received. This pointer is declared somewhere else and is the pointer to a structure that contains a function pointer.
This structure contains data and function pointers.
HttpExtensionContext:GetServerVariable() uses PCall() to call the function stored in the structure.

This all is quite complicated and probably not a good starting point for a conversion from VO to X#.

Robert

Resources

Posted: Sat Sep 02, 2017 7:18 am
by Horst
Hi Robert

I see, this is not a stuff for simple applikation programmer like me. after your writing i was reading the code again and with your help i saw now that there are two ways how this GetServerVariable() works, one class for CGI and GetEnv()and one class for the addional DLL for IIS with the pointer and grapping the data.

I dont need the Extension Part of this DLL because i use the CGI Part. I will rewrite and kicking out code that i dont need.

Thanks for your help