Recent content by mariomotta

  1. M

    P3D v4 How do I start making c++ GDI+ gauges?

    Thanks a lot theisomizer, that solved the problem, did not realize the pointer truncation. /Mario
  2. M

    P3D v4 How do I start making c++ GDI+ gauges?

    Hello, that's true, does not impact on runtime error since last arg is just declared not used. So i'm again stuck. /Mario
  3. M

    P3D v4 How do I start making c++ GDI+ gauges?

    Thanks for replay, however i'm a bit confused, not sure to have understood since the gauge callback signature is exactly what is defined in x64 gauges.h: typedef void FSAPI GAUGE_CALLBACK( PGAUGEHDR pgauge, SINT32 service_id, UINT_PTR extra_data ); May you be a bit more precise (language...
  4. M

    P3D v4 How do I start making c++ GDI+ gauges?

    Hello, i have played a bit with the example above https://www.fsdeveloper.com/forum/resources/blank-invisible-systems-gauge-template.164/ compiling it in X64 with VS 2019, using the gauges header from P3d v4 SDK. It compiles and links nicely, however i get a run time error of "access violation"...
  5. M

    LUA scripts and PBR material problems

    Hi, apologize for my weak english. Below GinaTextureScript.lua lua scripts works nicely !lua --Get precip state. local raining = 0x00000004 local precipState = varget("A:AMBIENT PRECIP STATE", "Mask") precipState = math.floor(precipState) --Define textures. textureDry=...
  6. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks, i have set HERE the complete managed C++/SimConnect solution (Visual Studio C++ 2017 Community), it entraps both SIMCONNECT_OPEN and SIMCONNECT_QUIT into WinForms private methods, even simple guess is a good starting point to create nice UI that can crosstalk with the sim via...
  7. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    [SOLVED] Thanks to Benjamin Erd i have now corrected my code and it works, so i have nice managed SimConnect C++ code. 2 fix to do to code: Sim_Connect = gcnew SimConnect(safe_cast<String^>("tf104gconfig"),this->Handle, WM_USER_SIMCONNECT, nullptr, 0); and this->simConnect->OnRecvOpen += gcnew...
  8. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks a lot, i have routed these tracks: 1. using this: https://blogs.msdn.microsoft.com/abhina ... ogramming/ tried to mix managed and unmanaged code using compiler directive as suggested also by you, it compiles but does not link with unmanaged LM SimConnect.Debug.lib or SimConnect.lib 2. as...
  9. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks a lot, I have tried it before, it compiles and works nicely but is linked with a FSW simconnect.lib and Dovetail Simconnect.dll on the executable folder. Does not link with p3d simconnect.lib, however i'm not sure to have such extension, will give a try.
  10. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks Doug, that's could be a feasible route, all in all there are few functions to export, remain to check if it could be loaded into a managed code. /Mario btw don't know if you received my answer about arrestor, i had some failure on my SMTP, however thanks a lot, will test soon, also...
  11. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks for reply, that's what i'm looking for to decide to either give up or succeed; 30 example of non-managed C++ code are unuseful. /Mario
  12. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    thanks for reply, I'm working on ver 141 (2017) and x64, with /clr option I'm trying using c# as a rough guide, discovered, as i expected, SimConnect::RecvOpenEventHandler() and others accepts function pointers as a pure C call, that's why i have embedded it in extern "C" { }; /Mario
  13. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    You are intentionally rude and prove you do not know what you're talking about and you did not understand anything from the beginning, there is not a single C ++ example of SimConnect managed code, that would not compile using C++/CLI and .NET framework, the only examples of managed code are on...
  14. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    Thanks for reply, My goal is to make an external GUI application in C++ (an aircraft configurator) able to talk with the sim via SimConnect. Actually the only way i could have is an inelegant file cross talk. Yes actually i use client_event.cs as a start point, no language preferences, my route...
  15. M

    P3D v4 Desperately trying to make SimConnect with C ++ work in managed code

    I have done several non-managed SimConnect clients so far, what you say does not match with what i know, ie: // Connect to the SimConnect's Server HRESULT hr = SimConnect_Open(&hSimConnect, "TF104G", NULL, 0, 0, 0); .... // Give to the SimConnect's Server our SimConnect's callback pointer...
Top