Microsoft KB Archive/113188: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 64: | Line 64: | ||
=== List of Text Errors === | === List of Text Errors === | ||
<pre class="fixed_text">Page 71: The second line of the last paragraph should read | <pre class="fixed_text">Page 71: The second line of the last paragraph should read "with all the | ||
functions in the preceding table... | functions in the preceding table...". The book has "tale" | ||
instead of | instead of "table". | ||
Pages 82- The exact implementations of CImpIEnumRECT::Next on these pages | Pages 82- The exact implementations of CImpIEnumRECT::Next on these pages | ||
83, 92- are incorrect--for more information, see the section | 83, 92- are incorrect--for more information, see the section "Errors in | ||
93: Enumerator Samples | 93: Enumerator Samples" in the Knowledge Base article "SAMPLE: | ||
Corrections for Inside OLE 2 Sample Code. | Corrections for Inside OLE 2 Sample Code." | ||
Also, on page 83 there should be no space between | Also, on page 83 there should be no space between "book" and | ||
"1632" in the text "#include <book 1632.h>". | |||
Page 105: The second use of QueryInterface in the Transitive property | Page 105: The second use of QueryInterface in the Transitive property | ||
should read | should read "pInterface2->QueryInterface(IInterface3)". The | ||
book has IInterface2 as the parameter to QueryInterface, | book has IInterface2 as the parameter to QueryInterface, | ||
which is incorrect. | which is incorrect. | ||
Page 157: A space is missing between | Page 157: A space is missing between "LPLPVOID" and "ppv" in the | ||
last parameter of the declaration CKoala::QueryInterface. | last parameter of the declaration CKoala::QueryInterface. | ||
Page 161: The prototype for WEP should return an int, not VOID. | Page 161: The prototype for WEP should return an int, not VOID. | ||
Page 197: The line of code under | Page 197: The line of code under "if (IsEqual(riid, IID_IAnimal))" | ||
should read | should read "*ppv=(LPVOID)m_pAnimal". In the text the | ||
underscore is mistakenly a space, dash, and space. | underscore is mistakenly a space, dash, and space. | ||
Page 199: A space is missing between | Page 199: A space is missing between "LPLPVOID" and "ppv" in the | ||
last parameter of the declaration CKoala::QueryInterface. | last parameter of the declaration CKoala::QueryInterface. | ||
Page 243: The second sentence in the second paragraph should read: | Page 243: The second sentence in the second paragraph should read: | ||
"The Structured Storage definition of IStream allows streams | |||
to contain up to 2^64 (2 raised to the 64th power) | to contain up to 2^64 (2 raised to the 64th power) | ||
addressable bytes of data. | addressable bytes of data." | ||
The text incorrectly reads | The text incorrectly reads "264" instead of "2^64." | ||
Pages 257- The code listings for CPages::DevModeSet, CPages::DevModeGet, | Pages 257- The code listings for CPages::DevModeSet, CPages::DevModeGet, | ||
259: and CPages::ConfigureForDevice should be changed to correct a | 259: and CPages::ConfigureForDevice should be changed to correct a | ||
problem with certain printer drivers in Patron. For more | problem with certain printer drivers in Patron. For more | ||
information on this problem, see the section | information on this problem, see the section "Patron Does Not | ||
Work with Some Printer Drivers | Work with Some Printer Drivers" in the Knowledge Base article | ||
"SAMPLE: Corrections for Inside OLE 2 Sample Code." | |||
Pages 289- Both LibMain and WEP functions should return an int. | Pages 289- Both LibMain and WEP functions should return an int. | ||
290: For more information, see the section | 290: For more information, see the section "Incorrect Prototypes for | ||
LibMain() and WEP() | LibMain() and WEP()" in the Knowledge Base article "SAMPLE: | ||
Corrections for Inside OLE 2 Sample Code. | Corrections for Inside OLE 2 Sample Code." | ||
Page 316: The implementation of CImpIEnumFormatEtc::Next is incorrect. | Page 316: The implementation of CImpIEnumFormatEtc::Next is incorrect. | ||
For more information on this problem, see the section | For more information on this problem, see the section "Errors in | ||
Enumerator Samples | Enumerator Samples" in the Knowledge Base article "SAMPLE: | ||
Corrections for Inside OLE 2 Sample Code. | Corrections for Inside OLE 2 Sample Code." | ||
Page 331: The description of IDataObject::GetCanonicalFormatEtc | Page 331: The description of IDataObject::GetCanonicalFormatEtc | ||
is incorrect. For correct details, see the Microsoft Object | is incorrect. For correct details, see the Microsoft Object | ||
Linking and Embedding version 2.0 | Linking and Embedding version 2.0 "Programmer's Reference." | ||
Page 365: The | Page 365: The "const LPRECTL" parameter to IViewObject::Draw | ||
should be of type | should be of type "LPCRECTL" to match OLE 2.01. The book | ||
is correct for OLE 2.0. For more information, see the section | is correct for OLE 2.0. For more information, see the section | ||
"Compiler Errors on IViewObject::Draw()" in the Knowledge | |||
Base article | Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." | ||
Page 368: The call to pIViewObject->Draw about should read: | Page 368: The call to pIViewObject->Draw about should read: | ||
"pIViewObject->Draw(dwAspect, -1, NULL, NULL, 0, hdcDraw, | |||
lprcBounds, NULL, NULL, 0); | lprcBounds, NULL, NULL, 0);". In the book, the dwAspect and | ||
hDC parameters are incorrect. | hDC parameters are incorrect. | ||
Line 136: | Line 136: | ||
it should also call AddRef on any IStorage or IStream pointer | it should also call AddRef on any IStorage or IStream pointer | ||
inside the STGMEDIUM, if that is the medium in use. For more | inside the STGMEDIUM, if that is the medium in use. For more | ||
information, see the section | information, see the section "Datatran Reference Counting | ||
Problem | Problem" in the Knowledge Base article "SAMPLE: Corrections | ||
for Inside OLE 2 Sample Code. | for Inside OLE 2 Sample Code." | ||
Page 437: The word | Page 437: The word "consumer" in the caption of Figure 8-6 should be | ||
"target." | |||
Pages 544- In OLE 2.01 there is a new, additional parameter to | Pages 544- In OLE 2.01 there is a new, additional parameter to | ||
546: OleUIAddVerbMenu called | 546: OleUIAddVerbMenu called "idVerbMax", which comes immediately | ||
after | after "idVerbMin." This parameter was not present in OLE 2.0. | ||
For information on how this change affects the sample code, see | For information on how this change affects the sample code, see | ||
the section | the section "Compiler Errors on OleUIAddVerbMenu" in | ||
the Knowledge Base article | the Knowledge Base article "SAMPLE: Corrections for Inside | ||
OLE 2 Sample Code. | OLE 2 Sample Code." | ||
Page 554: Under OLE 2.01 the OleStdGetObjectDescriptorFromOleObject | Page 554: Under OLE 2.01 the OleStdGetObjectDescriptorFromOleObject | ||
Line 155: | Line 155: | ||
additional LPSIZEL as the last parameter. For more information | additional LPSIZEL as the last parameter. For more information | ||
on how this change affects the sample code, see the section | on how this change affects the sample code, see the section | ||
"Compiler Errors on OleStdGetObjectDescriptorFromOleObject()" | |||
in the Knowledge Base article | in the Knowledge Base article "SAMPLE: Corrections for Inside | ||
OLE 2 Sample Code. | OLE 2 Sample Code." | ||
Pages 614- No ellipsis ( | Pages 614- No ellipsis ("...") is necessary to separate functions in | ||
622: Listing 10-5. There is no code omitted from the listing in these | 622: Listing 10-5. There is no code omitted from the listing in these | ||
places. | places. | ||
Page 630: The right curly brace just above the | Page 630: The right curly brace just above the "else" at the bottom | ||
of the page should be indented to align with the call | of the page should be indented to align with the call | ||
to ModifyMenu above it. | to ModifyMenu above it. | ||
Line 173: | Line 173: | ||
should not cache or hold pointers to the same elements the | should not cache or hold pointers to the same elements the | ||
server must access. For more information on this problem, see | server must access. For more information on this problem, see | ||
the section | the section "Component Cosmo Fails to Release Polyline Object" | ||
in the Knowledge Base article | in the Knowledge Base article "SAMPLE: Corrections for Inside | ||
OLE 2 Sample Code. | OLE 2 Sample Code." | ||
If a handler manipulates and changes data unaffected by | If a handler manipulates and changes data unaffected by | ||
Line 182: | Line 182: | ||
others that it modifies. | others that it modifies. | ||
Page 668: The | Page 668: The "const LPRECTL" parameter to IViewObject::Draw | ||
should be of type | should be of type "LPCRECTL" to match OLE 2.01. The book | ||
is correct for OLE 2.0. For more information on how this change | is correct for OLE 2.0. For more information on how this change | ||
affects the sample code, see the section | affects the sample code, see the section "Compiler Errors on | ||
IViewObject::Draw() | IViewObject::Draw()" of the Knowledge Base article "SAMPLE: | ||
Corrections for Inside OLE 2 Sample Code. | Corrections for Inside OLE 2 Sample Code." | ||
Page 687: There should not be | Page 687: There should not be "//" before the large bold "IOLEOBJ.CPP" | ||
in this code listing. The label is not part of the code. | in this code listing. The label is not part of the code. | ||
Line 199: | Line 199: | ||
Page 817: Remove the second parameter to pTenantCur->Close. It should | Page 817: Remove the second parameter to pTenantCur->Close. It should | ||
read | read "pTenantCur->Close(FALSE);". For more information on this | ||
problem, see the section | problem, see the section "Patron GP Faults During Activate As" | ||
in the Knowledge Base article | in the Knowledge Base article "SAMPLE: Corrections for Inside | ||
OLE 2 Sample Code. | OLE 2 Sample Code." | ||
Page 817: There should be a call to pIStorage->Commit(STGC_ONLYIFCURRENT) | Page 817: There should be a call to pIStorage->Commit(STGC_ONLYIFCURRENT) | ||
immediately after the call to OleStdDoConvert and before | immediately after the call to OleStdDoConvert and before | ||
the call to pIStorage->Release. For more information, see | the call to pIStorage->Release. For more information, see | ||
the section | the section "Patron Convert To Fails" of the Knowledge Base | ||
article | article "SAMPLE: Corrections for Inside OLE 2 Sample Code." | ||
Page 819: Remove the second parameter to pTenantCur->Close. It should | Page 819: Remove the second parameter to pTenantCur->Close. It should | ||
read | read "pTenantCur->Close(FALSE);". This matches the change | ||
necessary for a bug resolution described in the section | necessary for a bug resolution described in the section "Patron | ||
GP Faults During Activate As | GP Faults During Activate As" in the Knowledge Base article | ||
"SAMPLE: Corrections for Inside OLE 2 Sample Code." | |||
Page 846: The parenthetical entry in the fourth line of the last | Page 846: The parenthetical entry in the fourth line of the last | ||
paragraph should read | paragraph should read "(linked objects are NOT allowed...)". | ||
The book reads | The book reads "now" instead of "not". | ||
Page 861: The second sentence of the third paragraph under | Page 861: The second sentence of the third paragraph under "Active | ||
vs. UI Active and Inside-Out Objects | vs. UI Active and Inside-Out Objects" should read: | ||
"The answer...as they are visible-end users DO NOT have to | |||
double-click... | double-click..." | ||
The DO NOT is important. | The DO NOT is important. |
Revision as of 11:32, 20 July 2020
Article ID: 113188
Article Last Modified on 7/10/2001
APPLIES TO
- Microsoft OLE 2.01
This article was previously published under Q113188
SUMMARY
This article contains a list of errors in the text of the book Inside OLE 2 by Kraig Brockschmidt (Microsoft Press).
Many of the errors listed below also affect the book's sample code; the descriptions for those errors include references to another Knowledge Base article, which describes the problems (and their solutions) in more detail.
For additional information on these problems and their solutions, please see the following article(s) in the Microsoft Knowledge Base:
113255 SAMPLE: Corrections for Inside OLE 2 Sample Code
The sample code for Inside OLE 2 was originally written to be compatible with OLE 2.0. This code has been updated to be compatible with OLE 2.01 and also to fix some problems in the original code. The entire source tree for the updated sample code is included in the Microsoft Download Center Inole2.exe sample. You can download Inole2.exe from the above-mentioned Microsoft Knowledge Base article.
MORE INFORMATION
List of Text Errors
Page 71: The second line of the last paragraph should read "with all the functions in the preceding table...". The book has "tale" instead of "table". Pages 82- The exact implementations of CImpIEnumRECT::Next on these pages 83, 92- are incorrect--for more information, see the section "Errors in 93: Enumerator Samples" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Also, on page 83 there should be no space between "book" and "1632" in the text "#include <book 1632.h>". Page 105: The second use of QueryInterface in the Transitive property should read "pInterface2->QueryInterface(IInterface3)". The book has IInterface2 as the parameter to QueryInterface, which is incorrect. Page 157: A space is missing between "LPLPVOID" and "ppv" in the last parameter of the declaration CKoala::QueryInterface. Page 161: The prototype for WEP should return an int, not VOID. Page 197: The line of code under "if (IsEqual(riid, IID_IAnimal))" should read "*ppv=(LPVOID)m_pAnimal". In the text the underscore is mistakenly a space, dash, and space. Page 199: A space is missing between "LPLPVOID" and "ppv" in the last parameter of the declaration CKoala::QueryInterface. Page 243: The second sentence in the second paragraph should read: "The Structured Storage definition of IStream allows streams to contain up to 2^64 (2 raised to the 64th power) addressable bytes of data." The text incorrectly reads "264" instead of "2^64." Pages 257- The code listings for CPages::DevModeSet, CPages::DevModeGet, 259: and CPages::ConfigureForDevice should be changed to correct a problem with certain printer drivers in Patron. For more information on this problem, see the section "Patron Does Not Work with Some Printer Drivers" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Pages 289- Both LibMain and WEP functions should return an int. 290: For more information, see the section "Incorrect Prototypes for LibMain() and WEP()" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 316: The implementation of CImpIEnumFormatEtc::Next is incorrect. For more information on this problem, see the section "Errors in Enumerator Samples" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 331: The description of IDataObject::GetCanonicalFormatEtc is incorrect. For correct details, see the Microsoft Object Linking and Embedding version 2.0 "Programmer's Reference." Page 365: The "const LPRECTL" parameter to IViewObject::Draw should be of type "LPCRECTL" to match OLE 2.01. The book is correct for OLE 2.0. For more information, see the section "Compiler Errors on IViewObject::Draw()" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 368: The call to pIViewObject->Draw about should read: "pIViewObject->Draw(dwAspect, -1, NULL, NULL, 0, hdcDraw, lprcBounds, NULL, NULL, 0);". In the book, the dwAspect and hDC parameters are incorrect. Page 399: When CImpIDataObject::GetData calls AddRef() before returning, it should also call AddRef on any IStorage or IStream pointer inside the STGMEDIUM, if that is the medium in use. For more information, see the section "Datatran Reference Counting Problem" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 437: The word "consumer" in the caption of Figure 8-6 should be "target." Pages 544- In OLE 2.01 there is a new, additional parameter to 546: OleUIAddVerbMenu called "idVerbMax", which comes immediately after "idVerbMin." This parameter was not present in OLE 2.0. For information on how this change affects the sample code, see the section "Compiler Errors on OleUIAddVerbMenu" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 554: Under OLE 2.01 the OleStdGetObjectDescriptorFromOleObject function (used in the Patron sample application) requires an additional LPSIZEL as the last parameter. For more information on how this change affects the sample code, see the section "Compiler Errors on OleStdGetObjectDescriptorFromOleObject()" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Pages 614- No ellipsis ("...") is necessary to separate functions in 622: Listing 10-5. There is no code omitted from the listing in these places. Page 630: The right curly brace just above the "else" at the bottom of the page should be indented to align with the call to ModifyMenu above it. Pages 663- The bottom of page 663 mentions how a handler should hold 665: onto open streams for low-memory save situations. This is important ONLY for elements that are entirely manipulated by the handler and never touched by the server. The handler should not cache or hold pointers to the same elements the server must access. For more information on this problem, see the section "Component Cosmo Fails to Release Polyline Object" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." If a handler manipulates and changes data unaffected by the server, it must fulfill the IPersistStorage contract for only those formats. The server is responsible for all others that it modifies. Page 668: The "const LPRECTL" parameter to IViewObject::Draw should be of type "LPCRECTL" to match OLE 2.01. The book is correct for OLE 2.0. For more information on how this change affects the sample code, see the section "Compiler Errors on IViewObject::Draw()" of the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 687: There should not be "//" before the large bold "IOLEOBJ.CPP" in this code listing. The label is not part of the code. Page 788: Same problem with OleStdGetObjectDescriptorFromOleObject as described above for page 554. Page 814: Same problem with OleUIAddVerbMenu as described above for pages 544-546. Page 817: Remove the second parameter to pTenantCur->Close. It should read "pTenantCur->Close(FALSE);". For more information on this problem, see the section "Patron GP Faults During Activate As" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 817: There should be a call to pIStorage->Commit(STGC_ONLYIFCURRENT) immediately after the call to OleStdDoConvert and before the call to pIStorage->Release. For more information, see the section "Patron Convert To Fails" of the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 819: Remove the second parameter to pTenantCur->Close. It should read "pTenantCur->Close(FALSE);". This matches the change necessary for a bug resolution described in the section "Patron GP Faults During Activate As" in the Knowledge Base article "SAMPLE: Corrections for Inside OLE 2 Sample Code." Page 846: The parenthetical entry in the fourth line of the last paragraph should read "(linked objects are NOT allowed...)". The book reads "now" instead of "not". Page 861: The second sentence of the third paragraph under "Active vs. UI Active and Inside-Out Objects" should read: "The answer...as they are visible-end users DO NOT have to double-click..." The DO NOT is important.
NOTE: Versions of Inside OLE 2 that are printed after March 1994 (which is the third printing or later) have been corrected.
Additional query words: 2.01 mspress docerr
Keywords: kbbug kbdocfix kbdocerr KB113188