--- mstools/samples/rpc/whello/whelloc.c 2018/08/09 18:20:56 1.1 +++ mstools/samples/rpc/whello/whelloc.c 2018/08/09 18:22:01 1.1.1.2 @@ -27,6 +27,7 @@ ****************************************************************************/ #include /* required for all Win applications */ +#include /* select between win16 or win32 */ #include #include #include /* required for all RPC applications */ @@ -39,7 +40,7 @@ HCURSOR hHourGlass, hOld; /* during char pszFail[MSGLEN]; /* RPC API failure message */ RPC_STATUS status; /* returned by RPC API function */ -unsigned char * pszUuid = "12345678-1234-1234-1234-123456789ABC"; +unsigned char * pszUuid = NULL; unsigned char * pszProtocolSequence = "ncacn_np"; unsigned char szNetworkAddress[UNCLEN+1]; unsigned char szEndpoint[PATHLEN+1]; @@ -243,13 +244,13 @@ UINT message; /* type of message WPARAM wParam; /* additional information */ LPARAM lParam; /* additional information */ { - FARPROC lpProc; /* pointer to the dialog box function */ + DLGPROC lpProc; /* pointer to the dialog box function */ switch (message) { case WM_COMMAND: /* message: command from application menu */ switch (wParam) { case IDM_ABOUT: - lpProc = MakeProcInstance((FARPROC)About, hInst); + lpProc = MakeProcInstance(About, hInst); DialogBox(hInst, /* current instance */ "AboutBox", /* resource to use */ hWnd, /* parent handle */ @@ -258,7 +259,7 @@ LPARAM lParam; /* additional info break; case IDM_SERVER: - lpProc = MakeProcInstance((FARPROC)Server, hInst); + lpProc = MakeProcInstance(Server, hInst); DialogBox(hInst, /* current instance */ "ServerBox", /* resource to use */ hWnd, /* parent handle */ @@ -267,7 +268,7 @@ LPARAM lParam; /* additional info break; case IDM_ENDPOINT: - lpProc = MakeProcInstance((FARPROC)Endpoint, hInst); + lpProc = MakeProcInstance(Endpoint, hInst); DialogBox(hInst, /* current instance */ "EndpointBox", /* resource to use */ hWnd, /* parent handle */ @@ -276,7 +277,7 @@ LPARAM lParam; /* additional info break; case IDM_SEND: - lpProc = MakeProcInstance((FARPROC)Send, hInst); + lpProc = MakeProcInstance(Send, hInst); DialogBox(hInst, /* current instance */ "SendBox", /* resource to use */ hWnd, /* parent handle */ @@ -335,7 +336,7 @@ UNREFERENCED_PARAMETER(lParam); switch (message) { case WM_INITDIALOG: /* message: initialize dialog box */ - SetDlgItemText( hDlg, IDD_SERVERNAME, szNetworkAddress); + SetDlgItemText((HANDLE)hDlg, IDD_SERVERNAME, szNetworkAddress); return (TRUE); case WM_COMMAND: /* message: received a command */