1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

How to use 'PluginApi.dll' from MFC?

Discussion in 'Miscellaneous' started by kibaets, Mar 24, 2016.

  1. kibaets

    kibaets Kim Ki-bae

    Joined:
    Mar 23, 2016
    Messages:
    5
    Location:
    Korea
    Balance:
    228Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    4DOF
    Hi..
    How to use 'PluginApi.dll' from MFC?


    ----------------------------------------------------------------------------------
    HMODULE h;
    h = LoadLibrary(_T("PluginApi.dll"));
    typedef double (*aa)(void);
    aa a;
    a = (aa)GetProcAddress(h, "Get_RollOutput");

    LoadLibrary 's return h = exist but .. GetPorcAddress 's return is 'NULL'
    please help me..



    This is 'pluginapi.dll' - visual basic source

    ---------------------------------------------------------------------------------------
    Public Interface IPlugin
    ReadOnly Property Name() As String
    ReadOnly Property ProcessName() As String
    ReadOnly Property PluginAuthorsName() As String
    ReadOnly Property Port() As String
    ReadOnly Property Is_MemoryMap() As Boolean
    ReadOnly Property Is_DashBoard() As Boolean
    ReadOnly Property Is_MemoryHook() As Boolean
    Sub Process_MemoryHook()
    Sub Process_MemoryMap()
    'run at start/stop
    Sub StartupCommands()
    Sub ShutDownCommands()
    'patching
    Function PatchGame(ByVal MyPath As String, ByVal MyIp As String) As Boolean
    Sub PatchPathInfo()
    Sub UnPatchGame(ByVal MyPath As String)
    Function ValidatePatchPath(ByVal MyPath As String) As Boolean
    'GameEngine - process info
    Sub Process_PacketRecieved(ByVal Text As String)
    'Game_Manager
    Function GetDOFsUsed() As String
    'output
    Function Get_RollOutput() As Double
    Function Get_PitchOutput() As Double
    Function Get_HeaveOutput() As Double
    Function Get_YawOutput() As Double
    Function Get_SwayOutput() As Double
    Function Get_SurgeOutput() As Double
    Function Get_Extra1Output() As Double
    Function Get_Extra2Output() As Double
    Function Get_Extra3Output() As Double
    Function Get_RollMemHook() As Double
    Function Get_PitchMemHook() As Double
    Function Get_HeaveMemHook() As Double
    Function Get_YawMemHook() As Double
    Function Get_SwayMemHook() As Double
    Function Get_SurgeMemHook() As Double
    Function Get_Extra1MemHook() As Double
    Function Get_Extra2MemHook() As Double
    Function Get_Extra3MemHook() As Double
    Function Get_RollMemMap() As Double
    Function Get_PitchMemMap() As Double
    Function Get_HeaveMemMap() As Double
    Function Get_YawMemMap() As Double
    Function Get_SwayMemMap() As Double
    Function Get_SurgeMemMap() As Double
    Function Get_Extra1MemMap() As Double
    Function Get_Extra2MemMap() As Double
    Function Get_Extra3MemMap() As Double
    Function Get_Dash1_Output() As String
    Function Get_Dash2_Output() As String
    Function Get_Dash3_Output() As String
    Function Get_Dash4_Output() As String
    Function Get_Dash5_Output() As String
    Function Get_Dash6_Output() As String
    Function Get_Dash7_Output() As String
    Function Get_Dash8_Output() As String
    Function Get_Dash9_Output() As String
    Function Get_Dash10_Output() As String
    Function Get_Dash11_Output() As String
    Function Get_Dash12_Output() As String
    Function Get_Dash13_Output() As String
    Function Get_Dash14_Output() As String
    Function Get_Dash15_Output() As String
    Function Get_Dash16_Output() As String
    Function Get_Dash17_Output() As String
    Function Get_Dash18_Output() As String
    Function Get_Dash19_Output() As String
    Function Get_Dash20_Output() As String
    'reset
    Sub ResetDOFVars()
    Sub ResetMapVars()
    Sub ResetHookVars()
    Sub ResetDashVars()
    End Interface
  2. kibaets

    kibaets Kim Ki-bae

    Joined:
    Mar 23, 2016
    Messages:
    5
    Location:
    Korea
    Balance:
    228Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    4DOF
    Please answer
  3. noorbeast

    noorbeast VR Tassie Devil Staff Member Moderator Race Director

    Joined:
    Jul 13, 2014
    Messages:
    21,051
    Occupation:
    Innovative tech specialist for NGOs
    Location:
    St Helens, Tasmania, Australia
    Balance:
    148,004Coins
    Ratings:
    +10,884 / 54 / -2
    My Motion Simulator:
    3DOF, DC motor, JRK
  4. kibaets

    kibaets Kim Ki-bae

    Joined:
    Mar 23, 2016
    Messages:
    5
    Location:
    Korea
    Balance:
    228Coins
    Ratings:
    +0 / 0 / -0
    My Motion Simulator:
    4DOF
    I want to use it('PluginApi.dll, game ***plugin.dll) in my program.
    My development environment is 'Visual Studio 2008 - MFC C++'


    HMODULE h;
    h = LoadLibrary(_T("PluginApi.dll"));
    typedef double (*aa)(void);
    aa a;
    a = (aa)GetProcAddress(h, "Get_RollOutput");
    LoadLibrary 's return value h = exist

    but .. GetPorcAddress 's return value is 'NULL'

    please help me..
  5. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,282
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    49,207Coins
    Ratings:
    +5,093 / 18 / -0
    Sorry @kibaets,
    This is not allowed.
    SimTools API's are only to be used with SimTools.
    yobuddy