Jump to content
The simFlight Network Forums

Module creation using a C# Project


Recommended Posts

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.