George Waters's Q&A profile
Architecture Architecture for Notification based application
I need to develop a notification based system in .Net. Basically as and when certain data gets updated, the client machine is informed about it. There would be a windows based application running across all these clients. One way I was thinking of was to have the clients poll the server for any updates at frequent intervals. Whenever the Server does an update it would post the update into a queue. Every client would poll the queue for any updates. Would like to know if this approach is alrite or suggest an alternative architecture. Thanks Sai I agree with the "ToadKillerDog" person. Consider Notification service in both version of SQL Server and consider UDP instead of TCP/IP protocol to reduc ...Show All
.NET Development TCP Socket.EndReceive
Hi.. Im sending images from a client to a sever every n millesecond.. the images hardly exceed 4k.. most of the time its 2.5k .. this is the method i use to send the images,, private void timer_snap_Tick(object sender, EventArgs e) { try { MemoryStream ms = new MemoryStream(); pictureBox_snapshot.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) ; bpic = ms.ToArray(); m_VideoSocket.SendBufferSize = bpic.Length; m_VideoSocket.Send(bpic); ms.Close(); ms.Dispose(); bpic = null; } catch (Exception ex) { MessageBox.Show(ex.Message); } } now i receive it on the server using asyncronous tcp connection.. and here is the method.. public void OnVideoReceived(IAsy ...Show All
Visual C++ any comments about a cache design?
Hello everyone, I am going to design a Cache in C/C++ (memory cache). I have two different approaches to design/implement it, any comments will be appreciated. Design 1, using a map (hashtable) to store key --> object pointer relationship (simple and straight forward); Design 2, store real object or object pointer in a stack/linked list/queue/array as an internal storage data structure, then using a map (hashtable) as an external interface to mapping key --> index in the stack/linked list/queue/array; (in this design, when accessing an object, we need two times mapping, first mapping key to index in the stack/linked list/queue/array, then using the index to access the real object) I am wondering any advantages or disadvantages of th ...Show All
.NET Development .Net 2.0 threading: calls to Join(), after calling stop(), nerver return.
Hi, I have recently converted our .net 1.1 project to .Net 2.0. One big issue that I am running into, and still don't have a clue of, is the our code for terminating a thread is no longer work. We have code that starts a thread and then kills it later. When killing it, we just call stop() then join() and it worked fine under .net1.1. But now it is not, after converting to .net 2.0. The join() never return. The app is just hang. Currently, I am just skip the join() and just call stop(). I know this is not safe but I don't have an option. What should I do to make it right Thanks. Feng Unless I am missing I don't think there is any standard Stop() function Is that your own function Make sure whil ...Show All
Visual Studio Tools for Office Rpresenting ranges as nmbers
Hi, Is there anyway I can represent a range (A1, E1) as something like (11,41) Can I replace "A" and "E" part with some integer Actually I am populating the excel sheet dynamically and I cant tell how many columns or row I am going to have at design time. So to create named ranges I have to rely on number of columns and rows I have in my datatable using MyDataTable.Columns.Count and MyDataTable.Rows.Count. Thanks, Here's the VBA Help for Offset. It really is best to just open the Excel app, Alt+F11 and read up on the basic in the Excel VBA Help: Returns a Range object that represents a range that’s offset from the specified range. Read-only. expression .Offs ...Show All
Windows Forms Minimize Form Together with Parent Form
I have made use of the MDI, I realized that the children forms called from the parent form is minimized together with main form and however when i call a new form from a children form, a design problem which this new form can't be minimized together with main may appear How to make their minimize and maximize properties to be consistent Thank you. I have tried the following code but it still doesn't work properly, may i know why Thank you. Dim DisplayForm As New emp_pro_f DisplayForm.Show(Me.MdiParent) Me.Close() ...Show All
SQL Server Move SQL server to SQL server 2005 Express
I'm new in Express Edition. We use SQL 2000 on our SBS2003. For disaster recovery I installed SQL Express on a laptop. How can I move database and application from SQL 2000 to Eexpress edition Many thanks Peter Glenn. Did you mean use SQL server 2000 backup utility to backup all Dbs then setup Express Edition, then use its recovery to restore Dbs One of my friend suggested just copy all .MDF and .LDF files, then use SQL server Management Studio Express to link them. We don't use Sharepoint database. Thank you for your attention. Welcome your further advise. Peter ...Show All
.NET Development Using multiple SqlConnection objects, bad for performance?
Hello, I am planning to use three databases on the local SQL Server. DB1 will be for App1, DB2 for App2, and DB3 will hold tables, that both, App1 and App2 need to access. With applications I mean ASP.NET applications. Obviously, I need in App1 and App2 at least two SqlConnection and SqlCommand objects, one that access their respective databases, and one that will access DB3. Will this result in a worse performance (The using of two SqlConnection objects in one aspx page as example, and switching them) Should I for better performance get rid of DB3 and add the tables there to DB1 and DB2 (Thus multiplying data, but, if the performance will be much better, it will be fine with me) I would be thankful for any advices. ...Show All
Software Development for Windows Vista Video Samples
Hi people, I need to create a window with some botons in the top and the video in the center of the window how can i add this botons into the window that is created at the moment that i make a call of the pControl->Run(); method, thanks by your help ... Create your own window. If you were using .NET, I would say create a Form with a Panel on it. You can use the handle for the panel as the value you pass to IVideoWindow::put_Owner(). I'm sure there's a way to do something similar with MFC or whatever you are using now. ...Show All
Software Development for Windows Vista How to inject DLL in all processes?
In Vista, is it possible for a Service to inject a dll in all processes (including those which are running in Admin context) I want to do this without showing the consent prompt. Help! Hello Navin C, Services in Vista are isolated from user processes and do not have direct access to them, utilizing a service would be the only way to communicate with Admin context processes without being prompted by UAC for elevation rights. However as I stated, you can not communicate directly with processes outside of session 0. By elevating your application to an administrative level you must pass through the UAC elevation prompt, there is no way arround this except for disabling UAC which is NOT recomended by Micro ...Show All
Visual C++ Problem with WinINET HTTPS Post
Hi, I have a problem with simulation of HTTPS post using WinINET. I use the following code to post data: instance->m_hInternet = InternetOpen( agent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0); instance->m_hSession = InternetConnect( instance->m_hInternet, server, INTERNET_DEFAULT_HTTPS_PORT, L"", L"", INTERNET_SERVICE_HTTP, 0, 0); DWORD secureFlags = INTERNET_FLAG_RELOAD | INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLA ...Show All
Visual Basic wrapper problem
hi, i'm working on a wrapper for vb.net 2005 and the problem is i couldn't add in my vb6 references. it prompts "couldn't add reference to the specified file" every time i attempt to add it. any ideas on this i also tried a regasm even though the examples at the vb fusion article didn't specify, only on system.dll, it didn't solve the issue. dave. adding reference to the tbl worked thanks! to spotty: i made the class library with vb 2005 and i was referencing it with vb6. ...Show All
SQL Server Oracle connection fail with Microsoft OLEDB provider for Oracle MSDAORA.1
Hello, On my dev server I have working ssis packages that use connections Microsoft OLEDB provider for Oracle MSDAORA.1 and Oracle provider for oledb and OracleClient data provider. I use one or the other according to my needs. In anticipation and to prepare for the build of a new production server, I have build a test server from scratch and deployed to it the entire dev. Almost everything works except Microsoft OLEDB provider for Oracle. ssis packages on the test machine will return an error Error at Pull Calendar from One [OLE DB Source [1]]: The AcquireConnection method call to the connection manager "one.oledb" failed with error code 0xC0202009. Error at Pull Calendar from One [DTS.Pipeline]: component ...Show All
Windows Forms MTAThread and AutoComplete
I need to use the WaitHandle.WaitAll and TextBox.AutoCompleteMode. The problem is that the first requires MTA and the latter STA . Is there any way around this rich Hi Rich, Based on my knowledge, to invoke a method on UI Control on the main thread from another thread, we recommend you use the Control.Invoke which is implemented by SendMessage. Due to the Winform is not thread safe, we do not recommend you put it into MTA thread. Also .NET do have more payload than Win32, because if the .NET code underlyingly call the unmanaged code, it need P/invoke or COM interop marshalling(if .NET code call an unmanaged COM, we also need marshaller). Also for .NET code to run, the .NET runtime need to JIT the MSIL to nat ...Show All
Software Development for Windows Vista Copy File to System32\Drivers
Hello, I encountered a problem that my program cannot CopyFile to C:\\Windows\\System32\\Drivers even though my property is Administrator, what I got by using GetLastError is Access Deny. But I really need to copy some files to that place, is there any other way I can do this Thanks! "elevated" generally means "as administrator". Start here to learn more about User Account Control: http://www.microsoft.com/technet/windowsvista/security/uac.mspx ...Show All
