bfalcao Posted January 5, 2006 Report Share Posted January 5, 2006 Hi there, I am investigating how to create a new FS2004 module using C#. Does anyone can help me and show me /link me an example ? Thank you. Regards, Bruno Falcão Link to comment Share on other sites More sharing options...
cknipe Posted January 6, 2006 Report Share Posted January 6, 2006 There are very good examples in the C# .NET SDK, available as part of the FSUIPC SDK. I'd suggest you download the SDK, look at the libraries, and the examples provided. Link to comment Share on other sites More sharing options...
bfalcao Posted January 6, 2006 Author Report Share Posted January 6, 2006 Indeed they are but the example to create a new module (and show a popup window) is made in C. Also, I saw a post here about someone who developped in Delphi. But I want to do it in C#Can anyone help me ? Thanks in advance. Link to comment Share on other sites More sharing options...
bfalcao Posted January 6, 2006 Author Report Share Posted January 6, 2006 Hi, I made some progresses in the C example, but I have a doubt. BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpvReserved) { switch (fdwReason) { case DLL_PROCESS_ATTACH: hFSimWindow = FindWindow("FS98MAIN", NULL); oldWndProc = (WNDPROC)SetWindowLong(hFSimWindow, GWL_WNDPROC, (LONG)FSimWindowProc); break; } return TRUE; } Does anyone knows how to refer the entry point on the C# DLL based on that code ? Regards, Link to comment Share on other sites More sharing options...
beatle Posted January 10, 2006 Report Share Posted January 10, 2006 You can't load a C# based DLL inside of Flight Sim, it has no knowledge of things Managed/CLR. That's why the FSUIPC example of a loadable module is only in C, because it has to be a standard PE format DLL, not a managed one, in order to load inside FS. The reason someone was able to do the same with Delphi is because it still generates standard PE format DLLs - you can basically use any langauge that generates standard PE format DLLs, heck back in FS95 & FS98 several of the standard FS modules were still written in assembler :-> Tim Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now