windows

Getting Recv-Q/Send-Q in Windows?

In linux, you can get the following statistics with netstat: Active Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 192.168.1.136.58519 72.47.210.69.80 LAST_ACK tcp4 37 0 192.168.1.136.57059 174.129.27.181.443 CLOSE_WAIT ...

How do I determine the "narrowest" font on Windows?

Hello I am looking for a way to find the font that uses the least average horizontal space per letter, since I have a few buttons in my application that need to show a rather long text in it, and the goal is to make the buttons with the minimal width necessary. Since I already know the environment where the application is going to be ...

how to display entire report by giving values in a textbox using crystal reports in c#

this is my code .This is an application for generating reports in c# using crystal reports private void button3_Click(object sender, EventArgs e) { con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:/Documents and Settings/techsoft/My Documents/Database.accdb;Persist Security Info=False"); con.Ope...

How do I register a proxy/stub for a COM interface defined by a third party?

There's Another Company that ships the product that consumes IAnotherCompanyInterface. We want to ship a COM object that implements IAnotherCompanyInterface. That interface is not Automation-compatible, so the next easiest option to enable marshalling is using a proxy/stub. Another Company doesn't ship the proxy/stub and doesn't want to....

How to neglect this error in windows application using crystal reports

this is a formula that i have used to select records based on string array 'aa ' crystalReportViewer1.SelectionFormula = "({Table3.logindate} = '" + aa[i] + "')" for e.g aa[i]=aa[0],aa[1],aa[2] it will select only the records of aa[2] please give me a valuable solution ...

Reconnecting a disconnected network drive

If I try to write a file to a network drive, that is disconnected, I get an error. If I doubleclick the drive in explorer, the network drive is reconnected. Using System.Io.Driveinfo.IsReady I can check if a drive is ready - but how can I reconnect it in code? ...

PHP Startup: Unable to load dynamic library, Windows, Apache 2.2, php 5.2.11

This is becoming a very frustrating issue. I am trying to do a clean install of apache 2.2 and PHP 5.2.11. Everything seems to be configured correctly but the php modules aren't starting... PHP Warning: PHP Startup: Unable to load dynamic library '.;C:/Program Files (x86)/Apache Software Foundation/Apache2.2/php/ext/php_mcrypt.dll' - T...

Chance of losing a localhost network connection?

Once a Tcp/Ip connection has been established between two applications running on the same computer, using the localhost loop back is there any real possibility of losing that connection? Or is it possible to make the assumption that such a connection loss is as rare as a blue screen event, and treat it in a very exceptional manner. Ass...

ShellExecute + runas with quotes (") in parametees, fails to call the executable/batch

I have tried calling a batch file with elevated permissions. For that I have called fallowing function: (ref - http://msdn.microsoft.com/en-us/library/bb762153%28VS.85%29.aspx) ShellExecute(this->GetSafeHwnd(), L"runas", strExecutable, strParams, 0 , SW_SHOW); The call successfully launches the exexutable, but if I add quotes to my par...

Oracle C++ linux and more weird stuff

So here is the story. I have this device that uses Linux and more open source tools(btw its an ARM). And I was given the task of creating some magic cashier application with it. I have done it and now my boss have made a new request. He wants me to make that stuff(the device) connect to a remote database(preferably Oracle). So thats wha...

How to use Windows Security Descriptor to prevent executing other applications?

Hi, In one of my recent questions about using CreateDesktop() API call to create a new desktop and execute my own application inside and prevent other applications to be executed in my Desktop someone pointed me to use security descriptors! Is someone here who could tell me how to do that? Thanks in advance! ...

How to identify the default audio devices from a .Net application?

Hi community, I'm a bit confused. Is there any simple way to set proper audio devices (in/out) in my VoIP .NET application w/o using of DirectX? "Proper audio devices" probably means - devices which are already set as DEFAULT in Windows. E.g. Skype (or X-Lite) selects in most cases audio devices properly. But How? Just getting of list...

Library getting information from any active windows into screen

Hi all, I am looking for a library to get some information from the active windows. By "information" I mean the absolute/relative position of the window, the size, the list of all the windows. There is a function in GTK+ called get_window_list_toplevels() or get_root_window() but I get only the windows information realized with GTK. I...

Controlling WriteProfileString

Is it possible to specify the application name which is used by CWinApp::WriteProfileString()? If I use CWinApp::SetRegistryKey to set the name of my company to "MyCompany", and I call AfxGetApp()->WriteProfileString in my application called "SomeApp", my string will be stored under the following registry key: HKEY_CURRENT_USER\Software\...

Library for software mixing of sound (wave) streams

I would like to mix several sound (wave) streams into one. Each stream might have a different format (bits/sample, channel count, etc.), so conversion is needed also. I am looking for a library to do this, which I can link into my VS C++ project, before jumping in and implementing my own. ...

"descript.ion" file spec?

There appears to be a somewhat standard "descript.ion" file in Windows programs universe which provides meta data for all/some of the files in a given directory. I know there are various programs which write this file (example: NewsBin, UseNet downloader) and read it (Example: "FAR", a file manager mimicking old Norton Commander). I'm...

Active Scripting on the server side

I am considering writing a NT service. The service will need scripting capabilities. Users can write some VBScript/JScript code and feed the server. I also want the script be able to debug in Microsoft Script Debugger. The service will behave in a similar way as IIS with classic ASP. It gets input from somewhere else. When it get inpu...

How to safely write to a file?

Imagine you have a library for working with some sort of XML file or configuration file. The library reads the whole file into memory and provides methods for editing the content. When you are done manipulating the content you can call a write to save the content back to file. The question is how to do this in a safe way. Overwriting th...

manage.py syncdb on windows for Google App Engine Patch does not work

I have installed Google App Engine patch and I get the following error when I want to sync the DB Command on command prompt on windows manage.py syncdb The Google App Engine SDK could not be found!Visit http://code.google.com/p/app-engine- patch/ for installation instructions. I have installed win32api too and it still recurs. a...

Is there a way to silently or automatically install .NET?

I am selling desktop software written in C# to multiple clients, and having a huge problem: The .NET install. The users of this software are not computer-savvy and usually don't have any version of the .NET framework installed, and many times don't want it. Nearly every single one of my support requests is due to someone not installing...