Ok, I've seen the old post on this.
However, this is specific to a Windows Service. The main function on a service is like a console app, you get argc, char *argv[] with command line parameters.
There are no registered Window objects, there is no WinMain().
I am storing a resource in the service, but in order to extract it, it wants an HINSTANCE handle.
Comments
HINSTANCE hInst = (HINSTANCE)GetWindowLong( hwndC, GWL_HINSTANCE );