Microsoft KB Archive/105520

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 09:01, 20 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ACC1x: GP Fault with PostMessage() to an ADK Application

Q105520



The information in this article applies to:


  • Microsoft Access Distribution Kit, version 1.1





SYMPTOMS

If you attempt to close a Microsoft Access Distribution Kit application by sending a WM_CLOSE message from another application using the PostMessage() Windows API function call, a general protection (GP) fault will occur.

The sample code


   x = PostMessage(hWnd, WM_CLOSE, 0, 0) 


will result in a GP fault when run in languages such as Microsoft Visual Basic, Microsoft Windows C, or Access Basic.



RESOLUTION

Use the WM_DESTROY window message instead of the WM_CLOSE message to close a run-time application. The following sample code demonstrates how to use the WM_DESTROY message:


   x = PostMessage(hWnd, WM_DESTROY, 0, 0) 



STATUS

Microsoft has confirmed this to be a problem in the Microsoft Access Distribution Kit version 1.1. This problem no longer occurs in the Microsoft Access Developer's Toolkit version 2.0.



REFERENCES

Microsoft Windows version 3.1 "Programmer's Reference," Volume 2

Additional query words: GPF ADK

Keywords : kberrmsg kbprg
Issue type : kbbug
Technology :


Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.