如果直接针对 Windows API 进行编程,则必须在应用程序的 WindowProc 函数中处理来自 MobiLink 提供程序的消息,使用 ULIsSynchronizeMessage 函数确定应用程序是否已收到消息。
下面是如何处理该消息的一个示例:
LRESULT CALLBACK WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { if( ULIsSynchronizeMessage( uMsg ) ) { DoSync(); if( wParam == 1 ) DestroyWindow( hWnd ); return 0; } switch( uMsg ) { // code to handle other windows messages default: return DefWindowProc( hwnd, uMsg, wParam, lParam ); } return 0; } |
其中 DoSync 是实际调用 ULSynchronize 的方法。
![]() |
使用DocCommentXchange讨论此页。
|
版权 © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |