--- mstools/samples/ole/srvrdemo/server.c 2018/08/09 18:20:49 1.1 +++ mstools/samples/ole/srvrdemo/server.c 2018/08/09 18:23:59 1.1.1.2 @@ -266,8 +266,8 @@ VOID SetTitle (LPSTR lpszDoc, BOOL fEmbe * LPOLESERVER lpolesrvr - The server structure registered by * the application * LHSERVERDOC lhdoc - The library's handle - * LPSTR lpszClassName - The class of document to create - * LPSTR lpszDoc - The name of the document + * OLE_LPCSTR lpszClassName - The class of document to create + * OLE_LPCSTR lpszDoc - The name of the document * LPOLESERVERDOC FAR *lplpoledoc - Indicates the server doc structure to be * created * @@ -278,10 +278,10 @@ VOID SetTitle (LPSTR lpszDoc, BOOL fEmbe * */ OLESTATUS APIENTRY SrvrCreate - (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, LPSTR lpszClassName, - LPSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) + (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, OLE_LPCSTR lpszClassName, + OLE_LPCSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) { - if (!CreateNewDoc (lhdoc, lpszDoc, doctypeEmbedded)) + if (!CreateNewDoc (lhdoc, (LPSTR) lpszDoc, doctypeEmbedded)) return OLE_ERROR_NEW; // Although the document has not actually been changed, the client has not @@ -305,9 +305,9 @@ OLESTATUS APIENTRY SrvrCreate * LPOLESERVER lpolesrvr - The server structure registered by * the application * LHSERVERDOC lhdoc - The library's handle - * LPSTR lpszClassName - The class of document to create - * LPSTR lpszDoc - The name of the document - * LPSTR lpszTemplate - The name of the template + * OLE_LPCSTR lpszClassName - The class of document to create + * OLE_LPCSTR lpszDoc - The name of the document + * OLE_LPCSTR lpszTemplate - The name of the template * LPOLESERVERDOC FAR *lplpoledoc - Indicates the server doc structure * to be created * @@ -318,10 +318,10 @@ OLESTATUS APIENTRY SrvrCreate * */ OLESTATUS APIENTRY SrvrCreateFromTemplate - (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, LPSTR lpszClassName, - LPSTR lpszDoc, LPSTR lpszTemplate, LPOLESERVERDOC FAR *lplpoledoc) + (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, OLE_LPCSTR lpszClassName, + OLE_LPCSTR lpszDoc, OLE_LPCSTR lpszTemplate, LPOLESERVERDOC FAR *lplpoledoc) { - if (!CreateDocFromFile(lpszTemplate, lhdoc, doctypeEmbedded)) + if (!CreateDocFromFile((LPSTR) lpszTemplate, (LHSERVERDOC) lhdoc, doctypeEmbedded)) return OLE_ERROR_TEMPLATE; *lplpoledoc = (LPOLESERVERDOC) &docMain; @@ -348,8 +348,8 @@ OLESTATUS APIENTRY SrvrCreateFromTempla * LPOLESERVER lpolesrvr - The server structure registered by * the application * LHSERVERDOC lhdoc - The library's handle - * LPSTR lpszClassName - The class of document to create - * LPSTR lpszDoc - The name of the document + * OLE_LPCSTR lpszClassName - The class of document to create + * OLE_LPCSTR lpszDoc - The name of the document * LPOLESERVERDOC FAR *lplpoledoc - Indicates the server doc structure to be * created * @@ -360,10 +360,10 @@ OLESTATUS APIENTRY SrvrCreateFromTempla * */ OLESTATUS APIENTRY SrvrEdit - (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, LPSTR lpszClassName, - LPSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) + (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, OLE_LPCSTR lpszClassName, + OLE_LPCSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) { - if (!CreateNewDoc (lhdoc, lpszDoc, doctypeEmbedded)) + if (!CreateNewDoc ((LONG)lhdoc, (LPSTR)lpszDoc, doctypeEmbedded)) return OLE_ERROR_EDIT; // The client is creating an embedded object for the server to edit, @@ -432,7 +432,7 @@ OLESTATUS APIENTRY SrvrExit (LPOLESERVE * LPOLESERVER lpolesrvr - The server structure registered by * the application * LHSERVERDOC lhdoc - The library's handle - * LPSTR lpszDoc - The name of the document + * OLE_LPCSTR lpszDoc - The name of the document * LPOLESERVERDOC FAR *lplpoledoc - Indicates server doc structure to be * created * @@ -443,9 +443,9 @@ OLESTATUS APIENTRY SrvrExit (LPOLESERVE * */ OLESTATUS APIENTRY SrvrOpen (LPOLESERVER lpolesrvr, LHSERVERDOC lhdoc, - LPSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) + OLE_LPCSTR lpszDoc, LPOLESERVERDOC FAR *lplpoledoc) { - if (!CreateDocFromFile (lpszDoc, lhdoc, doctypeFromFile)) + if (!CreateDocFromFile ((LPSTR)lpszDoc, (LHSERVERDOC)lhdoc, doctypeFromFile)) return OLE_ERROR_OPEN; *lplpoledoc = (LPOLESERVERDOC) &docMain; @@ -527,7 +527,7 @@ OLESTATUS StartRevokingServer (VOID) lhserver = srvrMain.lhsrvr; // Set lhsrvr to NULL to indicate that srvrMain is a lame duck and that // if SrvrRelease is called, then it is ok to quit the application. - srvrMain.lhsrvr = NULL; + srvrMain.lhsrvr = 0; olestatus = OleRevokeServer (lhserver); } else