windows

Why does not the input of a string work?

#include <stdio.h> int main() { char temp[1024]; if(getchar() != 'y') { printf("no options\n"); return 1; } scanf(temp, "%s"); printf("%s", temp); } I get snippet as below. I just want twice input from user. but the first input works, however the second dir...

How can I convert the input of console as nothing like inputed a password

I mean i want the input to be invisible like inputing password when i log in Linux. How can I implement it both in C under linux and windows. thanx ...

How to get the fractional part of the seconds in UTCTime using time.h

I want to get the system time including fractional part of the seconds. Is it possible in standard c (ANSI C)? If not then tell me some libraries for window OS so that I make it possible. In Linux I have the following code with work fine for me. #include <sys/time.h> #inc...

Programmatically Refresh DNS resolution (avoid cache) (c#)

Hi all, Is there a way to programmatically remove an address from windows' dns cache, or to re-resolve it? I'm using c#, but native code would be just fine (however, playing with the registry would not be). I'm writing a little application that measures the amount of time it takes to resolve an address and would like to avoid caching i...

How to configure Vim for C++ development?

I'm learning C++ using Vim as editor on Windows XP, however I found issue that I have list below. I have downloaded and installed c.vim and it essential file, however when I start vim it show message C/C++ template file 'C:\Program Files\Vim\vimfiles\c-support/templates/Templates' does not exist or is not readable, I want to know how t...

Compile my own PHP extension on windows, but got LNK 2005 error

I am using VC 2008 express, and tried to compile my own PHP extension with that. Any idea about the following error? ------ Rebuild All started: Project: xsplit, Configuration: Debug Win32 ------ Deleting intermediate and output files for project 'xsplit', configuration 'Debug|Win32' Compiling... xsplit.cpp c:\x\php-5.3.1\zend\zend_exec...

Which install system to pick when deploying to Windows and Linux?

My company is thinking of dumping InstallShield and move to something else, mainly because of the poor experience it had with it, mostly on Linux. Our product is a C++ application (binaries, shared libraries) targeted at Windows and Linux (Red Hat). The installer itself isn't required to do anything special, just dump some binaries and...

Python2.4 and 2.6 behaves differently for os.path.getmtime() on Windows

Getting two different modification time when calculated from different Python versions on Windows XP. Python2.4 C:\Copy of elisp>c:\python24\python Python 2.4.4 (#71, Oct 18 2006, 08:34:43) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.path.getmtime("aut...

MFC basic structure questions

There are few things I'm not sure of : When you create a basic SDI using MFC app wizard (let's call it TestMfc) you get : 4 major classes : CTestMfcApp CTestMfcView CTestMfcDoc CMainFrame What I noticed is that CTestMfcApp has those declaration ON_COMMAND(ID_APP_ABOUT, &CTestMfcApp::OnAppAbout) // Standard file based document c...

Using Windows Identity Foundation to log someone in to an ASP.net application

My supervisor at the office tells me that he saw a demonstration with a pre-release version of Microsoft "Geneva" (now Windows Identity Foundation) where a developer did the following: He set up some sort of ASP.net web application where a user could log in using a customized log-on system. Behind the scenes, the web application logs ...

Insert progressbar into statusbar panel using powershell and windows forms

I am currently working on a project that requires me to put a progressbar in one of the panels of a statusbar. Does anyone have any experience with this, or can anyone provide any input or direction on how it is done. I have been searching for 2 days now for a solution with no luck. There is still not an abundance of powershell help o...

Windows Impersonation failed

I am using following code to implement impersonation for the particular windows account,which is failing.Please help. using System.Security.Principal; using System.Runtime.InteropServices; public partial class Source_AddNewProduct : System.Web.UI.Page { [DllImport("advapi32.dll", SetLastError = true)] static extern bool LogonUser( ...

How to test if hostname refers to local machine

Can anyone think of an easy way to tell in win32 or .NET if hostname (string) resolves to a local computer? Such as: "myhostname" "myhostname.mydomain.local" "192.168.1.1" "localhost" The goal of this exercise is to produce a test which will tell if Windows security layer will treat access to machine as local or network ...

client-server design

i want to develop a pretty basic client-server program. one software reads xml (or any data) and send it to the server who in turn will manipulate it a little bit and eventually will write it to the disk. the thing is that if i have many xml files on disk (on my client side), i want to open multiple connection to the server , and not d...

Proper way to set PHP include path for *Nix and Windows

Is this the proper way to define an include path for both *nix and Windows? define( 'INCPATH', realpath( dirname( __FILE__ ) ) . '/' ); Note the trailing forward-slash I included above. Is the forward-slash for includes/requires the same for both OS's, as well? EDIT (UPDATED WITH ANSWER): From what I can gather, my code below is the...

Windows Server cannot execute a py2exe-generated app

A simple python script needs to run on a windows server with no python installed. I used py2exe, which generated a healthy dist subdirectory, with script.exe that runs fine on the local machine. However, when I run it on the server (Windows Server 2003 R2), it produces this: The system cannot execute the specified program. and ERRORL...

the easiest way to upload updated data to the server

I work on Windows app and every week I want to upload the new data (rows) to the server and i want to upload the new db from asp.net web page and i'm using sqlserver2005 for our co branches or from my local server. What is the best way to do so upload complete db mdf and delete the old one ! Do I update only the new rows and how can I...

How can I determine the space/size of my drive programatically? Both in LInux and on Windows.

That is : How can I check the drive size which is not formatted... Don't consider the formatted drives...just unformatted drive. ...

How to find which programme is using port 80 in windows?

I can't find it ...

DirectShow analog for Symbian OS?

So Windows Mobile has its DirectShow for media editing capturing and so what is its analog for Symbian OS (s60 v5)? ...