Kart Racing Pro Official Forum

Mods => Plugins => Topic started by: PiBoSo on May 28, 2011, 06:21:02 PM

Title: Proxy plugin
Post by: PiBoSo on May 28, 2011, 06:21:02 PM
Kart Racing Pro integrates a "proxy" plugin.

Opening KRPProxyObject

g_hMapFile = OpenFileMapping(FILE_MAP_READ,FALSE,"Local\\KRPProxyObject");
void *pBuf = MapViewOfFile(g_hMapFile,FILE_MAP_READ,0,0,sizeof(SProxyData_t));

external programs can read Kart Racing Pro output data.

The source code and data structure are available here: http://www.kartracing-pro.com/downloads/krp_proxy.c
Title: Re: Proxy plugin
Post by: PiBoSo on November 16, 2011, 02:24:56 PM

Files updated.
Title: Re: Proxy plugin
Post by: PiBoSo on October 06, 2012, 01:20:27 AM

Files updated.
Title: Re: Proxy plugin
Post by: Quadie on September 08, 2013, 05:06:12 PM
in the first post u show some code.

does this have to be put somewhere?
Title: Re: Proxy plugin
Post by: PiBoSo on September 08, 2013, 08:56:05 PM
Quote from: Quadie on September 08, 2013, 05:06:12 PM
in the first post u show some code.

does this have to be put somewhere?

No. It is only needed for developers.
Title: Re: Proxy plugin
Post by: PiBoSo on April 06, 2014, 05:36:51 PM

Files updated.
Title: Re: Proxy plugin
Post by: PiBoSo on January 02, 2015, 11:29:17 PM
Source code updated to the latest interface.
Starting with Beta12, the proxy plugin is packed with the build.
Title: Re: Proxy plugin
Post by: PiBoSo on July 23, 2015, 02:20:03 PM
Source code updated to the latest interface.
Title: Re: Proxy plugin
Post by: PiBoSo on August 12, 2016, 04:51:48 PM

Source code updated to the latest interface.
Title: Re: Proxy plugin
Post by: PiBoSo on March 11, 2017, 04:15:36 PM

Source code updated to the latest interface.
Title: Re: Proxy plugin
Post by: ccesaretto on August 05, 2017, 03:24:13 PM
Hello.
I have been using Proxy plugin to interface to Kart Racing Pro from my C# application.
Everything works fine but, in the SPluginsKartSession_t structure, I had to add an extra property to make everything work fine (see code at the bottom)

is it possible that this file:

http://www.kartracing-pro.com/downloads/krp_proxy.c

is not completely up to date and the SPluginsKartSession_t structure actually need the property I have added?

Thanks


    internal struct SPluginsKartSession_t
    {
        public int m_iSession;
        public int m_iSessionSeries;
        public int m_iConditions;
        public float temp;//<============================  ADDED
        public float m_fAirTemperature;
        public float m_fTrackTemperature;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
        public char[] m_szSetupFileName;
    }

Title: Re: Proxy plugin
Post by: PiBoSo on August 09, 2017, 10:08:53 PM
Quote from: ccesaretto on August 05, 2017, 03:24:13 PM
Hello.
I have been using Proxy plugin to interface to Kart Racing Pro from my C# application.
Everything works fine but, in the SPluginsKartSession_t structure, I had to add an extra property to make everything work fine (see code at the bottom)

is it possible that this file:

http://www.kartracing-pro.com/downloads/krp_proxy.c

is not completely up to date and the SPluginsKartSession_t structure actually need the property I have added?

Thanks


    internal struct SPluginsKartSession_t
    {
        public int m_iSession;
        public int m_iSessionSeries;
        public int m_iConditions;
        public float temp;//<============================  ADDED
        public float m_fAirTemperature;
        public float m_fTrackTemperature;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 100)]
        public char[] m_szSetupFileName;
    }


There is no missing member in the structure.
Could it be an alignment problem? The proxy plugin uses the default value of 8 bytes.
Also, please check the int size, that should be 4 bytes.