Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » UltraLite - C and C++ Programming » Developing UltraLite Applications for Windows CE » Synchronization on Windows CE » Adding ActiveSync synchronization to your application

Adding ActiveSync synchronization to your application Next Page

Adding ActiveSync synchronization (Windows API)

If you are programming directly to the Windows API, you must handle the message from the MobiLink provider in your application's WindowProc function, using the ULIsSynchronizeMessage function to determine if it has received the message.

Here is an example of how to handle the message:

         UINT uMsg,
         WPARAM wParam,
         LPARAM lParam )
  if( ULIsSynchronizeMessage( uMsg ) ) {
    if( wParam == 1 ) DestroyWindow( hWnd );
    return 0;
  switch( uMsg ) {
  // code to handle other windows messages
    return DefWindowProc( hwnd, uMsg, wParam, lParam );
  return 0;

where DoSync is the function that actually calls ULSynchronize.

See ULIsSynchronizeMessage function.