Click here to Skip to main content
15,884,298 members
Everything / Synchronize

Synchronize

synchronize

Great Reads

by honey the codewitch
Take control of which thread your code gets executed on, and how it does
by jerpat
How to get (almost) all your code in one place when using WCF together with Silverlight
by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
by Parallel Patterns
Introducing Memory Model in the context of .NET platform

Latest Articles

by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
by honey the codewitch
Take a page from .NET and enjoy an easy way to safely pass information between threads on an ESP32
by honey the codewitch
Take control of which thread your code gets executed on, and how it does
by Michael Chourdakis
A mutex with shared/exclusive access with upgrade/downgrade capability

All Articles

Sort by Score

Synchronize 

28 Jul 2020 by honey the codewitch
Take control of which thread your code gets executed on, and how it does
26 Mar 2013 by Andreas Gieriet
Change your code as follows:1) Give the Mutex the name @"Global\MyMutex".2) Call Dispose() on w after (or instead of) Close().Do the same for your other process.[EDIT]I would simplify the code as follows:public class Log{ public static Mutex m_Mutex = new Mutex( false,...
5 Jan 2011 by jerpat
How to get (almost) all your code in one place when using WCF together with Silverlight
17 Apr 2012 by Aescleal
How about sending the data as part of the message you post to the UI? Especially as it's only one word of information:LRESULT CContactFault::OnDeviceShortAddress(WPARAM, LPARAM lparam){ UINT data = reinterpret_cast(lparam); CsLoader = _T("%d"); CsTmp.Format(CsLoader,...
27 Feb 2021 by honey the codewitch
Using a popular RTOS to enable easy multithreading on your IoT gadgets
17 Apr 2012 by Jochen Arndt
In your case you are only passing an UINT value. So just pass it using the WPARAM or LPARAM parameter.When implementing a GetData() function, you should use locking inside that function and at all places where the data is written by the thread. An example:class CMyThreadClass{ ...
22 Dec 2010 by E.F. Nijboer
A dll used is normally "in-process" and therefore you could use critical sections. This would not apply if it would be a COM server dll that you use. In that case it would be "out-of-process" and you should use a mutex instead.Good luck!
22 Dec 2010 by Dylan Morley
Pretty sure the DLL is loaded into the application process and all threads are created within that Download Process Explorer http://technet.microsoft.com/en-us/sysinternals/bb896653[^] and you can browse the threads your process has created (invaluable tool if you don't have it...
2 May 2011 by Parallel Patterns
Introducing Memory Model in the context of .NET platform
27 Mar 2013 by tzych
See approved solution below - because the file is being accessed from two different user spaces, the Mutex needs to be declared as Global. Thanks to Andreas for the solution!=========================OK, I have a log file that can be written to by multiple processes. I'm trying to protect...
27 Jan 2011 by Abhinav S
SIlverlight does not support synchronous calls.Make use of the Action delegate to come back to your main code once the service returns.
27 Jan 2011 by #realJSOP
I wrote an article about how I handle the asynchronous nature of Silverlight:How I Optimized my Silverlight Asynchronous Web Service Consumption[^]
27 Jan 2011 by Espen Harlinn
One option, that might be possible, is to use:IAsyncResult.AsyncWaitHandle[^] - the asynch web/wcf request methods returns an IAsyncResult.It's possible that this can be used to create a synchronized wrapper for the service reference. I haven't tried doing things this way in SilverLight,...
4 Jun 2011 by lovsea
I want to implement a player for synchronizing two videos on different pc.Unluckily,I met some problems to prevent me to do it. As follows:(1).The player dropped samples when it played a avi file with vmr9. I tested different video renders ,such as haali,vmr7,vmr9... And the results is...
10 Nov 2011 by member60
refer:[^]http://www.dijksterhuis.org/creating-and-synchronizing-threads-with-c/[^]
16 Feb 2012 by krumia
I don't think you can bear the burden of comparing whole databases.What you can do is..1. implement a publisher-subscriber architecture.2. main server adds messages to a message queue when a database change happens.3. desktop applications subscribe to the main server and get messages...
20 Feb 2012 by Abhineet Ayan Verma
I have done my part of Research and Search and found out that there is nothing to get the exact count of Semaphores. It is designed like this only and no API is released to know the exact number of threads waiting and executing and released cause of Race Condition.
24 Apr 2012 by Sergey Alexandrovich Kryukov
Of course you can invoke a method on the other thread, more exactly, a delegate instance, but…Your "stop what you're doing now, run this code, and than return to do your work" sounds like thread preemption. Do you mean, t1 should be agnostic to the code to be executed when it is to be...
4 Aug 2012 by Christian Graus
If you want it to appear as a normal folder, then yes, it's a shell extension.
15 Feb 2013 by essence
ConcurrentDictionary's methods can call your value factory more than once.When is this a problem? How can it be overcome?
31 May 2013 by Jiří Miklík
Using one socket for many threads isn't best idea.My suggestion:Each client thread opens own connection, server thread is listening.With this solution you can find the end of client thread with error (socket dies).And you cannot distribute opened socket to client threads at start time.JiMi
14 Sep 2013 by Richard MacCutchan
You seem to have two different issues here. In the first you are sending mail from ASP.NET, which you seem to have working. In the second you are trying to create a mail client application. Your mail client will need to implement SMTP as described in RFC 5321[^], for sending mail.[edit]For...
1 Oct 2013 by bbirajdar
You should better start researching on your own and then come back with specific questions, code snippets and error messages if any.Start from this link Read Gmail in C#[^]
10 Dec 2013 by Bojjaiah
Hi all,I am trying to synchronize the two databases programmatically. So I have downloaded from msdn[^] and install my system to add the references of below dlls.Microsoft.Synchronization.dll Microsoft.Synchronization.Data.dll Microsoft.Synchronization.Data.SqlServer.dllWhen I...
29 Jan 2014 by Tadit Dash (ତଡିତ୍ କୁମାର ଦାଶ)
I do a research and following is what I have found.Microsoft Sync FrameworkBuilding online/offline synchronization capabilities with the Microsoft Sync Framework[^]HTML 5Offline Web applications[^]Build an HTML5 Offline Application with Application Cache, Web Storage and ASP.NET...
17 Feb 2014 by Pete O'Hanlon
Marhalling tends to be the term used to describe the process of transforming data so that it can either be stored (i.e., marshalling data), or moved. So, when you hear about an event being marshalled, what this means (in effect) is transforming the event so that it can be moved over threads - in...
17 Feb 2014 by mehdijafary
Serialization is the process of converting a data structure or object into a sequence of bits so that it can be stored in a file, a memory buffer, or transmitted across a network connection to be used later in the same or another computer environment. And this sequence of bits can be of any...
15 Sep 2014 by Suvabrata Roy
Yes it needs lock,How a data write to a stream :Stream is a pointer which holds some memory now when we write data to file stream data would first store into buffer and then flush to your memory now in between that if two or more threads are working simultaneously then buffer may be...
28 Mar 2015 by Sergey Alexandrovich Kryukov
Copying project files and being annoyed with that is more or less obvious indication of one more disturbing fact: you are not using any Revision Control system. If you don't you don't really do software development: you code asserts don't really belong to you, but to any random sleep of a hand...
6 May 2019 by OriginalGriff
Talk to the authors: if you go to your link page, you will find a line: Support questions: Stack Overflow[^] Follow the link, and ask them.
12 Dec 2010 by linkman_xbp
Hello there,I read a lot of information of this, but nothing works to me.I tried JCraft (Webdav + FTPS), it works perfectly, but it's impossible to exclude definitively file or folder of sync.So I tried "SmartSync" (part of Aptana plugin), it is possible to ignore files of...
25 Jan 2011 by khuong_vnt
Hi everyone,Example, I have a Silverlight Application here:Public data as String = "abc"Private Sub From_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded Me.InitControl() Me.Label1.Text = dataEnd SubPrivate Sub InitControl() ...
27 Jan 2011 by lmoelleb
Silverlight only supports async calls. You have to deal with it.A userinterface is typically databound (on top of a ViewModel), so when you set the data in the Model, the ViewModel will detect the changes, and raise it's own property changed notification that will update the view.You...
3 Mar 2011 by Ron zigelman
Scalable state synchronization using P2P - Part 2 - Running the test application
11 Apr 2011 by Nikolay Unguzov
Hi,I want to replicate Appointments between Outlook and my custom application. Can you point me to some pattern or algorithm for merge (2-way) replication? Now I have a working Push replication, but I need help for 2-way and especially dealing with deleted items.Thanks!
5 Jun 2011 by Christian Graus
It's going to be impossible, by the time you tell the other computer where your video is, it will have moved on, itself. Your best bet IMO is to synch the start of the video, then play the videos in programs which both regularly make sure that the position of the video is in line with how much...
17 Aug 2011 by satboy.110813
Hi, I am creating a web application, in which a form update the XML file. I am getting an error if a user wants to write XML which is all ready writing by another user. How to synchronous this request one by one.I used Semaphore and Lock, but either of them not working.I used...
17 Aug 2011 by #realJSOP
You could simply not make a file available until it can be opened. Force the user to click a button to see a list of available files, and refresh that list when they do.
5 Sep 2011 by Claudio Bertsch
I have a Windows Forms application.The database is a MSSQL Express.The offline cache should be no SQL Compact.My question:Is it possible to use locally and on a SQL Server Express, to syncronize this automatically.My application requires DocumentID's and CustomerID's. These must be...
5 Sep 2011 by Pradeep Shukla
No..there is no automatic way of handling it. If you do not want to use compact db, you can use Dictionary object or a Hashtable to store this data locally but it can not get updated on it's own. You need to re-start the application to load the fresh data.I believe you do not have much...
6 Sep 2011 by Claudio Bertsch
Hello,Thank you for your quick response.I've done it now I can sync to a SyncOrchestrator the main database and the locale.However, there are still some open questions.How do I initiate a sync from only one record? I create a new article and want to save it now. If I start a...
9 Oct 2011 by Medo-I
Hello allI have created a application in my WindowsCE device by C#, and this application saves data in the WindowsCE device.Now i want do synchronization between WindowsCE device and PC, when i connect the device to the PC by USB cable this application should transfer the data from...
10 Oct 2011 by Sergey Alexandrovich Kryukov
There can be a number of solutions, In particular, with Windows CE v.5.0 or later, you can use the "USB Mass Storage Function Driver" to expose its local storage device to be shared via USB.See http://msdn.microsoft.com/en-us/library/ms905330.aspx[^].—SA
11 Oct 2011 by MrDeej
Hello people!I have trouble with our newly configured application. This application is connected to a SQL server 2005, and runs custom C# code. I have written it to use datasets and bound object at the user end, and Microsoft sync framework with bidirectional sync to the server.My...
11 Oct 2011 by André Kraak
For trigger removal see DROP TRIGGER[^].
10 Nov 2011 by johannesnestler
I think you can not expect someone to write your software. Ask more specific questions. Where are your problems, what kind of software is this? You need help on architecture or code?A good common advice is: approach your project step by step. First think about the platform/architecture of...
10 Nov 2011 by bhagyap
Hi.. i am working with one of the desktop application and synchronization is part of it(i want synchronize done within intranet using web services)..I tried doing it with Microsoft Sync Framework but wasn't possible,so can anyone let me know how can i achieve this??Thank You in advance...
17 Dec 2011 by reza toorani
Hi I am developing a Sales Application. I want install standalone application on each client.A Client must sync data with server in Scheduled time. Now I’am searching for some solutions for doing this.I’m thinking of using local database (.sdf) and sync local database by Local Database...
18 Dec 2011 by Wendelius
Have a look at these, perhaps this approach is possible for you:- Introduction to Sync Framework Database Synchronization[^]- Sync Services for SQL Server Compact Edition 3.5 in Visual Studio 2008[^]
8 Feb 2012 by Foulques NERA
I'm writing a simple service for synchronizing date&time between PC's.How to change PC date-time (local or global) with visual dotnet c++ API ?I think I need to require privilege to do it too.Best regards.
8 Feb 2012 by Jochen Arndt
See SetDateTime method of the Win32_OperatingSystem Class [^] [UPDATE] and ::SetSystemTime().
16 Feb 2012 by ashok_rgm
Hi All,As per my requirement in my complete system it consists of both desktop and web application. Desktop application(OCASIONALLY CONNECTED APPLICATION) will be accessing the data from local database and will be in sync with central database hosted on server. Desktop...
18 Feb 2012 by Abhineet Ayan Verma
How to set event in case of calling CreateSemaphore ? I mean what I should use to avoid Main from exiting before my threads if I am implying CreateSemaphore in the Main itself??? I am using QueueUserWorkItem with Semaphore. Anybody please.
18 Feb 2012 by Albert Holguin
If you need to prevent main from exiting before your worker threads, then a semaphore really has nothing to do with that. You have to wait for your threads to finish. Do this by using the WaitForMultipleObjects() call with your thread...
20 Feb 2012 by Abhineet Ayan Verma
Is there any way or API to get the count of Semaphore? The purpose is to SetEvent if the Semaphore Count is equal to the MaximumCount and no more threads are there to execute.
20 Feb 2012 by E.F. Nijboer
Check out NtQuerySemaphore. Some extra info can be found here: http://stackoverflow.com/questions/2579536/semaphores-values[^]Good luck!
20 Feb 2012 by bjorn_ht
If you just want to check if a semaphore wait would block, then just call the wait function with timeout 0://! waitForSemaphore sets this event before a potential blocking attempt//! to aquire the semaphore.extern HANDLE warnEventHandle;//! The semaphore.extern HANDLE...
26 Mar 2012 by IviKAZAZI
Hello everybody,I am developing a desktop application to synchronize sql server 2008 database with the database of a connected windows mobile device.(.sdf sqlce database).I am a newbie in c# and i dont know how to do it,any help,or sample code will be appreciated!Thanx in advance !!
3 Apr 2012 by saxgod
I am developing a WPF application that uses an SQL Express database and runs on the clients PC (as well as the database). This application will be used by multiple clients but every client's database will contain unique records. The database contains textual data as well as image blobs, thus its...
3 Apr 2012 by AmitGajjar
Hi,i am bit confuse, if you would like to sync all the client database then why you want separate databases on server for each client ?Actually Sync framework will synchronize your specified databases at specified interval time. it can be set as downloadable/uploadable or both.If you...
17 Apr 2012 by dsandru1
I am trying to figure out how to access variables in my workerthread while it is doing work. What I have so far:Workerthread has updated the data.Postmessage to the UI.UI calls GetData from worker thread.//Message Routine from Post Message in UILRESULT...
17 Apr 2012 by Chuck O'Toole
I'm confused by your original problem. You say your results are "inconsistent" but are unclear as to either what that means or how you've decided they are "inconsistent".As for locking, since you are dealing with a single value, UINT, and not a structure with multiple variables, there's no...
24 Apr 2012 by amramaz
I have two threads : t1 and t2.t1 is the main thread, and it has created the t2 thread.After creating t2, t1 continue doing some work. on t2, there is at some point a code that I want to be executed on the t1 thread, while t2 continue to the rest of his code. is there a way that t2 can tell...
27 May 2012 by lilyNaz
Hello,I have written a driver and I need my driver to call a function in a user mode program(which can be done using DEVICEIOCONTROL), then my driver have to wait for the user program to respond. I need a sample code which does so.Thanks
27 May 2012 by User 59241
You should perhaps read the series of which this article is part:Driver Development Part 2: Introduction to Implementing IOCTLs[^]
4 Jul 2012 by vandananarula
I need to sync the SQL Server Database with that of Compact Server DB.Please help me as i don't know how to proceed.I am using Smart Device Application in VS 2008 for windows mobile app development
4 Aug 2012 by Cool Smith
i need to map remote repository as a local folder for example remote ftp folder to local folder in my system just like google drive, so that when i delete a file locally, it gets deleted remotely and when i add files locally to the folder, it gets uploaded to the remote repository. i...
28 Aug 2012 by SREEKAN2
In my application i am using wcf sync service to sync my local database in windows mobile with server. when i am using my localhost where both client and server are in same computer it works fine, now i hosted my wcf on server, now when i am trying to sync the databses it is giving me Target...
28 Aug 2012 by fjdiewornncalwe
One of two things has gone wrong.1) Your service reference is still pointing at a non-existent version of the service on your local machine. - In this case check the properties in your service reference or connection depending on how you are calling the service and make sure that the path...
7 Sep 2012 by SREEKAN2
I am doing an application in which I have some Windows Mobile devices which will synchronize with main database (Server) once a day using WCF Sync. For most of the tables in the client, the data is coming from the server, and later on only updates on those rows will be synchronized with the...
14 Oct 2012 by Kirolos Costa
I need to synchronize online XML file which given to me from another website with my access databasewhat I exactly need is to make this sync offline which means that when my website user open the page he will find the last data from xml fileI tried to fix it by deleting all the table data...
14 Oct 2012 by I.explore.code
I would recommend writing a Windows service that will run at scheduled intervals as decided by you and download the latest XML files from the external website to your server and save the data in those XML files to your database.This will help you save precious user time because you can...
4 Nov 2012 by vivekbtech
Hi,I am using the (same database) in both Central and Local system since the application has to be available both in connected and in disconnected environment.My problem is to occasionally sync the database when the client system is connected to the server.I came across Microsoft sync but...
6 Nov 2012 by Sergey Alexandrovich Kryukov
Of course this is possible, but you should understand that the Web is pure client-server, so it won't give you any notification unless you program the deployment process this way, only if you can access the programming of this process. That said, if you want to download newer versions from the...
24 Dec 2012 by golrokh_ka
hi,my application has two parts, a version uses in central company and a version uses in another companyevery day all subcompanies should send their data for main company,and they can have reports all of them,also i have basic data tables i need the best way for replication , i have some...
24 Dec 2012 by Zoltán Zörgő
First of all, it could depend on the DBMS. You have not specified what you are using.You wrote, that data will be uploaded from branch office to the main office. So let's suppose there is no data sent back to the branches. And even less you don't need to sync data between branch offices....
7 Feb 2013 by kunal jangade
The issue is I have my database at my machine, the application is developed and given to the users. The user uses the application daily updating, inserting and deleting data, what I want is that I get all the data in my database, the users are located at remote place. As the size of database...
11 Feb 2013 by balu12345
Hi All experts, I am a bit new to WCF. I had explicit requirement to prepare a wcf application with below requiements,1. Need to prepare synchronous WCF service hosted in IIS2. Client will consume synchronous WCF service.3. request & response might take long time, as other...
11 Feb 2013 by P_Dash
Yeah, requirements like this comes in case of Services which depend on multiple resources.I'd suggest you the following points, implementing which you could achieve your desired result:1-In ServiceContract use the following SessionMode attribute: ...
13 Feb 2013 by essence
Make your synchronizion easier by using Read/Write extensions.
17 Feb 2013 by Joan M
Hello all,My father in law has just bought a Samsung Galaxy S3 phone.He had an S2 before and was completely happy with it.Witht his old phone he was able to synchronize notes with outlook (without exchange) and now with the new phone it seems it is not possible.Do you know if it...
22 Feb 2013 by Christian Amado
The same question was answer here: StackOverflow Forum[^].Regards.
3 Apr 2013 by Ariana Bond
Hi,I am trying to develop an application to synchronize two directories of the two live domains hosted over different servers but i am not getting the logic to implement.I have tried it to do with tcp client server on localhost using different applications on different ports, but its not...
4 Apr 2013 by CodeHawkz
Hi there,You need to look into 'FTP'.The conventional web we browse is based on 'HTTP' is designed for viewing text, images, etc. but not for file transfer. 'FTP' is designed this in mind and if you can access your server using FTP you should be able to do most of the operations that you...
8 Apr 2013 by kunal jangade
I want to retrieve data from 4 Tables to show balance of items for every date. My tables structure are as:TABLE: Resource_MasterResourceCode primary key, ResourceName, UnitCode, TenderCode, ResourceRate, Status, Dt, Resource_H_CodeTABLE: UnitMasterUnitCode primary...
7 Apr 2013 by Johirul Islam Tarun
You can Group the sum of In,out by Date wise and item Wiseplz see this :Select ItemCode,ItemName,TransactionDate, Sum(In) as INQty, Sum(Out) as OutQty, Sum(In)-Sum(Out) as Balance from StockTable Group by ItemCode,ItemName,TransactionDate
6 May 2013 by jaiswal.richa
Hello Everyone,can anyone tell me that In Sync Framework, when i make changes on the form , Why does the local database not get update. the changes got saved on the server when i am connected to the server. but when i got disconnected with the SQL Server, and make any change there, i expect...
25 Jun 2013 by Member 9996541
Hi I want to synchronize our Java desktop application to Iphone Photos and files or access files and photos of iphone.Is there Any way to do this? I have searched a lot but could find solution Please give some idea or Suggestion to this.Thanks
19 Jul 2013 by Ganesh Satpute
Hello, I am total newbie to android application development.I want to develop an Android application which will sync the particular folder on Android device and PC over WiFi. This app should automatically search for WiFi router. Where should I start? I found some articles which...
24 Jul 2013 by Member 9871748
I have created Application for Windows Mobile application 6 and used mobile sql database.Now I want to sync the data in mobile db to backend database(MS SQL).So please tell me how to sync the data in mobile db to backend using Microsoft Synchronization Framework
13 Aug 2013 by mamali-1346
hi all.i have a winform and console in c# 2013.i want to pipe them and send&receive data.data means character string.something like chat but so basic and user can't control this process.this process must be synchronized.they should be able to send and receive data at the same...
13 Aug 2013 by Sergey Alexandrovich Kryukov
Use two instances of a named pipe: one for one direction, another for another.Now, why "sync"? A pipe is a thread synchronization primitive by yourself. Don't even try to use others (unless you share data beyond the pipes between the threads in the same application). You just unconditionally...
1 Sep 2013 by Saurabh.abhyankar
Hi there , I have set up a Merge replication on the SQL server 2008 R2 . Which exchanges all rows that have changed between the Publisher and Subscriber since the last time synchronization occurred.here is one scenario i want to ask you guys about. What happens when the Publisher and...
18 Sep 2013 by Anoop Brijmohun
Hi all,I am currently developing a solution for a chain store.the backend data storage is SQL Server 2012(main server) & SQL 2012 express(store).which is the best method to transfer data between the servers?taking into consideration the connection can drop in the middle of the bulk...
20 Sep 2013 by alimohammad2011
Greeting for the day !!Dear friends I am stuck on a solution i need to provide to my clients. Describing the requirement in detail so please don't mind the length of this post.I am supposed to develop an offline model for my asp.net (4.5) web application along with SQL server as db on...
15 Feb 2017 by CodeGlitch
Hello All!I need to create a client that will sync some of the users local folders to a remote server but i can't use dropbox or any other client already created, i need to make my own to implement features according to my company needs.What are your opinions about what should i use? I have...
25 Sep 2013 by pasztorpisti
I always used rsync over ssh for this purpose. It's a linux toolset but you can install for example cygwin on windows and then you have the very same tools.An advantage of this is that you can easily connect unix/mac/windows machines with this tool. ssh is widely used and trusted secure...
29 Sep 2013 by GauravThorat
Hi Friends,I wanted to Synchronize sage 50 with C#.NET based Windows Application which should having facility to updated Stocks, and other Information, all information should be transferred using Excel files.So what should i consider while working/starting with this.Thanks All..
30 May 2013 by ayesha hassan
I have developed a single server/multiple client TCP Application.The client consists of x number of threads each thread doing processing on its own data and then sending the data over TCP socket to the Server for displaying.The Server is basically a GUI having a window. Server receves...