windows-7

Receive GET request through sockets

淺唱寂寞╮ 提交于 2019-12-25 14:42:09
问题 How can I receive GET request through sockets? For example I am writing in browser: 127.0.0.1:41233/?data=mymessage and I want my application to receive "mymessage". I wrote this piece of code but recv() returns WSAENOTCONN error and I don't know how to fix it. int main() { WSADATA socketData; SOCKET portListener; struct sockaddr_in saInfo = {0}; if ( WSAStartup( MAKEWORD(1, 1), &socketData ) != 0) { printf( "WSAStartup() error!" ); return 0; } portListener = socket( AF_INET, SOCK_STREAM, 0 )

dos boot before win7 boot

可紊 提交于 2019-12-25 12:45:45
问题 I've got a question for dos & win7 boot process. Is it possible that dos boot and execute some dos-app before win7 boot without reboot? I mean boot process like win95 or win3.1. I'll explain more detail. dos boot -> execute some dos app -> cleanup memory -> load win7 volume boot record into memory 7c00 -> win7 boot without reboot Is this possible? 回答1: The scenario you have described is basically a warm reboot, interrupt 0x19 behaves almost like that, with the exception that it always loads

Visual Studio 2010: When creating new project vs2010 wants to open html file of wizard

房东的猫 提交于 2019-12-25 09:42:32
问题 As title says when I'm creating new project in vs2010 it wants to open wizard html in browser. The file it wants to open: file:///C:/Program Files/Microsoft Visual Studio 10.0/VC/VCWizards/AppWiz/Generic/Application/html/1033/default.htm So in the end I can't create project. Any ideas what can be wrong? I'm using Windows 7 64bit. I tried uninstalling Internet Explorer but it didn't solve my problem. I'll explain how it works now: I click File -> New -> Project... I choose win32 console app,

vbscript - Bring Internet Explorer Application window to front

浪尽此生 提交于 2019-12-25 09:10:14
问题 I have a script where I create an IE window through CreateObject("InternetExplorer.Application") . The problem is, whenever I run this script, it always opens behind whatever else might already be open on my machine. I want this IE window to open on TOP of everything else. It does not have to be "always on top", like the option in Task Manager, but it should at least initially open on top. After that, I don't care what happens. I have searched high and low and have been unable to find a way

Problem migrating ConnectNamedPipe() from XP to Win 7

▼魔方 西西 提交于 2019-12-25 08:38:04
问题 We developed an XP application that uses ConnectNamedPipe() in blocking mode. When testing on Win 7, the application behaves as if it is unblocked: ConnectNamedPipe() returns before its VBS client connects. An exception is raised ("Waiting for a process to open the other end of pipe") when calling StreamReader.ReadLine(). When running with the debugger, this does not occur even in Win 7! These are the functions that we are using: [ DllImport("kernel32.dll", SetLastError = true)] public static

MFC chtmlview Windows 7 issue

谁说胖子不能爱 提交于 2019-12-25 07:49:33
问题 I am working on an old MFC project. Users are using Windows 7 they are expierincing the following problem which does not occur on Windows XP: The MFC application hosts a CHtmlView which presents a custom HTML site located as a file on the disk. This html document heavily uses Javascript. Wenn you start the program and the CHtmlView control is displayed, in some cases - for example after a fresh reboot - the HTML file is not properly displayed. Refreshing the site using F5 or minimizing the

Programmatically I need to disconnect my internet connection using C#?

泪湿孤枕 提交于 2019-12-25 07:37:34
问题 I'm using my broadband internet through Wan Miniport (PPPOE) connection and I've Windows 7 as my OS. I would like to disconnect the internet connection through C#. I searched a lot over the internet but I'm not sure which methodology (WMI, WinInet etc) suits my connection. I will be reconnecting through another software later, hence my requirement is just to disconnect from the internet rather totally disabling it permanently. Kindly please give some solution & code to implement this. ? 回答1:

Python IDLE script does not show output of subprocess but cmd.exe does

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 07:01:28
问题 I'm using Python 2.7.6 and IDLE on Windows 7. I have 2 Python scripts: script.py: import subprocess, os, sys print("hello 1") mypath = os.path.abspath(__file__) mydir = os.path.dirname(mypath) start = os.path.join(mydir, "script2.py") subprocess.call([sys.executable, start, "param"]) print("bye 1") and script2.py that is being called by the previous script: import sys print "hello 2" print (sys.argv[1]) print "bye 2" If I run script.py with cmd.exe shell I get the expected result: C:\tests

IIS 7.5 Detailed Error 500.0 - Internal Server Error occurred after enabling ServersideInclude with Windows 7 IIS 8 Express

ε祈祈猫儿з 提交于 2019-12-25 06:59:03
问题 I have ServerSideIncludeModule enabled using "Turn on/off Windows Features" Control Panel. On inetmgr's Handlers-Mapping suite, I have mapped it to handle my .html extension. However after everything has been done and I tried to browse my Default.html (which has <!--#include virtual="includes/NavBand.html"--> ) it gave me the above 500.0 - Internal Server Error on this url http://localhost/myDir/Default.html !! If I removed my mapping, my default page works again of course without the include

Bitmap with alpha channel crashes Bitmap () constructor only under Windows 7

人走茶凉 提交于 2019-12-25 06:50:19
问题 Ran into a weird Bitmap problem that I can't find in Google: The Bitmap constructor crashes on a file with an alpha channel under Windows 7, but works perfectly under Windows XP. The code couldn't be simpler: Bitmap image = new Bitmap (fname); The error is: "Parameter is not valid", and there's no inner exception. If it failed in Windows XP too, I'd suspect a simple bug, but since it works there it implies it's something more complex. Any ideas how a bitmap with an alpha channel can be loaded