Jump to content
Sign in to follow this  
wraithdu

Plugins - Regular MFC Dll

Recommended Posts

wraithdu

I want use the MFC CString class in a plugin. So I'm using VS 2008 and creating a regular Win32 Dll project with MFC support.

My question is about the entry point. The AU3 SDK uses the DllMain entry point. However regular MFC dlls don't have a DllMain entry point by default. There's a MS article how to include one if need be, but I was curious if this is necessary, of if there's an MFC equivalent, or if I can just do without DllMain altogether.

Share this post


Link to post
Share on other sites
Richard Robertson

If I remember correctly, the plugin structure can do without anything special in the entry point. You just need to make sure you have the important pieces. Like functions, the list of exported plugin functions, the mini-variant information, etc.

Share this post


Link to post
Share on other sites
wraithdu

Thanks. Plugin works just fine without DllMain.

Share this post


Link to post
Share on other sites
cppman

Thanks. Plugin works just fine without DllMain.

DLLs in general don't need an entry-point unless you plan on "running" them. Edited by cppman

Share this post


Link to post
Share on other sites
wraithdu

I was only asking because DllMain is in the plugin SDK. I could see the function didn't have any meaningful code, but I wasn't sure if AutoIt was expecting it to be there anyway. I figured it was worth an ask :mellow:

Share this post


Link to post
Share on other sites
Richard Robertson

I don't believe the entry point is called explicitly. It's more of one of those behind the scenes loader functions.

Share this post


Link to post
Share on other sites
cppman

I don't believe the entry point is called explicitly. It's more of one of those behind the scenes loader functions.

If the "entry-point" exists, Windows will call that function every time the DLL is loaded.

Share this post


Link to post
Share on other sites
Richard Robertson

I know. I just said it's a behind the scenes function and that no programmer actively find the address of it and calls it.

Share this post


Link to post
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
Sign in to follow this  

×