Resources

This forum is meant for questions and discussions about the X# language and tools
Post Reply
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Resources

Post 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
User avatar
robert
Posts: 4567
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

Resources

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
User avatar
Horst
Posts: 337
Joined: Tue Oct 13, 2015 3:27 pm

Resources

Post 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
Post Reply