The information in this article applies to:
SYMPTOMSWhen running your Visual Basic application, you may encounter an error similar to the following: This error may occur immediately following a declared API function call within a Visual Basic callback function. CAUSE
When the error occurs, the callback function is called by a thread that was not created by Visual Basic.
MORE INFORMATIONThese API functions use a Free threading model, but Visual Basic only supports Apartment-model threading. Furthermore, additional care must be taken with regards to what code can be executed within the callback function. Any use of the following within the callback function may cause undesirable results:
REFERENCES
For more information on using threads in Visual Basic, please see the following:
Visual Basic Books Online, "Apartment-Model Threading in Visual Basic" http://www.desaware.comFor additional information, please see the following articles in the Microsoft Knowledge Base: Q189133 Make C DLL More Accessible to VB with a Type Library Additional query words:
Keywords : kbAPI kbThread kbVBp kbVBp600 kbGrpVBDB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |