WinMain is a function that "replaces" the default main entry point with "main".
Then the user can determine his main entry point, for example
int WINAPI WinMain(...) { }
How is this done in the form of encapsulation?
Well, most likely, at some point it looks like this:
int main()
{
return WinMain(...);
}
Question . How can I perform such an encapsulation of my own, which then calls WinMain? Note. The library I created is a DLL, so it will look like this:
#pragma comment(lib, "MyLibrary.lib")
include "MyLibrary.h"
void Main(MyCustomParameter *params)
{
}
The problem is that the DLL does not "know" the function Main()and therefore generates a "unresolved external character" compilation error. So how can I encapsulate it as follows?
source
share